Skip to content

Commit b99215c

Browse files
committed
bonding: Fix LACPDU rx_dropped commit.
I applied the wrong version of Jiri's bonding fix in commit 13a8e0c ("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 <[email protected]>
1 parent cf00c55 commit b99215c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

drivers/net/bonding/bond_alb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,33 +342,35 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
342342
_unlock_rx_hashtbl_bh(bond);
343343
}
344344

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,
346346
struct slave *slave)
347347
{
348348
struct arp_pkt *arp;
349349

350350
if (skb->protocol != cpu_to_be16(ETH_P_ARP))
351-
return;
351+
goto out;
352352

353353
arp = (struct arp_pkt *) skb->data;
354354
if (!arp) {
355355
pr_debug("Packet has no ARP data\n");
356-
return;
356+
goto out;
357357
}
358358

359359
if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
360-
return;
360+
goto out;
361361

362362
if (skb->len < sizeof(struct arp_pkt)) {
363363
pr_debug("Packet is too small to be an ARP\n");
364-
return;
364+
goto out;
365365
}
366366

367367
if (arp->op_code == htons(ARPOP_REPLY)) {
368368
/* update rx hash table for this ARP */
369369
rlb_update_entry_from_arp(bond, arp);
370370
pr_debug("Server received an ARP Reply from client\n");
371371
}
372+
out:
373+
return RX_HANDLER_ANOTHER;
372374
}
373375

374376
/* Caller must hold bond lock for read */

drivers/net/bonding/bonding.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ struct bonding {
218218
struct slave *primary_slave;
219219
bool force_primary;
220220
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 *,
222222
struct slave *);
223223
rwlock_t lock;
224224
rwlock_t curr_slave_lock;

0 commit comments

Comments
 (0)