DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain
@ 2019-11-21 17:59 Viacheslav Ovsiienko
  2019-11-24  7:06 ` Matan Azrad
  2019-11-24 11:54 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Viacheslav Ovsiienko @ 2019-11-21 17:59 UTC (permalink / raw)
  To: dev; +Cc: matan, rasland, orika

The metadata register used for META item/action within E-Switch
steering domain should be altered depending on dv_xmeta_en
devarg value.

Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b488b67..65a0e65 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -364,7 +364,15 @@ enum modify_reg
 	case MLX5_METADATA_TX:
 		return REG_A;
 	case MLX5_METADATA_FDB:
-		return REG_C_0;
+		switch (config->dv_xmeta_en) {
+		case MLX5_XMETA_MODE_LEGACY:
+			return REG_NONE;
+		case MLX5_XMETA_MODE_META16:
+			return REG_C_0;
+		case MLX5_XMETA_MODE_META32:
+			return REG_C_1;
+		}
+		break;
 	case MLX5_FLOW_MARK:
 		switch (config->dv_xmeta_en) {
 		case MLX5_XMETA_MODE_LEGACY:
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain
  2019-11-21 17:59 [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain Viacheslav Ovsiienko
@ 2019-11-24  7:06 ` Matan Azrad
  2019-11-24 11:54 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2019-11-24  7:06 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam



From: Viacheslav Ovsiienko
> The metadata register used for META item/action within E-Switch steering
> domain should be altered depending on dv_xmeta_en devarg value.
> 
> Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
Acked-by: Matan Azrad <matan@mellanox.com>


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain
  2019-11-21 17:59 [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain Viacheslav Ovsiienko
  2019-11-24  7:06 ` Matan Azrad
@ 2019-11-24 11:54 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-11-24 11:54 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Matan Azrad, Ori Kam

Hi,

> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Sent: Thursday, November 21, 2019 8:00 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>
> Subject: [PATCH] net/mlx5: fix get metadata register for E-Switch domain
> 
> The metadata register used for META item/action within E-Switch steering
> domain should be altered depending on dv_xmeta_en devarg value.
> 
> Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index b488b67..65a0e65 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -364,7 +364,15 @@ enum modify_reg
>  	case MLX5_METADATA_TX:
>  		return REG_A;
>  	case MLX5_METADATA_FDB:
> -		return REG_C_0;
> +		switch (config->dv_xmeta_en) {
> +		case MLX5_XMETA_MODE_LEGACY:
> +			return REG_NONE;
> +		case MLX5_XMETA_MODE_META16:
> +			return REG_C_0;
> +		case MLX5_XMETA_MODE_META32:
> +			return REG_C_1;
> +		}
> +		break;
>  	case MLX5_FLOW_MARK:
>  		switch (config->dv_xmeta_en) {
>  		case MLX5_XMETA_MODE_LEGACY:
> --
> 1.8.3.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 17:59 [dpdk-dev] [PATCH] net/mlx5: fix get metadata register for E-Switch domain Viacheslav Ovsiienko
2019-11-24  7:06 ` Matan Azrad
2019-11-24 11:54 ` Raslan Darawsheh

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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