Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdd0db05 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: dont update dev->trans_start



Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round)

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28679751
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2573,7 +2573,6 @@ static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev)
			netif_wake_queue(dev);
	}

	dev->trans_start = jiffies;
	return NETDEV_TX_OK;

overflow:
+0 −1
Original line number Diff line number Diff line
@@ -2113,7 +2113,6 @@ static int atl1c_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
	atl1c_tx_map(adapter, skb, tpd, type);
	atl1c_tx_queue(adapter, skb, tpd, type);

	netdev->trans_start = jiffies;
	spin_unlock_irqrestore(&adapter->tx_lock, flags);
	return NETDEV_TX_OK;
}
+1 −1
Original line number Diff line number Diff line
@@ -1893,7 +1893,7 @@ static int atl1e_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
	atl1e_tx_map(adapter, skb, tpd);
	atl1e_tx_queue(adapter, tpd_req, tpd);

	netdev->trans_start = jiffies;
	netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
	spin_unlock_irqrestore(&adapter->tx_lock, flags);
	return NETDEV_TX_OK;
}
+0 −1
Original line number Diff line number Diff line
@@ -2431,7 +2431,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
	atl1_tx_queue(adapter, count, ptpd);
	atl1_update_mailbox(adapter);
	mmiowb();
	netdev->trans_start = jiffies;
	return NETDEV_TX_OK;
}

+0 −1
Original line number Diff line number Diff line
@@ -6211,7 +6211,6 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
	mmiowb();

	txr->tx_prod = prod;
	dev->trans_start = jiffies;

	if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) {
		netif_tx_stop_queue(txq);
Loading