From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) (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 35C253FBEAF for ; Fri, 8 May 2026 15:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252599; cv=none; b=Fk75MON645mKUu4qtpHLM/4jN0IPNKIrxf0eY/aPShIiKVhK104k5Syx/C1du2FTAaQauS+GLVYz+l8SyTvjMYqSn1rvtzTdF6X4/L1xaFOE2R18HxhpZct0e+y+vXocOBV/LNthg/JOYz0eiPEfQ/cI1rw+FesmE1J1nyR4gxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252599; c=relaxed/simple; bh=Yc8G/OYaz0np5e+ifQwa6O1CU5HmHo+b4K8v6Tjxvs8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qQ1G7nWZwsZ89vYRJbqObD3jQm/mQcFz19hM0dpg9aM9D8vayqehnrPvTuymE1J7dNn+4QsRyzEQVQqmajd300O4C1zQLA/MQpAdcOUkbq24mjiv4aGG3UPk3AYMivmDNuiNVopY2TvytnGT6nfpt4JH7Lz2zqvg0ubdBdf0sYI= 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=iwhlcuSE; arc=none smtp.client-ip=209.85.215.194 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="iwhlcuSE" Received: by mail-pg1-f194.google.com with SMTP id 41be03b00d2f7-c80148ae949so930985a12.2 for ; Fri, 08 May 2026 08:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778252593; x=1778857393; 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=OCvkvD50FsVxDN97c8Hp0jXUGucP6UrrTJOe2Js6aRE=; b=iwhlcuSE1RFQW2tMj7c6OHS86RYq0Cr8bopzDoWjdgEhNUOx91pEsF8qHLVtRoYcpX toDk8UOGhdVxf9rWykP63/iEbJY0DCENeha6M0qNKzWdhB8uHse6vuj7omiMm1xbPzhf diAn5UqdUa5AiqVush6Ex/+pFWzc3Hp6J2mvNO/KZa6jj930gJ0w4gSYuJVWFs5RAIMR dGvAt4A1Cm06wdzEsAlmWhtrKhn0lK7euxhaaBB4EgQfcdMAMqN63yyYmfKs4L7s5rA/ lUkUdTkx52qH0L1z6gQ19mJJ/hFM/sdw/C8NEQFHJgXBy6qKO4bjXgylqqitjrKLaQVe xrIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778252593; x=1778857393; 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=OCvkvD50FsVxDN97c8Hp0jXUGucP6UrrTJOe2Js6aRE=; b=I+GJ0nmpPOAC2GIZq5y9JxJJD70cpjdOUNMY6NyNeTPxOGUJtFO+5VLmF3a4C67JJK c0hbGdL64FzS9KdrAusP7YwyHRV1NaV38z81uVMKKotzaEwTYg1TfSzT9hjd2yugh0al fIoDq588F/Ab/EH9rehkTzZ9ya4RCTy8Yyd1XOkjMFPN9EOPhb4YEhnUK/KEXN7IFG/s lyuoTpgpFU11S8IK0DbOidvxtsnGTXKIrZ9IMlKxY9Xe//4dv/FtnlJZ+/Pqa52QfzkP jA94fZYZxK6ItzrsffBv3PeG/hOLWrFfSJdl3PsmiZM2/xrC1qxIXLveCErXmatSMEW4 ldfA== X-Forwarded-Encrypted: i=1; AFNElJ8WNFFJASa0BMGQkbwgixdNJS1XzMJokyabUA/wHwncJtDxtVJlLcfr6kPpgDwkxNrVzbxcC7C2c815YhI=@vger.kernel.org X-Gm-Message-State: AOJu0Yzn5WY96T4mcKvJhOYoS0UC4Xf/DgYXTtAsV6nkDcrHTOaqhzWK dEf2mNkO5HoIE8+qCRvGE1szhTa0HOeSP6ivLfIoFTl7ZtYbD9aH1Vn1 X-Gm-Gg: AeBDietXLCpmAHzfFojwjGxJcgLaJeEFhBIdIWRrCROl777jzhZp1QgDrE9iAtY4cMA oDcoPremlvNT1gbk3lsUbDCh7mX7ngpPOtQDWEn+kuNBw6IBEEvCTewXXeYFQxbag2ks9SV320G ow7g0GO3FZNK/gFG6Q8qbqv93Z2kCNwo0JiOesk4nMshSkg1GiHy5MLb4usWvT4PB7L36/OFGG2 PXgRUr0B5BlOoz7bV4lC+N99RD3vT62Qco0ahOudlIp+MRVCk8gis6xs4P7vG3kN+pfCIvUbxFZ MlgxbFehdvuK0LXLcCNAH9+60tmP34Tm9gqnWBE4GJtUB64jy3NoyiN9INczKhHZuyNeZE6mLRq WA5g/X3wQaTvVOIzrACyMxu4T1yjxlOkBviNHHi2hbmy3SSrcQZAbKlJlLAGwyTzg2lFh4Y+5Jw xR/4z3i2BeqCxQFRHP X-Received: by 2002:a05:6a20:244d:b0:3a3:a69c:216e with SMTP id adf61e73a8af0-3aa5ac23e75mr14422053637.38.1778252592814; Fri, 08 May 2026 08:03:12 -0700 (PDT) Received: from localhost ([2a03:2880:2ff:48::]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8396594645csm13180339b3a.14.2026.05.08.08.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 08:03:11 -0700 (PDT) Date: Fri, 8 May 2026 08:03:11 -0700 From: Stanislav Fomichev To: Bobby Eshleman 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260507-tcp-dm-netkit-v3-6-52821445867c@meta.com> 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 Acked-by: Stanislav Fomichev