diff options
| author | Tony Lindgren <tony@atomide.com> | 2010-06-28 15:47:04 +0300 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2010-06-28 15:47:04 +0300 |
| commit | 41bd03ba0758a076671e5de35ed084535984143d (patch) | |
| tree | 9a669f9f1f52996b38acb077655e4b044bba67c7 /net/core/dev.c | |
| parent | 090830b4c79cd5ac85430822a9b87c90848bedcf (diff) | |
| parent | dc75925d67950889b79df1cc1518c21ec678df6c (diff) | |
Merge branch 'for_2.6.35rc' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d03470f5260..2b3bf53bc68 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2253,11 +2253,9 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, if (skb_rx_queue_recorded(skb)) { u16 index = skb_get_rx_queue(skb); if (unlikely(index >= dev->num_rx_queues)) { - if (net_ratelimit()) { - pr_warning("%s received packet on queue " - "%u, but number of RX queues is %u\n", - dev->name, index, dev->num_rx_queues); - } + WARN_ONCE(dev->num_rx_queues > 1, "%s received packet " + "on queue %u, but number of RX queues is %u\n", + dev->name, index, dev->num_rx_queues); goto done; } rxqueue = dev->_rx + index; @@ -2812,13 +2810,24 @@ static int __netif_receive_skb(struct sk_buff *skb) if (!skb->skb_iif) skb->skb_iif = skb->dev->ifindex; + /* + * bonding note: skbs received on inactive slaves should only + * be delivered to pkt handlers that are exact matches. Also + * the deliver_no_wcard flag will be set. If packet handlers + * are sensitive to duplicate packets these skbs will need to + * be dropped at the handler. The vlan accel path may have + * already set the deliver_no_wcard flag. + */ null_or_orig = NULL; orig_dev = skb->dev; master = ACCESS_ONCE(orig_dev->master); - if (master) { - if (skb_bond_should_drop(skb, master)) + if (skb->deliver_no_wcard) + null_or_orig = orig_dev; + else if (master) { + if (skb_bond_should_drop(skb, master)) { + skb->deliver_no_wcard = 1; null_or_orig = orig_dev; /* deliver only exact match */ - else + } else skb->dev = master; } |
