tg3: Add skb->xmit_more support
Ring TX doorbell only if xmit_more is not set or the queue is stopped. Suggested-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Prashant Sreedharan <prashant@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f76936d07c
commit
2c7c9ea429
|
@ -8099,9 +8099,6 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
/* Sync BD data before updating mailbox */
|
/* Sync BD data before updating mailbox */
|
||||||
wmb();
|
wmb();
|
||||||
|
|
||||||
/* Packets are ready, update Tx producer idx local and on card. */
|
|
||||||
tw32_tx_mbox(tnapi->prodmbox, entry);
|
|
||||||
|
|
||||||
tnapi->tx_prod = entry;
|
tnapi->tx_prod = entry;
|
||||||
if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
|
if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
|
||||||
netif_tx_stop_queue(txq);
|
netif_tx_stop_queue(txq);
|
||||||
|
@ -8116,7 +8113,12 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
netif_tx_wake_queue(txq);
|
netif_tx_wake_queue(txq);
|
||||||
}
|
}
|
||||||
|
|
||||||
mmiowb();
|
if (!skb->xmit_more || netif_xmit_stopped(txq)) {
|
||||||
|
/* Packets are ready, update Tx producer idx on card. */
|
||||||
|
tw32_tx_mbox(tnapi->prodmbox, entry);
|
||||||
|
mmiowb();
|
||||||
|
}
|
||||||
|
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
|
||||||
dma_error:
|
dma_error:
|
||||||
|
|
Loading…
Reference in New Issue