]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Read ETS settings directly from firmware
authorHuy Nguyen <huyn@mellanox.com>
Sun, 27 Nov 2016 15:02:05 +0000 (17:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 20:09:34 +0000 (15:09 -0500)
commit548cd5e38029f65d2ba6f4a9080f88656340154d
tree23409904845c12d1b38960a788cd40cb8c720572
parent21ecc4b47aa4d04f155b22c454f8b749b643162d
net/mlx5e: Read ETS settings directly from firmware

Issue description:
Current implementation saves the ETS settings from user in
a temporal soft copy and returns this settings when user
queries the ETS settings.

With the new DCBX firmware, the ETS settings can be changed
by firmware when the DCBX is in firmware controlled mode. Therefore,
user will obtain wrong values from the temporal soft copy.

Solution:
1. Read the ETS settings directly from firmware.
2. For tc_tsa:
   a. Initialize tc_tsa to vendor IEEE_8021QAZ_TSA_VENDOR at netdev
      creation.
   b. When reading ETS setting from FW, if the traffic class bandwidth
      is less than 100, set tc_tsa to IEEE_8021QAZ_TSA_ETS. This
      implementation solves the scenarios when the DCBX is in FW control
      and willing bit is on which means the ETS setting is dictated
      by remote switch.

Also check ETS capability where needed.

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c