RE: [PATCH net] net: enetc: prevent VF from configuring preemptiable TCs
From: Wei Fang
Date: Sun Nov 03 2024 - 20:46:55 EST
> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> Sent: 2024年11月1日 22:03
> To: Wei Fang <wei.fang@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; andrew+netdev@xxxxxxx; Claudiu Manoil
> <claudiu.manoil@xxxxxxx>; netdev@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH net] net: enetc: prevent VF from configuring preemptiable
> TCs
>
> 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.
Yes, I agree with you, for QBV and PSFP, I think we'd better to use a separate
patch to clear these two bits for VFs, and the target of the patch will be net-next
tree, because the related interfaces of these two features are not accessed by
VFs, so there are no notable and visible issues at present.