aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-08-30 03:51:17 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-01 17:49:33 -0400
commitde6be6c1f77798c4da38301693d33aff1cd76e84 (patch)
treef00cedd75ddae577847cd334f099f3560fb5cced /drivers/net/sky2.c
parent750e9fad8c7f44e0005ffb7195f72dd76978c2cf (diff)
sky2: don't do GRO on second port
There's something very important I forgot to tell you. What? Don't cross the GRO streams. Why? It would be bad. I'm fuzzy on the whole good/bad thing. What do you mean, "bad"? Try to imagine all the Internet as you know it stopping instantaneously and every bit in every packet swapping at the speed of light. Total packet reordering. Right. That's bad. Okay. All right. Important safety tip. Thanks, Hubert The simplest way to stop this is just avoid doing GRO on the second port. Very few Marvell boards support two ports per ring, and GRO is just an optimization. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 194e5cf8c763..a6ff113d34bb 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2520,24 +2520,27 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
2520 } 2520 }
2521} 2521}
2522 2522
2523static inline void sky2_skb_rx(const struct sky2_port *sky2, 2523static inline void sky2_skb_rx(struct napi_struct *napi,
2524 const struct sky2_port *sky2,
2524 u32 status, struct sk_buff *skb) 2525 u32 status, struct sk_buff *skb)
2525{ 2526{
2526#ifdef SKY2_VLAN_TAG_USED 2527#ifdef SKY2_VLAN_TAG_USED
2527 u16 vlan_tag = be16_to_cpu(sky2->rx_tag);
2528 if (sky2->vlgrp && (status & GMR_FS_VLAN)) { 2528 if (sky2->vlgrp && (status & GMR_FS_VLAN)) {
2529 if (skb->ip_summed == CHECKSUM_NONE) 2529 u16 vlan_tag = be16_to_cpu(sky2->rx_tag);
2530
2531 if (skb->ip_summed == CHECKSUM_NONE ||
2532 sky2->netdev != napi->dev)
2530 vlan_hwaccel_receive_skb(skb, sky2->vlgrp, vlan_tag); 2533 vlan_hwaccel_receive_skb(skb, sky2->vlgrp, vlan_tag);
2531 else 2534 else
2532 vlan_gro_receive(&sky2->hw->napi, sky2->vlgrp, 2535 vlan_gro_receive(napi, sky2->vlgrp, vlan_tag, skb);
2533 vlan_tag, skb);
2534 return; 2536 return;
2535 } 2537 }
2536#endif 2538#endif
2537 if (skb->ip_summed == CHECKSUM_NONE) 2539 if (skb->ip_summed == CHECKSUM_NONE ||
2540 sky2->netdev != napi->dev)
2538 netif_receive_skb(skb); 2541 netif_receive_skb(skb);
2539 else 2542 else
2540 napi_gro_receive(&sky2->hw->napi, skb); 2543 napi_gro_receive(napi, skb);
2541} 2544}
2542 2545
2543static inline void sky2_rx_done(struct sky2_hw *hw, unsigned port, 2546static inline void sky2_rx_done(struct sky2_hw *hw, unsigned port,
@@ -2638,7 +2641,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
2638 2641
2639 skb->protocol = eth_type_trans(skb, dev); 2642 skb->protocol = eth_type_trans(skb, dev);
2640 2643
2641 sky2_skb_rx(sky2, status, skb); 2644 sky2_skb_rx(&hw->napi, sky2, status, skb);
2642 2645
2643 /* Stop after net poll weight */ 2646 /* Stop after net poll weight */
2644 if (++work_done >= to_do) 2647 if (++work_done >= to_do)