From: Francois Romieu <romieu@fr.zoreil.com>
To: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [net-next PATCH 2/2] drivers: net: cpsw: add separate napi for tx packet handling for performance improvment
Date: Wed, 29 Jul 2015 00:30:13 +0200 [thread overview]
Message-ID: <20150728223013.GA10669@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <55B71E99.50807@ti.com>
Mugunthan V N <mugunthanvnm@ti.com> :
> On Tuesday 28 July 2015 02:52 AM, Francois Romieu wrote:
> > Mugunthan V N <mugunthanvnm@ti.com> :
[...]
> >> @@ -752,13 +753,22 @@ static irqreturn_t cpsw_tx_interrupt(int irq, void *dev_id)
> >> struct cpsw_priv *priv = dev_id;
> >>
> >> cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);
> >> - cpdma_chan_process(priv->txch, 128);
> >> + writel(0, &priv->wr_regs->tx_en);
> >> +
> >> + if (netif_running(priv->ndev)) {
> >> + napi_schedule(&priv->napi_tx);
> >> + return IRQ_HANDLED;
> >> + }
> >
> >
> > cpsw_ndo_stop calls napi_disable: you can remove netif_running.
> >
>
> This netif_running check is to find which interface is up as the
> interrupt is shared by both the interfaces. When first interface is down
> and second interface is active then napi_schedule for first interface
> will fail and second interface napi needs to be scheduled.
>
> So I don't think netif_running needs to be removed.
Each interface has its own napi tx (resp. rx) context: I would had expected
two unconditional napi_schedule per tx (resp. rx) shared irq, not one.
I'll read it again after some sleep.
--
Ueimor
next prev parent reply other threads:[~2015-07-28 22:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 11:18 [net-next PATCH 0/2] CPSW interrupt handling cleanup and performance improvement Mugunthan V N
2015-07-27 11:19 ` [net-next PATCH 1/2] drivers: net: cpsw: remove disable_irq/enable_irq as irq can be masked from cpsw itself Mugunthan V N
2015-07-27 11:19 ` [net-next PATCH 2/2] drivers: net: cpsw: add separate napi for tx packet handling for performance improvment Mugunthan V N
2015-07-27 21:22 ` Francois Romieu
2015-07-28 6:02 ` Mugunthan V N
2015-07-28 6:18 ` Mugunthan V N
2015-07-28 22:30 ` Francois Romieu [this message]
2015-07-29 5:18 ` Mugunthan V N
2015-07-29 22:57 ` Francois Romieu
2015-07-30 6:12 ` Mugunthan V N
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=20150728223013.GA10669@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=davem@davemloft.net \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/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).