From: "Ye, MingjinX" <mingjinx.ye@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yang, Qiming" <qiming.yang@intel.com>,
"Zhou, YidingX" <yidingx.zhou@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>
Subject: RE: [PATCH] net/iavf: fix abnormal disable HW interrupt
Date: Fri, 9 Jun 2023 03:20:18 +0000 [thread overview]
Message-ID: <SN7PR11MB713948F1C97801E29378A8A5E551A@SN7PR11MB7139.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM4PR11MB5994B07FB79ABD928A51DC5AD751A@DM4PR11MB5994.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: 2023年6月9日 9:48
> To: Ye, MingjinX <mingjinx.ye@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Ye, MingjinX <mingjinx.ye@intel.com>;
> stable@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: RE: [PATCH] net/iavf: fix abnormal disable HW interrupt
>
>
>
> > -----Original Message-----
> > From: Mingjin Ye <mingjinx.ye@intel.com>
> > Sent: Thursday, June 8, 2023 2:23 PM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> > <yidingx.zhou@intel.com>; Ye, MingjinX <mingjinx.ye@intel.com>;
> > stable@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>
> > Subject: [PATCH] net/iavf: fix abnormal disable HW interrupt
> >
> > For command VIRTCHNL_OP_REQUEST_QUEUES, polling access to the
> admin
> > queue has the issue of access overruns after disabling interrupt. That
> > results in FW disabling HW interrupt for protection purposes.
> >
> > The updates/changes in this patch:
> > 1. Remove the polling admin queue processing and use the generic
> > interrupt processing instead.
> > 2. Release redundant queue resource before stopping processing
> > interrupt events.
> >
> > Fixes: 22b123a36d07 ("net/avf: initialize PMD")
> > Fixes: ef807926e148 ("net/iavf: support requesting additional queues
> > from
> > PF")
> > Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel
> > message")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> > ---
> > drivers/net/iavf/iavf_ethdev.c | 25 +++++++++---------
> > drivers/net/iavf/iavf_vchnl.c | 48 +++++++---------------------------
> > 2 files changed, 23 insertions(+), 50 deletions(-)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index e6cf897293..ba5c88a1ec 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -2756,6 +2756,19 @@ iavf_dev_close(struct rte_eth_dev *dev)
> > }
> >
> > ret = iavf_dev_stop(dev);
> > +
> > + /*
> > + * Release redundant queue resource when close the dev
> > + * so that other vfs can re-use the queues.
> > + */
> > + if (vf->lv_enabled) {
> > + ret = iavf_request_queues(dev,
> > IAVF_MAX_NUM_QUEUES_DFLT);
> > + if (ret)
> > + PMD_DRV_LOG(ERR, "Reset the num of queues
> > failed");
> > +
> > + vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
> > + }
> > +
> > adapter->closed = true;
> >
> > /* free iAVF security device context all related resources */ @@ -
> > 2772,18 +2785,6 @@ iavf_dev_close(struct rte_eth_dev *dev)
> > if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
> > iavf_config_promisc(adapter, false, false);
> >
> > - /*
> > - * Release redundant queue resource when close the dev
> > - * so that other vfs can re-use the queues.
> > - */
> > - if (vf->lv_enabled) {
> > - ret = iavf_request_queues(dev,
> > IAVF_MAX_NUM_QUEUES_DFLT);
> > - if (ret)
> > - PMD_DRV_LOG(ERR, "Reset the num of queues
> > failed");
> > -
> > - vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
> > - }
> > -
> > iavf_shutdown_adminq(hw);
> > if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR)
> {
> > /* disable uio intr before callback unregister */ diff --git
> > a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index
> > 8cc5377bcf..579c0d0d70 100644
> > --- a/drivers/net/iavf/iavf_vchnl.c
> > +++ b/drivers/net/iavf/iavf_vchnl.c
> > @@ -323,6 +323,7 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter,
> > struct iavf_cmd_info *args,
> >
> > switch (args->ops) {
> > case VIRTCHNL_OP_RESET_VF:
> > + case VIRTCHNL_OP_REQUEST_QUEUES:
> > /*no need to wait for response */
> > _clear_cmd(vf);
> > break;
>
> Have you tested the "large VF" case ( > 16 queue) with this patch.
> I assume event VIRTCHNL_EVENT_RESET_IMPENDING need to be handled
> here then to trigger a device reset.
> But I didn't see related part in your patch.
The processing related to the "big VF" is moved before "adapter->closed = true;"
to make sure it can be handled correctly by the interrupt function.
next prev parent reply other threads:[~2023-06-09 3:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 6:23 Mingjin Ye
2023-06-09 1:47 ` Zhang, Qi Z
2023-06-09 3:20 ` Ye, MingjinX [this message]
2023-06-12 12:40 ` Zhang, Qi Z
2023-06-14 6:23 ` Zhang, Qi Z
2023-06-14 9:53 ` [PATCH v2] " Mingjin Ye
2023-06-15 6:22 ` Zhang, Qi Z
-- strict thread matches above, loose matches on Subject: below --
2023-06-07 10:09 [PATCH] " Mingjin Ye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN7PR11MB713948F1C97801E29378A8A5E551A@SN7PR11MB7139.namprd11.prod.outlook.com \
--to=mingjinx.ye@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).