[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SN6PR11MB3136CE39DA28B20378A25D6988639@SN6PR11MB3136.namprd11.prod.outlook.com>
Date: Wed, 24 Mar 2021 08:43:46 +0000
From: "Voon, Weifeng" <weifeng.voon@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "David S . Miller" <davem@...emloft.net>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jose Abreu <joabreu@...opsys.com>,
"Giuseppe Cavallaro" <peppe.cavallaro@...com>,
Andrew Lunn <andrew@...n.ch>,
"Alexandre Torgue" <alexandre.torgue@...com>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"Ong, Boon Leong" <boon.leong.ong@...el.com>,
"Wong, Vee Khee" <vee.khee.wong@...el.com>
Subject: RE: [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt
routines for mac, safety, RX & TX
> On Tue, 16 Mar 2021 20:18:21 +0800 Voon Weifeng wrote:
> > From: Ong Boon Leong <boon.leong.ong@...el.com>
> >
> > Now we introduce MSI interrupt service routines and hook these
> > routines up if stmmac_open() sees valid irq line being requested:-
> >
> > stmmac_mac_interrupt() :- MAC (dev->irq), WOL (wol_irq), LPI (lpi_irq)
> > stmmac_safety_interrupt() :- Safety Feat Correctible Error (sfty_ce_irq)
> > & Uncorrectible Error (sfty_ue_irq)
> > stmmac_msi_intr_rx() :- For all RX MSI irq (rx_irq)
> > stmmac_msi_intr_tx() :- For all TX MSI irq (tx_irq)
>
> Do you split RX and TX irqs out on purpose? Most commonly one queue pair
> maps to one CPU, so using single IRQ for Rx and Tx results in fewer IRQs
> being triggered and better system performance.
Yes, the RX and TX irqs are split out on purpose as the hardware is designed
to have independent MSI vector. You can refer the 4th patch in the this patchset.
https://patchwork.kernel.org/project/netdevbpf/patch/20210316121823.18659-5-weifeng.voon@intel.com/
This design also gives us the flexibility to group RX/TX MSI vectors to specific CPU freely.
Weifeng
> > Each of IRQs will have its unique name so that we can differentiate
> > them easily under /proc/interrupts.
> >
> > Signed-off-by: Ong Boon Leong <boon.leong.ong@...el.com>
> > Signed-off-by: Voon Weifeng <weifeng.voon@...el.com>
>
> > +static int stmmac_request_irq(struct net_device *dev)
>
> This function is a one huge if statement, please factor out both sides into
> separate subfunctions.
Noted. Will do.
>
> > + netdev_info(priv->dev, "PASS: requesting IRQs\n");
>
> Does the user really need to know interrupts were requested on every probe?
Will remove.
>
> > + return ret;
>
> return 0; ?
Good catch, will fix.
>
> > +irq_error:
> > + stmmac_free_irq(dev, irq_err, irq_idx);
> > + return ret;
> > +}
Powered by blists - more mailing lists