linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Voon, Weifeng" <weifeng.voon@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jose Abreu <joabreu@synopsys.com>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"Alexandre Torgue" <alexandre.torgue@st.com>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>,
	"Wong, Vee Khee" <vee.khee.wong@intel.com>
Subject: RE: [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX
Date: Wed, 24 Mar 2021 08:43:46 +0000	[thread overview]
Message-ID: <SN6PR11MB3136CE39DA28B20378A25D6988639@SN6PR11MB3136.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210316142941.3ea1e24d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

> On Tue, 16 Mar 2021 20:18:21 +0800 Voon Weifeng wrote:
> > From: Ong Boon Leong <boon.leong.ong@intel.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@intel.com>
> > Signed-off-by: Voon Weifeng <weifeng.voon@intel.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;
> > +}

  reply	other threads:[~2021-03-24  8:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 12:18 [RESEND v1 net-next 0/5] net: stmmac: enable multi-vector MSI Voon Weifeng
2021-03-16 12:18 ` [RESEND v1 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction Voon Weifeng
2021-03-16 12:18 ` [RESEND v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI Voon Weifeng
2021-03-16 21:21   ` Jakub Kicinski
2021-03-16 12:18 ` [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX Voon Weifeng
2021-03-16 21:29   ` Jakub Kicinski
2021-03-24  8:43     ` Voon, Weifeng [this message]
2021-03-16 12:18 ` [RESEND v1 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x Voon Weifeng
2021-03-16 21:32   ` Jakub Kicinski
2021-03-16 12:18 ` [RESEND v1 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI Voon Weifeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB3136CE39DA28B20378A25D6988639@SN6PR11MB3136.namprd11.prod.outlook.com \
    --to=weifeng.voon@intel.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=vee.khee.wong@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).