bonding: don't increase rx_dropped after processing LACPDUs
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Linux Kernel Mailing List
Author: Jiri Bohac <[email protected]>
bonding: don't increase
rx_droppedafter processing LACPDUsSince commit
3aba891d, bonding processes LACP frames (802.3ad mode) withbond_handle_frame(). Currently a copy of the skb is made and the original is left to be processed by otherrx_handlersand the rest of the network stack by returningRX_HANDLER_ANOTHER. As there is no protocol handler forPKT_TYPE_LACPDU, the frame is dropped anddev->rx_droppedincreased.Fix this by making
bond_handle_frame()returnRX_HANDLER_CONSUMEDif bonding has processed the LACP frame.Signed-off-by Jiri Bohac <[email protected]>Signed-off-by David S. Miller <[email protected]>
drivers/net/bonding/bond_main.c static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) · line 1448
Quoted 6 lines
drivers/net/bonding/bond_main.c +1
-1@@ -1444,8 +1444,9 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) struct sk_buff *skb = *pskb; struct slave *slave; struct bonding *bond; - void (*recv_probe)(struct sk_buff *, struct bonding *, + int (*recv_probe)(struct sk_buff *, struct bonding *, struct slave *);
drivers/net/bonding/bonding.h:struct bonding still has a version that returns void:
void (*recv_probe)(struct sk_buff *, struct bonding *,
struct slave *);
drivers/net/bonding/bond_main.c: In function ‘bond_handle_frame’:drivers/net/bonding/bond_main.c:1463: warning: assignment from incompatible pointer type drivers/net/bonding/bond_main.c: In function ‘bond_open’:drivers/net/bonding/bond_main.c:3441: warning: assignment from incompatible pointer type drivers/net/bonding/bond_main.c:3448: warning: assignment from incompatible pointer type
Can this cause crashes on architectures where the caller needs to preserve space for the return value?
Don't know why I only start seeing this in -rc7, as the prototypes for the functions related to the latter 2 warnings haven't changed recently.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
A message that is not in the archive (sent off-list or not yet received): [email protected]
David Miller
maintainerRe: [PATCH v3.4-rc7 regression] net/bond: return int from recv_probe()
From: Arnd Bergmann <[email protected]>
Date: Tue, 15 May 2012 10:56:53 +0000
Quoted 4 lines
13a8e0c8c"bonding: don't increaserx_droppedafter processing LACPDUs" changed the prototype of the bondingrecv_probehandler, but only in some places, as identified by this warning:
Quoted 8 lines
drivers/net/bonding/bond_main.c: In function 'bond_handle_frame':drivers/net/bonding/bond_main.c:1463:13: error: assignment from incompatible pointer type [-Werror]drivers/net/bonding/bond_main.c: In function 'bond_open':drivers/net/bonding/bond_main.c:3441:21: error: assignment from incompatible pointer type [-Werror]drivers/net/bonding/bond_main.c:3448:20: error: assignment from incompatible pointer type [-Werror]To fix this, we can change the remaining prototypes to return an integer as well, and always return
RX_HANDLER_ANOTHERfromrlb_arp_recv.
This has been fixed in Linus's tree for almost 2 days.
David Miller
maintainerRe: [PATCH v3.4-rc7 regression] net/bond: return int from recv_probe()
In reply to a message not in the archiveAlso there were illegal sequences in your email headers (the netdev address has a trailing ".") so vger rejected the posting.