Commit 50693e66 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Jason Gunthorpe

RDMA/mlx5: Use dev_addr_mod()

Commit 406f42fa ("net-next: When a bond have a massive amount of
VLANs...") introduced a rbtree for faster Ethernet address look up. To
maintain netdev->dev_addr in this tree we need to make all the writes to
it got through appropriate helpers.

Link: https://lore.kernel.org/r/20211019182604.1441387-3-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 10f7b9bc
......@@ -472,11 +472,13 @@ int mlx5i_dev_init(struct net_device *dev)
{
struct mlx5e_priv *priv = mlx5i_epriv(dev);
struct mlx5i_priv *ipriv = priv->ppriv;
u8 addr_mod[3];
/* Set dev address using underlay QP */
dev->dev_addr[1] = (ipriv->qpn >> 16) & 0xff;
dev->dev_addr[2] = (ipriv->qpn >> 8) & 0xff;
dev->dev_addr[3] = (ipriv->qpn) & 0xff;
addr_mod[0] = (ipriv->qpn >> 16) & 0xff;
addr_mod[1] = (ipriv->qpn >> 8) & 0xff;
addr_mod[2] = (ipriv->qpn) & 0xff;
dev_addr_mod(dev, 1, addr_mod, sizeof(addr_mod));
/* Add QPN to net-device mapping to HT */
mlx5i_pkey_add_qpn(dev, ipriv->qpn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment