Re: [PATCH 2/2] net: hinic: Add control command support for VF PMD driver in DPDK

From: Cai Huoqing
Date: Sat Oct 29 2022 - 03:53:51 EST


On 28 10月 22 08:56:51, Jakub Kicinski wrote:
> On Fri, 28 Oct 2022 12:56:55 +0800 Cai Huoqing wrote:
> > > The commands are actually supported or you're just ignoring them
> > > silently?
> > No,
>
> Do you mean "neither"?
>
> > if the cmd is not added to 'nic_cmd_support_vf',
> > the PF will return false, and the error messsage "PF Receive VFx
> > unsupported cmd x" in the function 'hinic_mbox_check_cmd_valid',
> > then, the configuration will not be set to hardware.
>
> You're describing the behavior before the patch?
>
> After the patch the command is ignored silently, like I said, right?
> Because there is no handler added to nic_vf_cmd_msg_handler[].
> Why is that okay? Or is there handler somewhere else?

No need to add handlers to nic_vf_cmd_msg_handler[].
It will run the path,
if (i == ARRAY_SIZE(nic_vf_cmd_msg_handler))
err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC,
cmd, buf_in, in_size, buf_out,
out_size, HINIC_MGMT_MSG_SYNC);
right? or if not please show the related code.