Patchwork [V1,net-next,3/3] net/mlx4_en: Advertize DCB_CAP_DCBX_HOST in getdcbx

login
register
mail settings
Submitter Or Gerlitz
Date April 7, 2013, 1:44 p.m.
Message ID <1365342248-31901-4-git-send-email-ogerlitz@mellanox.com>
Download mbox | patch
Permalink /patch/234502/
State Accepted
Delegated to: David Miller
Headers show

Comments

Or Gerlitz - April 7, 2013, 1:44 p.m.
When our getdcbx entry is called, DCB_CAP_DCBX_HOST should be advertized too.

Cc: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Sergei Shtylyov - April 7, 2013, 3:31 p.m.
Hello.

On 07-04-2013 17:44, Or Gerlitz wrote:

> When our getdcbx entry is called, DCB_CAP_DCBX_HOST should be advertized too.

> Cc: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
[...]

> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
> index 321553f..9199aed 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
> @@ -186,7 +186,7 @@ static int mlx4_en_dcbnl_ieee_setpfc(struct net_device *dev,
>
>   static u8 mlx4_en_dcbnl_getdcbx(struct net_device *dev)
>   {
> -	return DCB_CAP_DCBX_VER_IEEE;
> +	return (DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE);

    Nit: parens not needed here.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 7, 2013, 8:56 p.m.
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sun, 07 Apr 2013 19:31:27 +0400

>> @@ -186,7 +186,7 @@ static int mlx4_en_dcbnl_ieee_setpfc(struct
>> net_device *dev,
>>
>>   static u8 mlx4_en_dcbnl_getdcbx(struct net_device *dev)
>>   {
>> -	return DCB_CAP_DCBX_VER_IEEE;
>> +	return (DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE);
> 
>    Nit: parens not needed here.

I made this simplification when I applied this patch, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
index 321553f..9199aed 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
@@ -186,7 +186,7 @@  static int mlx4_en_dcbnl_ieee_setpfc(struct net_device *dev,
 
 static u8 mlx4_en_dcbnl_getdcbx(struct net_device *dev)
 {
-	return DCB_CAP_DCBX_VER_IEEE;
+	return (DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_IEEE);
 }
 
 static u8 mlx4_en_dcbnl_setdcbx(struct net_device *dev, u8 mode)