Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170418
b: refs/heads/master
c: 0835acf
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 5, 2009
1 parent 8e3c034 commit d6dd577
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: b3a5b6cc7cab89dcc3301add750f88019d910a2b
refs/heads/master: 0835acfe72e43b2f9bd46ec8c0d219e94c3525e0
11 changes: 7 additions & 4 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3441,12 +3441,14 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
txq = netdev_get_tx_queue(odev, queue_map);

__netif_tx_lock_bh(txq);
atomic_inc(&(pkt_dev->skb->users));

if (unlikely(netif_tx_queue_stopped(txq) || netif_tx_queue_frozen(txq)))
if (unlikely(netif_tx_queue_stopped(txq) || netif_tx_queue_frozen(txq))) {
ret = NETDEV_TX_BUSY;
else
ret = (*xmit)(pkt_dev->skb, odev);
pkt_dev->last_ok = 0;
goto unlock;
}
atomic_inc(&(pkt_dev->skb->users));
ret = (*xmit)(pkt_dev->skb, odev);

switch (ret) {
case NETDEV_TX_OK:
Expand All @@ -3468,6 +3470,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
atomic_dec(&(pkt_dev->skb->users));
pkt_dev->last_ok = 0;
}
unlock:
__netif_tx_unlock_bh(txq);

/* If pkt_dev->count is zero, then run forever */
Expand Down

0 comments on commit d6dd577

Please sign in to comment.