netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: Francois Romieu <romieu@fr.zoreil.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: Thu, 30 Jul 2015 11:42:09 +0530	[thread overview]
Message-ID: <55B9C039.2060805@ti.com> (raw)
In-Reply-To: <20150729225709.GA8122@electric-eye.fr.zoreil.com>

On Thursday 30 July 2015 04:27 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
>> On Wednesday 29 July 2015 04:00 AM, Francois Romieu wrote:
>>> Mugunthan V N <mugunthanvnm@ti.com> :
>>>> On Tuesday 28 July 2015 02:52 AM, Francois Romieu wrote:
> [...]
>>>>> 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.
>>>
>>
>> For each interrupt only one napi will be scheduled, when the first
>> interface is down then only second interface napi is scheduled in both
>> tx and rx irqs.
> 
> Ok, I've had some hints from the "Assumptions" section at
> http://processors.wiki.ti.com/index.php/AM335x_CPSW_%28Ethernet%29_Driver%27s_Guide#Dual_Standalone_EMAC_mode
> 
> Why does the driver create 2 rx napi contexts ? They don't run at the
> same time and the port demux is done in cpsw_dual_emac_src_port_detect.
> The driver would work the same with a single rx (resp. tx) napi context
> for both interfaces.
> 

The wiki you had pointed out is old design done on v3.2 and doesn't have
device tree support also. In mainline Dual EMAC implementation has
changed a lot.

I can think of a way with one napi implementation for each rx and tx,
will submit a separate patch for it.

Regards
Mugunthan V N

      reply	other threads:[~2015-07-30  6:12 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
2015-07-29  5:18         ` Mugunthan V N
2015-07-29 22:57           ` Francois Romieu
2015-07-30  6:12             ` Mugunthan V N [this message]

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=55B9C039.2060805@ti.com \
    --to=mugunthanvnm@ti.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.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).