Skip to content

Commit 28fa55f

Browse files
yeya24yonghong-song
authored andcommitted
cleanup the style and unused function in XDP examples
Signed-off-by: yeya24 <yb532204897@gmail.com>
1 parent 57cd85d commit 28fa55f

4 files changed

Lines changed: 3 additions & 7 deletions

File tree

examples/networking/xdp/xdp_drop_count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def usage():
157157
time.sleep(1)
158158
except KeyboardInterrupt:
159159
print("Removing filter from device")
160-
break;
160+
break
161161

162162
if mode == BPF.XDP:
163163
b.remove_xdp(device, flags)

examples/networking/xdp/xdp_macswap_count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def usage():
180180
time.sleep(1)
181181
except KeyboardInterrupt:
182182
print("Removing filter from device")
183-
break;
183+
break
184184

185185
if mode == BPF.XDP:
186186
b.remove_xdp(device, flags)

examples/networking/xdp/xdp_redirect_cpu.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ def usage():
6161
6262
return cpumap.redirect_map(*cpu, 0);
6363
}
64-
65-
int xdp_dummy(struct xdp_md *ctx) {
66-
return XDP_PASS;
67-
}
6864
""", cflags=["-w", "-D__MAX_CPU__=%u" % max_cpu], debug=0)
6965

7066
dest = b.get_table("dest")

examples/networking/xdp/xdp_redirect_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def usage():
100100
time.sleep(1)
101101
except KeyboardInterrupt:
102102
print("Removing filter from device")
103-
break;
103+
break
104104

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

0 commit comments

Comments
 (0)