lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <030d01dbe5b2$ab34df70$019e9e50$@trustnetic.com>
Date: Wed, 25 Jun 2025 17:22:27 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Michal Swiatkowski'" <michal.swiatkowski@...ux.intel.com>
Cc: <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>,
	<stable@...r.kernel.org>
Subject: RE: [PATCH net v2 1/3] net: txgbe: request MISC IRQ in ndo_open

On Wed, Jun 25, 2025 4:53 PM, Michal Swiatkowski wrote:
> On Tue, Jun 24, 2025 at 04:56:32PM +0800, Jiawen Wu wrote:
> > Move the creating of irq_domain for MISC IRQ from .probe to .ndo_open,
> > and free it in .ndo_stop, to maintain consistency with the queue IRQs.
> > This it for subsequent adjustments to the IRQ vectors.
> >
> > Fixes: aefd013624a1 ("net: txgbe: use irq_domain for interrupt controller")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>
> > ---
> >  .../net/ethernet/wangxun/txgbe/txgbe_irq.c    |  2 +-
> >  .../net/ethernet/wangxun/txgbe/txgbe_main.c   | 22 +++++++++----------
> >  2 files changed, 11 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c
> > index 20b9a28bcb55..dc468053bdf8 100644
> > --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c
> > +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c
> > @@ -78,7 +78,6 @@ int txgbe_request_queue_irqs(struct wx *wx)
> >  		free_irq(wx->msix_q_entries[vector].vector,
> >  			 wx->q_vector[vector]);
> >  	}
> > -	wx_reset_interrupt_capability(wx);
> >  	return err;
> >  }
> >
> > @@ -211,6 +210,7 @@ void txgbe_free_misc_irq(struct txgbe *txgbe)
> >  	free_irq(txgbe->link_irq, txgbe);
> >  	free_irq(txgbe->misc.irq, txgbe);
> >  	txgbe_del_irq_domain(txgbe);
> > +	txgbe->wx->misc_irq_domain = false;
> >  }
> >
> >  int txgbe_setup_misc_irq(struct txgbe *txgbe)
> > diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> > index f3d2778b8e35..a5867f3c93fc 100644
> > --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> > +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> > @@ -458,10 +458,14 @@ static int txgbe_open(struct net_device *netdev)
> >
> >  	wx_configure(wx);
> >
> > -	err = txgbe_request_queue_irqs(wx);
> > +	err = txgbe_setup_misc_irq(wx->priv);
> 
> Don't you need misc interrupt before ndo_open is called? I wonder if it
> won't be simpler to always use last index (8) for misc irq. Is it
> possible? I mean, use 8 event if the number of queues is lower than 8.
> If yes you can drop this patch and hardcode misc interrupts on index 8.
> 
> [...]
> 
> BTW, assuming you can't always use last index, the patch looks fine.

Cannot always use index (8). Because the max RSS index is 63 for TXGBE,
but 8 for NGBE. This hardware limitation is only for NGBE. And index (8)
cannot be used by PF when SRIOV is enabled on NGBE.

In fact, the misc interrupt is only used when the device is opened.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ