lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] net/ncsi: add control packet payload to NC-SI commands from netlink
Date
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 to take data payload sent from netlink message and sent it over NC-SI.

>
> diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c index 5c3fad8..3b01f65 100644
> --- a/net/ncsi/ncsi-cmd.c
> +++ b/net/ncsi/ncsi-cmd.c
> @@ -309,14 +309,19 @@ static struct ncsi_request *ncsi_alloc_command(struct ncsi_cmd_arg *nca)
>
> int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca) {
> + struct ncsi_cmd_handler *nch = NULL;
> struct ncsi_request *nr;
> + unsigned char type;
> struct ethhdr *eh;
> - struct ncsi_cmd_handler *nch = NULL;
> int i, ret;
>
> + if (nca->req_flags == NCSI_REQ_FLAG_NETLINK_DRIVEN)
> + type = NCSI_PKT_CMD_OEM;
> + else
> + type = nca->type;
> /* Search for the handler */
> for (i = 0; i < ARRAY_SIZE(ncsi_cmd_handlers); i++) {
> - if (ncsi_cmd_handlers[i].type == nca->type) {
> + if (ncsi_cmd_handlers[i].type == type) {
> if (ncsi_cmd_handlers[i].handler)
> nch = &ncsi_cmd_handlers[i];
> else
>

So in this case NCSI_PKT_CMD_OEM would be the default handler for all NC-SI command over netlink (standard and OEM), correct?
Should we rename this to something like NCSI_PKT_CMD_GENERIC for clarity perhaps? Do you plan to upstream this patch?


Also do you have local patch to support NCSI_PKT_CMD_PLDM and the PLDM over NC-SI commands defined here (https://www.dmtf.org/sites/default/files/NC-SI_1.2_PLDM_Support_over_RBT_Commands_Proposal.pdf)?
If not I can send my local changes - but I think we can use the same NCSI_PKT_CMD_OEM handler to transport PLDM payload over NC-SI.
What do you think?

(CC Deepak as I think once this is in place we can use pldmtool to send basic PLDM payloads over NC-SI)

Regards,
-Ben


\
 
 \ /
  Last update: 2019-08-19 22:57    [W:0.158 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site