diff mbox series

[v3,7/9] net/mlx5: save bonding member ports information

Message ID 1610969353-31938-8-git-send-email-xuemingl@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers show
Series net/mlx5: support SubFunction representor | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Xueming(Steven) Li Jan. 18, 2021, 11:29 a.m. UTC
Since kernel bonding interface doesn't provide counter summary of member
ports, PMD has to aggregate couters from of member ports.

This patch collect bonding member information and save to shared context
data.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Slava Ovsiienko Jan. 18, 2021, 4:17 p.m. UTC | #1
Hi, Xueming

- this patch has the same headline as previous one
- typos: couters -> counters, collect -> collectS, save -> saveS

With best regards, Slava

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Monday, January 18, 2021 13:29
> To: Slava Ovsiienko <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Shahaf Shuler
> <shahafs@nvidia.com>; NBU-Contact-Thomas Monjalon
> <thomas@monjalon.net>; Xueming(Steven) Li <xuemingl@nvidia.com>; Asaf
> Penso <asafp@nvidia.com>
> Subject: [PATCH v3 7/9] net/mlx5: save bonding member ports information
> 
> Since kernel bonding interface doesn't provide counter summary of member
> ports, PMD has to aggregate couters from of member ports.
> 
> This patch collect bonding member information and save to shared context
> data.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index
> 508f98f8cd..c15af1d794 100644
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -662,12 +662,14 @@ struct mlx5_flex_parser_profiles {
>  	void *obj;		/* Flex parser node object. */
>  };
> 
> +/* Max member ports per bonding device. */ #define
> MLX5_BOND_MAX_PORTS
> +2
> +
>  /* Bonding device information. */
>  struct mlx5_bond_info {
>  	int n_port; /* Number of bond member ports. */
>  	uint32_t ifindex;
>  	char ifname[MLX5_NAMESIZE + 1];
> -#define MLX5_BOND_MAX_PORTS 2
>  	struct {
>  		char ifname[MLX5_NAMESIZE + 1];
>  		uint32_t ifindex;
> --
> 2.25.1
Xueming(Steven) Li Jan. 18, 2021, 11:05 p.m. UTC | #2
Hi Slava,

>-----Original Message-----
>From: Slava Ovsiienko <viacheslavo@nvidia.com>
>Sent: Tuesday, January 19, 2021 12:17 AM
>To: Xueming(Steven) Li <xuemingl@nvidia.com>
>Cc: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Shahaf Shuler
><shahafs@nvidia.com>; NBU-Contact-Thomas Monjalon
><thomas@monjalon.net>; Xueming(Steven) Li <xuemingl@nvidia.com>; Asaf
>Penso <asafp@nvidia.com>
>Subject: RE: [PATCH v3 7/9] net/mlx5: save bonding member ports
>information
>
>Hi, Xueming
>
>- this patch has the same headline as previous one
>- typos: couters -> counters, collect -> collectS, save -> saveS

My bad, this patch should  combine with previous one.

>
>With best regards, Slava
>
>> -----Original Message-----
>> From: Xueming Li <xuemingl@nvidia.com>
>> Sent: Monday, January 18, 2021 13:29
>> To: Slava Ovsiienko <viacheslavo@nvidia.com>
>> Cc: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Shahaf Shuler
>> <shahafs@nvidia.com>; NBU-Contact-Thomas Monjalon
>> <thomas@monjalon.net>; Xueming(Steven) Li <xuemingl@nvidia.com>; Asaf
>> Penso <asafp@nvidia.com>
>> Subject: [PATCH v3 7/9] net/mlx5: save bonding member ports
>> information
>>
>> Since kernel bonding interface doesn't provide counter summary of
>> member ports, PMD has to aggregate couters from of member ports.
>>
>> This patch collect bonding member information and save to shared
>> context data.
>>
>> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
>> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
>> ---
>>  drivers/net/mlx5/mlx5.h | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index
>> 508f98f8cd..c15af1d794 100644
>> --- a/drivers/net/mlx5/mlx5.h
>> +++ b/drivers/net/mlx5/mlx5.h
>> @@ -662,12 +662,14 @@ struct mlx5_flex_parser_profiles {
>>  	void *obj;		/* Flex parser node object. */
>>  };
>>
>> +/* Max member ports per bonding device. */ #define
>> MLX5_BOND_MAX_PORTS
>> +2
>> +
>>  /* Bonding device information. */
>>  struct mlx5_bond_info {
>>  	int n_port; /* Number of bond member ports. */
>>  	uint32_t ifindex;
>>  	char ifname[MLX5_NAMESIZE + 1];
>> -#define MLX5_BOND_MAX_PORTS 2
>>  	struct {
>>  		char ifname[MLX5_NAMESIZE + 1];
>>  		uint32_t ifindex;
>> --
>> 2.25.1
diff mbox series

Patch

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 508f98f8cd..c15af1d794 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -662,12 +662,14 @@  struct mlx5_flex_parser_profiles {
 	void *obj;		/* Flex parser node object. */
 };
 
+/* Max member ports per bonding device. */
+#define MLX5_BOND_MAX_PORTS 2
+
 /* Bonding device information. */
 struct mlx5_bond_info {
 	int n_port; /* Number of bond member ports. */
 	uint32_t ifindex;
 	char ifname[MLX5_NAMESIZE + 1];
-#define MLX5_BOND_MAX_PORTS 2
 	struct {
 		char ifname[MLX5_NAMESIZE + 1];
 		uint32_t ifindex;