All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: Leon Romanovsky <leonro@mellanox.com>, saeedm@mellanox.com
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	Jason Gunthorpe <jgg@mellanox.com>,
	Shahar Klein <shahark@mellanox.com>,
	Roi Dayan <roid@mellanox.com>
Subject: [PATCH mlx5-next 3/6] net/mlx5: E-Switch, Introduce flow counter affinity
Date: Wed, 12 Dec 2018 19:11:38 -0800	[thread overview]
Message-ID: <20181213031141.12783-4-saeedm@mellanox.com> (raw)
In-Reply-To: <20181213031141.12783-1-saeedm@mellanox.com>

From: Shahar Klein <shahark@mellanox.com>

This dictates the device affinity for eswitch flow counters, set by the FW
according to the HW device capabilities.

Under "source eswitch" affinity, the counter should be allocated on the
device related to the source vport in the match. This covers both non
merged e-switch mode as well as old FW that does not advertise this cap.

Under "flow eswitch" affinity, the counter should be allocated on the
device where the eswitch rule is set.

Signed-off-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 include/linux/mlx5/mlx5_ifc.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index a56bd3b1f579..f48d7ee345ff 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -608,13 +608,19 @@ struct mlx5_ifc_flow_table_eswitch_cap_bits {
 	u8      reserved_at_800[0x7800];
 };
 
+enum {
+	MLX5_COUNTER_SOURCE_ESWITCH = 0x0,
+	MLX5_COUNTER_FLOW_ESWITCH   = 0x1,
+};
+
 struct mlx5_ifc_e_switch_cap_bits {
 	u8         vport_svlan_strip[0x1];
 	u8         vport_cvlan_strip[0x1];
 	u8         vport_svlan_insert[0x1];
 	u8         vport_cvlan_insert_if_not_exist[0x1];
 	u8         vport_cvlan_insert_overwrite[0x1];
-	u8         reserved_at_5[0x18];
+	u8         reserved_at_5[0x17];
+	u8         counter_eswitch_affinity[0x1];
 	u8         merged_eswitch[0x1];
 	u8         nic_vport_node_guid_modify[0x1];
 	u8         nic_vport_port_guid_modify[0x1];
-- 
2.19.2

  parent reply	other threads:[~2018-12-13  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  3:11 [PATCH mlx5-next 0/6] mlx5 updates for shared branch 2018-12-12 Saeed Mahameed
2018-12-13  3:11 ` [PATCH mlx5-next 1/6] net/mlx5: Use lowercase 'X' for hex values Saeed Mahameed
2018-12-13  3:11 ` [PATCH mlx5-next 2/6] IB/mlx5: Unify e-switch representors load approach between uplink and VFs Saeed Mahameed
2018-12-13  3:37   ` Jason Gunthorpe
2018-12-13  3:41     ` Saeed Mahameed
2018-12-13  3:11 ` Saeed Mahameed [this message]
2018-12-13  3:11 ` [PATCH mlx5-next 4/6] net/mlx5: Split the activate lag function into two routines Saeed Mahameed
2018-12-13  3:11 ` [PATCH mlx5-next 5/6] net/mlx5: Add lag affinity info to log Saeed Mahameed
2018-12-13  3:11 ` [PATCH mlx5-next 6/6] net/mlx5: Fold the modify lag code into function Saeed Mahameed
2018-12-14 19:05 ` [PATCH mlx5-next 0/6] mlx5 updates for shared branch 2018-12-12 Saeed Mahameed

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=20181213031141.12783-4-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roid@mellanox.com \
    --cc=shahark@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.