[dpdk-dev] [PATCH v3 1/2] net/i40e: support VF request more queues
Yan, Zhirun
zhirun.yan at intel.com
Fri Dec 14 04:22:04 CET 2018
Hi Qi,
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Thursday, December 13, 2018 6:49 PM
> To: Yan, Zhirun <zhirun.yan at intel.com>; dev at dpdk.org
> Cc: Wang, Haiyue <haiyue.wang at intel.com>
> Subject: RE: [PATCH v3 1/2] net/i40e: support VF request more queues
>
>
>
> > -----Original Message-----
> > From: Yan, Zhirun
> > Sent: Thursday, December 13, 2018 10:05 PM
> > To: dev at dpdk.org; Zhang, Qi Z <qi.z.zhang at intel.com>
> > Cc: Yan, Zhirun <zhirun.yan at intel.com>; Wang, Haiyue
> > <haiyue.wang at intel.com>
> > Subject: [PATCH v3 1/2] net/i40e: support VF request more queues
> >
> > Before this patch, VF gets a default number of queues from the PF.
> > This patch enables VF to request a different number. When VF
> > configures more queues, it will send VIRTCHNL_OP_REQUEST_QUEUES to PF
> > to request more queues, if success, PF will reset the VF.
> >
> > User can run "port stop all", "port config port_id rxq/txq queue_num"
> > and "port start all" to reconfigure queue number.
> >
> > Signed-off-by: Zhirun Yan <zhirun.yan at intel.com>
> > Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
> > ---
> > drivers/net/i40e/i40e_ethdev_vf.c | 56
> > ++++++++++++++++++++++++++++---
> > 1 file changed, 52 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > b/drivers/net/i40e/i40e_ethdev_vf.c
> > index cecedc91f..50e3f1f4f 100644
> > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > @@ -343,6 +343,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev,
> > struct vf_cmd_info *args)
> > err = 0;
> > break;
> > case VIRTCHNL_OP_VERSION:
> > + case VIRTCHNL_OP_REQUEST_QUEUES:
> > case VIRTCHNL_OP_GET_VF_RESOURCES:
> > /* for init adminq commands, need to poll the response */
> > err = -1;
> > @@ -350,8 +351,15 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev,
> > struct vf_cmd_info *args)
> > ret = i40evf_read_pfmsg(dev, &info);
> > vf->cmd_retval = info.result;
> > if (ret == I40EVF_MSG_CMD) {
> > - err = 0;
> > + if (info.ops !=
> VIRTCHNL_OP_REQUEST_QUEUES)
> > + err = 0;
> > break;
> > + } else if (ret == I40EVF_MSG_SYS) {
> > + if (args->ops ==
> VIRTCHNL_OP_REQUEST_QUEUES &&
>
> OK, for VIRTCHNL_OP_REQUEST_QUEUES, we will ignore async reply
> (I40EVF_MSG_CMD) but only wait for system message (I40EVF_MSG_SYS) I
> think it's better to create new branch for case
> VIRTCHNL_OP_REQUEST_QUEUES to make code more readable.
>
Yes, I will send a new version without it and create new patchs for handling msg from pf.
> > + vf->vf_reset) {
> > + err = 0;
> > + break;
> > + }
> > } else if (ret == I40EVF_MSG_ERR)
> > break;
> > rte_delay_ms(ASQ_DELAY_MS);
More information about the dev
mailing list