* [dpdk-dev] [PATCH] net/mlx5: fix setting of port ID for egress rules
@ 2020-01-22 12:33 Dekel Peled
2020-01-26 16:36 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Dekel Peled @ 2020-01-22 12:33 UTC (permalink / raw)
To: matan, viacheslavo; +Cc: rasland, orika, dev, stable
Previous patch fixed the setting of port-id for eswitch rules, which
are ingress only.
This patch expands the fix, to support nic rules as well, which can
be ingress or egress.
Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5a1b426..7a169c7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7645,13 +7645,13 @@ struct field_modify_info modify_tcp[] = {
item_flags |= last_item;
}
/*
- * In case of ingress traffic when E-Switch mode is enabled,
- * we have two cases where we need to set the source port manually.
+ * When E-Switch mode is enabled, we have two cases where we need to
+ * set the source port manually.
* The first one, is in case of Nic steering rule, and the second is
* E-Switch rule where no port_id item was found. In both cases
* the source port is set according the current port in use.
*/
- if ((attr->ingress && !(item_flags & MLX5_FLOW_ITEM_PORT_ID)) &&
+ if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) &&
(priv->representor || priv->master)) {
if (flow_dv_translate_item_port_id(dev, match_mask,
match_value, NULL))
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix setting of port ID for egress rules
2020-01-22 12:33 [dpdk-dev] [PATCH] net/mlx5: fix setting of port ID for egress rules Dekel Peled
@ 2020-01-26 16:36 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-01-26 16:36 UTC (permalink / raw)
To: Dekel Peled, Matan Azrad, Slava Ovsiienko; +Cc: Ori Kam, dev, stable
Hi,
> -----Original Message-----
> From: Dekel Peled <dekelp@mellanox.com>
> Sent: Wednesday, January 22, 2020 2:33 PM
> To: Matan Azrad <matan@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ori Kam
> <orika@mellanox.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix setting of port ID for egress rules
>
> Previous patch fixed the setting of port-id for eswitch rules, which
> are ingress only.
> This patch expands the fix, to support nic rules as well, which can
> be ingress or egress.
>
> Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Ori Kam <orika@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 5a1b426..7a169c7 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -7645,13 +7645,13 @@ struct field_modify_info modify_tcp[] = {
> item_flags |= last_item;
> }
> /*
> - * In case of ingress traffic when E-Switch mode is enabled,
> - * we have two cases where we need to set the source port
> manually.
> + * When E-Switch mode is enabled, we have two cases where we
> need to
> + * set the source port manually.
> * The first one, is in case of Nic steering rule, and the second is
> * E-Switch rule where no port_id item was found. In both cases
> * the source port is set according the current port in use.
> */
> - if ((attr->ingress && !(item_flags & MLX5_FLOW_ITEM_PORT_ID))
> &&
> + if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) &&
> (priv->representor || priv->master)) {
> if (flow_dv_translate_item_port_id(dev, match_mask,
> match_value, NULL))
> --
> 1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-26 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 12:33 [dpdk-dev] [PATCH] net/mlx5: fix setting of port ID for egress rules Dekel Peled
2020-01-26 16:36 ` Raslan Darawsheh
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).