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

Jakub Kicinski kuba at kernel.org
Wed Oct 27 02:33:56 AEDT 2021


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 <kumarthangavel.hcl at gmail.com>
> Acked-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
> Reviewed-by: Paul Menzel <pmenzel at molgen.mpg.de>

You need to CC netdev@ if you want this applied to networking trees.

> 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.


More information about the openbmc mailing list