Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691326 > unrolled thread

[PATCH 4.11 25/88] net/mlx5e: Initialize CEEs getpermhwaddr address buffer to 0xff

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-07-19 12:20 +0200
Last post2017-07-19 12:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.11 25/88] net/mlx5e: Initialize CEEs getpermhwaddr address buffer to 0xff Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-19 12:20 +0200

#1691326 — [PATCH 4.11 25/88] net/mlx5e: Initialize CEEs getpermhwaddr address buffer to 0xff

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-07-19 12:20 +0200
Subject[PATCH 4.11 25/88] net/mlx5e: Initialize CEEs getpermhwaddr address buffer to 0xff
Message-ID<u4Ufh-79T-43@gated-at.bofh.it>
4.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Huy Nguyen <huyn@mellanox.com>


[ Upstream commit d968f0f2e4404152f37ed2384b4a2269dd2dae5a ]

Latest change in open-lldp code uses bytes 6-11 of perm_addr buffer
as the Ethernet source address for the host TLV packet.
Since our driver does not fill these bytes, they stay at zero and
the open-lldp code ends up sending the TLV packet with zero source
address and the switch drops this packet.

The fix is to initialize these bytes to 0xff. The open-lldp code
considers 0xff:ff:ff:ff:ff:ff as the invalid address and falls back to
use the host's mac address as the Ethernet source address.

Fixes: 3a6a931dfb8e ("net/mlx5e: Support DCBX CEE API")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -464,6 +464,8 @@ static void mlx5e_dcbnl_getpermhwaddr(st
 	if (!perm_addr)
 		return;
 
+	memset(perm_addr, 0xff, MAX_ADDR_LEN);
+
 	mlx5_query_nic_vport_mac_address(priv->mdev, 0, perm_addr);
 }
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web