net: trans_start cleanups
Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
2b0b05ddc0
commit
1ae5dc342a
@ -523,8 +523,8 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
|
||||
|
||||
/* Transmitter timeout, serious problems. */
|
||||
if (netif_queue_stopped(dev)) {
|
||||
int tickssofar = jiffies - dev->trans_start;
|
||||
if (tickssofar < 20)
|
||||
int tickssofar = jiffies - dev_trans_start(dev);
|
||||
if (tickssofar < HZ/5)
|
||||
return NETDEV_TX_BUSY;
|
||||
|
||||
DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n",
|
||||
@ -559,7 +559,6 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
|
||||
REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT;
|
||||
|
||||
netif_start_queue(dev);
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
@ -637,8 +636,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
|
||||
AREG = CSR0;
|
||||
DPRINTK( 2, ( "%s: lance_start_xmit() exiting, csr0 %4.4x.\n",
|
||||
dev->name, DREG ));
|
||||
dev->trans_start = jiffies;
|
||||
dev_kfree_skb( skb );
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
lp->lock = 0;
|
||||
if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) ==
|
||||
|
Reference in New Issue
Block a user