DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Xing, Beilei" <beilei.xing@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] net/cpfl: reset devargs during the first probe
Date: Mon, 16 Oct 2023 03:57:37 +0000	[thread overview]
Message-ID: <DM4PR11MB5994423DC637A67BF29C3888D7D7A@DM4PR11MB5994.namprd11.prod.outlook.com> (raw)
In-Reply-To: <LV2PR11MB5997768EB97B040780DE2D5BF7D3A@LV2PR11MB5997.namprd11.prod.outlook.com>



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Thursday, October 12, 2023 3:42 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/cpfl: reset devargs during the first probe
> 
> 
> 
> > -----Original Message-----
> > From: Wu, Jingjing <jingjing.wu@intel.com>
> > Sent: Thursday, October 12, 2023 2:54 PM
> > To: Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org
> > Subject: RE: [PATCH] net/cpfl: reset devargs during the first probe
> >
> >
> >
> > > -----Original Message-----
> > > From: Xing, Beilei <beilei.xing@intel.com>
> > > Sent: Thursday, October 12, 2023 12:47 AM
> > > To: Wu, Jingjing <jingjing.wu@intel.com>
> > > Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>
> > > Subject: [PATCH] net/cpfl: reset devargs during the first probe
> > >
> > > From: Beilei Xing <beilei.xing@intel.com>
> >
> > > Reset devargs during the first probe. Otherwise, probe again will be
> > > affected.
> > >
> > > Fixes: a607312291b3 ("net/cpfl: support probe again")
> > >
> > > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> > > ---
> > >  drivers/net/cpfl/cpfl_ethdev.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/cpfl/cpfl_ethdev.c
> > > b/drivers/net/cpfl/cpfl_ethdev.c index 762fbddfe6..890a027a1d 100644
> > > --- a/drivers/net/cpfl/cpfl_ethdev.c
> > > +++ b/drivers/net/cpfl/cpfl_ethdev.c
> > > @@ -1611,11 +1611,12 @@ cpfl_parse_devargs(struct rte_pci_device
> > > *pci_dev, struct cpfl_adapter_ext *adap
> > >  	struct rte_kvargs *kvlist;
> > >  	int ret;
> > >
> > > -	cpfl_args->req_vport_nb = 0;
> > > -
> > >  	if (devargs == NULL)
> > >  		return 0;
> > >
> > > +	if (first)
> > > +		memset(cpfl_args, 0, sizeof(struct cpfl_devargs));
> > > +
> > adapter is allocated by rte_zmalloc. It should be zero already.
> > If I understand correctly, memset to 0 should be happened when first
> > probe is done or before probe again but not at the beginning when first probe.
> 
> But 'struct cpfl_devargs devargs' is the member of adapter, if 'memset to 0'
> happens before probe again, adapter->devargs will only save the last devargs.

Reverted from dpdk-next-net-intel.


      reply	other threads:[~2023-10-16  3:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 16:47 beilei.xing
2023-10-12  1:24 ` Zhang, Qi Z
2023-10-12  6:54 ` Wu, Jingjing
2023-10-12  7:42   ` Xing, Beilei
2023-10-16  3:57     ` Zhang, Qi Z [this message]

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=DM4PR11MB5994423DC637A67BF29C3888D7D7A@DM4PR11MB5994.namprd11.prod.outlook.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).