Skip to content

Commit cefc8db

Browse files
nimrod-orentohojo
authored andcommitted
xdp-bench: Enable xdp_frags for dummy programs
Enable the xdp_frags flag for the redirect dummy programs so they can be attached on interfaces with non-linear MTU. Signed-off-by: Nimrod Oren <[email protected]>
1 parent 9085a51 commit cefc8db

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

xdp-bench/xdp_redirect_basic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ int do_redirect_basic(const void *cfg, __unused const char *pin_root_path)
120120
goto end_detach;
121121
}
122122

123+
xdp_program__set_xdp_frags_support(dummy_prog, true);
124+
123125
ret = xdp_program__attach(dummy_prog, opt->iface_out.ifindex, opt->mode, 0);
124126
if (ret < 0) {
125127
pr_warn("Failed to attach dummy program: %s\n", strerror(-ret));

xdp-bench/xdp_redirect_devmap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ int do_redirect_devmap(const void *cfg, __unused const char *pin_root_path)
174174
goto end_detach;
175175
}
176176

177+
xdp_program__set_xdp_frags_support(dummy_prog, true);
178+
177179
ret = xdp_program__attach(dummy_prog, opt->iface_out.ifindex, opt->mode, 0);
178180
if (ret < 0) {
179181
pr_warn("Failed to attach dummy program: %s\n", strerror(-ret));

0 commit comments

Comments
 (0)