Lines Matching defs:args

106         log("BKG " + proc.args, msg)
123 log("CMD " + proc.args,
131 raise Exception("Command failed: %s\n%s" % (proc.args, stderr))
143 def tool(name, args, flags, JSON=True, ns="", fail=True, include_stderr=False):
152 ret, stdout, stderr = cmd(ns + name + " " + params + args,
155 ret, stdout = cmd(ns + name + " " + params + args,
168 def bpftool(args, JSON=True, ns="", fail=True, include_stderr=False):
169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns,
212 args = "prog load %s %s" % (os.path.join(bpf_test_dir, sample), file_name)
214 args += " type " + prog_type
216 args += " dev " + dev
218 args += " map " + " map ".join(maps)
220 res = bpftool(args, fail=fail, include_stderr=include_stderr)
225 def ip(args, force=False, JSON=True, ns="", fail=True, include_stderr=False):
227 args = "-force " + args
228 return tool("ip", args, {"json":"-j"}, JSON=JSON, ns=ns,
231 def tc(args, JSON=True, ns="", fail=True, include_stderr=False):
232 return tool("tc", args, {"json":"-p"}, JSON=JSON, ns=ns,
235 def ethtool(dev, opt, args, fail=True):
236 return cmd("ethtool %s %s %s" % (opt, dev["ifname"], args), fail=fail)
518 args = "-s filter show dev %s ingress" % (self['ifname'])
519 _, out = tc(args, JSON=False)
581 args = "hw-tc-offload %s" % ("on" if enable else "off")
582 return ethtool(self, "-K", args, fail=fail)
650 def check_extack(output, reference, args):
657 def check_extack_nsim(output, reference, args):
658 check_extack(output, "netdevsim: " + reference, args)
715 check_extack(err, "XDP program already attached.", args)
721 check_extack(err, "More than one program loaded, unset mode is ambiguous.", args)
755 args = parser.parse_args()
756 if args.log:
757 logfile = open(args.log, 'w+')
837 check_extack(err, "TC offload is disabled on net device.", args)
869 args)
877 check_extack(err, "Driver supports only offload of chain 0.", args)
1012 args)
1023 check_extack_nsim(err, "MTU too large w/ XDP enabled.", args)
1033 check_extack_nsim(err, "xdpoffload of non-bound program.", args)
1042 check_extack(err, "Using offloaded program without HW_MODE flag is not supported.", args)
1091 check_extack(err, "Program bound to different device.", args)
1096 check_extack(err, "Program bound to different device.", args)
1110 check_extack_nsim(err, "driver and netdev offload states mismatch.", args)
1117 check_extack_nsim(err, "TC program is already loaded.", args)
1143 check_extack_nsim(err, "driver and netdev offload states mismatch.", args)
1337 check_extack(err, "Program bound to different device.", args)
1342 check_extack(err, "Program bound to different device.", args)