aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorMohsin Bashir <[email protected]>2025-07-10 18:43:47 +0000
committerJakub Kicinski <[email protected]>2025-07-11 17:09:28 +0000
commita339dd699a7aa01bce4b38c8d81def310cf2bca0 (patch)
tree35e7c6dab5ecc39c7c4745d8f407af8a635c4136 /tools/testing/selftests/net/lib/py/utils.py
parentMerge branch 'hv-msi-parent-domain' into main (diff)
downloadkernel-a339dd699a7aa01bce4b38c8d81def310cf2bca0.tar.gz
kernel-a339dd699a7aa01bce4b38c8d81def310cf2bca0.zip
selftests: drv-net: Add bpftool util
Add bpf utility to simplify the use of bpftool for XDP tests included in this series. Signed-off-by: Mohsin Bashir <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
-rw-r--r--tools/testing/selftests/net/lib/py/utils.py4
1 files changed, 4 insertions, 0 deletions
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