From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Zhang, Peng1X" <peng1x.zhang@intel.com>,
"Yang, Qiming" <qiming.yang@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after failure
Date: Wed, 1 Jun 2022 03:22:31 +0000 [thread overview]
Message-ID: <DM4PR11MB5994916B9FD29CC22D56F66ED7DF9@DM4PR11MB5994.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SJ0PR11MB51205B0DC892117AB0BA8DD1CEDF9@SJ0PR11MB5120.namprd11.prod.outlook.com>
> -----Original Message-----
> From: Zhang, Peng1X <peng1x.zhang@intel.com>
> Sent: Wednesday, June 1, 2022 10:46 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after failure
>
> Because currently just focus on the following given situation, and use 'hw-
> >dcf_enabled' it should only affect on DCF.
> After having checked code 'ice_dcf_send_aq_cmd', it already have retry
> mechanism.
If it is already retried, then why we need this patch?
Btw, we are talking about "retry virtual channel command from DCF to kernel PF" here, not the case "retry polling reply status of the a request".
>
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Wednesday, June 1, 2022 9:54 AM
> > To: Zhang, Peng1X <peng1x.zhang@intel.com>; Yang, Qiming
> > <qiming.yang@intel.com>; dev@dpdk.org
> > Cc: stable@dpdk.org
> > Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after
> > failure
> >
> >
> >
> > > -----Original Message-----
> > > From: Zhang, Peng1X <peng1x.zhang@intel.com>
> > > Sent: Wednesday, June 1, 2022 9:49 AM
> > > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> > > <qiming.yang@intel.com>; dev@dpdk.org
> > > Cc: stable@dpdk.org
> > > Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after
> > > failure
> > >
> > > I see, so ice_aq_retry_send_cmd function will conduct whether DCF
> > > is enabled or not with 'hw->dcf_enabled'.
> >
> > Why not just enable retry in ice_dcf_send_aq_cmd?
> >
> >
> > > > -----Original Message-----
> > > > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > > > Sent: Tuesday, May 31, 2022 7:52 PM
> > > > To: Zhang, Peng1X <peng1x.zhang@intel.com>; Yang, Qiming
> > > > <qiming.yang@intel.com>; dev@dpdk.org
> > > > Cc: stable@dpdk.org
> > > > Subject: RE: [PATCH v4] net/ice: retry sending adminQ command
> > > > after failure
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Zhang, Peng1X <peng1x.zhang@intel.com>
> > > > > Sent: Wednesday, June 1, 2022 1:48 AM
> > > > > To: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > > > > <qi.z.zhang@intel.com>; dev@dpdk.org
> > > > > Cc: Zhang, Peng1X <peng1x.zhang@intel.com>; stable@dpdk.org
> > > > > Subject: [PATCH v4] net/ice: retry sending adminQ command after
> > > > > failure
> > > > >
> > > > > From: Peng Zhang <peng1x.zhang@intel.com>
> > > > >
> > > > > The origin design is if error happen during the step 3 of
> > > > > following given situation, it will return error directly without
> > > > > retry. While in current patch, it will retry again and again
> > > > > during certain
> > time.
> > > > > If retry succeed, rule can be continuously created. It will
> > > > > improve success rate of creating rule under following given situation.
> > > > >
> > > > > The given situation as following steps show:
> > > > > step 1. Kernel PF and DCF are ready at the beginning.
> > > > > step 2. A VF reset happen, kernel send an event to DPDK DCF and
> > > > > set STATE to pause.
> > > > > step 3. Before DPDK DCF receive the event, it is possible a rule
> > > > > creation is ongoing and switch rules, recipe, or vsi list
> > > > > related adminQ operation is executing.
> > > > > step 4. Then result of operation is failure, it will lead to
> > > > > error return to DPDK DCF. DPDK DCF error code will be set as
> > > > > EINVAL, not
> > > EAGAIN.
> > > > >
> > > > > Fixes: 6bad5047be24 ("net/ice/base: return correct error code")
> > > > > Fixes: 453d087ccaff ("net/ice/base: add common functions")
> > > > > Cc: stable@dpdk.org
> > > > >
> > > > > Signed-off-by: Peng Zhang <peng1x.zhang@intel.com>
> > > > > ---
> > > > > v4 changes:
> > > > > - Add retry mechanism if fail to send adminQ command under
> > > > > given
> > > > situation.
> > > > > v3 Changes:
> > > > > - Add the situation description, expected error code and
> > > > > incorrect error code
> > > > > - in commit log.
> > > > > v2 Changes:
> > > > > - Modify DCF state checking mechanism.
> > > > >
> > > > > drivers/net/ice/base/ice_common.c | 2 +-
> > > > > drivers/net/ice/base/ice_switch.c |
> > > > > 46 +++++++++++++++++++++++++++----
> > > > > drivers/net/ice/base/ice_switch.h
> > > > > | 5
> > > > > ++++
> > > > > 3 files changed, 46 insertions(+), 7 deletions(-)
> > > > >
> > > > > diff --git a/drivers/net/ice/base/ice_common.c
> > > > > b/drivers/net/ice/base/ice_common.c
> > > > > index db87bacd97..013c255371 100644
> > > > > --- a/drivers/net/ice/base/ice_common.c
> > > > > +++ b/drivers/net/ice/base/ice_common.c
> > > > > @@ -2127,7 +2127,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw,
> > > > > u16 num_entries,
> > > > >
> > > > > cmd->num_entries = CPU_TO_LE16(num_entries);
> > > > >
> > > > > - return ice_aq_send_cmd(hw, &desc, buf, buf_size, cd);
> > > > > + return ice_aq_retry_send_cmd(hw, &desc, buf, buf_size, cd);
> > > >
> > > > this is the fix only for DCF, we don't need to retry in a PF driver context.
> > > > Better keep the same function name, but implements the retry
> > > > mechanism inside the function, and should only be triggered when
> > > > it is in a DCF context
next prev parent reply other threads:[~2022-06-01 3:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 15:49 [PATCH v2] net/ice: fix DCF state checking mechanism peng1x.zhang
2022-05-13 9:56 ` Connolly, Padraig J
2022-05-17 7:35 ` Zhang, Qi Z
2022-05-18 6:36 ` Zhang, Peng1X
2022-05-18 6:45 ` Zhang, Qi Z
2022-05-19 6:05 ` Zhang, Peng1X
2022-05-20 18:31 ` [PATCH v3] " peng1x.zhang
2022-05-21 2:17 ` Zhang, Qi Z
2022-05-31 17:48 ` [PATCH v4] net/ice: retry sending adminQ command after failure peng1x.zhang
2022-05-31 11:51 ` Zhang, Qi Z
2022-06-01 1:48 ` Zhang, Peng1X
2022-06-01 1:53 ` Zhang, Qi Z
2022-06-01 2:46 ` Zhang, Peng1X
2022-06-01 3:22 ` Zhang, Qi Z [this message]
2022-06-01 5:35 ` Zhang, Peng1X
2022-06-08 10:21 ` [PATCH v5] net/ice: add retry mechanism for DCF " peng1x.zhang
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=DM4PR11MB5994916B9FD29CC22D56F66ED7DF9@DM4PR11MB5994.namprd11.prod.outlook.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=peng1x.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
/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).