aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2008-08-26 07:26:56 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 10:03:32 -0400
commit712744bebef1e47623244004a2770d0438b5b3f7 (patch)
tree518486567505a1978d36b78354fdbd6675c8d424 /drivers/net/ixgbe/ixgbe_main.c
parentfa928c0caa9cb1ebc2fb6717b2f7bb73dd4f487c (diff)
ixgbe: fix rx csum return status misinterpretation
the driver was misinterpreting rx_csum return value in the descriptor so occassionally we would indicate an rx_csum error in our stats when there was none. This would have no effect on traffic because we would just hand the packet to the stack anyway without the offload flag set, but would increase CPU for those packets that needed a recompute. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 53f41b649f03..b14192f369db 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -420,14 +420,12 @@ static void ixgbe_receive_skb(struct ixgbe_adapter *adapter,
420 * @skb: skb currently being received and modified 420 * @skb: skb currently being received and modified
421 **/ 421 **/
422static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter, 422static inline void ixgbe_rx_checksum(struct ixgbe_adapter *adapter,
423 u32 status_err, 423 u32 status_err, struct sk_buff *skb)
424 struct sk_buff *skb)
425{ 424{
426 skb->ip_summed = CHECKSUM_NONE; 425 skb->ip_summed = CHECKSUM_NONE;
427 426
428 /* Ignore Checksum bit is set, or rx csum disabled */ 427 /* Rx csum disabled */
429 if ((status_err & IXGBE_RXD_STAT_IXSM) || 428 if (!(adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED))
430 !(adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED))
431 return; 429 return;
432 430
433 /* if IP and error */ 431 /* if IP and error */