diff options
author | Petr Machata <petrm@mellanox.com> | 2019-07-17 23:29:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-18 01:19:46 +0300 |
commit | dedfde2fe1c4ccf27179fcb234e2112d065c39bb (patch) | |
tree | f8ae2f52a8195d789d05392efd1d59223b8f0715 /drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | |
parent | a6574227a81ffd443cd715f8946baddccce66ada (diff) | |
download | linux-dedfde2fe1c4ccf27179fcb234e2112d065c39bb.tar.xz |
mlxsw: spectrum_dcb: Configure DSCP map as the last rule is removed
Spectrum systems use DSCP rewrite map to update DSCP field in egressing
packets to correspond to priority that the packet has. Whether rewriting
will take place is determined at the point when the packet ingresses the
switch: if the port is in Trust L3 mode, packet priority is determined from
the DSCP map at the port, and DSCP rewrite will happen. If the port is in
Trust L2 mode, 802.1p is used for packet prioritization, and no DSCP
rewrite will happen.
The driver determines the port trust mode based on whether any DSCP
prioritization rules are in effect at given port. If there are any, trust
level is L3, otherwise it's L2. When the last DSCP rule is removed, the
port is switched to trust L2. Under that scenario, if DSCP of a packet
should be rewritten, it should be rewritten to 0.
However, when switching to Trust L2, the driver neglects to also update the
DSCP rewrite map. The last DSCP rule thus remains in effect, and packets
egressing through this port, if they have the right priority, will have
their DSCP set according to this rule.
Fix by first configuring the rewrite map, and only then switching to trust
L2 and bailing out.
Fixes: b2b1dab6884e ("mlxsw: spectrum: Support ieee_setapp, ieee_delapp")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reported-by: Alex Veber <alexve@mellanox.com>
Tested-by: Alex Veber <alexve@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c')
0 files changed, 0 insertions, 0 deletions