Merge branch 'mlxsw-Various-fixes'
Ido Schimmel says: ==================== mlxsw: Various fixes This patchset includes two small fixes for the mlxsw driver and one patch which clarifies recently introduced devlink-trap documentation. Patch #1 clears the port's VLAN filters during port initialization. This ensures that the drop reason reported to the user is consistent. The problem is explained in detail in the commit message. Patch #2 clarifies the description of one of the traps exposed via devlink-trap. Patch #3 from Danielle forbids the installation of a tc filter with multiple mirror actions since this is not supported by the device. The failure is communicated to the user via extack. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
94e7e5da38
@ -143,7 +143,8 @@ be added to the following table:
|
||||
* - ``port_list_is_empty``
|
||||
- ``drop``
|
||||
- Traps packets that the device decided to drop in case they need to be
|
||||
flooded and the flood list is empty
|
||||
flooded (e.g., unknown unicast, unregistered multicast) and there are
|
||||
no ports the packets should be flooded to
|
||||
* - ``port_loopback_filter``
|
||||
- ``drop``
|
||||
- Traps packets that the device decided to drop in case after layer 2
|
||||
|
@ -3771,6 +3771,14 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
|
||||
goto err_port_qdiscs_init;
|
||||
}
|
||||
|
||||
err = mlxsw_sp_port_vlan_set(mlxsw_sp_port, 0, VLAN_N_VID - 1, false,
|
||||
false);
|
||||
if (err) {
|
||||
dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to clear VLAN filter\n",
|
||||
mlxsw_sp_port->local_port);
|
||||
goto err_port_vlan_clear;
|
||||
}
|
||||
|
||||
err = mlxsw_sp_port_nve_init(mlxsw_sp_port);
|
||||
if (err) {
|
||||
dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize NVE\n",
|
||||
@ -3818,6 +3826,7 @@ err_port_vlan_create:
|
||||
err_port_pvid_set:
|
||||
mlxsw_sp_port_nve_fini(mlxsw_sp_port);
|
||||
err_port_nve_init:
|
||||
err_port_vlan_clear:
|
||||
mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
|
||||
err_port_qdiscs_init:
|
||||
mlxsw_sp_port_fids_fini(mlxsw_sp_port);
|
||||
|
@ -21,6 +21,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
const struct flow_action_entry *act;
|
||||
int mirror_act_count = 0;
|
||||
int err, i;
|
||||
|
||||
if (!flow_action_has_entries(flow_action))
|
||||
@ -105,6 +106,11 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
|
||||
case FLOW_ACTION_MIRRED: {
|
||||
struct net_device *out_dev = act->dev;
|
||||
|
||||
if (mirror_act_count++) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Multiple mirror actions per rule are not supported");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
err = mlxsw_sp_acl_rulei_act_mirror(mlxsw_sp, rulei,
|
||||
block, out_dev,
|
||||
extack);
|
||||
|
@ -224,13 +224,6 @@ ingress_vlan_filter_test()
|
||||
local vid=10
|
||||
|
||||
bridge vlan add vid $vid dev $swp2 master
|
||||
# During initialization the firmware enables all the VLAN filters and
|
||||
# the driver does not turn them off since the traffic will be discarded
|
||||
# by the STP filter whose default is DISCARD state. Add the VID on the
|
||||
# ingress bridge port and then remove it to make sure it is not member
|
||||
# in the VLAN.
|
||||
bridge vlan add vid $vid dev $swp1 master
|
||||
bridge vlan del vid $vid dev $swp1 master
|
||||
|
||||
RET=0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user