From patchwork Thu Feb 22 21:07:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Gobert X-Patchwork-Id: 205056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp210586dyb; Thu, 22 Feb 2024 13:07:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW88DqQwxm4vwCjNuf53wqEaLYIFJHlnzYUTFfa60Hz7i+rQtd9zPss5J7F3kxD43uT4N/XjdVHMjt475EduxO2pM5u4w== X-Google-Smtp-Source: AGHT+IEnrAFwthrxtNepOYtU0Hogi+Et3ZDfz+PuvXuKUGQf0urU4FGcQF45gTPtAk/tAX7G7ndG X-Received: by 2002:a17:906:1692:b0:a3f:33b2:5ce2 with SMTP id s18-20020a170906169200b00a3f33b25ce2mr23933ejd.35.1708636063934; Thu, 22 Feb 2024 13:07:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708636063; cv=pass; d=google.com; s=arc-20160816; b=sbJuYmuRXH0/Sy9b7T1Ou3M+ECq0uNL5oGpV3EW3s/AkZBzLL8atqCKkQ6jfrF10BF j93Oqb1NS6vaZGf5A9ThzSV55c2QNT22ANlqxxSK9TCSgiRHnjSG08FIdhYVyrT/c8cF ux/9fiUHcjynC2lDKMGhLMBuOx022SgP17ztykP94B8T4VGO34JeB8q8/BqsnaCfnRA0 0vmDW5E2+ddWit1oxyEXBTLX9i6ZnO/19ncmndserugip9BonBGgaO7HQ/wachBAuWG3 9S9ggKdmYAUcalOyHtjDihSvq6t2v0QxmCD1C4MKg+GSooGkRLmV/He9WzoUz3JMoDge TTPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to:subject :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=W/LsAF7t/DjHyNUZ4YFga9FjpoydH+mPM4Uvs/yTAKk=; fh=PTao8SNXHg3dSOcfqxRr+0O3ibKTMbvbg/BbNstaiS0=; b=uDzZepMqyxNHIC+xK2iEUZnbNSxuoAiggMmCH8/bihduZZXWE/IgSoKMpIxqT4GR/O Q2FHfVp1HOlA6naI/Z7wybG6WwOwTkXl2vXK7XlCcMy76mzDTYZ+Wu8ZXnA0Tx79R/SC ZOBzQQbKf3C1lmfiZIOJpMrBO1HsNqb7h1rqwSS0ZsM7IchYybW+aiVTRKNRYH/25p1Q XB+vYDZRxB93D15+TlMBAx0yukKdc4j5vRa/iA8tKFtmS3zZEvJguiqCN6OfDU2kLGT5 A7P6NelIMjrBFcf/boT6QDfk0jnJ3veDNdQ2RipAQDXlM54Z22HACQAnbjg6N3vxg/sS UzxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXD9nKE/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77361-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77361-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j20-20020a170906475400b00a3f44a9bcecsi1628716ejs.78.2024.02.22.13.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:07:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77361-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="JXD9nKE/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77361-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77361-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 873141F2203B for ; Thu, 22 Feb 2024 21:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9434873F34; Thu, 22 Feb 2024 21:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JXD9nKE/" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D41E7172E; Thu, 22 Feb 2024 21:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708636043; cv=none; b=lqshvHqPQ21e/kc08FtSzL44YMbdO474aWcyRXYFtkDFvgXAR74z5ZiqMhJ2m6p0m8GoXu7ApwtNLsfxjvBqnceAx65b5R+7msiupUHsSuj360X7V3HEwygHVCxGtKrLs68UAY2aP/hpb/KlvEikTYHSY7MvmQfG3tkw7ksGJ8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708636043; c=relaxed/simple; bh=yEcHDxN9RLq38OaBT7T32ipqe63fnfoOEny+8083TOs=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=WHqsO0RLKJHfat6/MFNZ9gXCsylZYYep7J/3vSvyY/H3l29OzQ9NJSjzJ/2dJhpTaVZdehYZSE2dzzq0A5g9VD1BwUT/daZSvWlbRU1Pbq565B679RpIPWKz0JKPCiK311aIA5EtBvIXfHS25z7Bjo/HZj3y1HIDRUqhhjte4Xc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JXD9nKE/; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3394ca0c874so107832f8f.2; Thu, 22 Feb 2024 13:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708636040; x=1709240840; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=W/LsAF7t/DjHyNUZ4YFga9FjpoydH+mPM4Uvs/yTAKk=; b=JXD9nKE/4nZXAgT2Z9S71xEsz6keTY9zT6Vorbyfa8OkjBmeCxeycdYCtjc+HSmfgP eAFWP8JEUNy2d6dZe2GtRU4qzvPL32j2eZkgIXwcyc2ZGjDTpnJ6jyyp1Zo/gGVJXFMR 13CBuJNpC3AFoP8amOx9XATng3AZfwDCr8ED93soqL+pCNqGU6zOL7mQz9NvVtG+6T8q WZVEQFQ1m87hGTiYXKDeUAxDlbShtBxOCFa+g9P+LcnOXplmci0TB2cj3n0nfDGKIn1X 7gN5DzVkamzDIr0zW/a38PVOLnwtW+SpKfktW0MhL2XUBrOrIfPE7J+wH2H+CVlOLJry hwzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708636040; x=1709240840; h=content-transfer-encoding:in-reply-to:from:references:to:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=W/LsAF7t/DjHyNUZ4YFga9FjpoydH+mPM4Uvs/yTAKk=; b=EJ9XFW+NMYtXej9mQN/uC8R6uS3VnaoTJHYvLbl58Xq3C4HNEVKlplg2LeYzkSd8yC FqzWFhFLyvv/7ATVqXmMqg3QpdHTK8uvO0h3tSSG/t/qYBDwFN4jBMAgTjoy+8wur6CN RUDZjqXiXEZHalt8t+Eif1id25qna1Jy6/hwk5nSXy/AEg6pwoFEWr05LHa5uCL0hr5T AZcrRthSqGDqnxGth2bEPVprW/ey89io4RbORbD7NjUr93dQl8jhIp1ugzDVCPEthw0O +mKRXLwn23CixbDRtefvUN+jnCwdSsYtPLakdvwGR4aUEh7H+1Ya+XdR9ZD1doUENmI5 4dSA== X-Forwarded-Encrypted: i=1; AJvYcCWfFabX1UjEcBKhkvmf7fvUe19o52v9oR3G7lOlKX/Fh9a1KzUdXj2Nvu/RcUSDMI/qCIC5zmC8LFbpYkYsPjYQPkdtt8sjABWcA+ki1gyDGa2IvHVYZy45adSu8poh0PDRi1RhNjuajX+4/5u7dE2GTfLWBQsdwOYx5Y73xA47UP1zJbGl X-Gm-Message-State: AOJu0YxhoIZzIhjZSLuv73REhGFNDG634MTrYpS001MNz3LYy6/UYRZ4 ltodNoGhD3K4jeTza1leCPhfDA+ED2qUWrVIBCSe/DgXYesbMVPe X-Received: by 2002:a5d:5007:0:b0:33d:67a1:ba0b with SMTP id e7-20020a5d5007000000b0033d67a1ba0bmr196182wrt.61.1708636039601; Thu, 22 Feb 2024 13:07:19 -0800 (PST) Received: from debian ([146.70.204.204]) by smtp.gmail.com with ESMTPSA id bx9-20020a5d5b09000000b0033d568f8310sm198145wrb.89.2024.02.22.13.07.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Feb 2024 13:07:19 -0800 (PST) Message-ID: <2622ff3b-144f-4038-8f05-82c01afc5ce3@gmail.com> Date: Thu, 22 Feb 2024 22:07:00 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: [PATCH net-next 2/3] selftests/net: add local address bind in vxlan selftest To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org, shuah@kernel.org, liujian56@huawei.com, horms@kernel.org, aleksander.lobakin@intel.com, linyunsheng@huawei.com, therbert@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: From: Richard Gobert In-Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791634769395795416 X-GMAIL-MSGID: 1791634769395795416 Add local address bind support to existing udpgro_fwd.sh vxlan selftest, to ensure UDP socket lookup in GRO is working. Signed-off-by: Richard Gobert --- tools/testing/selftests/net/udpgro_fwd.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh index c079565add39..8cc9b6ff3910 100755 --- a/tools/testing/selftests/net/udpgro_fwd.sh +++ b/tools/testing/selftests/net/udpgro_fwd.sh @@ -56,11 +56,13 @@ create_vxlan_endpoint() { local -r bm_rem_addr=$3 local -r vxlan_dev=$4 local -r vxlan_id=$5 + local -r bm_local_addr=$6 local -r vxlan_port=4789 ip -n $netns link set dev $bm_dev up ip -n $netns link add dev $vxlan_dev type vxlan id $vxlan_id \ - dstport $vxlan_port remote $bm_rem_addr + dstport $vxlan_port local $bm_local_addr \ + remote $bm_rem_addr ip -n $netns link set dev $vxlan_dev up } @@ -71,11 +73,13 @@ create_vxlan_pair() { for ns in $SRC $DST; do # note that 3 - $SRC == $DST and 3 - $DST == $SRC - create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V4$((3 - $ns)) vxlan$ns 4 + create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V4$((3 - $ns)) \ + vxlan$ns 4 $BM_NET_V4$ns ip -n $BASE$ns addr add dev vxlan$ns $OL_NET_V4$ns/24 done for ns in $SRC $DST; do - create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V6$((3 - $ns)) vxlan6$ns 6 + create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V6$((3 - $ns)) \ + vxlan6$ns 6 $BM_NET_V6$ns ip -n $BASE$ns addr add dev vxlan6$ns $OL_NET_V6$ns/24 nodad done }