From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 41963FB00 for ; Tue, 20 Dec 2016 09:49:31 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 20 Dec 2016 00:49:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,378,1477983600"; d="scan'208";a="44529953" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 20 Dec 2016 00:49:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 20 Dec 2016 00:49:29 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.54]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.97]) with mapi id 14.03.0248.002; Tue, 20 Dec 2016 16:49:28 +0800 From: "Lu, Wenzhuo" To: "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 02/32] net/i40e: add callback to user on VF to PF mbox msg Thread-Index: AQHSUDqNVyJYKpAEXEGaxnQZ/XNDvaD76MyAgBSrhUA= Date: Tue, 20 Dec 2016 08:49:27 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B543CA8@shsmsx102.ccr.corp.intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-3-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 02/32] net/i40e: add callback to user on VF to PF mbox msg X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 08:49:33 -0000 Hi Ferruh, > -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday, December 7, 2016 8:45 PM > To: Lu, Wenzhuo; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 02/32] net/i40e: add callback to user o= n VF to > PF mbox msg >=20 > On 12/7/2016 3:31 AM, Wenzhuo Lu wrote: > > The callback asks the user application if it is allowed to perform the > > mailbox messages. > > > > If the return value from user is RTE_PMD_I40E_MB_EVENT_PROCEED then > > continue. If ACK or NACK, do nothing and send not_supported to VF. > > > > Signed-off-by: Wenzhuo Lu > > --- > > drivers/net/i40e/i40e_pf.c | 230 > ++++++++++++++++++++++++++++++++++------ > > drivers/net/i40e/rte_pmd_i40e.h | 21 ++++ > > 2 files changed, 216 insertions(+), 35 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c > > index f70712b..8b8a14f 100644 > > --- a/drivers/net/i40e/i40e_pf.c > > +++ b/drivers/net/i40e/i40e_pf.c > > @@ -55,6 +55,7 @@ > > #include "i40e_ethdev.h" > > #include "i40e_rxtx.h" > > #include "i40e_pf.h" > > +#include "rte_pmd_i40e.h" > > > > #define I40E_CFG_CRCSTRIP_DEFAULT 1 > > > > @@ -272,14 +273,23 @@ > > } > > > > static void > > -i40e_pf_host_process_cmd_version(struct i40e_pf_vf *vf) > > +i40e_pf_host_process_cmd_version(struct i40e_pf_vf *vf, bool b_op) > > { > > struct i40e_virtchnl_version_info info; > > > > info.major =3D I40E_DPDK_VERSION_MAJOR; > > info.minor =3D I40E_DPDK_VERSION_MINOR; > > - i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_VERSION, > > - I40E_SUCCESS, (uint8_t *)&info, sizeof(info)); > > + > > + if (b_op) > > + i40e_pf_host_send_msg_to_vf(vf, > I40E_VIRTCHNL_OP_VERSION, > > + I40E_SUCCESS, > > + (uint8_t *)&info, > > + sizeof(info)); > > + else > > + i40e_pf_host_send_msg_to_vf(vf, > I40E_VIRTCHNL_OP_VERSION, > > + I40E_NOT_SUPPORTED, > > + (uint8_t *)&info, > > + sizeof(info)); >=20 > Even I40E_NOT_SUPPORTED returned to the VF, it seems VF is ignoring this > value, is it something should be fixed as part of this patch? >=20 > This path is a little complex, I may be missing something but stack trace= is: >=20 > VF: > i40evf_check_api_version() > i40evf_execute_vf_cmd(vfd_cmd_info arg) > i40e_aq_send_msg_to_pf(arg->op, retval, arg->in_msg) > desc <- op, retval > msg_in <- arg_in_msg > i40e_asq_send_command(desc, msg_in) >=20 > PF: > i40e_pf_host_handle_vf_msg(op, msg_in) > i40e_pf_host_process_cmd_version() > i40e_pf_host_send_msg_to_vf(op, retval, msg_out) > i40e_aq_send_msg_to_vf(op, retval, msg_out) > desc <- op, retval > i40e_asq_send_command(desc, msg_out) >=20 > VF: > data <- arg->out_xxx > i40evf_read_pfmsg(data) > event <- data->out_msg > op <- > retval <- > i40e_clean_arq_element(event) > event->desc <- desc > event->msg <- msg_out > data->result =3D retval <---------------- > return 0; > ver =3D arg->out_msg > return 0; >=20 >=20 > So, as far as I can see I40E_NOT_SUPPORTED is somewhere in the stack but = not > reached to the final VF function, is this OK? I think it's a bug in the existing code. It's forgotten to check the ' data= ->result ' . I will send a separate patch to fix it. >=20 >=20 > > } > > > > static int > > @@ -292,13 +302,20 @@ > > } > > > > static int > > -i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf) > > +i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, bool > > +b_op) > > { > > struct i40e_virtchnl_vf_resource *vf_res =3D NULL; > > struct i40e_hw *hw =3D I40E_PF_TO_HW(vf->pf); > > uint32_t len =3D 0; > > int ret =3D I40E_SUCCESS; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf(vf, > > + > I40E_VIRTCHNL_OP_GET_VF_RESOURCES, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > /* only have 1 VSI by default */ > > len =3D sizeof(struct i40e_virtchnl_vf_resource) + > > I40E_DEFAULT_VF_VSI_NUM * > > @@ -423,7 +440,8 @@ > > static int > > i40e_pf_host_process_cmd_config_vsi_queues(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > struct i40e_hw *hw =3D I40E_PF_TO_HW(vf->pf); > > struct i40e_vsi *vsi =3D vf->vsi; > > @@ -432,6 +450,13 @@ > > struct i40e_virtchnl_queue_pair_info *vc_qpi; > > int i, ret =3D I40E_SUCCESS; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf(vf, > > + > I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (!msg || vc_vqci->num_queue_pairs > vsi->nb_qps || > > vc_vqci->num_queue_pairs > I40E_MAX_VSI_QP || > > msglen < I40E_VIRTCHNL_CONFIG_VSI_QUEUES_SIZE(vc_vqci, > > @@ -482,7 +507,8 @@ > > static int > > i40e_pf_host_process_cmd_config_vsi_queues_ext(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > struct i40e_hw *hw =3D I40E_PF_TO_HW(vf->pf); > > struct i40e_vsi *vsi =3D vf->vsi; > > @@ -491,6 +517,14 @@ > > struct i40e_virtchnl_queue_pair_ext_info *vc_qpei; > > int i, ret =3D I40E_SUCCESS; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (!msg || vc_vqcei->num_queue_pairs > vsi->nb_qps || > > vc_vqcei->num_queue_pairs > I40E_MAX_VSI_QP || > > msglen < I40E_VIRTCHNL_CONFIG_VSI_QUEUES_SIZE(vc_vqcei, > > @@ -539,12 +573,21 @@ > > > > static int > > i40e_pf_host_process_cmd_config_irq_map(struct i40e_pf_vf *vf, > > - uint8_t *msg, uint16_t msglen) > > + uint8_t *msg, uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_irq_map_info *irqmap =3D > > (struct i40e_virtchnl_irq_map_info *)msg; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen < sizeof(struct i40e_virtchnl_irq_map_i= nfo)) { > > PMD_DRV_LOG(ERR, "buffer too short"); > > ret =3D I40E_ERR_PARAM; > > @@ -646,12 +689,21 @@ > > static int > > i40e_pf_host_process_cmd_disable_queues(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_queue_select *q_sel =3D > > (struct i40e_virtchnl_queue_select *)msg; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_DISABLE_QUEUES, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen !=3D sizeof(*q_sel)) { > > ret =3D I40E_ERR_PARAM; > > goto send_msg; > > @@ -669,7 +721,8 @@ > > static int > > i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_ether_addr_list *addr_list =3D @@ -678,6 +731,14 > > @@ > > int i; > > struct ether_addr *mac; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > memset(&filter, 0 , sizeof(struct i40e_mac_filter_info)); > > > > if (msg =3D=3D NULL || msglen <=3D sizeof(*addr_list)) { @@ -707,7 +7= 68,8 > > @@ static int i40e_pf_host_process_cmd_del_ether_address(struct > > i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_ether_addr_list *addr_list =3D @@ -715,6 +777,14 > > @@ > > int i; > > struct ether_addr *mac; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen <=3D sizeof(*addr_list)) { > > PMD_DRV_LOG(ERR, "delete_ether_address argument too > short"); > > ret =3D I40E_ERR_PARAM; > > @@ -739,7 +809,8 @@ > > > > static int > > i40e_pf_host_process_cmd_add_vlan(struct i40e_pf_vf *vf, > > - uint8_t *msg, uint16_t msglen) > > + uint8_t *msg, uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_vlan_filter_list *vlan_filter_list =3D @@ -747,6 > > +818,14 @@ > > int i; > > uint16_t *vid; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_ADD_VLAN, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen <=3D sizeof(*vlan_filter_list)) { > > PMD_DRV_LOG(ERR, "add_vlan argument too short"); > > ret =3D I40E_ERR_PARAM; > > @@ -771,7 +850,8 @@ > > static int > > i40e_pf_host_process_cmd_del_vlan(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_vlan_filter_list *vlan_filter_list =3D @@ -779,6 > > +859,14 @@ > > int i; > > uint16_t *vid; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_DEL_VLAN, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen <=3D sizeof(*vlan_filter_list)) { > > PMD_DRV_LOG(ERR, "delete_vlan argument too short"); > > ret =3D I40E_ERR_PARAM; > > @@ -803,7 +891,8 @@ > > i40e_pf_host_process_cmd_config_promisc_mode( > > struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_promisc_info *promisc =3D @@ -811,6 +900,14 @@ > > struct i40e_hw *hw =3D I40E_PF_TO_HW(vf->pf); > > bool unicast =3D FALSE, multicast =3D FALSE; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen !=3D sizeof(*promisc)) { > > ret =3D I40E_ERR_PARAM; > > goto send_msg; > > @@ -836,13 +933,20 @@ > > } > > > > static int > > -i40e_pf_host_process_cmd_get_stats(struct i40e_pf_vf *vf) > > +i40e_pf_host_process_cmd_get_stats(struct i40e_pf_vf *vf, bool b_op) > > { > > i40e_update_vsi_stats(vf->vsi); > > > > - i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_GET_STATS, > > - I40E_SUCCESS, (uint8_t *)&vf->vsi->eth_stats, > > - sizeof(vf->vsi->eth_stats)); > > + if (b_op) > > + i40e_pf_host_send_msg_to_vf(vf, > I40E_VIRTCHNL_OP_GET_STATS, > > + I40E_SUCCESS, > > + (uint8_t *)&vf->vsi->eth_stats, > > + sizeof(vf->vsi->eth_stats)); > > + else > > + i40e_pf_host_send_msg_to_vf(vf, > I40E_VIRTCHNL_OP_GET_STATS, > > + I40E_NOT_SUPPORTED, > > + (uint8_t *)&vf->vsi->eth_stats, > > + sizeof(vf->vsi->eth_stats)); > > > > return I40E_SUCCESS; > > } > > @@ -851,12 +955,21 @@ > > i40e_pf_host_process_cmd_cfg_vlan_offload( > > struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_vlan_offload_info *offload =3D > > (struct i40e_virtchnl_vlan_offload_info *)msg; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen !=3D sizeof(*offload)) { > > ret =3D I40E_ERR_PARAM; > > goto send_msg; > > @@ -877,12 +990,21 @@ > > static int > > i40e_pf_host_process_cmd_cfg_pvid(struct i40e_pf_vf *vf, > > uint8_t *msg, > > - uint16_t msglen) > > + uint16_t msglen, > > + bool b_op) > > { > > int ret =3D I40E_SUCCESS; > > struct i40e_virtchnl_pvid_info *tpid_info =3D > > (struct i40e_virtchnl_pvid_info *)msg; > > > > + if (!b_op) { > > + i40e_pf_host_send_msg_to_vf( > > + vf, > > + I40E_VIRTCHNL_OP_CFG_VLAN_PVID, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + return ret; > > + } > > + > > if (msg =3D=3D NULL || msglen !=3D sizeof(*tpid_info)) { > > ret =3D I40E_ERR_PARAM; > > goto send_msg; > > @@ -923,6 +1045,8 @@ > > struct i40e_pf_vf *vf; > > /* AdminQ will pass absolute VF id, transfer to internal vf id */ > > uint16_t vf_id =3D abs_vf_id - hw->func_caps.vf_base_id; > > + struct rte_pmd_i40e_mb_event_param cb_param; > > + bool b_op =3D TRUE; > > > > if (vf_id > pf->vf_num - 1 || !pf->vfs) { > > PMD_DRV_LOG(ERR, "invalid argument"); @@ -937,10 > +1061,35 @@ > > return; > > } > > > > + /** > > + * initialise structure to send to user application > > + * will return response from user in retval field > > + */ > > + cb_param.retval =3D RTE_PMD_I40E_MB_EVENT_PROCEED; > > + cb_param.vfid =3D vf_id; > > + cb_param.msg_type =3D opcode; > > + cb_param.msg =3D (void *)msg; > > + cb_param.msglen =3D msglen; > > + > > + /** > > + * Ask user application if we're allowed to perform those functions. > > + * If we get cb_param.retval =3D=3D RTE_PMD_I40E_MB_EVENT_PROCEED, > > + * then business as usual. > > + * If RTE_PMD_I40E_MB_EVENT_NOOP_ACK or > RTE_PMD_I40E_MB_EVENT_NOOP_NACK, > > + * do nothing and send not_supported to VF. As PF must send a respons= e > > + * to VF and ACK/NACK is not defined. > > + */ > > + _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, > &cb_param); > > + if (cb_param.retval !=3D RTE_PMD_I40E_MB_EVENT_PROCEED) { > > + PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not > permitted!", > > + opcode); > > + b_op =3D FALSE; > > + } > > + >=20 > Is the reason you just not do [1], because final function requires valid = buffers? > Can it be an option to fix them? I thought about doing [1], but the problem is we cannot use NULL for all ki= nds of messages. For some messages NULL will break them, so have to handle = them case by case. >=20 > [1] > if (!b_op) { > i40e_pf_host_send_msg_to_vf(vf, opcode, I40E_NOT_SUPPORTED, > NULL, 0); } >=20 > > switch (opcode) { > > case I40E_VIRTCHNL_OP_VERSION : > > PMD_DRV_LOG(INFO, "OP_VERSION received"); > > - i40e_pf_host_process_cmd_version(vf); > > + i40e_pf_host_process_cmd_version(vf, b_op); > > break; > > case I40E_VIRTCHNL_OP_RESET_VF : > > PMD_DRV_LOG(INFO, "OP_RESET_VF received"); @@ -948,61 > +1097,72 @@ > > break; > > case I40E_VIRTCHNL_OP_GET_VF_RESOURCES: > > PMD_DRV_LOG(INFO, "OP_GET_VF_RESOURCES received"); > > - i40e_pf_host_process_cmd_get_vf_resource(vf); > > + i40e_pf_host_process_cmd_get_vf_resource(vf, b_op); > > break; > > case I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES: > > PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES received"); > > - i40e_pf_host_process_cmd_config_vsi_queues(vf, msg, > msglen); > > + i40e_pf_host_process_cmd_config_vsi_queues(vf, msg, > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT: > > PMD_DRV_LOG(INFO, "OP_CONFIG_VSI_QUEUES_EXT > received"); > > i40e_pf_host_process_cmd_config_vsi_queues_ext(vf, msg, > > - msglen); > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_CONFIG_IRQ_MAP: > > PMD_DRV_LOG(INFO, "OP_CONFIG_IRQ_MAP received"); > > - i40e_pf_host_process_cmd_config_irq_map(vf, msg, msglen); > > + i40e_pf_host_process_cmd_config_irq_map(vf, msg, msglen, > b_op); > > break; > > case I40E_VIRTCHNL_OP_ENABLE_QUEUES: > > PMD_DRV_LOG(INFO, "OP_ENABLE_QUEUES received"); > > - i40e_pf_host_process_cmd_enable_queues(vf, msg, msglen); > > - i40e_notify_vf_link_status(dev, vf); > > + if (b_op) { > > + i40e_pf_host_process_cmd_enable_queues(vf, msg, > msglen); > > + i40e_notify_vf_link_status(dev, vf); > > + } else { > > + i40e_pf_host_send_msg_to_vf( > > + vf, I40E_VIRTCHNL_OP_ENABLE_QUEUES, > > + I40E_NOT_SUPPORTED, NULL, 0); > > + } > > break; > > case I40E_VIRTCHNL_OP_DISABLE_QUEUES: > > PMD_DRV_LOG(INFO, "OP_DISABLE_QUEUE received"); > > - i40e_pf_host_process_cmd_disable_queues(vf, msg, msglen); > > + i40e_pf_host_process_cmd_disable_queues(vf, msg, msglen, > b_op); > > break; > > case I40E_VIRTCHNL_OP_ADD_ETHER_ADDRESS: > > PMD_DRV_LOG(INFO, "OP_ADD_ETHER_ADDRESS received"); > > - i40e_pf_host_process_cmd_add_ether_address(vf, msg, > msglen); > > + i40e_pf_host_process_cmd_add_ether_address(vf, msg, > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_DEL_ETHER_ADDRESS: > > PMD_DRV_LOG(INFO, "OP_DEL_ETHER_ADDRESS received"); > > - i40e_pf_host_process_cmd_del_ether_address(vf, msg, > msglen); > > + i40e_pf_host_process_cmd_del_ether_address(vf, msg, > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_ADD_VLAN: > > PMD_DRV_LOG(INFO, "OP_ADD_VLAN received"); > > - i40e_pf_host_process_cmd_add_vlan(vf, msg, msglen); > > + i40e_pf_host_process_cmd_add_vlan(vf, msg, msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_DEL_VLAN: > > PMD_DRV_LOG(INFO, "OP_DEL_VLAN received"); > > - i40e_pf_host_process_cmd_del_vlan(vf, msg, msglen); > > + i40e_pf_host_process_cmd_del_vlan(vf, msg, msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE: > > PMD_DRV_LOG(INFO, "OP_CONFIG_PROMISCUOUS_MODE > received"); > > - i40e_pf_host_process_cmd_config_promisc_mode(vf, msg, > msglen); > > + i40e_pf_host_process_cmd_config_promisc_mode(vf, msg, > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_GET_STATS: > > PMD_DRV_LOG(INFO, "OP_GET_STATS received"); > > - i40e_pf_host_process_cmd_get_stats(vf); > > + i40e_pf_host_process_cmd_get_stats(vf, b_op); > > break; > > case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD: > > PMD_DRV_LOG(INFO, "OP_CFG_VLAN_OFFLOAD received"); > > - i40e_pf_host_process_cmd_cfg_vlan_offload(vf, msg, msglen); > > + i40e_pf_host_process_cmd_cfg_vlan_offload(vf, msg, > > + msglen, b_op); > > break; > > case I40E_VIRTCHNL_OP_CFG_VLAN_PVID: > > PMD_DRV_LOG(INFO, "OP_CFG_VLAN_PVID received"); > > - i40e_pf_host_process_cmd_cfg_pvid(vf, msg, msglen); > > + i40e_pf_host_process_cmd_cfg_pvid(vf, msg, msglen, b_op); > > break; > > /* Don't add command supported below, which will > > * return an error code. > > diff --git a/drivers/net/i40e/rte_pmd_i40e.h > > b/drivers/net/i40e/rte_pmd_i40e.h index 14852f2..eb7a72b 100644 > > --- a/drivers/net/i40e/rte_pmd_i40e.h > > +++ b/drivers/net/i40e/rte_pmd_i40e.h > > @@ -42,6 +42,27 @@ > > #include > > > > /** > > + * Response sent back to i40e driver from user app after callback */ > > +enum rte_pmd_i40e_mb_event_rsp { > > + RTE_PMD_I40E_MB_EVENT_NOOP_ACK, /**< skip mbox request and > ACK */ > > + RTE_PMD_I40E_MB_EVENT_NOOP_NACK, /**< skip mbox request and > NACK */ > > + RTE_PMD_I40E_MB_EVENT_PROCEED, /**< proceed with mbox > request */ > > + RTE_PMD_I40E_MB_EVENT_MAX /**< max value of this enum */ > > +}; > > + > > +/** > > + * Data sent to the user application when the callback is executed. > > + */ > > +struct rte_pmd_i40e_mb_event_param { > > + uint16_t vfid; /**< Virtual Function number */ > > + uint16_t msg_type; /**< VF to PF message type, see i40e_virtchnl_ops > */ > > + uint16_t retval; /**< return value */ > > + void *msg; /**< pointer to message */ > > + uint16_t msglen; /**< length of the message */ > > +}; > > + > > +/** > > * Notify VF when PF link status changes. > > * > > * @param port > >