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

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

net: dont update dev->trans_start in 10GB drivers



Followup of commits 9d21493b
and 08baf561
(net: tx scalability works : trans_start)
(net: txq_trans_update() helper)

Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Multi queue drivers can
avoid one cache miss (on dev->trans_start) in their start_xmit()
handler.

Exceptions are NETIF_F_LLTX drivers (vxge & tehuti)

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f1f39c4
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -478,8 +478,6 @@ static int be_xmit(struct sk_buff *skb, struct net_device *netdev)

	be_txq_notify(&adapter->ctrl, txq->id, wrb_cnt);

	netdev->trans_start = jiffies;

	be_tx_stats_update(adapter, wrb_cnt, copied, stopped);
	return NETDEV_TX_OK;
}
+0 −1
Original line number Diff line number Diff line
@@ -10617,7 +10617,6 @@ static int bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
	mmiowb();

	fp->tx_bd_prod += nbd;
	dev->trans_start = jiffies;

	if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
		/* We want bnx2x_tx_int to "see" the updated tx_bd_prod
+0 −1
Original line number Diff line number Diff line
@@ -1879,7 +1879,6 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
		cpl->vlan_valid = 0;

send:
	dev->trans_start = jiffies;
	ret = t1_sge_tx(skb, adapter, 0, dev);

	/* If transmit busy, and we reallocated skb's due to headroom limit,
+0 −1
Original line number Diff line number Diff line
@@ -1286,7 +1286,6 @@ int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
	if (vlan_tx_tag_present(skb) && pi->vlan_grp)
		qs->port_stats[SGE_PSTAT_VLANINS]++;

	dev->trans_start = jiffies;
	spin_unlock(&q->lock);

	/*
+0 −2
Original line number Diff line number Diff line
@@ -661,8 +661,6 @@ static int enic_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
	if (vnic_wq_desc_avail(wq) < MAX_SKB_FRAGS + 1)
		netif_stop_queue(netdev);

	netdev->trans_start = jiffies;

	spin_unlock_irqrestore(&enic->wq_lock[0], flags);

	return NETDEV_TX_OK;
Loading