Patch "mlxsw: spectrum: Don't forward packets when STP state is DISABLED" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    mlxsw: spectrum: Don't forward packets when STP state is DISABLED

to the 4.4-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:
     mlxsw-spectrum-don-t-forward-packets-when-stp-state-is-disabled.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 9cb026ebb8ab76829a8d8e4bbd057168ac38fb86 Mon Sep 17 00:00:00 2001
From: Ido Schimmel <idosch@xxxxxxxxxxxx>
Date: Wed, 27 Jan 2016 15:20:19 +0100
Subject: mlxsw: spectrum: Don't forward packets when STP state is DISABLED

From: Ido Schimmel <idosch@xxxxxxxxxxxx>

commit 9cb026ebb8ab76829a8d8e4bbd057168ac38fb86 upstream.

When STP state is set to DISABLED the port is assumed to be inactive, but
currently we forward packets ingressing through it.

Instead, set the port's STP state in hardware to DISCARDING, which means
it doesn't forward packets or perform any learning, but it does trap
control packets. However, these packets will be dropped by bridge code,
which results in the expected behavior.

Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxxxx>
Signed-off-by: Jiri Pirko <jiri@xxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -87,7 +87,6 @@ static int mlxsw_sp_port_stp_state_set(s
 	int err;
 
 	switch (state) {
-	case BR_STATE_DISABLED: /* fall-through */
 	case BR_STATE_FORWARDING:
 		spms_state = MLXSW_REG_SPMS_STATE_FORWARDING;
 		break;
@@ -95,6 +94,7 @@ static int mlxsw_sp_port_stp_state_set(s
 	case BR_STATE_LEARNING:
 		spms_state = MLXSW_REG_SPMS_STATE_LEARNING;
 		break;
+	case BR_STATE_DISABLED: /* fall-through */
 	case BR_STATE_BLOCKING:
 		spms_state = MLXSW_REG_SPMS_STATE_DISCARDING;
 		break;


Patches currently in stable-queue which might be from idosch@xxxxxxxxxxxx are

queue-4.4/mlxsw-spectrum-don-t-forward-packets-when-stp-state-is-disabled.patch
queue-4.4/mlxsw-treat-local-port-64-as-valid.patch
queue-4.4/mlxsw-pci-correctly-determine-if-descriptor-queue-is-full.patch
queue-4.4/mlxsw-spectrum-don-t-count-internal-tx-header-bytes-to-stats.patch
queue-4.4/mlxsw-spectrum-fix-misuse-of-hard_header_len.patch
queue-4.4/mlxsw-spectrum-indicate-support-for-autonegotiation.patch
queue-4.4/mlxsw-spectrum-disable-learning-according-to-stp-state.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux