[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220630201709.6e66a1bb@kernel.org>
Date: Thu, 30 Jun 2022 20:17:09 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
edumazet@...gle.com, petrm@...dia.com, amcohen@...dia.com,
mlxsw@...dia.com
Subject: Re: [PATCH net-next 01/13] mlxsw: Configure egress VID for unicast
FDB entries
On Thu, 30 Jun 2022 11:22:45 +0300 Ido Schimmel wrote:
> From: Amit Cohen <amcohen@...dia.com>
>
> Using unified bridge model, firmware no longer configures the egress VID
> "under the hood" and moves this responsibility to software.
>
> For layer 2, this means that software needs to determine the egress VID
> for both unicast (i.e., FDB) and multicast (i.e., MDB and flooding) flows.
>
> Unicast FDB records and unicast LAG FDB records have new fields - "set_vid"
> and "vid", set them. For records which point to router port, do not set
> these fields.
clang seems to have a legitimate complaint:
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2928:6: warning: variable 'mlxsw_sp_port_vlan' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2948:11: note: uninitialized use occurs here
mlxsw_sp_port_vlan->vid, adding, true);
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2928:2: note: remove the 'if' if its condition is always false
if (mlxsw_sp_fid_is_dummy(mlxsw_sp, fid))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2923:6: warning: variable 'mlxsw_sp_port_vlan' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!mlxsw_sp_port) {
^~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2948:11: note: uninitialized use occurs here
mlxsw_sp_port_vlan->vid, adding, true);
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2923:2: note: remove the 'if' if its condition is always false
if (!mlxsw_sp_port) {
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2907:47: note: initialize the variable 'mlxsw_sp_port_vlan' to silence this warning
struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan;
^
= NULL
Powered by blists - more mailing lists