Re: [EXTERNAL] Re: [net-next,v2 3/8] octeontx2-af: Disable backpressure between CPT and NIX

From: Simon Horman
Date: Tue May 14 2024 - 07:51:21 EST


On Tue, May 14, 2024 at 11:26:54AM +0000, Bharat Bhushan wrote:
> Please see inline
>
> > -----Original Message-----
> > From: Simon Horman <horms@xxxxxxxxxx>

..

> > > > I suspect 1 will have little downside and be easiest to implement.
> > >
> > > pfc_en is already a field of otx2_nic but under CONFIG_DCB. Will fix by
> > adding a wrapper function like:
> >
> > Thanks. Just to clarify, my first suggestion was to move pfc_en outside of
> > CONFIG_DCB in otx2_nic.
> >
> > >
> > > static bool is_pfc_enabled(struct otx2_nic *pfvf) { #ifdef CONFIG_DCB
> > > return pfvf->pfc_en ? true : false;
> >
> > FWIIW, I think this could also be:
> >
> > return !!pfvf->pfc_en;
> >
> > > #endif
> > > return false;
> > > }
> >
> > Also, I do wonder if the following can work:
> >
> > return IS_ENABLED(CONFIG_DCB) && pfvf->pfc_en;
>
> This is required at more than one place, so will keep wrapper function with this condition check.

Thanks, sounds good.

..