[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFvZ4miOKWbj1Xvp@mev-dev.igk.intel.com>
Date: Wed, 25 Jun 2025 13:13:38 +0200
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: 'Michal Swiatkowski' <michal.swiatkowski@...ux.intel.com>,
netdev@...r.kernel.org, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
horms@...nel.org, mengyuanlou@...-swift.com,
duanqiangwen@...-swift.com
Subject: Re: [PATCH net v2 3/3] net: ngbe: specify IRQ vector when the number
of VFs is 7
On Wed, Jun 25, 2025 at 05:27:05PM +0800, Jiawen Wu wrote:
> > > diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h b/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h
> > > index 6eca6de475f7..b6252b272364 100644
> > > --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h
> > > +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h
> > > @@ -87,7 +87,8 @@
> > > #define NGBE_PX_MISC_IC_TIMESYNC BIT(11) /* time sync */
> > >
> > > #define NGBE_INTR_ALL 0x1FF
> > > -#define NGBE_INTR_MISC(A) BIT((A)->num_q_vectors)
> > > +#define NGBE_INTR_MISC(A) ((A)->num_vfs == 7 ? \
> > > + BIT(0) : BIT((A)->num_q_vectors))
> >
> > Isn't it problematic that configuring interrupts is done in
> > ndo_open/ndo_stop on PF, but it depends on numvfs set in otther context.
> > If you start with misc on index 8 and after that set numvfs to 7 isn't
> > it fail?
>
> When setting num_vfs, wx->setup_tc() is called to re-init the interrupt scheme.
>
Right, maybe to be more clear you should use wx->msix_entry->entry
wherever misc index is used.
Powered by blists - more mailing lists