On Thu, Nov 26, 2020 at 10:31:56PM -0800, Yonghong Song wrote: > > 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