netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Ido Schimmel <idosch@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, petrm@nvidia.com, amcohen@nvidia.com,
	mlxsw@nvidia.com
Subject: Re: [PATCH net-next 01/13] mlxsw: Configure egress VID for unicast FDB entries
Date: Thu, 30 Jun 2022 20:17:09 -0700	[thread overview]
Message-ID: <20220630201709.6e66a1bb@kernel.org> (raw)
In-Reply-To: <20220630082257.903759-2-idosch@nvidia.com>

On Thu, 30 Jun 2022 11:22:45 +0300 Ido Schimmel wrote:
> From: Amit Cohen <amcohen@nvidia.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

  reply	other threads:[~2022-07-01  3:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  8:22 [PATCH net-next 00/13] mlxsw: Unified bridge conversion - part 6/6 Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 01/13] mlxsw: Configure egress VID for unicast FDB entries Ido Schimmel
2022-07-01  3:17   ` Jakub Kicinski [this message]
2022-07-01 15:23     ` Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 02/13] mlxsw: spectrum_fid: Configure VNI to FID classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 03/13] mlxsw: Configure ingress RIF classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 04/13] mlxsw: spectrum_fid: Configure layer 3 egress VID classification Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 05/13] mlxsw: spectrum_router: Do not configure VID for sub-port RIFs Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 06/13] mlxsw: Configure egress FID classification after routing Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 07/13] mlxsw: Add support for VLAN RIFs Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 08/13] mlxsw: Add new FID families for unified bridge model Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 09/13] mlxsw: Add support for 802.1Q FID family Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 10/13] mlxsw: Add ubridge to config profile Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 11/13] mlxsw: Enable unified bridge model Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 12/13] mlxsw: spectrum_fid: Remove flood_index() from FID operation structure Ido Schimmel
2022-06-30  8:22 ` [PATCH net-next 13/13] mlxsw: spectrum_fid: Remove '_ub_' indication from structures and defines Ido Schimmel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220630201709.6e66a1bb@kernel.org \
    --to=kuba@kernel.org \
    --cc=amcohen@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).