netdev
[Top] [All Lists]

lapb module irq context problems

To: netdev@xxxxxxxxxxx
Subject: lapb module irq context problems
From: Henner Eisen <eis@xxxxxxxxxxxxx>
Date: Wed, 20 Dec 2000 00:32:35 +0100
Sender: owner-netdev@xxxxxxxxxxx
Hi,

some lapb network device drivers might currently call the interface
routines to tha lapb protocol engine (in particular lapb_data_received())
from hardware irq. That causes problems with 2.4.0 softnet when
sk_buff's are kfree'd.

There three options to fix this:

1) replace all kfree_skb() by kfree_skb_any() (patch, already available)
2) change all affected drivers question to defer skb processing to
   a buttom handler/softirq.
3) provide an additional interface `lapb_data_received_irq()', which
   just queues the incoming frame and defers execution of
   `lapb_data_received()' to a buttom handler/softirq.

I think 2 or 3 will be the better solution because processing the lapb
protocol entirly from hardware irq is not something the 2.4 networking
core / softnet is designed for. However they are more difficult to
implement. 3) only requries to implement it once and all drivers can be
fixed easily after this. Thus, I'd prefer 3).

With 3, there are two options
a) the lapb module mantains an own backlog queue and schedules a tasklet
   that dequeues and processess the incoming frame.
b) the lapb module creates a `pseudo' network interface and a packet handler,
   incoming frames are queued to the standard network interface backlog
   queue by means of netif_rx() and the packet handler basically calls
   lapb_data_received().

I'd prefer b), or are there any reasons to favor another approach?

Henner

<Prev in Thread] Current Thread [Next in Thread>