From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 B629F3CFF51 for ; Fri, 8 May 2026 16:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257207; cv=none; b=UzraDOT0LhlYVJ8xPzgbWbGMlNNlGKWr9FnyHGrZPo8AtGPRbrstVYFgGXJnLa+yQwEksCUMFVH8B5nQA87L6QQd2ij7tLtaqyxAxoT0wJq7dXA3Gfc4yuM6mWBucUXCEjUcW3T5Zara99/hq2KGXYtWCxCRZwO4ULt3Q2CDSZY= 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.173 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-f173.google.com with SMTP id d75a77b69052e-50d880e6fbbso29166831cf.0 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=PpSkhUd6wOC2ww5pLbC/nPm+jFA8RJzDI/6IzfWpTmQWyyC731zX1nJ8PwI+jEOrvV b+44IXiyj/zn3tgFXQQb2Uuc/ZiSWxqZ77T/QaSb1l9L3qVolPhts44Sldxt71T6uO4X brkILHhuqVWMNEQFZX8gEX1qZB741FyyVVZ1GZfVE4d5hCtcRKPdK/EpaNtjjE7ePpYW KdSfFaZQHuu66kqSpPU7ZYeDWEcKR/5pwjBXn8jVSekpEDNugYa/0ORfAovP97u/kesn w44QphkjHdYKnA0XuAr8Em6cBihhXxafsVQEQgj4URCQbPTnvI0yxtkGpLSHpbaDPLgI D5cg== X-Forwarded-Encrypted: i=1; AFNElJ8WmiBiDlcrK6RuYQ0YvHb2ZTR5kRjQv+qJFPaDeEyqccS8vyB+CHJKIr1knDt2lMczNqKe0U0NlV80@vger.kernel.org X-Gm-Message-State: AOJu0YwFM82Yojiq7LCamVV8L8AuxyXE7lxwLZXY9BRKzxyA2poRSiMu JY85jBchHF/bzAjUuDL5kbDTqzRQ6rj0PgzPuzHaSx+wOHF9380UziHq X-Gm-Gg: AeBDieupm83x+MTZfHXbqKaS0c40vJcYz3Jx6aCGiKFhhJAg6OEQucBTEHw7xIKZdcg zlP9TJsgKKQPbFT3kkZMd4Vwfrtr6ty/4wUutm/64zmp3DKtcE/z8m28PVnLdsuJTg+sdhC2Wp0 ceYUX0g60ob1d0yO8U5K6Jd2o9ajc3fbyOsAUjJm7L9DAqI0ifwucYAohLIWivHA+hLM6I1uu0X N2aKE8SzA+cZ+8wDAZ+35mMqjP97T0yCt7YFUQYFFMiTbDMTEA/kaW+6JmCSL4409GQfaGscD2O esSxuqdG8CGqQvZW8kRCplv/Ea8KGxQSWy5CZU6Lg5Jnc9rraxwRrvSdQPcpCcNwkR6i6MeEwor qj6YEd09cTOG+j/WbjF2DfcamhQVyENTb/2pg/PNmg6CvmhJEzvWYe5Rf9zb36SCQd5ug8Bfr6Z EbdJKO1k43MosBuKNPHxNJ2W/1XK6EMJxI84DwgFApkqqwUg== 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: linux-rdma@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