Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66601
b: refs/heads/master
c: 22dd749
h: refs/heads/master
i:
  66599: e64c3ed
v: v3
  • Loading branch information
Jamal Hadi Salim authored and David S. Miller committed Oct 10, 2007
1 parent 4d7b694 commit d98337c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4885a50476b95fa0f4caad179a80783508c2fe86
refs/heads/master: 22dd74950172dc8979576e2bef3b439f20ef0b05
21 changes: 19 additions & 2 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1265,10 +1265,15 @@ static inline void netif_rx_complete(struct net_device *dev,
*
* Get network device transmit lock
*/
static inline void netif_tx_lock(struct net_device *dev)
static inline void __netif_tx_lock(struct net_device *dev, int cpu)
{
spin_lock(&dev->_xmit_lock);
dev->xmit_lock_owner = smp_processor_id();
dev->xmit_lock_owner = cpu;
}

static inline void netif_tx_lock(struct net_device *dev)
{
__netif_tx_lock(dev, smp_processor_id());
}

static inline void netif_tx_lock_bh(struct net_device *dev)
Expand Down Expand Up @@ -1297,6 +1302,18 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
spin_unlock_bh(&dev->_xmit_lock);
}

#define HARD_TX_LOCK(dev, cpu) { \
if ((dev->features & NETIF_F_LLTX) == 0) { \
__netif_tx_lock(dev, cpu); \
} \
}

#define HARD_TX_UNLOCK(dev) { \
if ((dev->features & NETIF_F_LLTX) == 0) { \
netif_tx_unlock(dev); \
} \
}

static inline void netif_tx_disable(struct net_device *dev)
{
netif_tx_lock_bh(dev);
Expand Down
12 changes: 0 additions & 12 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,18 +1574,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
return 0;
}

#define HARD_TX_LOCK(dev, cpu) { \
if ((dev->features & NETIF_F_LLTX) == 0) { \
netif_tx_lock(dev); \
} \
}

#define HARD_TX_UNLOCK(dev) { \
if ((dev->features & NETIF_F_LLTX) == 0) { \
netif_tx_unlock(dev); \
} \
}

/**
* dev_queue_xmit - transmit a buffer
* @skb: buffer to transmit
Expand Down

0 comments on commit d98337c

Please sign in to comment.