[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7dcc62b6536be05c784a50bf8a6da89eb3003697.camel@redhat.com>
Date: Tue, 21 Feb 2023 09:01:25 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Pawel Chmielewski <pawel.chmielewski@...el.com>,
netdev@...r.kernel.org
Cc: intel-wired-lan@...osl.org
Subject: Re: [PATCH net-next v3 1/1] ice: Change assigning method of the CPU
affinity masks
On Fri, 2023-02-17 at 23:03 +0100, Pawel Chmielewski wrote:
> With the introduction of sched_numa_hop_mask() and for_each_numa_hop_mask(),
> the affinity masks for queue vectors can be conveniently set by preferring the
> CPUs that are closest to the NUMA node of the parent PCI device.
>
> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@...el.com>
> ---
> Changes since v2:
> * Pointers for cpumasks point to const struct cpumask
> * Removed unnecessary label
> * Removed redundant blank lines
>
> Changes since v1:
> * Removed obsolete comment
> * Inverted condition for loop escape
> * Incrementing v_idx only in case of available cpu
> ---
> drivers/net/ethernet/intel/ice/ice_base.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c
> index 1911d644dfa8..30dc1c3c290f 100644
> --- a/drivers/net/ethernet/intel/ice/ice_base.c
> +++ b/drivers/net/ethernet/intel/ice/ice_base.c
> @@ -121,9 +121,6 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx)
>
> if (vsi->type == ICE_VSI_VF)
> goto out;
> - /* only set affinity_mask if the CPU is online */
> - if (cpu_online(v_idx))
> - cpumask_set_cpu(v_idx, &q_vector->affinity_mask);
>
> /* This will not be called in the driver load path because the netdev
> * will not be created yet. All other cases with register the NAPI
> @@ -662,8 +659,10 @@ int ice_vsi_wait_one_rx_ring(struct ice_vsi *vsi, bool ena, u16 rxq_idx)
> */
> int ice_vsi_alloc_q_vectors(struct ice_vsi *vsi)
> {
> + const struct cpumask *aff_mask, *last_aff_mask = cpu_none_mask;
> struct device *dev = ice_pf_to_dev(vsi->back);
> - u16 v_idx;
> + int numa_node = dev->numa_node;
The above breaks the build when CONFIG_XPS and CONFIG_NUMA are not
defined.
Note: net-next is now closed, please post the new revision after the
merge window, when net-next will re-open.
Thank,
Paolo
Powered by blists - more mailing lists