diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-10-16 01:06:24 -0500 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-10-16 01:06:24 -0500 |
| commit | 83fd84ce1e12e3e2770a68047fc4bc95657a6dc9 (patch) | |
| tree | a4048a116cc50bd57993ddb8cbbf479189e39384 /include | |
| parent | 5a7728c6d3eb83df9d120944cca4cf476dd326a1 (diff) | |
ISDN: new xmit handling for ISDN net interfaces
Instead of using locking per-channel, just lock the entire ISDN net work
interface as an entity, getting rid of weird locking.
Basically, ::hard_start_xmit() is already serialized by the network core,
so we could just rely on that. However, we want to send keep alive
frames, PPP messages from ipppd and such things directly without going
through the network stack, so we additionally lock
isdn_net_local->xmit_lock in hard_start_xmit(), which is taken in
the other paths dealing with transmitting frames as well.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/isdn.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 8203314e2cb7..6266234c3644 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -338,10 +338,18 @@ typedef struct isdn_net_local_s { /* phone[0] = Incoming Numbers */ /* phone[1] = Outgoing Numbers */ - struct list_head slaves; /* list of all bundled channels */ - struct list_head online; /* list of all bundled channels, - which are currently online */ - spinlock_t online_lock; /* lock to protect online list */ + struct list_head slaves; /* list of all bundled channels + protected by serializing config + ioctls / no change allowed when + interface is running */ + struct list_head online; /* circular list of all bundled + channels, which are currently + online + protected by xmit_lock */ + + spinlock_t xmit_lock; /* used to protect the xmit path of + a net_device, including all + associated channels's frame_cnt */ struct list_head running_devs; /* member of global running_devs */ atomic_t refcnt; /* references held by ISDN code */ @@ -393,12 +401,9 @@ typedef struct isdn_net_dev_s { int pppbind; /* ippp device for bindings */ int ppp_slot; /* PPPD device slot number */ - spinlock_t xmit_lock; /* used to protect the xmit path of */ - /* a particular channel (including */ - /* the frame_cnt */ struct sk_buff_head super_tx_queue; /* List of supervisory frames to */ /* be transmitted asap */ - atomic_t frame_cnt; /* number of frames currently */ + int frame_cnt; /* number of frames currently */ /* queued in HL driver */ struct tasklet_struct tlet; |
