All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Aya Levin <ayal@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 16/16] net/mlx5e: Fix RQ creation flow for queues which doesn't support XDP
Date: Tue, 13 Apr 2021 12:30:06 -0700	[thread overview]
Message-ID: <20210413193006.21650-17-saeed@kernel.org> (raw)
In-Reply-To: <20210413193006.21650-1-saeed@kernel.org>

From: Aya Levin <ayal@nvidia.com>

Allow to create an RQ which is not registered as an XDP RQ. For example:
the trap-RQ doesn't register as an XDP RQ.

Fixes: 869c5f926247 ("net/mlx5e: Generalize open RQ")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 2f47608bb9b9..6847e7b909a5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -510,8 +510,9 @@ static int mlx5e_alloc_rq(struct mlx5e_params *params,
 			rq->page_pool = NULL;
 			goto err_free_by_rq_type;
 		}
-		err = xdp_rxq_info_reg_mem_model(&rq->xdp_rxq,
-						 MEM_TYPE_PAGE_POOL, rq->page_pool);
+		if (xdp_rxq_info_is_reg(&rq->xdp_rxq))
+			err = xdp_rxq_info_reg_mem_model(&rq->xdp_rxq,
+							 MEM_TYPE_PAGE_POOL, rq->page_pool);
 	}
 	if (err)
 		goto err_free_by_rq_type;
-- 
2.30.2


      parent reply	other threads:[~2021-04-13 19:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 19:29 [pull request][net-next 00/16] mlx5 updates 2021-04-13 Saeed Mahameed
2021-04-13 19:29 ` [net-next 01/16] net/mlx5: E-Switch, let user to enable disable metadata Saeed Mahameed
2021-04-13 20:21   ` Jakub Kicinski
2021-04-13 22:40     ` Saeed Mahameed
2021-04-13 22:57       ` Jakub Kicinski
2021-04-13 19:29 ` [net-next 02/16] net/mlx5: E-Switch, Skip querying SF enabled bits Saeed Mahameed
2021-04-13 19:29 ` [net-next 03/16] net/mlx5: E-Switch, Make vport number u16 Saeed Mahameed
2021-04-13 19:29 ` [net-next 04/16] net/mlx5: E-Switch Make cleanup sequence mirror of init Saeed Mahameed
2021-04-13 19:29 ` [net-next 05/16] net/mlx5: E-Switch, Convert a macro to a helper routine Saeed Mahameed
2021-04-13 19:29 ` [net-next 06/16] net/mlx5: E-Switch, Move legacy code to a individual file Saeed Mahameed
2021-04-13 19:29 ` [net-next 07/16] net/mlx5: E-Switch, Initialize eswitch acls ns when eswitch is enabled Saeed Mahameed
2021-04-13 19:29 ` [net-next 08/16] net/mlx5: SF, Use device pointer directly Saeed Mahameed
2021-04-13 19:29 ` [net-next 09/16] net/mlx5: SF, Reuse stored hardware function id Saeed Mahameed
2021-04-13 19:30 ` [net-next 10/16] net/mlx5: DR, Use variably sized data structures for different actions Saeed Mahameed
2021-04-13 19:30 ` [net-next 11/16] net/mlx5: DR, Alloc cmd buffer with kvzalloc() instead of kzalloc() Saeed Mahameed
2021-04-13 19:30 ` [net-next 12/16] net/mlx5: Fix bit-wise and with zero Saeed Mahameed
2021-04-13 19:30 ` [net-next 13/16] net/mlx5: Add a blank line after declarations Saeed Mahameed
2021-04-13 19:30 ` [net-next 14/16] net/mlx5: Remove return statement exist at the end of void function Saeed Mahameed
2021-04-13 19:30 ` [net-next 15/16] net/mlx5: Replace spaces with tab at the start of a line Saeed Mahameed
2021-04-13 19:30 ` Saeed Mahameed [this message]

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=20210413193006.21650-17-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=ayal@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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.