Merge branch 'mlxsw-Various-fixes'
Ido Schimmel says: ==================== mlxsw: Various fixes This patchset contains various small fixes for mlxsw. Patch #1 fixes a warning generated by switchdev core when the driver fails to insert an MDB entry in the commit phase. Patches #2-#4 fix a warning in check_flush_dependency() that can be triggered when a work item in a WQ_MEM_RECLAIM workqueue tries to flush a non-WQ_MEM_RECLAIM workqueue. It seems that the semantics of the WQ_MEM_RECLAIM flag are not very clear [1] and that various patches have been sent to remove it from various workqueues throughout the kernel [2][3][4] in order to silence the warning. These patches do the same for the workqueues created by mlxsw that probably should not have been created with this flag in the first place. Patch #5 fixes a regression where an IP address cannot be assigned to a VRF upper due to erroneous MAC validation check. Patch #6 adds a test case. Patch #7 adjusts Spectrum-2 shared buffer configuration to be compatible with Spectrum-1. The problem and fix are described in detail in the commit message. Please consider patches #1-#5 for 5.0.y. I verified they apply cleanly. [1] https://patchwork.kernel.org/patch/10791315/ [2] Commitce162bfbc0
("mac80211_hwsim: don't use WQ_MEM_RECLAIM") [3] Commit39baf10310
("IB/core: Fix use workqueue without WQ_MEM_RECLAIM") [4] Commit75215e5bb2
("iwcm: Don't allocate iwcm workqueue with WQ_MEM_RECLAIM") ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
f8d49bee4a
|
@ -568,7 +568,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
|
|||
if (!(mlxsw_core->bus->features & MLXSW_BUS_F_TXRX))
|
||||
return 0;
|
||||
|
||||
emad_wq = alloc_workqueue("mlxsw_core_emad", WQ_MEM_RECLAIM, 0);
|
||||
emad_wq = alloc_workqueue("mlxsw_core_emad", 0, 0);
|
||||
if (!emad_wq)
|
||||
return -ENOMEM;
|
||||
mlxsw_core->emad_wq = emad_wq;
|
||||
|
@ -1958,10 +1958,10 @@ static int __init mlxsw_core_module_init(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, WQ_MEM_RECLAIM, 0);
|
||||
mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, 0, 0);
|
||||
if (!mlxsw_wq)
|
||||
return -ENOMEM;
|
||||
mlxsw_owq = alloc_ordered_workqueue("%s_ordered", WQ_MEM_RECLAIM,
|
||||
mlxsw_owq = alloc_ordered_workqueue("%s_ordered", 0,
|
||||
mlxsw_core_driver_name);
|
||||
if (!mlxsw_owq) {
|
||||
err = -ENOMEM;
|
||||
|
|
|
@ -70,6 +70,7 @@ static const struct mlxsw_sp_sb_pool_des mlxsw_sp2_sb_pool_dess[] = {
|
|||
{MLXSW_REG_SBXX_DIR_EGRESS, 1},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 2},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 3},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 15},
|
||||
};
|
||||
|
||||
#define MLXSW_SP_SB_ING_TC_COUNT 8
|
||||
|
@ -428,6 +429,7 @@ static const struct mlxsw_sp_sb_pr mlxsw_sp2_sb_prs[] = {
|
|||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, MLXSW_SP_SB_INFI),
|
||||
};
|
||||
|
||||
static int mlxsw_sp_sb_prs_init(struct mlxsw_sp *mlxsw_sp,
|
||||
|
@ -517,14 +519,14 @@ static const struct mlxsw_sp_sb_cm mlxsw_sp2_sb_cms_egress[] = {
|
|||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(1, 0xff, 4),
|
||||
};
|
||||
|
||||
|
@ -671,6 +673,7 @@ static const struct mlxsw_sp_sb_pm mlxsw_sp2_sb_pms[] = {
|
|||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(10000, 90000),
|
||||
};
|
||||
|
||||
static int mlxsw_sp_port_sb_pms_init(struct mlxsw_sp_port *mlxsw_sp_port)
|
||||
|
|
|
@ -6781,7 +6781,7 @@ static int mlxsw_sp_router_port_check_rif_addr(struct mlxsw_sp *mlxsw_sp,
|
|||
/* A RIF is not created for macvlan netdevs. Their MAC is used to
|
||||
* populate the FDB
|
||||
*/
|
||||
if (netif_is_macvlan(dev))
|
||||
if (netif_is_macvlan(dev) || netif_is_l3_master(dev))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
|
||||
|
|
|
@ -1630,7 +1630,7 @@ static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
u16 fid_index;
|
||||
int err = 0;
|
||||
|
||||
if (switchdev_trans_ph_prepare(trans))
|
||||
if (switchdev_trans_ph_commit(trans))
|
||||
return 0;
|
||||
|
||||
bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev);
|
||||
|
|
|
@ -11,6 +11,7 @@ lib_dir=$(dirname $0)/../../../net/forwarding
|
|||
|
||||
ALL_TESTS="
|
||||
rif_set_addr_test
|
||||
rif_vrf_set_addr_test
|
||||
rif_inherit_bridge_addr_test
|
||||
rif_non_inherit_bridge_addr_test
|
||||
vlan_interface_deletion_test
|
||||
|
@ -98,6 +99,25 @@ rif_set_addr_test()
|
|||
ip link set dev $swp1 addr $swp1_mac
|
||||
}
|
||||
|
||||
rif_vrf_set_addr_test()
|
||||
{
|
||||
# Test that it is possible to set an IP address on a VRF upper despite
|
||||
# its random MAC address.
|
||||
RET=0
|
||||
|
||||
ip link add name vrf-test type vrf table 10
|
||||
ip link set dev $swp1 master vrf-test
|
||||
|
||||
ip -4 address add 192.0.2.1/24 dev vrf-test
|
||||
check_err $? "failed to set IPv4 address on VRF"
|
||||
ip -6 address add 2001:db8:1::1/64 dev vrf-test
|
||||
check_err $? "failed to set IPv6 address on VRF"
|
||||
|
||||
log_test "RIF - setting IP address on VRF"
|
||||
|
||||
ip link del dev vrf-test
|
||||
}
|
||||
|
||||
rif_inherit_bridge_addr_test()
|
||||
{
|
||||
RET=0
|
||||
|
|
Loading…
Reference in New Issue