DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix wire vport hint
@ 2021-01-27 13:53 Viacheslav Ovsiienko
  2021-01-28  9:52 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Viacheslav Ovsiienko @ 2021-01-27 13:53 UTC (permalink / raw)
  To: dev; +Cc: rasland, matan, orika, thomas, stable

In order to optimize number of hops in the steering tables there
was the hint field of source vport in the matcher. If this hint
was provided for the wire port the actual vport match, used by
kernel, was not set in the matcher metadata register field.
This could led to not creating the rule in hardware and E-Switch
malfunction if kernel used non-zero metadata value for the wire
vport.

This patch always sets the match for the vport metadata register
value besides the hint.

Fixes: aaf34de5d801 ("net/mlx5: add wire vport hint")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1a0c0be680..15f778a509 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7964,11 +7964,15 @@ flow_dv_translate_item_port_id(struct rte_eth_dev *dev, void *matcher,
 		    priv->pf_bond < 0 && attr->transfer)
 			flow_dv_translate_item_source_vport
 				(matcher, key, priv->vport_id, mask);
-		else
-			flow_dv_translate_item_meta_vport
-				(matcher, key,
-				 priv->vport_meta_tag,
-				 priv->vport_meta_mask);
+		/*
+		 * We should always set the vport metadata register,
+		 * otherwise the SW steering library can drop
+		 * the rule if wire vport metadata value is not zero,
+		 * it depends on kernel configuration.
+		 */
+		flow_dv_translate_item_meta_vport(matcher, key,
+						  priv->vport_meta_tag,
+						  priv->vport_meta_mask);
 	} else {
 		flow_dv_translate_item_source_vport(matcher, key,
 						    priv->vport_id, mask);
-- 
2.18.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix wire vport hint
  2021-01-27 13:53 [dpdk-dev] [PATCH] net/mlx5: fix wire vport hint Viacheslav Ovsiienko
@ 2021-01-28  9:52 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2021-01-28  9:52 UTC (permalink / raw)
  To: Slava Ovsiienko, dev
  Cc: Matan Azrad, Ori Kam, NBU-Contact-Thomas Monjalon, stable

Hi,

> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Sent: Wednesday, January 27, 2021 3:53 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas
> Monjalon <thomas@monjalon.net>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix wire vport hint
> 
> In order to optimize number of hops in the steering tables there
> was the hint field of source vport in the matcher. If this hint
> was provided for the wire port the actual vport match, used by
> kernel, was not set in the matcher metadata register field.
> This could led to not creating the rule in hardware and E-Switch
> malfunction if kernel used non-zero metadata value for the wire
> vport.
> 
> This patch always sets the match for the vport metadata register
> value besides the hint.
> 
> Fixes: aaf34de5d801 ("net/mlx5: add wire vport hint")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-28  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 13:53 [dpdk-dev] [PATCH] net/mlx5: fix wire vport hint Viacheslav Ovsiienko
2021-01-28  9:52 ` Raslan Darawsheh

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git