Re: [PATCH net] net: enetc: prevent VF from configuring preemptiable TCs

From: Vladimir Oltean
Date: Fri Nov 01 2024 - 10:03:37 EST


On Fri, Nov 01, 2024 at 01:55:19PM +0200, Vladimir Oltean wrote:
> On Thu, Oct 31, 2024 at 05:46:47AM +0200, Wei Fang wrote:
> > > > Actually please do this instead:
> > > >
> > > > if (!(si->hw_features & ENETC_SI_F_QBU))
> > > >
> >
> > Actually, VFs of eno0 have ENETC_SI_F_QBU bit set. So we should use the
> > following check instead.
> >
> > if (!enetc_si_is_pf(si) || !(si->hw_features & ENETC_SI_F_QBU))
> >
> > Or we only set ENETC_SI_F_QBU bit for PF in enetc_get_si_caps() if the PF
> > supports 802.1 Qbu.
>
> This one is weird. I don't know why the ENETC would push a capability in
> the SI port capability register 0 for the VSI, if the VSI doesn't have
> access to the port registers in the first place. Let me ask internally,
> so we could figure out what's the best thing to do.

Let's mask the ENETC_SI_F_QBU feature for VSIs in enetc_get_si_caps().
Though we should do the same with ENETC_SIPCAPR0_QBV and ENETC_SIPCAPR0_PSFP.