aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2013-02-12 04:45:44 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-12 16:07:19 -0500
commit96be80abaf95d01aa623246048b422cbcb6b8baf (patch)
treed1049ce4f280aa7dc04fb98880d60ea5dd3123c9
parent77c1090f94d1b0b5186fb13a1b71b47b1343f87f (diff)
ixgbe: Only set gso_type to SKB_GSO_TCPV4 as RSC does not support IPv6
The original fix that was applied for setting gso_type required more change than necessary because it was assumed ixgbe does RSC on IPv6 frames and this is not correct. RSC is only supported with IPv4/TCP frames only. As such we can simplify the fix and avoid the unnecessary move of eth_type_trans. The previous patch "ixgbe: fix gso type" and this patch reduce the entire fix to one line that sets gso_type to TCPV4 if the frame is RSC. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e1b2d22a2850..b3e3294cfe53 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1401,10 +1401,7 @@ static void ixgbe_set_rsc_gso_size(struct ixgbe_ring *ring,
1401 /* set gso_size to avoid messing up TCP MSS */ 1401 /* set gso_size to avoid messing up TCP MSS */
1402 skb_shinfo(skb)->gso_size = DIV_ROUND_UP((skb->len - hdr_len), 1402 skb_shinfo(skb)->gso_size = DIV_ROUND_UP((skb->len - hdr_len),
1403 IXGBE_CB(skb)->append_cnt); 1403 IXGBE_CB(skb)->append_cnt);
1404 if (skb->protocol == __constant_htons(ETH_P_IPV6)) 1404 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
1405 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
1406 else
1407 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
1408} 1405}
1409 1406
1410static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring, 1407static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring,
@@ -1439,8 +1436,6 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1439{ 1436{
1440 struct net_device *dev = rx_ring->netdev; 1437 struct net_device *dev = rx_ring->netdev;
1441 1438
1442 skb->protocol = eth_type_trans(skb, dev);
1443
1444 ixgbe_update_rsc_stats(rx_ring, skb); 1439 ixgbe_update_rsc_stats(rx_ring, skb);
1445 1440
1446 ixgbe_rx_hash(rx_ring, rx_desc, skb); 1441 ixgbe_rx_hash(rx_ring, rx_desc, skb);
@@ -1456,6 +1451,8 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1456 } 1451 }
1457 1452
1458 skb_record_rx_queue(skb, rx_ring->queue_index); 1453 skb_record_rx_queue(skb, rx_ring->queue_index);
1454
1455 skb->protocol = eth_type_trans(skb, dev);
1459} 1456}
1460 1457
1461static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector, 1458static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,