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

From: Cai Huoqing
Date: Fri Oct 28 2022 - 00:58:01 EST


On 27 10月 22 11:03:12, Jakub Kicinski wrote:
> On Wed, 26 Oct 2022 20:59:11 +0800 Cai Huoqing wrote:
> > The control command only can be set to register in PF,
> > so add support in PF driver for VF PMD driver control
> > command when VF PMD driver work with linux PF driver.
>
> For what definition of "work"?
Hi Jakub,
The work means that when the VF NIC driver in guest OS do some
configuration (VF L2NIC config),
firstly, VF send cmd to PF viamailbox,
then, PF deside what cmd is valid as a command filter.

see these,
./hinic_sriov.c:1031:static int nic_pf_mbox_handler(..
./hinic_sriov.c:1045: if (!hinic_mbox_check_cmd_valid(hwdev, nic_cmd_support_vf, vf_id, cmd,
>
> The commands are actually supported or you're just ignoring them
> silently?
No, 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.

./hinic_hw_mbox.c:1238:bool hinic_mbox_check_cmd_valid(struct hinic_hwdev *hwdev,

Thanks,
Cai