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.
Fixes: fb4ee67529ff ("net/ncsi: Add NCSI OEM command support")
Signed-off-by: Kumar Thangavel <redacted>
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Reviewed-by: Paul Menzel <redacted>
---
v7:
- Updated padding_bytes as const static int variable
v6:
- Updated type of padding_bytes variable
- Updated type of payload
- Seperated variable declarations and code
v5:
- Added Fixes tag
- Added const variable for padding_bytes
v4:
- Used existing macro for max function
v3:
- Added Macro for MAX
- Fixed the missed semicolon
v2:
- Added NC-SI spec version and section
- Removed blank line
- corrected spellings
v1:
- Initial draft
---
---
net/ncsi/ncsi-cmd.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
From: Eric Dumazet <hidden> Date: 2021-11-18 17:14:05
On 11/18/21 8:03 AM, 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.
Patch title should start with a prefix, identifying which layer/driver is
involved.
Probably in this case
net/ncsi: Add payload to be 32-bit aligned to fix dropped packets
quoted hunk
Fixes: fb4ee67529ff ("net/ncsi: Add NCSI OEM command support")
Signed-off-by: Kumar Thangavel <redacted>
Acked-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Reviewed-by: Paul Menzel <redacted>
---
v7:
- Updated padding_bytes as const static int variable
v6:
- Updated type of padding_bytes variable
- Updated type of payload
- Seperated variable declarations and code
v5:
- Added Fixes tag
- Added const variable for padding_bytes
v4:
- Used existing macro for max function
v3:
- Added Macro for MAX
- Fixed the missed semicolon
v2:
- Added NC-SI spec version and section
- Removed blank line
- corrected spellings
v1:
- Initial draft
---
---
net/ncsi/ncsi-cmd.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 06:32:31
On Thu, 18 Nov 2021 21:33:02 +0530 Kumar Thangavel wrote:
+const static int padding_bytes = 26;
/net/ncsi/ncsi-cmd.c:21:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
21 | const static int padding_bytes = 26;
| ^~~~~