lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210409101952.iyf4svtgxvgwvxfr@skbuf>
Date:   Fri, 9 Apr 2021 13:19:52 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Claudiu Manoil <claudiu.manoil@....com>
Cc:     netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next] enetc: Use generic rule to map Tx rings to
 interrupt vectors

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@....com>
> ---

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ