DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiawei Wang <jiaweiw@nvidia.com>
To: <suanmingm@nvidia.com>, <viacheslavo@nvidia.com>,
	Matan Azrad <matan@nvidia.com>, Ori Kam <orika@nvidia.com>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>
Subject: [PATCH] net/mlx5: fix checking for send to kernel action
Date: Fri, 3 Nov 2023 17:25:56 +0200	[thread overview]
Message-ID: <20231103152556.20532-1-jiaweiw@nvidia.com> (raw)

This patch adds the checking to avoid creating send_to_kernel
action on the FDB table if eswitch disabled.

Fixes: 033e826f680b ("net/mlx5: fix device checking for send to kernel action")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 7376030da2..22d1e652f2 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7287,7 +7287,8 @@ flow_hw_create_send_to_kernel_actions(struct mlx5_priv *priv __rte_unused)
 	bool is_vf_sf_dev = priv->sh->dev_cap.vf || priv->sh->dev_cap.sf;
 
 	for (i = MLX5DR_TABLE_TYPE_NIC_RX; i < MLX5DR_TABLE_TYPE_MAX; i++) {
-		if (is_vf_sf_dev && MLX5DR_TABLE_TYPE_FDB == i)
+		if ((!priv->sh->config.dv_esw_en || is_vf_sf_dev) &&
+		    MLX5DR_TABLE_TYPE_FDB == i)
 			continue;
 		action_flag = mlx5_hw_act_flag[1][i];
 		priv->hw_send_to_kernel[i] =
-- 
2.18.1


             reply	other threads:[~2023-11-03 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 15:25 Jiawei Wang [this message]
2023-11-12  7:55 ` Raslan Darawsheh

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=20231103152556.20532-1-jiaweiw@nvidia.com \
    --to=jiaweiw@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).