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] [day] [month] [year] [list]
Message-ID: <20210913092950.13e92a7a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 13 Sep 2021 09:29:50 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Aya Levin <ayal@...dia.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Moshe Shemesh <moshe@...lanox.com>,
        Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net] udp_tunnel: Fix udp_tunnel_nic work-queue type

On Mon, 13 Sep 2021 10:53:49 +0300 Aya Levin wrote:
> Turn udp_tunnel_nic work-queue to an ordered work-queue. This queue
> holds the UDP-tunnel configuration commands of the different netdevs.
> When the netdevs are functions of the same NIC the order of
> execution may be crucial.
> 
> Problem example:
> NIC with 2 PFs, both PFs declare offload quota of up to 3 UDP-ports.
>  $ifconfig eth2 1.1.1.1/16 up
> 
>  $ip link add eth2_19503 type vxlan id 5049 remote 1.1.1.2 dev eth2 dstport 19053
>  $ip link set dev eth2_19503 up
> 
>  $ip link add eth2_19504 type vxlan id 5049 remote 1.1.1.3 dev eth2 dstport 19054
>  $ip link set dev eth2_19504 up
> 
>  $ip link add eth2_19505 type vxlan id 5049 remote 1.1.1.4 dev eth2 dstport 19055
>  $ip link set dev eth2_19505 up
> 
>  $ip link add eth2_19506 type vxlan id 5049 remote 1.1.1.5 dev eth2 dstport 19056
>  $ip link set dev eth2_19506 up
> 
> NIC RX port offload infrastructure offloads the first 3 UDP-ports (on
> all devices which sets NETIF_F_RX_UDP_TUNNEL_PORT feature) and not
> UDP-port 19056. So both PFs gets this offload configuration.
> 
>  $ip link set dev eth2_19504 down
> 
> This triggers udp-tunnel-core to remove the UDP-port 19504 from
> offload-ports-list and offload UDP-port 19056 instead.
> 
> In this scenario it is important that the UDP-port of 19504 will be
> removed from both PFs before trying to add UDP-port 19056. The NIC can
> stop offloading a UDP-port only when all references are removed.
> Otherwise the NIC may report exceeding of the offload quota.
> 
> Fixes: cc4e3835eff4 ("udp_tunnel: add central NIC RX port offload infrastructure")
> Signed-off-by: Aya Levin <ayal@...dia.com>
> Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Obviously not. If you hardware uses a single port table regardless of
the number of PFs you should use the shared table version of the API,
like Intel does.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ