lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220519042628.e2yqi37ceyks6rbv@sx1>
Date:   Wed, 18 May 2022 21:26:28 -0700
From:   Saeed Mahameed <saeedm@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        Eli Cohen <elic@...dia.com>, Mark Bloch <mbloch@...dia.com>
Subject: Re: [net-next 16/16] net/mlx5: Support multiport eswitch mode

On 18 May 17:21, Jakub Kicinski wrote:
>On Tue, 17 May 2022 23:49:38 -0700 Saeed Mahameed wrote:
>> From: Eli Cohen <elic@...dia.com>
>>
>> Multiport eswitch mode is a LAG mode that allows to add rules that
>> forward traffic to a specific physical port without being affected by LAG
>> affinity configuration.
>>
>> This mode of operation is mutual exclusive with the other LAG modes used
>> by multipath and bonding.
>>
>> To make the transition between the modes, we maintain a counter on the
>> number of rules specifying one of the uplink representors as the target
>> of mirred egress redirect action.
>>
>> An example of such rule would be:
>>
>> $ tc filter add dev enp8s0f0_0 prot all root flower dst_mac \
>>   00:11:22:33:44:55 action mirred egress redirect dev enp8s0f0
>>
>> If the reference count just grows to one and LAG is not in use, we
>> create the LAG in multiport eswitch mode. Other mode changes are not
>> allowed while in this mode. When the reference count reaches zero, we
>> destroy the LAG and let other modes be used if needed.
>>
>> logic also changed such that if forwarding to some uplink destination
>> cannot be guaranteed, we fail the operation so the rule will eventually
>> be in software and not in hardware.
>>
>> Signed-off-by: Eli Cohen <elic@...dia.com>
>> Reviewed-by: Mark Bloch <mbloch@...dia.com>
>> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
>
>GCC 12 also points out that:
>
>drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c: In function ‘mlx5_do_bond’:
>drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c:786:28: warning: ‘tracker’ is used uninitialized [-Wuninitialized]
>  786 |         struct lag_tracker tracker;
>      |                            ^~~~~~~
>drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c:786:28: note: ‘tracker’ declared here
>  786 |         struct lag_tracker tracker;
>      |                            ^~~~~~~

it's a false alarm, anyway clang and gcc12 are happy on my machine:

$ KCFLAGS="-Wall" make W=1 drivers/net/ethernet/mellanox/mlx5/core/lag/lag.o
CALL    scripts/checksyscalls.sh
CALL    scripts/atomic/check-atomics.sh
DESCEND objtool
CC      drivers/net/ethernet/mellanox/mlx5/core/lag/lag.o

$ gcc --version
gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ