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.march...@redhat.com>
> Sent: Tuesday, November 15, 2022 8:00 AM
> To: Chautru, Nicolas <nicolas.chau...@intel.com>; Vargas, Hernan
> <hernan.var...@intel.com>
> Cc: dev@dpdk.org; gak...@marvell.com; t...@redhat.com;
> maxime.coque...@redhat.com; Zhang, Qi Z <qi.z.zh...@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.chau...@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

Reply via email to