diff options
author | 2023-07-13 18:15:26 +0200 | |
---|---|---|
committer | 2023-07-14 10:20:15 +0100 | |
commit | a0944b24d278b2657ffd5dcbaaf8c24d43e39e0c (patch) | |
tree | 1df119b5a0ca3f53e454239a55d76613196b8706 /kernel | |
parent | mlxsw: spectrum_router: Pass struct mlxsw_sp_rif_params to fid_get (diff) | |
download | linux-rng-a0944b24d278b2657ffd5dcbaaf8c24d43e39e0c.tar.xz linux-rng-a0944b24d278b2657ffd5dcbaaf8c24d43e39e0c.zip |
mlxsw: spectrum_router: Take VID for VLAN FIDs from RIF params
Currently, when an IP address is added to a bridge that has no PVID, the
operation is rejected. An IP address addition is interpreted as a request
to create a RIF for the bridge device, but without a PVID there is no VLAN
for which the RIF should be created. Thus the correct way to create a RIF
for a bridge as a user is to first add a PVID, and then add the IP address.
Ideally this ordering requirement would not exist. RIF would be created
either because an IP address is added, or because a PVID is added,
depending on which comes last.
For that, the switchdev code (which notices the PVID change request) must
be able to request that a RIF is created with a given VLAN ID, because at
the time that the PVID notification is distributed, the PVID setting is not
yet visible for querying.
Therefore when creating a VLAN-based RIF, use mlxsw_sp_rif_params.vid to
communicate the VID, and do not determine it ad-hoc in the fid_get
callback.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions