Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 May 2012 18:19:32 +0000 (11:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 May 2012 18:19:32 +0000 (11:19 -0700)
Pull networking fixes from David Miller:
 "The main purpose of this pull request is to fix up the erroneous
  bonding patch I applied last round.  I meant to apply v4 of the patch
  from Jiri but I applied v3 by accident.  Mea culpa.

  Also, eagle eyed Dan Carpenter noticed that openvswitch has one of
  those "X = alloc(); if (!Y)" mistakes, test the proper pointer
  instead."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  openvswitch: checking wrong variable in queue_userspace_packet()
  bonding: Fix LACPDU rx_dropped commit.

drivers/net/bonding/bond_alb.c
drivers/net/bonding/bonding.h
net/openvswitch/datapath.c

index 9abfde4793166f8d323ad9a229d7a1ec09ab2fab..2e1f8066f1a8146b0f89cfb4a9e08e1f6b9a54bd 100644 (file)
@@ -342,26 +342,26 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
        _unlock_rx_hashtbl_bh(bond);
 }
 
-static void rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
+static int rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
                         struct slave *slave)
 {
        struct arp_pkt *arp;
 
        if (skb->protocol != cpu_to_be16(ETH_P_ARP))
-               return;
+               goto out;
 
        arp = (struct arp_pkt *) skb->data;
        if (!arp) {
                pr_debug("Packet has no ARP data\n");
-               return;
+               goto out;
        }
 
        if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
-               return;
+               goto out;
 
        if (skb->len < sizeof(struct arp_pkt)) {
                pr_debug("Packet is too small to be an ARP\n");
-               return;
+               goto out;
        }
 
        if (arp->op_code == htons(ARPOP_REPLY)) {
@@ -369,6 +369,8 @@ static void rlb_arp_recv(struct sk_buff *skb, struct bonding *bond,
                rlb_update_entry_from_arp(bond, arp);
                pr_debug("Server received an ARP Reply from client\n");
        }
+out:
+       return RX_HANDLER_ANOTHER;
 }
 
 /* Caller must hold bond lock for read */
index 9f2bae6616d3f455ed097f927ba1ca9fd27be945..4581aa5ccabab0a36b5e1afcb2bfe5cc77e0d829 100644 (file)
@@ -218,7 +218,7 @@ struct bonding {
        struct   slave *primary_slave;
        bool     force_primary;
        s32      slave_cnt; /* never change this value outside the attach/detach wrappers */
-       void     (*recv_probe)(struct sk_buff *, struct bonding *,
+       int     (*recv_probe)(struct sk_buff *, struct bonding *,
                               struct slave *);
        rwlock_t lock;
        rwlock_t curr_slave_lock;
index 777716bc80f7c2ad183a7309c037f4cc9c84fffa..e66341ec455c3d7c588680bd829e044b7d7752ce 100644 (file)
@@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
                        return -ENOMEM;
 
                nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
-               if (!skb)
+               if (!nskb)
                        return -ENOMEM;
 
                nskb->vlan_tci = 0;
This page took 0.071335 seconds and 5 git commands to generate.