mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-20 00:11:22 +00:00
bonding: Fix LACPDU rx_dropped commit.
I applied the wrong version of Jiri's bonding fix in commit
13a8e0c8cd
("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>
This commit is contained in:
parent
cf00c55e3d
commit
b99215cdc6
@ -342,26 +342,26 @@ static void rlb_update_entry_from_arp(struct bonding *bond, struct arp_pkt *arp)
|
|||||||
_unlock_rx_hashtbl_bh(bond);
|
_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 slave *slave)
|
||||||
{
|
{
|
||||||
struct arp_pkt *arp;
|
struct arp_pkt *arp;
|
||||||
|
|
||||||
if (skb->protocol != cpu_to_be16(ETH_P_ARP))
|
if (skb->protocol != cpu_to_be16(ETH_P_ARP))
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
arp = (struct arp_pkt *) skb->data;
|
arp = (struct arp_pkt *) skb->data;
|
||||||
if (!arp) {
|
if (!arp) {
|
||||||
pr_debug("Packet has no ARP data\n");
|
pr_debug("Packet has no ARP data\n");
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
|
if (!pskb_may_pull(skb, arp_hdr_len(bond->dev)))
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
if (skb->len < sizeof(struct arp_pkt)) {
|
if (skb->len < sizeof(struct arp_pkt)) {
|
||||||
pr_debug("Packet is too small to be an ARP\n");
|
pr_debug("Packet is too small to be an ARP\n");
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arp->op_code == htons(ARPOP_REPLY)) {
|
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);
|
rlb_update_entry_from_arp(bond, arp);
|
||||||
pr_debug("Server received an ARP Reply from client\n");
|
pr_debug("Server received an ARP Reply from client\n");
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
|
return RX_HANDLER_ANOTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Caller must hold bond lock for read */
|
/* Caller must hold bond lock for read */
|
||||||
|
@ -218,7 +218,7 @@ struct bonding {
|
|||||||
struct slave *primary_slave;
|
struct slave *primary_slave;
|
||||||
bool force_primary;
|
bool force_primary;
|
||||||
s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
|
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 *);
|
struct slave *);
|
||||||
rwlock_t lock;
|
rwlock_t lock;
|
||||||
rwlock_t curr_slave_lock;
|
rwlock_t curr_slave_lock;
|
||||||
|
Loading…
Reference in New Issue
Block a user