> <snip>
> 
> >
> > +   exp = 0;
> >     /* R E P O R T processing */
> > -   if (rte_atomic16_test_and_set(&display_once)) {
> > +   if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
> > +                   __ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
> I think we can re-organize the current code which will avoid using atomic
> operations on 'display_once'. How about the following code?
> 
> rte_spinlock_lock(&print_spinlock);
> if (display_once != 1) {
>       display_once = 1;
>       printf("\nLegend for the table\n".....
>       <all other printfs>
> }
> printf....
> printf....
> printf....
> rte_spinlock_unlock(&print_spinlock);
> 
> Rest of the changes look fine.
> 

Will send out the next version with the changes.

Reply via email to