Re: [PATCH net-next v7 4/6] net: libwx: Add msg task func
From: "mengyuanlou@net-swift.com" <mengyuanlou@net-swift.com>
Date: 2025-02-11 11:15:21
2025年2月8日 09:17,Jakub Kicinski [off-list ref] 写道: On Thu, 6 Feb 2025 18:37:48 +0800 mengyuanlou wrote:quoted
+static int wx_negotiate_vf_api(struct wx *wx, u32 *msgbuf, u32 vf) +{ + int api = msgbuf[1]; + + switch (api) { + case wx_mbox_api_10 ... wx_mbox_api_13: + wx->vfinfo[vf].vf_api = api; + return 0; + default: + wx_err(wx, "VF %d requested invalid api version %u\n", vf, api); + return -EINVAL; + } +}How "compatible" is your device with IXGBE?
The pfvf mailbox flow is similar to IXGBE. But compatibility with the previous api seems not to be required, because inbox has been refactored.
static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
u32 *msgbuf, u32 vf)
{
int api = msgbuf[1];
switch (api) {
case ixgbe_mbox_api_10:
case ixgbe_mbox_api_11:
case ixgbe_mbox_api_12:
case ixgbe_mbox_api_13:
case ixgbe_mbox_api_14:
adapter->vfinfo[vf].vf_api = api;
return 0;
default:
break;
}
e_dbg(drv, "VF %d requested unsupported api version %u\n", vf, api);
return -1;
}