Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp853039lqo; Fri, 10 May 2024 18:43:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURaytyz1jDruLqR2vgYLGx/sY2Wh3CDBZplXv7M//swhy5gnajuZ0n5srXGs3K3/uHrWuqkGW8FK5iydQv1UJnIUAsX0E/6N5nyj7tFw== X-Google-Smtp-Source: AGHT+IGveIAOpRwxENFmnUKnWzNs6TAex8+uIccByJbMchhV7XR8bzu/jAVhiNAW9uA0/S/7VxzI X-Received: by 2002:a05:6870:8452:b0:23c:bcbb:f06a with SMTP id 586e51a60fabf-24172aa2c22mr4744147fac.30.1715391780180; Fri, 10 May 2024 18:43:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715391780; cv=pass; d=google.com; s=arc-20160816; b=H+UW5EAKzsjW3gFoZUjmB9+cdutkGxyNuQbHKlJHS3rgzhMXYwySmuLTh++C6UoDpR J44naCwjfrxP+qvHYFcWhPppmQ+4IL0Zk42FCw4UNFxQxevSZWBgXea86V71GEMGSOzU 7Oq77IVJ31KKF8+7LnHAcIFbUT82T+MkYQapW9M6n4kRzGsLaN/u+Tebc/Ga3Rm58X6X bPnps9X4UH5Uqr0We8D5CMnbtxLdpKZcVat0HqdIpRkDwgG65Ad9XR/CUntZ9XbJVVcw EeKsV9XRVY8LCdqWd7BMs1yFgRIbST73SPQv/7yTvg0NhTTqsToAOIhbQCA+RgA+uVn3 AXKA== 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:user-agent:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=2iR6RK8lHPyBLFmbppuFL6+IDeQ1CIVlPlxL9W6JGhs=; fh=raTuef+iST95SHBKYSDaHpZKaqbmg+R7xgLiQwxXYMQ=; b=0WxtcVNPmLF3plnrbp1sGn+zpPhkaBBu7BUU9J63LTJKIsF2CczwxFeovscFjMUqh2 chP4+vLBZVNTtTrGQTsNZ7T9XBHzUN0CTkvIp6hEd8rP9inEssypbs1Z9T5g74jmwZUX B2Epda490aP63yvqB44e/alW2oNI9+07ieSGhRAMZf3/hL9iZl15tnzCu8npLtAiF4Nh upAl+bFWdd2vX4pjzCHRRD39qWakquZf3LzINIzZvjFPDTPZLzNC9MXZPzY/ubw4vVrf 7Rwj9rFxVcPljB7ucPGNMoV5RHkz6u7F3avVa/TH6NpQT+0d9h8huijgwLy4gpmavyNX FCNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPI+OgTg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412958e16si4536352a12.717.2024.05.10.18.42.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 18:43:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPI+OgTg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176362-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D0BF7B22751 for ; Sat, 11 May 2024 01:42:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1D7A14F98; Sat, 11 May 2024 01:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BPI+OgTg" 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 9B75B8C13; Sat, 11 May 2024 01:42:42 +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=1715391762; cv=none; b=adsZB4ZGYucLSIBtSF2SYyjempEXWNb90j7QFMOBG8rwldHm4Cbe0o1sk4M9lbzv4yzyIjcVg2eEQRmfKG+0EgBG4rvYCvLfebDrJH3xwZLnZSvRRE/Auh0zwOO4pI9dFupWRfXyK6RCThwVB4Cvu2Y6HmCy0qsfr1pOg/zQXxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715391762; c=relaxed/simple; bh=B98QXwaMAkRfgO2gYmiRCq3L4jfQpvnIuCNjwrmLHLM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=rjz7FQ1cqclUvD4C/nakIEHQrFddFROJlPME+N3UjGebc95DeCyS3s04OaWgg7fL/1DU9kBPchlyjkJMBnK1sm3bH2G9kLi08b8Rj+/lzYtw5FUfY0eKhpmWU0X4EbJWRu1efIT+ZQeUCRSktxSvHWtRboqvMYj3trRN83ayqgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BPI+OgTg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F53DC113CC; Sat, 11 May 2024 01:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715391762; bh=B98QXwaMAkRfgO2gYmiRCq3L4jfQpvnIuCNjwrmLHLM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=BPI+OgTglWOHm/ORkzJT4reyKD78QnaHWRbN7umgcuTaM2SCoF4FNGPlyenp7GZcy mv21GgnXmircxJy9G+WoEQICqELkVPOHhJNDB4g72U0vmZpSK8mcIZUYjBn2+MjgGF TGja5L4vSNsphrFTlW/vY1YhzQ6peTFFOPEwshYEtxqTvtGW/8BlJgDj5aWJ1CYW+B tqmX4/6E6ZC6PdS+Crf3n/wdoJn/Txj+DSA51/s/ZHfWdhaUYO2JUBxWyeuIWIznQW qo2rmhSMoQQCJyeFusm7eGMyTVtaccmvQQFA29dykIne8r/4B4L/4CALBslW2buvXI iWQDBCrG90+ig== Message-ID: Subject: Re: [PATCH bpf-next 2/4] selftests/bpf: Add RUN_MPTCP_TEST macro From: Geliang Tang To: Alexei Starovoitov , Matthieu Baerts Cc: MPTCP Upstream , Mat Martineau , Andrii Nakryiko , Eduard Zingerman , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , LKML , Network Development , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , Geliang Tang Date: Sat, 11 May 2024 09:42:30 +0800 In-Reply-To: References: <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-0-e2bcbdf49857@kernel.org> <20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-2-e2bcbdf49857@kernel.org> Autocrypt: addr=geliang@kernel.org; prefer-encrypt=mutual; keydata=mQINBGWKTg4BEAC/Subk93zbjSYPahLCGMgjylhY/s/R2ebALGJFp13MPZ9qWlbVC8O+X lU/4reZtYKQ715MWe5CwJGPyTACILENuXY0FyVyjp/jl2u6XYnpuhw1ugHMLNJ5vbuwkc1I29nNe8 wwjyafN5RQV0AXhKdvofSIryqm0GIHIH/+4bTSh5aB6mvsrjUusB5MnNYU4oDv2L8MBJStqPAQRLl P9BWcKKA7T9SrlgAr0VsFLIOkKOQPVTCnYxn7gfKogH52nkPAFqNofVB6AVWBpr0RTY7OnXRBMInM HcjVG4I/NFn8Cc7oaGaWHqX/yHAufJKUsldieQVFd7C/SI8jCUXdkZxR0Tkp0EUzkRc/TS1VwWHav 0x3oLSy/LGHfRaIC/MqdGVqgCnm6wapUt7f/JHloyIyKJBGBuHCLMpN6n/kNkSCzyZKV7h6Vw1OL5 18p0U3Optyakoh95KiJsKzcd3At/eftQGlNn5WDflHV1+oMdW2sRgfVDPrYeEcYI5IkTc3LRO6ucp VCm9/+poZSHSXMI/oJ6iXMJE8k3/aQz+EEjvc2z0p9aASJPzx0XTTC4lciTvGj62z62rGUlmEIvU2 3wWH37K2EBNoq+4Y0AZsSvMzM+CcTo25hgPaju1/A8ErZsLhP7IyFT17ARj/Et0G46JRsbdlVJ/Pv X+XIOc2mpqx/QARAQABtCVHZWxpYW5nIFRhbmcgPGdlbGlhbmcudGFuZ0BsaW51eC5kZXY+iQJUBB MBCgA+FiEEZiKd+VhdGdcosBcafnvtNTGKqCkFAmWKTg4CGwMFCRLMAwAFCwkIBwIGFQoJCAsCBBY CAwECHgECF4AACgkQfnvtNTGKqCmS+A/9Fec0xGLcrHlpCooiCnNH0RsXOVPsXRp2xQiaOV4vMsvh G5AHaQLb3v0cU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QHyF677QARAQABiQI7BBgBCgAmFiEEZiKd+VhdGdcosBcafnvtNTGKqCkFA mWKTg4CGwwFCRLMAwAACgkQfnvtNTGKqCkpsw/2MuS0PVhl2iXs+MleEhnN1KjeSYaw+nLbRwd2Sd XoVXBquPP9Bgb92T2XilcWObNwfVtD2eDz8eKf3e9aaWIzZRQ3E5BxiQSHXl6bDDNaWJB6I8dd5TW +QnBPLzvqxgLIoYn+2FQ0AtL0wpMOdcFg3Av8MEmMJk6s/AHkL8HselA3+4h8mgoK7yMSh601WGrQ AFkrWabtynWxHrq4xGfyIPpq56e5ZFPEPd4Ou8wsagn+XEdjDof/QSSjJiIaenCdDiUYrx1jltLmS lN4gRxnlCBp6JYr/7GlJ9Gf26wk25pb9RD6xgMemYQHFgkUsqDulxoBit8g9e0Jlo0gwxvWWSKBJ8 3f22kKiMdtWIieq94KN8kqErjSXcpI8Etu8EZsuF7LArAPch/5yjltOR5NgbcZ1UBPIPzyPgcAmZl AQgpy5c2UBMmPzxco/A/JVp4pKX8elTc0pS8W7ne8mrFtG7JL0VQfdwNNn2R45VRf3Ag+0pLSLS7W OVQcB8UjwxqDC2t3tJymKmFUfIq8N1DsNrHkBxjs9m3r82qt64u5rBUH3GIO0MGxaI033P+Pq3BXy i1Ur7p0ufsjEj7QCbEAnCPBTSfFEQIBW4YLVPk76tBXdh9HsCwwsrGC2XBmi8ymA05tMAFVq7a2W+ TO0tfEdfAX7IENcV87h2yAFBZkaA== Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.52.0-1build2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 2024-05-07 at 13:51 -0700, Alexei Starovoitov wrote: > On Tue, May 7, 2024 at 9:02 AM Matthieu Baerts > wrote: > > > > Hi Alexei, > > > > Thank you for the review! > > > > On 07/05/2024 16:44, Alexei Starovoitov wrote: > > > On Tue, May 7, 2024 at 3:53 AM Matthieu Baerts (NGI0) > > > wrote: > > > > > > > > From: Geliang Tang > > > > > > > > Each MPTCP subtest tests test__start_subtest(suffix), then > > > > invokes > > > > test_suffix(). It makes sense to add a new macro RUN_MPTCP_TEST > > > > to > > > > simpolify the code. > > > > > > > > Signed-off-by: Geliang Tang > > > > Reviewed-by: Mat Martineau > > > > Signed-off-by: Matthieu Baerts (NGI0) > > > > --- > > > >  tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++++-- > > > > -- > > > >  1 file changed, 8 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c > > > > b/tools/testing/selftests/bpf/prog_tests/mptcp.c > > > > index baf976a7a1dd..9d1b255bb654 100644 > > > > --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c > > > > +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c > > > > @@ -347,10 +347,14 @@ static void test_mptcpify(void) > > > >         close(cgroup_fd); > > > >  } > > > > > > > > +#define RUN_MPTCP_TEST(suffix)                                 > > > > \ > > > > +do {                                                           > > > > \ > > > > +       if (test__start_subtest(#suffix))                       > > > > \ > > > > +               test_##suffix();                                > > > > \ > > > > +} while (0) > > > > > > Please no. > > > Don't hide it behind macros. > > > > I understand, I'm personally not a big fan of hiding code being a > > macro > > too. This one saves only one line. Geliang added a few more tests > > in our > > tree [1], for a total of 9, so that's only saving 9 lines. > > > > Related to that, if you don't mind, Geliang also added another > > macro -- > > MPTCP_SCHED_TEST -- for tests that are currently only in our tree > > [2] > > (not ready yet). We asked him to reduce the size of this macro to > > the > > minimum. We accepted it because it removed quite a lot of similar > > code > > with very small differences [3]. Do you think we should revert this > > modification too? > > Yeah. Pls don't hide such things in macros. > Refactor into helper function in normal C. I do agree to remove this RUN_MPTCP_TEST macro. But MPTCP_SCHED_TEST macro is different. I know this type of macro is unwelcome. But it's indeed a perfect place to use macro in MPTCP bpf sched tests. From ''' static void test_first(void) { struct mptcp_bpf_first *skel; skel = mptcp_bpf_first__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: first")) return; test_bpf_sched(skel->obj, "first", WITH_DATA, WITHOUT_DATA); mptcp_bpf_first__destroy(skel); } static void test_bkup(void) { struct mptcp_bpf_bkup *skel; skel = mptcp_bpf_bkup__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: bkup")) return; test_bpf_sched(skel->obj, "bkup", WITH_DATA, WITHOUT_DATA); mptcp_bpf_bkup__destroy(skel); } static void test_rr(void) { struct mptcp_bpf_rr *skel; skel = mptcp_bpf_rr__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: rr")) return; test_bpf_sched(skel->obj, "rr", WITH_DATA, WITH_DATA); mptcp_bpf_rr__destroy(skel); } static void test_red(void) { struct mptcp_bpf_red *skel; skel = mptcp_bpf_red__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: red")) return; test_bpf_sched(skel->obj, "red", WITH_DATA, WITH_DATA); mptcp_bpf_red__destroy(skel); } static void test_burst(void) { struct mptcp_bpf_burst *skel; skel = mptcp_bpf_burst__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: burst")) return; test_bpf_sched(skel->obj, "burst", WITH_DATA, WITH_DATA); mptcp_bpf_burst__destroy(skel); } static void test_stale(void) { struct mptcp_bpf_stale *skel; skel = mptcp_bpf_stale__open_and_load(); if (!ASSERT_OK_PTR(skel, "open_and_load: stale")) return; test_bpf_sched(skel->obj, "stale", WITH_DATA, WITHOUT_DATA); mptcp_bpf_stale__destroy(skel); } ''' to ''' #define MPTCP_SCHED_TEST(sched, addr1, addr2) \ static void test_##sched(void) \ { \ struct mptcp_bpf_##sched *skel; \ \ skel = mptcp_bpf_##sched##__open_and_load(); \ if (!ASSERT_OK_PTR(skel, "open_and_load:" #sched)) \ return; \ \ test_bpf_sched(skel->obj, #sched, addr1, addr2); \ mptcp_bpf_##sched##__destroy(skel); \ } MPTCP_SCHED_TEST(first, WITH_DATA, WITHOUT_DATA); MPTCP_SCHED_TEST(bkup, WITH_DATA, WITHOUT_DATA); MPTCP_SCHED_TEST(rr, WITH_DATA, WITH_DATA); MPTCP_SCHED_TEST(red, WITH_DATA, WITH_DATA); MPTCP_SCHED_TEST(burst, WITH_DATA, WITH_DATA); MPTCP_SCHED_TEST(stale, WITH_DATA, WITHOUT_DATA); ''' We can save so many code, and perfectly use BPF test skeleton template. It's small enough, and be difficult to refactor with a helper function in normal C. Please reconsider whether to delete it, or at least keep it until the day it is officially sent to BPF mail list for review. Thanks, -Geliang > > But, what do you mean "in your tree" ? > That's your development tree and you plan to send all that > properly as patches to bpf-next someday? > > > > > [1] > > https://github.com/multipath-tcp/mptcp_net-next/blob/4369d9cbd752e166961ac0db7f85886111606301/tools/testing/selftests/bpf/prog_tests/mptcp.c#L578-L595 > > > > [2] > > https://github.com/multipath-tcp/mptcp_net-next/blob/4369d9cbd752e166961ac0db7f85886111606301/tools/testing/selftests/bpf/prog_tests/mptcp.c#L559-L576 > > > > [3] > > https://lore.kernel.org/mptcp/cover.1713321357.git.tanggeliang@kylinos.cn/T/#m0b9c14f1cbae8653c6fd119f6b71d1797961d6ba > > > > Cheers, > > Matt > > -- > > Sponsored by the NGI0 Core fund. > >