RE: [PATCH net-next] net/ncsi: support unaligned payload size in NC-SI cmd handler

2019-09-12 Thread Ben Wei
ase 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. > &g

RE: [PATCH net-next] net/ncsi: support unaligned payload size in NC-SI cmd handler

2019-09-02 Thread Ben Wei
nto account can cause checksum being truncated, leading to > > dropped packets. > > > > Signed-off-by: Ben Wei > > If you have to align and add padding, I do not see where you are > clearing out that padding memory to make sure it is initialized. > > You do compa

[PATCH net-next] net/ncsi: support unaligned payload size in NC-SI cmd handler

2019-09-01 Thread Ben Wei
dropped packets. Signed-off-by: Ben Wei --- net/ncsi/ncsi-cmd.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c index 0187e65176c0..42636ed3cf3a 100644 --- a/net/ncsi/ncsi-cmd.c +++ b/net/ncsi/ncsi-cmd.c @@ -213,17

Re: [PATCH net-next] net/ncsi: add response handlers for PLDM over NC-SI

2019-08-30 Thread Ben Wei
now, but can be passed > > back to user space via Netlink for further handling. > > > > Signed-off-by: Ben Wei > > I don't know why but patchwork puts part of your patch into the commit > message, see: > > https://urldefense.proofpoint.com/v2/url?u=https-3A_

[PATCH v2 net-next] net/ncsi: add response handlers for PLDM over NC-SI

2019-08-30 Thread Ben Wei
rther handling. Signed-off-by: Ben Wei --- Changes in v2 - fix function definition spacing net/ncsi/ncsi-pkt.h | 5 + net/ncsi/ncsi-rsp.c | 11 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/net/ncsi/ncsi-pkt.h b/net/ncsi/ncsi-pkt.h index a8e9def593f2..80938b3

[PATCH net-next] net/ncsi: add response handlers for PLDM over NC-SI

2019-08-27 Thread Ben Wei
rther handling. Signed-off-by: Ben Wei --- net/ncsi/ncsi-pkt.h | 5 + net/ncsi/ncsi-rsp.c | 11 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/net/ncsi/ncsi-pkt.h b/net/ncsi/ncsi-pkt.h index a8e9def593f2..80938b338fee 100644 --- a/net/ncsi/ncsi-pkt.h +++ b/net

[PATCH net-next] net/ncsi: update response packet length for GCPS/GNS/GNPTS commands

2019-08-21 Thread Ben Wei
Update response packet length for the following commands per NC-SI spec - Get Controller Packet Statistics - Get NC-SI Statistics - Get NC-SI Pass-through Statistics command Signed-off-by: Ben Wei --- net/ncsi/ncsi-rsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

RE: [PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink

2019-08-20 Thread Ben Wei
> Hi Ben, > > > Hi Justin, > > > > > Hi Ben, > > > > > > I have similar fix locally with different approach as the command handler > > > may have some expectation for those byes. > > > We can use NCSI_PKT_CMD_OEM handler as it only copies data based on the > > > payload length. > > > > Great!

RE: [PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink

2019-08-19 Thread Ben Wei
Hi Justin, > Hi Ben, > > I have similar fix locally with different approach as the command handler may > have some expectation for those byes. > We can use NCSI_PKT_CMD_OEM handler as it only copies data based on the > payload length. Great! Yes I was thinking the same, we just need some way t

[PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink

2019-08-18 Thread Ben Wei
This patch adds support for NCSI_CMD_SEND_CMD netlink command to load packet data payload (up to 16 bytes) to standard NC-SI commands. Packet data will be loaded from NCSI_ATTR_DATA attribute similar to NC-SI OEM commands Signed-off-by: Ben Wei --- net/ncsi/internal.h | 7 --- net