Skip to content

Commit

Permalink
cleanup the style and unused function in XDP examples
Browse files Browse the repository at this point in the history
Signed-off-by: yeya24 <[email protected]>
  • Loading branch information
yeya24 authored and yonghong-song committed Mar 12, 2021
1 parent 57cd85d commit 28fa55f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/networking/xdp/xdp_drop_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def usage():
time.sleep(1)
except KeyboardInterrupt:
print("Removing filter from device")
break;
break

if mode == BPF.XDP:
b.remove_xdp(device, flags)
Expand Down
2 changes: 1 addition & 1 deletion examples/networking/xdp/xdp_macswap_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def usage():
time.sleep(1)
except KeyboardInterrupt:
print("Removing filter from device")
break;
break

if mode == BPF.XDP:
b.remove_xdp(device, flags)
Expand Down
4 changes: 0 additions & 4 deletions examples/networking/xdp/xdp_redirect_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def usage():
return cpumap.redirect_map(*cpu, 0);
}
int xdp_dummy(struct xdp_md *ctx) {
return XDP_PASS;
}
""", cflags=["-w", "-D__MAX_CPU__=%u" % max_cpu], debug=0)

dest = b.get_table("dest")
Expand Down
2 changes: 1 addition & 1 deletion examples/networking/xdp/xdp_redirect_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def usage():
time.sleep(1)
except KeyboardInterrupt:
print("Removing filter from device")
break;
break

b.remove_xdp(in_if, flags)
b.remove_xdp(out_if, flags)

0 comments on commit 28fa55f

Please sign in to comment.