From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (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 AF39D31715D for ; Fri, 8 May 2026 16:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257207; cv=none; b=jFsHwFBpIvQPEbbUltOoMrT4EcW4UU5M5VLn/egkHTa+3W6CtZVepcu3TLIYmahm1CQib5MGCuyvScUAgP6B97JUgFQLPMbBRo64kuUoOak4CTf+9LdTKyuGAUG5nVBXk/Yg/Q4Cczk3OYt7hOa3UT9H7VMd4x/Tf38piA9bCwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257207; c=relaxed/simple; bh=v647WHHmXcdLQIFhGfoT7NEbJ1k0sAZWFnTY5EXnBc4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Kg6QYG0Yxq0sMm9TSusnmICW5JAtU0ZIXYyNnbh2UO6KfTWCcwaHuuuXkU7zza7EMgz+Fe9zvakOvSYLID0nUXpFt4siirXL+hvusm0OoEfO9K6fEBV8Zn0RaEhoClLydOlOyA2CWu5mFDFhROpwZvzGPDfl/5nGoOH+EvuVH80= 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=sPcdaAur; arc=none smtp.client-ip=209.85.160.172 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sPcdaAur" Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-50fb1ad3734so34715471cf.1 for ; Fri, 08 May 2026 09:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778257205; x=1778862005; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VVIaSjloZ3+LpxQTNssmJQh6h7Rks2diPWr6o44EUDI=; b=sPcdaAurUpMDi10Sft6uGMJ2a/3e3HI1R+WovtJHcva09XXrP9E3WDtnvB/z/oOHmb JZSTVv5xHeIplTuYpGYcaB3CcmK8Qfep7o5JhM0Mw2FecYi+Z/q9Zj/1BQB85HZg1bfb pQcDeHRLUpHK5PIaeWLaA/WQaXfBunzXYk7nUXVtF/bPFy6o6Suz9ZM1SxO6tAiYtNmp VKUjjzZWuvwyc+2htS0wdWQTjHDGHxEsHylrMQNZ0TV3utkRg0vFVp3nOfKelE5L67XF StDhjMlr1oYCKZ7QttpiNCGrMptZMWMInB0T+Az6ELSTpP+QY6/IxarVExCL7vHhJLlT ir6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778257205; x=1778862005; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VVIaSjloZ3+LpxQTNssmJQh6h7Rks2diPWr6o44EUDI=; b=OWRh2D+QnAIfp4dHwhuFYip+sgtKrxxz8l3/QQjzVeDN7zcfRllKjZHC1K1Ej1cRKl PUJTEqzYo5PJrDcbv2NFgAHbzAfRSPeQNsCIEt9stPVXjB2gJfcd2P0eHmY03SgUTJxk FHIPY14Z7S5lqG5dkf4E3fdM35cru1lSX/CG9bELW2xT80xmWv8yMn7+VC95noQz3R5a Lq5Wz6v3RoFA4ttJSmgCkt0duWeRbS+0R8h6ei+7a41Vvk4TsTo/1vvjTYT4Z7sQcOlS 3o26O06prLJZkD+dImvbc/dkB66VrPbd1vQckVJqCShvqdDQLpPG8MVnJTZ9rrpLRP/U CZAg== X-Forwarded-Encrypted: i=1; AFNElJ/FL/+G9frRDGkiJMaDejjI6dcqv00FWnxrPeQ3q50+FeRoLoab4jQetnHUOcYCISyaww4Jcvc=@vger.kernel.org X-Gm-Message-State: AOJu0YxrQoRrX+M7rOKq1JyUteuQAE/CIWWZVXMBOa8ZhViYmJZ+3ebt CSiPFG0Mt/i6lgeAAOZE4rrvzbcu26MJ5bk1Z5yBH7S4F/ApzPtFZ7/v X-Gm-Gg: AeBDieuR7jx5NSrNp3zckLytsEurV5LKigVg0PQRllEy2+cVE1ekb3juqjKtWqPB+rF WZV4Clf0kN3mU2QmXuQ7ukPfwU1ZUUGGX0E8guomxwwCKzIgQR0vd76HMaBUTINLrB2E9Bv3rTr tuYQ1sCbD8+N4+Wff+H7hdTJt6tnyG7RCCUcTjt5vlNnTrEEnN1TQdFezFWO0rPUsRVxNsR6ySH 7s0yb0lbQAvehwHagJa8q/vlXE7mihLVCz9zDEF0Du8BTeFqYj7YM5AQs75AdfFNYlUAWxn4lMv w6kBIk6+P91/6m9HhTmxSGcFpCGMbTer2HmpAHsM2vK0Y0Nzt3UtoYYDqqy5+GIfH5SBkYzZaD7 3dyf7ebFCVrWv2oJxEiKqZyMTwV2a+sid7CqGXQ++wLjRB+QVjHU+PkBkUZGzgzkzvS8MuoM5FZ aTnpErSg6EjZtA+540itRm8xW4JngcKaLM8GvQAI5Ib+YdUQ== X-Received: by 2002:ac8:584d:0:b0:50f:ad91:8906 with SMTP id d75a77b69052e-51475c100cdmr95757961cf.20.1778257204178; Fri, 08 May 2026 09:20:04 -0700 (PDT) Received: from devvm29614.prn0.facebook.com ([2a03:2880:f800:d::]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8b53d35787esm238874416d6.44.2026.05.08.09.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 09:20:03 -0700 (PDT) Date: Fri, 8 May 2026 09:19:57 -0700 From: Bobby Eshleman To: Stanislav Fomichev Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jonathan Corbet , Shuah Khan , Alex Shi , Yanteng Si , Dongliang Mu , Michael Chan , Pavan Chebbi , Joshua Washington , Harshitha Ramamurthy , Saeed Mahameed , Tariq Toukan , Mark Bloch , Leon Romanovsky , Alexander Duyck , kernel-team@meta.com, Daniel Borkmann , Nikolay Aleksandrov , Shuah Khan , dw@davidwei.uk, mohsin.bashr@gmail.com, willemb@google.com, jiang.kun2@zte.com.cn, xu.xin16@zte.com.cn, wang.yaxin@zte.com.cn, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Stanislav Fomichev , Mina Almasry , Bobby Eshleman Subject: Re: [PATCH net-next v3 6/8] selftests: drv-net: refactor devmem command builders into lib module Message-ID: References: <20260507-tcp-dm-netkit-v3-0-52821445867c@meta.com> <20260507-tcp-dm-netkit-v3-6-52821445867c@meta.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 08, 2026 at 08:03:11AM -0700, Stanislav Fomichev wrote: > On 05/07, Bobby Eshleman wrote: > > From: Bobby Eshleman > > > > Adding netkit-based devmem tests is a straight-forward copy of devmem > > test commands plus some args for the nk cases, so this patch breaks out > > these command builders into helpers used by both. > > > > Though we tried to avoid libraries to avoid increasing the barrier of > > entry/complexity (see selftests/drivers/net/README.md, section "Avoid > > libraries and frameworks"), factoring out these functions seemed like > > the lesser of two evils in this case of using the same commands, just > > with slightly different args per environment. > > > > I experimented with just having all of the tests in the same file to > > avoid having helpers in a library file, but because ksft_run() is > > limited to a single call per file, and the new tests will require > > different environments (NetDrvContEnv/NetDrvEpEnv), it would have been > > necessary to have each test set up its own environment instead of > > sharing one for the entire ksft_run() run. This came at the cost of > > ballooning the test time (from under 5s to 30s on my test system), so to > > strike a balance these tests were placed in separate files so they could > > keep a shared environment across a single ksft_run() run shared across > > all tests using the same env type (introduced in subsequent patches). > > > > The helpers work transparently with both plain and netkit environments > > by inspecting cfg for netkit-specific attributes (netns, nk_queue, > > etc...). > > > > Signed-off-by: Bobby Eshleman > > --- > > [..] > > > Changes in v4: > > This is a v3, but you already have changes for v4 :-p oops, will change on respin. Thanks, Bobby