Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1846566lql; Wed, 13 Mar 2024 09:40:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhp5yw3et0yPRJn4spIm7Wk7eAMimIIGGjUvgiog7t462zkS3+2J1JkS6wEkUqwAftbbuDqM2l5yNh7ZiIuCWhLk3Jdvq44HfwawDuPg== X-Google-Smtp-Source: AGHT+IEqlsitrlFXxPH2N2iIAjqZYkfk9+fd7IU1XY4492h80IXzSJ2FjhuO39FqdiYjmodo5LXm X-Received: by 2002:a05:620a:4404:b0:788:2e8a:172e with SMTP id v4-20020a05620a440400b007882e8a172emr513223qkp.36.1710348059206; Wed, 13 Mar 2024 09:40:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710348059; cv=pass; d=google.com; s=arc-20160816; b=t/AZ3JcAqGF7YkxSsH0oJS1EhateoL8zBa0PwiUURrh6I/DBNKmJVsq1vqH53EmTnZ 0vt2CoZuOmxMRYmNMBjVVXBil6EOfSZHR9uVXkiH2LIIVq18mPUMkIi3ebqViY/mbyGg 8XIbZaMb2MxiZN3EIxSCBmAC+n+j+MIfbwqq01FzTF0riTW5LF3t8GNr+DBgkkocu+iJ k7ixfQtTE8zrFSWn3FZSnPNfDf+bcocAHxft6vmjNv9dCI2+EJzavovmPeB1Dt+joZiL Np/9c6hAnC3HCo7xiH9X1cOMLVM8HzBGQRB9nLQD6exaZaNE5LDyjJ31POAcKbRlyTb6 Usdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lJ08JqfqIXddxYfrDhSbnevtftEdoaR6yXDYMVH03QE=; fh=1APWxzqO+C0N1XVQI/1tO+0JSzdcDJYDUbGzbAKLkE0=; b=aQoNQ+vVHRFxZ+aliy3S5G8DeEEqKsTm6Jgf4ZYAMGvb8APXbwN6Vu3EXulhVCceNk VPbJOdcRgXr4ExV4Lifkr51gU0pm9S7aDUv424j2F6qJ/uLkC3m5S97ndJzdss/l5I5o IaK0gVaDo5VhIs13Z+aMOh/EcFUABf8zrID9+D1BDnwv5NB02LFXa1kqOks3S2qnpp9Q Tu7OiFRU1UgnN6ngW6xUsYknaYuyRwz+TPsbsgy+84etu+g21Ir76ETGMOFTSI9KKckz TaJjmvXo57AiWCSm4Le2Kjc2QrTqsACXbmo95NUkD6F7bvysA0YLPT3ok8rtSc14gODc lH7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jwd+/bf4"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a3-20020a05620a102300b00789d0ea11fdsi297771qkk.275.2024.03.13.09.40.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:40:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Jwd+/bf4"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D2ACB1C20A53 for ; Wed, 13 Mar 2024 16:40:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 238F761699; Wed, 13 Mar 2024 16:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jwd+/bf4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 464EF61676; Wed, 13 Mar 2024 16:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347603; cv=none; b=thvi5w0UhJplFtAwYmhWjJbuaGQQKUyReY/m/j9JjcRTcaA+0jbrlaPV7RsRG7OLE06/TghU/N4NvgTe/p639ywafUlHSVLsuieO+pXI/M6tfQlpkJuxMOrOJHETX/5PDidPH73BqHROgcCTcXh11NywOfxfHyauxUHAiQTO3c4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347603; c=relaxed/simple; bh=c9gRSY8NjpefR/RFvaa/fyBhrpNVDBwJnFGznfuiZ9w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mz3whTZUh33JjkWAa3iGTZ3bBELccWza2Anvzcb31JMP4y0UWUtJuj0GPlEq962sEi3yDvvpKRX9ucLdHy+A/AmUHn4SmNDa0RSmAJp9SOEyGmW5GmFuHaHyV9NWOC/j9Vnn3OaoAkQAZwZiQIGFHsrBwRCtuHOXm9RlVfXQF0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jwd+/bf4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44F3CC433B2; Wed, 13 Mar 2024 16:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347603; bh=c9gRSY8NjpefR/RFvaa/fyBhrpNVDBwJnFGznfuiZ9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jwd+/bf4jfHHtGurKMsGZ4q4Bzk5OSt+VZt9OHvSMFPaG63dzbsrUersntBA9KiU4 o0MJwp7+2F/bck5IHw4FwcPmSbeSujINxXe0DfAYqV+E6X7DbZi3qOj6cnuEg41CoX E+riH2WMhTl8LBr7kKEbr+cD3il9CTGlHLroO0PbmrE8aofWPqRwkCliUo9/S63FVK oqoh2nGtEbJ66P82jgpZ+Labi2HM4G00bImdc7RsyZf3wR8VV3Mxdq30nqP6kiWvx+ fGcvhAQGaGBhFsQrBQ7v6o3aJxz+zGClo70wP3asGMm5eQYowTPGy2c2T31JNWaKQ/ aZSjMjhLFF4Og== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Daniel Borkmann , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Alexei Starovoitov , Sasha Levin Subject: [PATCH 6.7 36/61] selftests/bpf: Fix up xdp bonding test wrt feature flags Date: Wed, 13 Mar 2024 12:32:11 -0400 Message-ID: <20240313163236.613880-37-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163236.613880-1-sashal@kernel.org> References: <20240313163236.613880-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.7.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.7.10-rc1 X-KernelTest-Deadline: 2024-03-15T16:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Daniel Borkmann [ Upstream commit 0bfc0336e1348883fdab4689f0c8c56458f36dd8 ] Adjust the XDP feature flags for the bond device when no bond slave devices are attached. After 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY"), the empty bond device must report 0 as flags instead of NETDEV_XDP_ACT_MASK. # ./vmtest.sh -- ./test_progs -t xdp_bond [...] [ 3.983311] bond1 (unregistering): (slave veth1_1): Releasing backup interface [ 3.995434] bond1 (unregistering): Released all slaves [ 4.022311] bond2: (slave veth2_1): Releasing backup interface #507/1 xdp_bonding/xdp_bonding_attach:OK #507/2 xdp_bonding/xdp_bonding_nested:OK #507/3 xdp_bonding/xdp_bonding_features:OK #507/4 xdp_bonding/xdp_bonding_roundrobin:OK #507/5 xdp_bonding/xdp_bonding_activebackup:OK #507/6 xdp_bonding/xdp_bonding_xor_layer2:OK #507/7 xdp_bonding/xdp_bonding_xor_layer23:OK #507/8 xdp_bonding/xdp_bonding_xor_layer34:OK #507/9 xdp_bonding/xdp_bonding_redirect_multi:OK #507 xdp_bonding:OK Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED [ 4.185255] bond2 (unregistering): Released all slaves [...] Fixes: 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY") Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Message-ID: <20240305090829.17131-2-daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/prog_tests/xdp_bonding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c index c3b45745cbccd..6d8b54124cb35 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c @@ -511,7 +511,7 @@ static void test_xdp_bonding_features(struct skeletons *skeletons) if (!ASSERT_OK(err, "bond bpf_xdp_query")) goto out; - if (!ASSERT_EQ(query_opts.feature_flags, NETDEV_XDP_ACT_MASK, + if (!ASSERT_EQ(query_opts.feature_flags, 0, "bond query_opts.feature_flags")) goto out; @@ -601,7 +601,7 @@ static void test_xdp_bonding_features(struct skeletons *skeletons) if (!ASSERT_OK(err, "bond bpf_xdp_query")) goto out; - ASSERT_EQ(query_opts.feature_flags, NETDEV_XDP_ACT_MASK, + ASSERT_EQ(query_opts.feature_flags, 0, "bond query_opts.feature_flags"); out: bpf_link__destroy(link); -- 2.43.0