[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210122113232.70040869@carbon>
Date: Fri, 22 Jan 2021 11:32:32 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
Yonghong Song <yhs@...com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
brouer@...hat.com
Subject: Re: [PATCHv10 bpf-next] samples/bpf: add xdp program on egress for
xdp_redirect_map
On Fri, 22 Jan 2021 10:50:07 +0800
Hangbin Liu <liuhangbin@...il.com> wrote:
> This patch add a xdp program on egress to show that we can modify
> the packet on egress. In this sample we will set the pkt's src
> mac to egress's mac address. The xdp_prog will be attached when
> -X option supplied.
>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
I think we have nitpicked this enough ;-)
Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>
> v10:
> make xdp_redirect_map() always inline.
>
> v9:
> roll back to just set src mac to egress interface mac on 2nd xdp prog,
> this could avoid packet reorder introduce in patch v6.
>
> v8: Fix some checkpatch issues.
>
> v7:
> a) use bpf_object__find_program_by_name() instad of
> bpf_object__find_program_by_title()
> b) set default devmap fd to 0
>
> v6: no code update, only rebase the code on latest bpf-next
>
> v5:
> a) close fd when err out in get_mac_addr()
> b) exit program when both -S and -X supplied.
>
> v4:
> a) Update get_mac_addr socket create
> b) Load dummy prog regardless of 2nd xdp prog on egress
>
> v3:
> a) modify the src mac address based on egress mac
>
> v2:
> a) use pkt counter instead of IP ttl modification on egress program
> b) make the egress program selectable by option -X
> ---
> samples/bpf/xdp_redirect_map_kern.c | 60 +++++++++++++--
> samples/bpf/xdp_redirect_map_user.c | 112 +++++++++++++++++++++++-----
> 2 files changed, 147 insertions(+), 25 deletions(-)
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists