mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
netdevsim: merge sdev into dev
As previously introduce dev which is mapped 1:1 to a bus device covers the purpose of the original shared device, merge the sdev code into dev. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a60f9e48b7
commit
d514f41e79
6 changed files with 120 additions and 119 deletions
|
|
@ -335,7 +335,7 @@ class NetdevSim:
|
|||
self.ns = ""
|
||||
|
||||
self.dfs_dir = '/sys/kernel/debug/netdevsim/%s' % (self.dev['ifname'])
|
||||
self.sdev_dir = self.dfs_dir + '/sdev/'
|
||||
self.dev_dir = self.dfs_dir + '/dev/'
|
||||
self.dfs_refresh()
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
|
@ -368,12 +368,12 @@ class NetdevSim:
|
|||
return data.strip()
|
||||
|
||||
def dfs_num_bound_progs(self):
|
||||
path = os.path.join(self.sdev_dir, "bpf_bound_progs")
|
||||
path = os.path.join(self.dev_dir, "bpf_bound_progs")
|
||||
_, progs = cmd('ls %s' % (path))
|
||||
return len(progs.split())
|
||||
|
||||
def dfs_get_bound_progs(self, expected):
|
||||
progs = DebugfsDir(os.path.join(self.sdev_dir, "bpf_bound_progs"))
|
||||
progs = DebugfsDir(os.path.join(self.dev_dir, "bpf_bound_progs"))
|
||||
if expected is not None:
|
||||
if len(progs) != expected:
|
||||
fail(True, "%d BPF programs bound, expected %d" %
|
||||
|
|
@ -1055,7 +1055,7 @@ try:
|
|||
|
||||
start_test("Test if netdev removal waits for translation...")
|
||||
delay_msec = 500
|
||||
sim.dfs["sdev/bpf_bind_verifier_delay"] = delay_msec
|
||||
sim.dfs["dev/bpf_bind_verifier_delay"] = delay_msec
|
||||
start = time.time()
|
||||
cmd_line = "tc filter add dev %s ingress bpf %s da skip_sw" % \
|
||||
(sim['ifname'], obj)
|
||||
|
|
|
|||
Loading…
Reference in a new issue