All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: netdev@vger.kernel.org
Cc: kuba@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, shuah@kernel.org,
	horms@kernel.org, cratiu@nvidia.com, noren@nvidia.com,
	cjubran@nvidia.com, mbloch@nvidia.com, mohsin.bashr@gmail.com,
	jdamato@fastly.com, gal@nvidia.com, sdf@fomichev.me,
	ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
	john.fastabend@gmail.com, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH net-next 1/5] selftests: drv-net: Add bpftool util
Date: Thu, 10 Jul 2025 11:43:47 -0700	[thread overview]
Message-ID: <20250710184351.63797-2-mohsin.bashr@gmail.com> (raw)
In-Reply-To: <20250710184351.63797-1-mohsin.bashr@gmail.com>

Add bpf utility to simplify the use of bpftool for XDP tests included in
this series.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
---
 tools/testing/selftests/drivers/net/lib/py/__init__.py | 2 +-
 tools/testing/selftests/net/lib/py/utils.py            | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/drivers/net/lib/py/__init__.py b/tools/testing/selftests/drivers/net/lib/py/__init__.py
index fce5d9218f1d..39968bc3df43 100644
--- a/tools/testing/selftests/drivers/net/lib/py/__init__.py
+++ b/tools/testing/selftests/drivers/net/lib/py/__init__.py
@@ -15,7 +15,7 @@ try:
         NlError, RtnlFamily, DevlinkFamily
     from net.lib.py import CmdExitFailure
     from net.lib.py import bkg, cmd, defer, ethtool, fd_read_timeout, ip, \
-        rand_port, tool, wait_port_listen
+        rand_port, tool, wait_port_listen, bpftool
     from net.lib.py import fd_read_timeout
     from net.lib.py import KsftSkipEx, KsftFailEx, KsftXfailEx
     from net.lib.py import ksft_disruptive, ksft_exit, ksft_pr, ksft_run, \
diff --git a/tools/testing/selftests/net/lib/py/utils.py b/tools/testing/selftests/net/lib/py/utils.py
index 34470d65d871..acf0e2c38614 100644
--- a/tools/testing/selftests/net/lib/py/utils.py
+++ b/tools/testing/selftests/net/lib/py/utils.py
@@ -175,6 +175,10 @@ def tool(name, args, json=None, ns=None, host=None):
     return cmd_obj
 
 
+def bpftool(args, json=None, ns=None, host=None):
+    return tool('bpftool', args, json=json, ns=ns, host=host)
+
+
 def ip(args, json=None, ns=None, host=None):
     if ns:
         args = f'-netns {ns} ' + args
-- 
2.47.1


  reply	other threads:[~2025-07-10 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10 18:43 [PATCH net-next V2 0/5] selftests: drv-net: Test XDP native support Mohsin Bashir
2025-07-10 18:43 ` Mohsin Bashir [this message]
2025-07-11 17:10   ` [PATCH net-next 1/5] selftests: drv-net: Add bpftool util Jakub Kicinski
2025-07-10 18:43 ` [PATCH net-next 2/5] selftests: drv-net: Test XDP_PASS/DROP support Mohsin Bashir
2025-07-11 13:41   ` Jakub Kicinski
2025-07-10 18:43 ` [PATCH net-next 3/5] selftests: drv-net: Test XDP_TX support Mohsin Bashir
2025-07-10 18:43 ` [PATCH net-next 4/5] selftests: drv-net: Test tail-adjustment support Mohsin Bashir
2025-07-10 18:43 ` [PATCH net-next 5/5] selftests: drv-net: Test head-adjustment support Mohsin Bashir
2025-07-11 13:39 ` [PATCH net-next V2 0/5] selftests: drv-net: Test XDP native support Jakub Kicinski
2025-07-11 17:29   ` Mohsin Bashir
2025-07-11 17:50 ` patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2025-07-09 17:37 [PATCH net-next " Mohsin Bashir
2025-07-09 17:37 ` [PATCH net-next 1/5] selftests: drv-net: Add bpftool util Mohsin Bashir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250710184351.63797-2-mohsin.bashr@gmail.com \
    --to=mohsin.bashr@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cjubran@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=noren@nvidia.com \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.