Skip to contentSkip to conversation

Patch "net/mlx5e: Initialize CEE's getpermhwaddr address buffer to 0xff" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Jul 17, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    net/mlx5e: Initialize CEE's getpermhwaddr address buffer to 0xff

to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     net-mlx5e-initialize-cee-s-getpermhwaddr-address-buffer-to-0xff.patch

and it can be found in the queue-4.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Jul 17 18:46:41 CEST 2017

From: Huy Nguyen <[email protected]>
Date: Thu, 29 Jun 2017 16:50:01 -0500
Subject: net/mlx5e: Initialize CEE's getpermhwaddr address buffer to 0xff

From: Huy Nguyen <[email protected]>

[ 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")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +2 -0
@@ -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);
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.12/net-mlx5e-initialize-cee-s-getpermhwaddr-address-buffer-to-0xff.patch