提交 182ff8df 编写于 作者: A Alexander Duyck 提交者: David S. Miller

igb/ixgbe: remove unecessary checks for CHECKSUM_UNNECESSARY

Both of these drivers do a check to verify ip_summed is set to
CHECKSUM_UNNECESSARY prior to passing the packet to GRO.  GRO itself
already does such a check so it is redundant and can be removed as this
will likely cause out of order issues when receiving a packet that didn't
pass checksum validation.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2844f797
...@@ -4430,20 +4430,12 @@ static void igb_receive_skb(struct igb_ring *ring, u8 status, ...@@ -4430,20 +4430,12 @@ static void igb_receive_skb(struct igb_ring *ring, u8 status,
bool vlan_extracted = (adapter->vlgrp && (status & E1000_RXD_STAT_VP)); bool vlan_extracted = (adapter->vlgrp && (status & E1000_RXD_STAT_VP));
skb_record_rx_queue(skb, ring->queue_index); skb_record_rx_queue(skb, ring->queue_index);
if (skb->ip_summed == CHECKSUM_UNNECESSARY) { if (vlan_extracted)
if (vlan_extracted) vlan_gro_receive(&ring->napi, adapter->vlgrp,
vlan_gro_receive(&ring->napi, adapter->vlgrp, le16_to_cpu(rx_desc->wb.upper.vlan),
le16_to_cpu(rx_desc->wb.upper.vlan), skb);
skb); else
else napi_gro_receive(&ring->napi, skb);
napi_gro_receive(&ring->napi, skb);
} else {
if (vlan_extracted)
vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
le16_to_cpu(rx_desc->wb.upper.vlan));
else
netif_receive_skb(skb);
}
} }
static inline void igb_rx_checksum_adv(struct igb_adapter *adapter, static inline void igb_rx_checksum_adv(struct igb_adapter *adapter,
......
...@@ -459,23 +459,16 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector, ...@@ -459,23 +459,16 @@ static void ixgbe_receive_skb(struct ixgbe_q_vector *q_vector,
u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan); u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
skb_record_rx_queue(skb, q_vector - &adapter->q_vector[0]); skb_record_rx_queue(skb, q_vector - &adapter->q_vector[0]);
if (skb->ip_summed == CHECKSUM_UNNECESSARY) { if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) {
if (adapter->vlgrp && is_vlan && (tag != 0)) if (adapter->vlgrp && is_vlan && (tag != 0))
vlan_gro_receive(napi, adapter->vlgrp, tag, skb); vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
else else
napi_gro_receive(napi, skb); napi_gro_receive(napi, skb);
} else { } else {
if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) { if (adapter->vlgrp && is_vlan && (tag != 0))
if (adapter->vlgrp && is_vlan && (tag != 0)) vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
vlan_hwaccel_receive_skb(skb, adapter->vlgrp, tag); else
else netif_rx(skb);
netif_receive_skb(skb);
} else {
if (adapter->vlgrp && is_vlan && (tag != 0))
vlan_hwaccel_rx(skb, adapter->vlgrp, tag);
else
netif_rx(skb);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册