public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Claudiu Manoil <claudiu.manoil@nxp.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next] enetc: Use generic rule to map Tx rings to interrupt vectors
Date: Fri, 9 Apr 2021 13:19:52 +0300	[thread overview]
Message-ID: <20210409101952.iyf4svtgxvgwvxfr@skbuf> (raw)
In-Reply-To: <20210409071613.28912-1-claudiu.manoil@nxp.com>

On Fri, Apr 09, 2021 at 10:16:13AM +0300, Claudiu Manoil wrote:
> Even if the current mapping is correct for the 1 CPU and 2 CPU cases
> (currently enetc is included in SoCs with up to 2 CPUs only), better
> use a generic rule for the mapping to cover all possible cases.
> The number of CPUs is the same as the number of interrupt vectors:
> 
> Per device Tx rings -
> device_tx_ring[idx], where idx = 0..n_rings_total-1
> 
> Per interrupt vector Tx rings -
> int_vector[i].ring[j], where i = 0..n_int_vects-1
> 			     j = 0..n_rings_per_v-1
> 
> Mapping rule -
> n_rings_per_v = n_rings_total / n_int_vects
> for i = 0..n_int_vects - 1:
> 	for j = 0..n_rings_per_v - 1:
> 		idx = n_int_vects * j + i
> 		int_vector[i].ring[j] <- device_tx_ring[idx]
> 
> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
> ---

Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>

  reply	other threads:[~2021-04-09 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  7:16 [PATCH net-next] enetc: Use generic rule to map Tx rings to interrupt vectors Claudiu Manoil
2021-04-09 10:19 ` Vladimir Oltean [this message]
2021-04-10  1:23   ` 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=20210409101952.iyf4svtgxvgwvxfr@skbuf \
    --to=olteanv@gmail.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox