Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bonding: Fix LACPDU rx_dropped commit.

I applied the wrong version of Jiri's bonding fix in commit
13a8e0c8cdb43982372bd6c65fb26839c8fd8ce9 ("bonding: don't increase
rx_dropped after processing LACPDUs")

I applied v3, which introduces warnings I asked him to fix,
instead of v4 which properly takes care of those issues.

This inter-diffs such that the warnings are now gone.

Signed-off-by: David S. Miller <davem@davemloft.net>

+8 -6
+7 -5
drivers/net/bonding/bond_alb.c
··· 342 342 _unlock_rx_hashtbl_bh(bond); 343 343 } 344 344 345 - static void rlb_arp_recv(struct sk_buff *skb, struct bonding *bond, 345 + static int rlb_arp_recv(struct sk_buff *skb, struct bonding *bond, 346 346 struct slave *slave) 347 347 { 348 348 struct arp_pkt *arp; 349 349 350 350 if (skb->protocol != cpu_to_be16(ETH_P_ARP)) 351 - return; 351 + goto out; 352 352 353 353 arp = (struct arp_pkt *) skb->data; 354 354 if (!arp) { 355 355 pr_debug("Packet has no ARP data\n"); 356 - return; 356 + goto out; 357 357 } 358 358 359 359 if (!pskb_may_pull(skb, arp_hdr_len(bond->dev))) 360 - return; 360 + goto out; 361 361 362 362 if (skb->len < sizeof(struct arp_pkt)) { 363 363 pr_debug("Packet is too small to be an ARP\n"); 364 - return; 364 + goto out; 365 365 } 366 366 367 367 if (arp->op_code == htons(ARPOP_REPLY)) { ··· 369 369 rlb_update_entry_from_arp(bond, arp); 370 370 pr_debug("Server received an ARP Reply from client\n"); 371 371 } 372 + out: 373 + return RX_HANDLER_ANOTHER; 372 374 } 373 375 374 376 /* Caller must hold bond lock for read */
+1 -1
drivers/net/bonding/bonding.h
··· 218 218 struct slave *primary_slave; 219 219 bool force_primary; 220 220 s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ 221 - void (*recv_probe)(struct sk_buff *, struct bonding *, 221 + int (*recv_probe)(struct sk_buff *, struct bonding *, 222 222 struct slave *); 223 223 rwlock_t lock; 224 224 rwlock_t curr_slave_lock;