[Intel-wired-lan] [next PATCH S26 04/12] i40e: do TSO only if CHECKSUM_PARTIAL is set
Deepthi Kavalur
deepthi.kavalur at intel.com
Mon Jan 4 18:33:04 UTC 2016
From: Shannon Nelson <shannon.nelson at intel.com>
Don't bother trying to set up a TSO if the skb->ip_summed is not
set to CHECKSUM_PARTIAL.
Signed-off-by: Shannon Nelson <shannon.nelson at intel.com>
Change-ID: I6495b3568e404907a2965b48cf3e2effa7c9ab55
---
Testing-Hints:
I'm sure there's a better test available, but I found this by
inspection and then adding a debug printk to see what was happening.
For now, just verify that the code is inserted and compiles.
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +++
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 7d81c1f..6537598 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2213,6 +2213,9 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
u32 l4len;
int err;
+ if (skb->ip_summed != CHECKSUM_PARTIAL)
+ return 0;
+
if (!skb_is_gso(skb))
return 0;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index a1d907c..c21fcee 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1470,6 +1470,9 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
u32 l4len;
int err;
+ if (skb->ip_summed != CHECKSUM_PARTIAL)
+ return 0;
+
if (!skb_is_gso(skb))
return 0;
--
2.1.0
More information about the Intel-wired-lan
mailing list