Netdev List
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, m.szyprowski@samsung.com,
	robin.murphy@arm.com, iommu@lists.linux.dev, joro@8bytes.org,
	will@kernel.org, "Björn Töpel" <bjorn@kernel.org>
Subject: Re: [PATCH 07/11] eth: ixgbe: use dma_alloc_coherent_node()
Date: Mon, 16 Nov 2026 13:27:34 +0100	[thread overview]
Message-ID: <bcb4535b-46f5-42a9-b94d-0fd2a6c29096@intel.com> (raw)
In-Reply-To: <20261106184433.761422-8-kuba@kernel.org>

On 11/6/26 19:44, Jakub Kicinski wrote:
> Use dma_alloc_coherent_node() to place the descriptor rings on the
> node of the ring's q_vector, instead of temporarily changing the node
> of the device. NUMA_NO_NODE (ring without a q_vector) means no
> preference, same as what set_dev_node(dev, NUMA_NO_NODE) resulted in.
> 
> Reviewed-by: Björn Töpel <bjorn@kernel.org>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

nice!
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

> ---
> v1: no change
> rfc: https://lore.kernel.org/20261027022528.633359-8-kuba@kernel.org
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 ++++++-------------
>   1 file changed, 6 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index b9496f0bee13..6458cb2e511e 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7083,7 +7083,6 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
>   int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring)
>   {
>   	struct device *dev = tx_ring->dev;
> -	int orig_node = dev_to_node(dev);
>   	int ring_node = NUMA_NO_NODE;
>   	int size;
>   
> @@ -7102,12 +7101,9 @@ int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring)
>   	tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
>   	tx_ring->size = ALIGN(tx_ring->size, 4096);
>   
> -	set_dev_node(dev, ring_node);
> -	tx_ring->desc = dma_alloc_coherent(dev,
> -					   tx_ring->size,
> -					   &tx_ring->dma,
> -					   GFP_KERNEL);
> -	set_dev_node(dev, orig_node);
> +	tx_ring->desc = dma_alloc_coherent_node(dev, tx_ring->size,
> +						&tx_ring->dma, GFP_KERNEL,
> +						ring_node);
>   	if (!tx_ring->desc)
>   		tx_ring->desc = dma_alloc_coherent(dev, tx_ring->size,
>   						   &tx_ring->dma, GFP_KERNEL);
> @@ -7184,7 +7180,6 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
>   			     struct ixgbe_ring *rx_ring)
>   {
>   	struct device *dev = rx_ring->dev;
> -	int orig_node = dev_to_node(dev);
>   	int ring_node = NUMA_NO_NODE;
>   	int size;
>   
> @@ -7203,12 +7198,9 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
>   	rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
>   	rx_ring->size = ALIGN(rx_ring->size, 4096);
>   
> -	set_dev_node(dev, ring_node);
> -	rx_ring->desc = dma_alloc_coherent(dev,
> -					   rx_ring->size,
> -					   &rx_ring->dma,
> -					   GFP_KERNEL);
> -	set_dev_node(dev, orig_node);
> +	rx_ring->desc = dma_alloc_coherent_node(dev, rx_ring->size,
> +						&rx_ring->dma, GFP_KERNEL,
> +						ring_node);
>   	if (!rx_ring->desc)
>   		rx_ring->desc = dma_alloc_coherent(dev, rx_ring->size,
>   						   &rx_ring->dma, GFP_KERNEL);


  reply	other threads:[~2026-11-16 12:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 18:44 [PATCH 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 01/11] " Jakub Kicinski
2026-11-06 23:41   ` Marek Szyprowski
2026-11-06 18:44 ` [PATCH 02/11] dma-direct: add dma_direct_alloc_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 03/11] iommu/dma: pass the NUMA node to iommu_dma_alloc() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 04/11] dma-contiguous: pass the NUMA node to dma_alloc_contiguous() Jakub Kicinski
2026-11-12  9:53   ` Paolo Abeni
2026-11-12 13:28     ` Robin Murphy
2026-11-12 15:43       ` Paolo Abeni
2026-11-12 16:17         ` Jakub Kicinski
2026-11-12 16:21         ` Robin Murphy
2026-11-06 18:44 ` [PATCH 05/11] eth: libwx: restore the device's NUMA node after ring allocation Jakub Kicinski
2026-11-06 18:44 ` [PATCH 06/11] eth: libwx: use dma_alloc_coherent_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 07/11] eth: ixgbe: " Jakub Kicinski
2026-11-16 12:27   ` Przemek Kitszel [this message]
2026-11-06 18:44 ` [PATCH 08/11] eth: xgbe: " Jakub Kicinski
2026-11-06 18:44 ` [PATCH 09/11] eth: fungible: " Jakub Kicinski
2026-11-06 18:44 ` [PATCH 10/11] eth: mlx5: " Jakub Kicinski
2026-11-12 12:31   ` Tariq Toukan
2026-11-06 18:44 ` [PATCH 11/11] eth: mlx4: " Jakub Kicinski
2026-11-12 12:32   ` Tariq Toukan
2026-11-12 16:16 ` [PATCH 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() Jakub Kicinski
2026-11-16  9:57   ` Marek Szyprowski
2026-11-12 16:51 ` Robin Murphy

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=bcb4535b-46f5-42a9-b94d-0fd2a6c29096@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=bjorn@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kuba@kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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