From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (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 B47663B47FA for ; Fri, 8 May 2026 16:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257208; cv=none; b=X6rgGruJCnFmOqoXq1vzkN7Yg+nj5/k6ws2FvqLvf516LLUScjUdUusfNtI9dQUdwCgiCPiU7m2Hkv2A5ex+wO/vvhaMuN5Wd73zJWpfBIeJ0WLOLSAuEDWpGjffuydQkO8pSF6RVVLVj7k12qOlRDu6CZxXh9+GCR7vuob6cJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257208; c=relaxed/simple; bh=v647WHHmXcdLQIFhGfoT7NEbJ1k0sAZWFnTY5EXnBc4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aR6qLazz98DXhaaHoScDeqGhB0CpAosyCQRpmfZ6hpP1x8ZalzECx2PmwICtJrT57ZQxuPwzK2pnfLyvoJ22KxL4ctpMQn0m0kk8x7Y1eLKzf66aGbp4Tbc1t3JhzEhcOyVX66AlYqC0FhDGpNH40TciZL11W1AO+0XjiM5RlQU= 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.178 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-f178.google.com with SMTP id d75a77b69052e-50fb1ad3734so34715561cf.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=RQR6Ug97L0Mqm9FL4LATZFp/2WgUTNkMkz8Ovj0yQTDZhtbggDyHSJ09y59B21DjUb khOlrGHTZfXQZoc+oSWJ0sn1HBOMRRqPgRKBQk8nKtSCXTRUuEfUquB0vw+iyJ9DexYt dBQJl6FlQV2gETslfb1IlKbpQ5zhECgsEs4H1AUZkuo5Y/zYpKGrWVXL6T1WFcnyi7QQ 5z/1g5dgn9a9/9CLQ6ux3ADY8cd+dCUtxhqov9q4afriqpGOm8P50lnfHt2t2JbMurCk EBp1BycvsYqqsFTq4mYZeHZH6WG+DhaBJGWCgns9WuGWAurox+P5xaENCTJzaV9Qf4AD 2aGA== X-Forwarded-Encrypted: i=1; AFNElJ9F3Gtvd3AGnBuXng5nnK1ITGdHjnin1t7IL1FhZk7ZjWH097KPHiScsbPLTZS+3TjysveDkIevcphk5jECZ5E=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+Dyav60DWJVCWlRfmbU1RRA+jMDV+f0AKCdY2rMo0Cc9pLVou 1YGQcLNEchkqNtSCarIj1ACpOQqjlR5v0MCUbgnoi4MyIHUpMqShZOXN X-Gm-Gg: AeBDiesPmvlkSDoAiIIZ5lUFpB3yjxOAqogSyL7qpMlM+W9bRssd+Cirm24QVLOmPWp 4CjfiuY1L+nNXNASToyabO0vuVfy471RpJs6bvcDOIvBbtib1r0MmZB4juHRIUZNuIsbcTF70Yf T/ydXDC4AAcUSb2lceGgdKs46qxWemwZ6gMq+U47pTCF7mprPItIMx/tNy5j7izPgKAao5R2oMo gHJIVm17VWtIuO3O9Tg6g08W7Tcg3J6G4xfgBd7hG61hZGgbmcO06LOgeLEyaGLmY+fmHilQgXw byAC0QeG6/vj9EpdOQPkpCjJyl2KiYxnFGMY2gMah/gZx+gzrwrmXNU0Js1uXBoAXcHGQFWmkuF eAZ5D7l8c644fktt3D8LwJhCfpAU/+Rm5s6qHFBHhKFq90CmAbpjZOEO8SCvucSn3FrPTibguZj rzdzEl87UtbgMn3fV7de1FHJ9Yk4Gu56fxnGE3Zzwws8G53Q== 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-kselftest@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