Patch "udp_tunnel: Fix udp_tunnel_nic work-queue type" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    udp_tunnel: Fix udp_tunnel_nic work-queue type

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     udp_tunnel-fix-udp_tunnel_nic-work-queue-type.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cceba5156e64ee2644f8ad58eba2e7daa3f41222
Author: Aya Levin <ayal@xxxxxxxxxx>
Date:   Mon Sep 13 10:53:49 2021 +0300

    udp_tunnel: Fix udp_tunnel_nic work-queue type
    
    [ Upstream commit e50e711351bdc656a8e6ca1022b4293cae8dcd59 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/udp_tunnel_nic.c b/net/ipv4/udp_tunnel_nic.c
index 0d122edc368d..b91003538d87 100644
--- a/net/ipv4/udp_tunnel_nic.c
+++ b/net/ipv4/udp_tunnel_nic.c
@@ -935,7 +935,7 @@ static int __init udp_tunnel_nic_init_module(void)
 {
 	int err;
 
-	udp_tunnel_nic_workqueue = alloc_workqueue("udp_tunnel_nic", 0, 0);
+	udp_tunnel_nic_workqueue = alloc_ordered_workqueue("udp_tunnel_nic", 0);
 	if (!udp_tunnel_nic_workqueue)
 		return -ENOMEM;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux