Skip to content

Commit

Permalink
xdp-bench: Enable xdp_frags for dummy programs
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nimrod-oren committed Nov 17, 2024
1 parent cc7a112 commit 1915a6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xdp-bench/xdp_redirect_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ int do_redirect_basic(const void *cfg, __unused const char *pin_root_path)
goto end_detach;
}

xdp_program__set_xdp_frags_support(dummy_prog, true);

ret = xdp_program__attach(dummy_prog, opt->iface_out.ifindex, opt->mode, 0);
if (ret < 0) {
pr_warn("Failed to attach dummy program: %s\n", strerror(-ret));
Expand Down
2 changes: 2 additions & 0 deletions xdp-bench/xdp_redirect_devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ int do_redirect_devmap(const void *cfg, __unused const char *pin_root_path)
goto end_detach;
}

xdp_program__set_xdp_frags_support(dummy_prog, true);

ret = xdp_program__attach(dummy_prog, opt->iface_out.ifindex, opt->mode, 0);
if (ret < 0) {
pr_warn("Failed to attach dummy program: %s\n", strerror(-ret));
Expand Down

0 comments on commit 1915a6c

Please sign in to comment.