From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: "Chautru, Nicolas" <nicolas.chautru@intel.com>,
David Marchand <david.marchand@redhat.com>,
"Vargas, Hernan" <hernan.vargas@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"gakhil@marvell.com" <gakhil@marvell.com>,
"trix@redhat.com" <trix@redhat.com>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>
Subject: RE: [PATCH v1 1/1] baseband/acc: fix check after deref and dead code
Date: Tue, 15 Nov 2022 22:32:04 +0000 [thread overview]
Message-ID: <BY5PR11MB4451068D292647D8E2D62AACF8049@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BY5PR11MB44513E3A3DA61A36EF20C538F8049@BY5PR11MB4451.namprd11.prod.outlook.com>
Hi David,
Given we are already at RC3, let's keep the PMD as is and avoid code churn on top of lack of consensus.
It is not worth spending more time on this for 22.11.
I have marked the issue accordingly in Coverity, there is no concerning vulnerability just dead code which is minor and accepted.
As mentioned we can clean up some of these checks in 23.03, hence marked as deferred.
Thanks
Nic
> -----Original Message-----
> From: Chautru, Nicolas <nicolas.chautru@intel.com>
> Sent: Tuesday, November 15, 2022 10:04 AM
> To: David Marchand <david.marchand@redhat.com>; Vargas, Hernan
> <hernan.vargas@intel.com>
> Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
> maxime.coquelin@redhat.com; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v1 1/1] baseband/acc: fix check after deref and dead code
>
> Hi David,
> I am not sure why the push back. The minimal and proper fix is that v1.
> We are not making that check for other dequeue function. It should not have
> been there in the first place.
> See previous discussion.
>
> Thanks
> Nic
>
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Tuesday, November 15, 2022 8:00 AM
> > To: Chautru, Nicolas <nicolas.chautru@intel.com>; Vargas, Hernan
> > <hernan.vargas@intel.com>
> > Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
> > maxime.coquelin@redhat.com; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: Re: [PATCH v1 1/1] baseband/acc: fix check after deref and
> > dead code
> >
> > Hello Nicolas, Hernan,
> >
> > On Thu, Nov 10, 2022 at 10:15 PM Chautru, Nicolas
> > <nicolas.chautru@intel.com> wrote:
> > > > > diff --git a/drivers/baseband/acc/rte_acc100_pmd.c
> > > > > b/drivers/baseband/acc/rte_acc100_pmd.c
> > > > > index 96daef87bc..30a718916d 100644
> > > > > --- a/drivers/baseband/acc/rte_acc100_pmd.c
> > > > > +++ b/drivers/baseband/acc/rte_acc100_pmd.c
> > > > > @@ -4122,15 +4122,11 @@ acc100_dequeue_ldpc_enc(struct
> > > > rte_bbdev_queue_data *q_data,
> > > > > struct rte_bbdev_enc_op *op;
> > > > > union acc_dma_desc *desc;
> > > > >
> > > > > - if (q == NULL)
> > > > > - return 0;
> > > >
> > > > I guess this protects badly written applications that would do
> > > > stuff like pass an incorrect queue id, or call this callback while
> > > > the queue has not been configured yet.
> > > > This is something that should be caught at the bbdev layer
> > > > (arguably under the RTE_LIBRTE_BBDEV_DEBUG if the performance is
> > > > that much affected, though I'd like to see numbers).
> > > > (edit: I see Maxime replied a similar comment).
> > >
> > > That is not directly to that ticket but would be good to follow up.
> > > From previous discussion with Maxime, the new consensus was to avoid
> > special check in debug mode (try to build the same code). It would be
> > good to come up to a new consensus on this.
> >
> > - Yes, there is something to look at in follow ups so we agree on
> > which checks to add and have them *consistent* for all dequeue functions.
> > I am not taking sides with removing or adding checks for now.
> >
> > My point above was to ask for performance numbers as part of this
> > follow ups.
> > If there is concern that adding checks has a cost, we need numbers to
> > conclude.
> > I saw none so far.
> >
> >
> > - Now, for this patch precisely, I still stand with this part of my previous
> mail:
> >
> > ""
> > > > Back to this particular patch, rather than remove the check, the
> > > > right fix is to move acc_ring_avail_deq(q).
> > > > This is what Coverity reports.
> > """
> >
> > This suggestion here seems the minimal and correct fix.
> >
> > Deciding on removing/adding more checks can be decided in follow up
> > discussions.
> >
> >
> > --
> > David Marchand
next prev parent reply other threads:[~2022-11-15 22:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 3:52 [PATCH v1 0/1] baseband/acc: coverity fix RC2 Hernan Vargas
2022-11-04 3:52 ` [PATCH v1 1/1] baseband/acc: fix check after deref and dead code Hernan Vargas
2022-11-04 8:51 ` Maxime Coquelin
2022-11-04 17:39 ` Chautru, Nicolas
2022-11-08 18:00 ` Chautru, Nicolas
2022-11-10 9:48 ` David Marchand
2022-11-10 21:15 ` Chautru, Nicolas
2022-11-15 15:17 ` Chautru, Nicolas
2022-11-15 15:59 ` David Marchand
2022-11-15 18:04 ` Chautru, Nicolas
2022-11-15 22:32 ` Chautru, Nicolas [this message]
2023-01-20 20:55 [PATCH v1 0/1] DPDK Coverity issue 381631, 381646 Hernan Vargas
2023-01-20 20:55 ` [PATCH v1 1/1] baseband/acc: fix check after deref and dead code Hernan Vargas
2023-02-06 15:22 ` Maxime Coquelin
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=BY5PR11MB4451068D292647D8E2D62AACF8049@BY5PR11MB4451.namprd11.prod.outlook.com \
--to=nicolas.chautru@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=hernan.vargas@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=qi.z.zhang@intel.com \
--cc=trix@redhat.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).