DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@mellanox.com>
To: matan@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com
Cc: orika@mellanox.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix condition to create default rule
Date: Thu,  7 Nov 2019 17:04:19 +0200	[thread overview]
Message-ID: <68c9b97142373f84eb6af76e5fcf3178bfe4e21c.1573138940.git.dekelp@mellanox.com> (raw)

Previous patch added creation of a default flow rule on port start.
Rule is created under the condition that device is in eswitch mode,
and is not a VF, to make sure rule is created only once.
In Bluefield, where PF representor is used, this condition is not
sufficient. Rule is created twice, causing loss of traffic.

This patch updates this condition, adding check that device is also
not a representor.

Fixes: b67b4ecbde22 ("net/mlx5: skip table zero to improve insertion rate")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index cafab25..f4dc047 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -420,7 +420,7 @@
 		}
 		mlx5_txq_release(dev, i);
 	}
-	if (priv->config.dv_esw_en && !priv->config.vf)
+	if (priv->config.dv_esw_en && !priv->config.vf && !priv->representor)
 		if (!mlx5_flow_create_esw_table_zero_flow(dev))
 			goto error;
 	if (priv->isolated)
-- 
1.8.3.1


             reply	other threads:[~2019-11-07 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 15:04 Dekel Peled [this message]
2019-11-07 15:09 ` Slava Ovsiienko
2019-11-07 23:32 ` 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=68c9b97142373f84eb6af76e5fcf3178bfe4e21c.1573138940.git.dekelp@mellanox.com \
    --to=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=viacheslavo@mellanox.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).