aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-02-06 22:13:05 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-10 20:14:12 -0500
commit1594712f9e5426bfb96b96404cf3726a7b348db7 (patch)
tree3fdd4eb4d96118f35fe33dffc491fe1a18fe1fca
parent3955b22b9798ae8694ac053614694695991f0a91 (diff)
ixgbe: fix gso type
ixgbe set gso_size but not gso_type. This leads to crashes in macvtap. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 20a5af6d87d0..e1b2d22a2850 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1401,6 +1401,10 @@ 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))
1405 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
1406 else
1407 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
1404} 1408}
1405 1409
1406static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring, 1410static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring,
@@ -1435,6 +1439,8 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1435{ 1439{
1436 struct net_device *dev = rx_ring->netdev; 1440 struct net_device *dev = rx_ring->netdev;
1437 1441
1442 skb->protocol = eth_type_trans(skb, dev);
1443
1438 ixgbe_update_rsc_stats(rx_ring, skb); 1444 ixgbe_update_rsc_stats(rx_ring, skb);
1439 1445
1440 ixgbe_rx_hash(rx_ring, rx_desc, skb); 1446 ixgbe_rx_hash(rx_ring, rx_desc, skb);
@@ -1450,8 +1456,6 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1450 } 1456 }
1451 1457
1452 skb_record_rx_queue(skb, rx_ring->queue_index); 1458 skb_record_rx_queue(skb, rx_ring->queue_index);
1453
1454 skb->protocol = eth_type_trans(skb, dev);
1455} 1459}
1456 1460
1457static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector, 1461static void ixgbe_rx_skb(struct ixgbe_q_vector *q_vector,