* [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos
@ 2019-10-16 8:36 Moti Haimovsky
2019-10-18 8:17 ` Slava Ovsiienko
2019-10-20 10:15 ` Raslan Darawsheh
0 siblings, 2 replies; 3+ messages in thread
From: Moti Haimovsky @ 2019-10-16 8:36 UTC (permalink / raw)
To: viacheslavo, rasland; +Cc: dev
This commit add querying the HCA which FLEX protocols are already
enabled.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_devx_cmds.c | 2 ++
drivers/net/mlx5/mlx5_prm.h | 12 ++++++++++++
3 files changed, 15 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index baf945c..024a403 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -184,6 +184,7 @@ struct mlx5_hca_attr {
uint32_t tunnel_lro_vxlan:1;
uint32_t lro_max_msg_sz_mode:2;
uint32_t lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];
+ uint32_t flex_parser_protocols;
};
/* Flow list . */
diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c b/drivers/net/mlx5/mlx5_devx_cmds.c
index acfe1de..01e4094 100644
--- a/drivers/net/mlx5/mlx5_devx_cmds.c
+++ b/drivers/net/mlx5/mlx5_devx_cmds.c
@@ -330,6 +330,8 @@ struct mlx5_devx_obj *
attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
eth_net_offloads);
attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
+ attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
+ flex_parser_protocols);
if (!attr->eth_net_offloads)
return 0;
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 3765df0..e429792 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -856,6 +856,18 @@ enum {
MLX5_INLINE_MODE_INNER_TCP_UDP,
};
+/* HCA bit masks indicating which Flex parser protocols are already enabled. */
+#define MLX5_HCA_FLEX_IPV4_OVER_VXLAN_ENABLED (1UL << 0)
+#define MLX5_HCA_FLEX_IPV6_OVER_VXLAN_ENABLED (1UL << 1)
+#define MLX5_HCA_FLEX_IPV6_OVER_IP_ENABLED (1UL << 2)
+#define MLX5_HCA_FLEX_GENEVE_ENABLED (1UL << 3)
+#define MLX5_HCA_FLEX_CW_MPLS_OVER_GRE_ENABLED (1UL << 4)
+#define MLX5_HCA_FLEX_CW_MPLS_OVER_UDP_ENABLED (1UL << 5)
+#define MLX5_HCA_FLEX_P_BIT_VXLAN_GPE_ENABLED (1UL << 6)
+#define MLX5_HCA_FLEX_VXLAN_GPE_ENABLED (1UL << 7)
+#define MLX5_HCA_FLEX_ICMP_ENABLED (1UL << 8)
+#define MLX5_HCA_FLEX_ICMPV6_ENABLED (1UL << 9)
+
struct mlx5_ifc_cmd_hca_cap_bits {
u8 reserved_at_0[0x30];
u8 vhca_id[0x10];
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos
2019-10-16 8:36 [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos Moti Haimovsky
@ 2019-10-18 8:17 ` Slava Ovsiienko
2019-10-20 10:15 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Slava Ovsiienko @ 2019-10-18 8:17 UTC (permalink / raw)
To: Moti Haimovsky, Raslan Darawsheh; +Cc: dev
> -----Original Message-----
> From: Moti Haimovsky <motih@mellanox.com>
> Sent: Wednesday, October 16, 2019 11:36
> To: Slava Ovsiienko <viacheslavo@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos
>
> This commit add querying the HCA which FLEX protocols are already enabled.
>
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
> drivers/net/mlx5/mlx5.h | 1 +
> drivers/net/mlx5/mlx5_devx_cmds.c | 2 ++
> drivers/net/mlx5/mlx5_prm.h | 12 ++++++++++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index
> baf945c..024a403 100644
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -184,6 +184,7 @@ struct mlx5_hca_attr {
> uint32_t tunnel_lro_vxlan:1;
> uint32_t lro_max_msg_sz_mode:2;
> uint32_t
> lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];
> + uint32_t flex_parser_protocols;
> };
>
> /* Flow list . */
> diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c
> b/drivers/net/mlx5/mlx5_devx_cmds.c
> index acfe1de..01e4094 100644
> --- a/drivers/net/mlx5/mlx5_devx_cmds.c
> +++ b/drivers/net/mlx5/mlx5_devx_cmds.c
> @@ -330,6 +330,8 @@ struct mlx5_devx_obj *
> attr->eth_net_offloads = MLX5_GET(cmd_hca_cap, hcattr,
> eth_net_offloads);
> attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
> + attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
> + flex_parser_protocols);
> if (!attr->eth_net_offloads)
> return 0;
>
> diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
> index 3765df0..e429792 100644
> --- a/drivers/net/mlx5/mlx5_prm.h
> +++ b/drivers/net/mlx5/mlx5_prm.h
> @@ -856,6 +856,18 @@ enum {
> MLX5_INLINE_MODE_INNER_TCP_UDP,
> };
>
> +/* HCA bit masks indicating which Flex parser protocols are already
> +enabled. */ #define MLX5_HCA_FLEX_IPV4_OVER_VXLAN_ENABLED (1UL
> << 0)
> +#define MLX5_HCA_FLEX_IPV6_OVER_VXLAN_ENABLED (1UL << 1) #define
> +MLX5_HCA_FLEX_IPV6_OVER_IP_ENABLED (1UL << 2) #define
> +MLX5_HCA_FLEX_GENEVE_ENABLED (1UL << 3) #define
> +MLX5_HCA_FLEX_CW_MPLS_OVER_GRE_ENABLED (1UL << 4) #define
> +MLX5_HCA_FLEX_CW_MPLS_OVER_UDP_ENABLED (1UL << 5) #define
> +MLX5_HCA_FLEX_P_BIT_VXLAN_GPE_ENABLED (1UL << 6) #define
> +MLX5_HCA_FLEX_VXLAN_GPE_ENABLED (1UL << 7) #define
> +MLX5_HCA_FLEX_ICMP_ENABLED (1UL << 8) #define
> +MLX5_HCA_FLEX_ICMPV6_ENABLED (1UL << 9)
> +
> struct mlx5_ifc_cmd_hca_cap_bits {
> u8 reserved_at_0[0x30];
> u8 vhca_id[0x10];
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos
2019-10-16 8:36 [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos Moti Haimovsky
2019-10-18 8:17 ` Slava Ovsiienko
@ 2019-10-20 10:15 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2019-10-20 10:15 UTC (permalink / raw)
To: Moti Haimovsky, Slava Ovsiienko; +Cc: dev
Hi,
> -----Original Message-----
> From: Moti Haimovsky <motih@mellanox.com>
> Sent: Wednesday, October 16, 2019 11:36 AM
> To: Slava Ovsiienko <viacheslavo@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos
>
> This commit add querying the HCA which FLEX protocols are already enabled.
>
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Series applied to next-net-
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-20 10:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 8:36 [dpdk-dev] [PATCH 1/2] net/mlx5: query HCA for enabled FLEX parser protos Moti Haimovsky
2019-10-18 8:17 ` Slava Ovsiienko
2019-10-20 10:15 ` 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).