All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yannick Vignon <yannick.vignon@oss.nxp.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Antoine Tenart <atenart@kernel.org>, Wei Wang <weiwan@google.com>,
	Taehee Yoo <ap420073@gmail.com>,
	Alexander Lobakin <alobakin@pm.me>,
	netdev <netdev@vger.kernel.org>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Joakim Zhang <qiangqing.zhang@nxp.com>,
	sebastien.laveze@oss.nxp.com,
	Yannick Vignon <yannick.vignon@nxp.com>
Subject: Re: [RFC PATCH net-next v1 1/2] net: add name field to napi struct
Date: Tue, 11 May 2021 18:44:26 +0200	[thread overview]
Message-ID: <2ce5ff9d-7453-f48e-7e84-539752f72be5@oss.nxp.com> (raw)
In-Reply-To: <CANn89i+kZnGHmiVoQSj4Xww7uNwhaj8+XV2C+4a_6k+T4UcY7g@mail.gmail.com>

On 5/6/2021 7:35 PM, Eric Dumazet wrote:
> On Thu, May 6, 2021 at 7:20 PM Yannick Vignon
> <yannick.vignon@oss.nxp.com> wrote:
>>
>> From: Yannick Vignon <yannick.vignon@nxp.com>
>>
>> An interesting possibility offered by the new thread NAPI code is to
>> fine-tune the affinities and priorities of different NAPI instances. In a
>> real-time networking context, this makes it possible to ensure packets
>> received in a high-priority queue are always processed, and with low
>> latency.
>>
>> However, the way the NAPI threads are named does not really expose which
>> one is responsible for a given queue. Assigning a more explicit name to
>> NAPI instances can make that determination much easier.
>>
>> Signed-off-by: Yannick Vignon <yannick.vignon@nxp.com>
>> -
> 
> Having to change drivers seems a lot of work
> 
> How about exposing thread id (and napi_id eventually) in
> /sys/class/net/eth0/queues/*/kthread_pid  ?
> 

This seemed like a good idea, but after looking into how to actually 
implement it, I can't find a way to "map" rx queues to napi instances. 
Am I missing something?

In the end, I'm afraid that the NAPI<->RX queue mapping is only known 
within the drivers, so we'll have no choice but to modify them
to extract that information somehow.

  reply	other threads:[~2021-05-11 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 17:20 [RFC PATCH net-next v1 0/2] Threaded NAPI configurability Yannick Vignon
2021-05-06 17:20 ` [RFC PATCH net-next v1 1/2] net: add name field to napi struct Yannick Vignon
2021-05-06 17:35   ` Eric Dumazet
2021-05-11 16:44     ` Yannick Vignon [this message]
2021-05-06 17:20 ` [RFC PATCH net-next v1 2/2] net: stmmac: use specific name for each NAPI instance Yannick Vignon
2021-05-06 22:18 ` [RFC PATCH net-next v1 0/2] Threaded NAPI configurability Jakub Kicinski
2021-05-11 16:46   ` Yannick Vignon
2021-05-12  1:07     ` Jakub Kicinski

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=2ce5ff9d-7453-f48e-7e84-539752f72be5@oss.nxp.com \
    --to=yannick.vignon@oss.nxp.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=alobakin@pm.me \
    --cc=ap420073@gmail.com \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=qiangqing.zhang@nxp.com \
    --cc=sebastien.laveze@oss.nxp.com \
    --cc=weiwan@google.com \
    --cc=yannick.vignon@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.