提交 127aa0e1 编写于 作者: E Eric Dumazet 提交者: David S. Miller

drivers: net: last_rx elimination

Network drivers do not have to update last_rx, unless they need it for
their private use.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 acbbc071
...@@ -344,7 +344,6 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget) ...@@ -344,7 +344,6 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
skb->protocol = eth_type_trans(skb, dev); skb->protocol = eth_type_trans(skb, dev);
priv->stats.rx_packets++; priv->stats.rx_packets++;
priv->stats.rx_bytes += len; priv->stats.rx_bytes += len;
dev->last_rx = jiffies;
netif_receive_skb(skb); netif_receive_skb(skb);
} while (--budget > 0); } while (--budget > 0);
......
...@@ -661,7 +661,6 @@ static int at91_poll_err(struct net_device *dev, int quota, u32 reg_sr) ...@@ -661,7 +661,6 @@ static int at91_poll_err(struct net_device *dev, int quota, u32 reg_sr)
at91_poll_err_frame(dev, cf, reg_sr); at91_poll_err_frame(dev, cf, reg_sr);
netif_receive_skb(skb); netif_receive_skb(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++; dev->stats.rx_packets++;
dev->stats.rx_bytes += cf->can_dlc; dev->stats.rx_bytes += cf->can_dlc;
...@@ -898,7 +897,6 @@ static void at91_irq_err(struct net_device *dev) ...@@ -898,7 +897,6 @@ static void at91_irq_err(struct net_device *dev)
at91_irq_err_state(dev, cf, new_state); at91_irq_err_state(dev, cf, new_state);
netif_rx(skb); netif_rx(skb);
dev->last_rx = jiffies;
dev->stats.rx_packets++; dev->stats.rx_packets++;
dev->stats.rx_bytes += cf->can_dlc; dev->stats.rx_bytes += cf->can_dlc;
......
...@@ -611,7 +611,6 @@ static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector, ...@@ -611,7 +611,6 @@ static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
skb->protocol = eth_type_trans(skb, adapter->netdev); skb->protocol = eth_type_trans(skb, adapter->netdev);
ixgbevf_receive_skb(q_vector, skb, staterr, rx_ring, rx_desc); ixgbevf_receive_skb(q_vector, skb, staterr, rx_ring, rx_desc);
adapter->netdev->last_rx = jiffies;
next_desc: next_desc:
rx_desc->wb.upper.status_error = 0; rx_desc->wb.upper.status_error = 0;
......
...@@ -5054,8 +5054,6 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw, ...@@ -5054,8 +5054,6 @@ static inline int rx_proc(struct net_device *dev, struct ksz_hw* hw,
priv->stats.rx_bytes += packet_len; priv->stats.rx_bytes += packet_len;
/* Notify upper layer for received packet. */ /* Notify upper layer for received packet. */
dev->last_rx = jiffies;
rx_status = netif_rx(skb); rx_status = netif_rx(skb);
return 0; return 0;
......
...@@ -317,7 +317,6 @@ static int octeon_mgmt_receive_one(struct octeon_mgmt *p) ...@@ -317,7 +317,6 @@ static int octeon_mgmt_receive_one(struct octeon_mgmt *p)
skb->protocol = eth_type_trans(skb, netdev); skb->protocol = eth_type_trans(skb, netdev);
netdev->stats.rx_packets++; netdev->stats.rx_packets++;
netdev->stats.rx_bytes += skb->len; netdev->stats.rx_bytes += skb->len;
netdev->last_rx = jiffies;
netif_receive_skb(skb); netif_receive_skb(skb);
rc = 0; rc = 0;
} else if (re.s.code == RING_ENTRY_CODE_MORE) { } else if (re.s.code == RING_ENTRY_CODE_MORE) {
......
...@@ -1280,7 +1280,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit) ...@@ -1280,7 +1280,6 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit)
priv->dev->stats.rx_packets++; priv->dev->stats.rx_packets++;
priv->dev->stats.rx_bytes += frame_len; priv->dev->stats.rx_bytes += frame_len;
priv->dev->last_rx = jiffies;
} }
entry = next_entry; entry = next_entry;
p = p_next; /* use prefetched values */ p = p_next; /* use prefetched values */
......
...@@ -1174,7 +1174,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, ...@@ -1174,7 +1174,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
netif_receive_skb(skb); netif_receive_skb(skb);
} }
adapter->netdev->last_rx = jiffies;
ctx->skb = NULL; ctx->skb = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册