diff mbox

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

Message ID 1365342248-31901-4-git-send-email-ogerlitz@mellanox.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Or Gerlitz April 7, 2013, 1:44 p.m. UTC
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(-)

Comments

Sergei Shtylyov April 7, 2013, 3:31 p.m. UTC | #1
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. UTC | #2
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
diff mbox

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)