forked from luck/tmp_suning_uos_patched
drivers: net: sfc: use netdev_xmit_more helper
skb->xmit_more hint is now always 0, this switches the sfc driver to use the netdev_xmit_more helper instead. Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com> Cc: Edward Cree <ecree@solarflare.com> Cc: Bert Kenward <bkenward@solarflare.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3c31ff22b2
commit
f79c957a0b
|
@ -321,7 +321,7 @@ netdev_tx_t ef4_enqueue_skb(struct ef4_tx_queue *tx_queue, struct sk_buff *skb)
|
|||
netdev_tx_sent_queue(tx_queue->core_txq, skb_len);
|
||||
|
||||
/* Pass off to hardware */
|
||||
if (!skb->xmit_more || netif_xmit_stopped(tx_queue->core_txq)) {
|
||||
if (!netdev_xmit_more() || netif_xmit_stopped(tx_queue->core_txq)) {
|
||||
struct ef4_tx_queue *txq2 = ef4_tx_queue_partner(tx_queue);
|
||||
|
||||
/* There could be packets left on the partner queue if those
|
||||
|
@ -333,7 +333,7 @@ netdev_tx_t ef4_enqueue_skb(struct ef4_tx_queue *tx_queue, struct sk_buff *skb)
|
|||
|
||||
ef4_nic_push_buffers(tx_queue);
|
||||
} else {
|
||||
tx_queue->xmit_more_available = skb->xmit_more;
|
||||
tx_queue->xmit_more_available = netdev_xmit_more();
|
||||
}
|
||||
|
||||
tx_queue->tx_packets++;
|
||||
|
|
|
@ -478,8 +478,6 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
|
|||
next = skb->next;
|
||||
skb->next = NULL;
|
||||
|
||||
if (next)
|
||||
skb->xmit_more = true;
|
||||
efx_enqueue_skb(tx_queue, skb);
|
||||
skb = next;
|
||||
}
|
||||
|
@ -506,7 +504,7 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
|
|||
netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
|
||||
{
|
||||
unsigned int old_insert_count = tx_queue->insert_count;
|
||||
bool xmit_more = skb->xmit_more;
|
||||
bool xmit_more = netdev_xmit_more();
|
||||
bool data_mapped = false;
|
||||
unsigned int segments;
|
||||
unsigned int skb_len;
|
||||
|
@ -533,7 +531,7 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
|
|||
if (rc)
|
||||
goto err;
|
||||
#ifdef EFX_USE_PIO
|
||||
} else if (skb_len <= efx_piobuf_size && !skb->xmit_more &&
|
||||
} else if (skb_len <= efx_piobuf_size && !xmit_more &&
|
||||
efx_nic_may_tx_pio(tx_queue)) {
|
||||
/* Use PIO for short packets with an empty queue. */
|
||||
if (efx_enqueue_skb_pio(tx_queue, skb))
|
||||
|
@ -559,8 +557,8 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
|
|||
if (__netdev_tx_sent_queue(tx_queue->core_txq, skb_len, xmit_more)) {
|
||||
struct efx_tx_queue *txq2 = efx_tx_queue_partner(tx_queue);
|
||||
|
||||
/* There could be packets left on the partner queue if those
|
||||
* SKBs had skb->xmit_more set. If we do not push those they
|
||||
/* There could be packets left on the partner queue if
|
||||
* xmit_more was set. If we do not push those they
|
||||
* could be left for a long time and cause a netdev watchdog.
|
||||
*/
|
||||
if (txq2->xmit_more_available)
|
||||
|
@ -568,7 +566,7 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
|
|||
|
||||
efx_nic_push_buffers(tx_queue);
|
||||
} else {
|
||||
tx_queue->xmit_more_available = skb->xmit_more;
|
||||
tx_queue->xmit_more_available = xmit_more;
|
||||
}
|
||||
|
||||
if (segments) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user