[PATCH v3] Add payload to be 32-bit aligned to fix dropped packets

From
Jakub Kicinski <kuba@kernel.org>
Date
2021-10-26 15:33:56
Also in
openbmc
Reply to
Kumar Thangavel, 2021-10-26
On Tue, 26 Oct 2021 20:19:53 +0530 Kumar Thangavel wrote:
Update NC-SI command handler (both standard and OEM) to take into
account of payload paddings in allocating skb (in case of payload
size is not 32-bit aligned).

The checksum field follows payload field, without taking payload
padding into account can cause checksum being truncated, leading to
dropped packets.

Signed-off-by: Kumar Thangavel <redacted>
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Reviewed-by: Paul Menzel <redacted>
You need to CC netdev@ if you want this applied to networking trees.
quoted hunk ↗ jump to hunk
diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c
index ba9ae482141b..179e39105072 100644
--- a/net/ncsi/ncsi-cmd.c
+++ b/net/ncsi/ncsi-cmd.c
@@ -18,6 +18,8 @@
 #include "internal.h"
 #include "ncsi-pkt.h"
 
+#define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
Please use one of the existing max() macroes in the kernel.
Thread (3 messages) 3 messages, 2 authors, last reply 2021-10-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help