[dpdk-dev] [PATCH v4 00/58] net: txgbe PMD

Honnappa Nagarahalli Honnappa.Nagarahalli at arm.com
Fri Nov 6 18:36:07 CET 2020


<snip>

> > > +Cc Konstantin and Honnappa for guidance
> > >
> > > 05/11/2020 09:55, Jiawen Wu:
> > > > On Thursday, November 5, 2020 9:55 AM, Jiawen Wu wrote:
> > > > > On Thursday, November 5, 2020 1:24 AM, Ferruh Yigit wrote:
> > > > > > On 11/3/2020 11:08 PM, Thomas Monjalon wrote:
> > > > > > > When pulling in the main branch, I see some checkpatches
> > > > > > > warnings (in order of criticality):
> > > > > > > 	Using rte_smp_[r/w]mb
> > > > > > > 	Using rte_panic/rte_exit
> > > > > > > 	Using compiler attribute directly
> > > > > > >
> > > > > > > Please could you fix them (at least first two) before the
> > > > > > > second
> series?
> > > [...]
> > > >
> > > > I saw ' rte_smp_*mb ' is in the deprecation notices, but there is
> > > > no function can be an alternative.
> > > > I would like to use 'rte_atomic_thread_fence(__ATOMIC_ACQUIRE)' to
> > > > replace 'rte_smp_rmb()', is it the correct usage?
> > Yes, rte_atomic_thread_fence(__ATOMIC_ACQUIRE) is the correct code to
> > replace 'rte_smp_rmb()'.
> >
> > However, I took a look at the code and it is not clear to me if the
> barrier is
> > required or if it is in the correct place.
> >
> 
> Thanks for guidance.
> 
> I want to add the barrier at the time before reading descriptors in Rx scan, to
> synchronize with the hardware.
> Actually I don't really understand the usage of this function.
> Could you please tell me more details?
Looking at the code again, qw0 should not be read before checking the status of the descriptors. So, barrier is required.
But, I think the barrier can be moved down after the for loop that computes the number of status bits set.

> 
> 



More information about the dev mailing list