From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 B1F083A5434 for ; Fri, 8 May 2026 16:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778257207; cv=none; b=hx4QxzkDd5GybXjxo19wEiqRwNvx5k+hcHSVzj9utSmTvaW/7WyVHGD1qnScASY3jOa5EsdmtE2yipja0T9KPKe90z2A124oIcLDnQU24ZfXENxXg5JfaNlTvDm1eKoBOTt8PziKn2cHAGJhl989BGTAQLdJB+cJcJ6HUYLfQz0= 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.175 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-f175.google.com with SMTP id d75a77b69052e-50fb1ad3734so34715521cf.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=isNFY4m+IqrpO8dENMQtEsxLUbqy6UD9CsrNVBhnuy4emk8LW34kEoeBvFUCz0IeTK Aqp5P/eDqZRBYcDn+oR8jGqRw21w9SyZhJrOd9qCRF10njg5ycv4aF4/8x2pOZS+gLcB dN2gCnSGrCzh2mom17pdw1WHYE4Nguo9SdwcSYZZyGt8AOEChQZROJz3CqUNsGHbUNvy lnYebQZippofggzTjlaZ2/GRb5dBppLX+a1Y/+DJ2za2HOQGREqaBYYTHgs5+vqSZ8L3 akM8IiQBc1TM/gDLyZOZDgK+P9EwD2KRkiMQ5gF3lhcy3+JMlF3X3s3mlAm9rAiuiG8I IP8Q== X-Forwarded-Encrypted: i=1; AFNElJ+Tlx0BZ+bwqdZFOvyuXHdvGTqkkrtf7QuVW2Rut/P1Nx3SKoI8Trva+wN3dm0A/3tyDI0=@vger.kernel.org X-Gm-Message-State: AOJu0YwE5SRzjJGUOh+pPlAvUF8MMT2E+fZCIOfSSFIgvfJg/fkFcWtu 6iwN2Dps4ejLGLoX3B+GKmoWlqDvaXM2vwR9yYuemZvRmQucOHh7fFYn X-Gm-Gg: AeBDiet34XXX6a88gk5V4k+p4ax/oFph8HLVBlpmhYFVtejioOq259z4g9I9ZXgHvgY DhlDlQIKGeTJ66YwNVnUxJLTAlfGEIrR3bLjC8SeVY/HIUSj2UDd9rxKf2mBwxoDacOb5BAFlWp elCITYYWg0bOWgCUqPGTBaNLzibXP9b46FlWykT9IA3NyOroFfLOJFTyxL5lpsH6lVCTxZYcRzQ 8AXIkXr4AiATZFpxMA9wGzae08MebOJGJOKJqUBxePbHc7T02Ujfh3xt1ZgXxf6bgC+mJwFU3MP xDYUlHvnABXsCunITaXeAB8+nyLcdNdjYgfKwNXYTun/1Nsxl2vZkPMKeEN/kmD1u53vYY1ONyZ Psqglq9qWKUHd6MeI/C1TNpBS1u0zMubfHwTCLzsTX+akIlur1lwqe5JezOwXTEIZwyHSAquxYq yBRuyQ8sNlJlxgXrIW4ei3jIIKlgDFSBoSbBUby286sqIXVA== 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: bpf@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