Thread (33 messages) read the whole thread 33 messages, 7 authors, 2021-01-22

Re: [PATCHv2 bpf-next] samples/bpf: add xdp program on egress for xdp_redirect_map

From: Hangbin Liu <hidden>
Date: 2020-11-30 07:52:07
Also in: bpf

On Thu, Nov 26, 2020 at 10:31:56PM -0800, Yonghong Song wrote:
quoted
index 35e16dee613e..8bdec0865e1d 100644
--- a/samples/bpf/xdp_redirect_map_user.c
+++ b/samples/bpf/xdp_redirect_map_user.c
@@ -21,12 +21,13 @@
  static int ifindex_in;
  static int ifindex_out;
-static bool ifindex_out_xdp_dummy_attached = true;
+static bool ifindex_out_xdp_dummy_attached = false;
+static bool xdp_prog_attached = false;
Maybe xdp_devmap_prog_attached? Feel xdp_prog_attached
is too generic since actually it controls xdp_devmap program
attachment.
Hi Yonghong,

Thanks for your comments. As Jesper replied, The 2nd xdp_prog on egress
doesn't tell us if the redirect was successful. So the number is meaningless.

I plan to write a example about vlan header modification based on egress
index. I will post the patch later.

Thanks
Hangbin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help