[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH3MdRWYpXj8Yb9TM_VefMHLE=wvM5E04hY=0aMWUVRziCxaeg@mail.gmail.com>
Date: Thu, 1 Aug 2019 23:26:41 -0700
From: Y Song <ys114321@...il.com>
To: "Daniel T. Lee" <danieltimlee@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [v2,0/2] tools: bpftool: add net attach/detach command to attach
XDP prog
On Thu, Aug 1, 2019 at 1:33 AM Daniel T. Lee <danieltimlee@...il.com> wrote:
>
> Currently, bpftool net only supports dumping progs attached on the
> interface. To attach XDP prog on interface, user must use other tool
> (eg. iproute2). By this patch, with `bpftool net attach/detach`, user
> can attach/detach XDP prog on interface.
>
> $ ./bpftool prog
> ...
> 208: xdp name xdp_prog1 tag ad822e38b629553f gpl
> loaded_at 2019-07-28T18:03:11+0900 uid 0
> ...
> $ ./bpftool net attach id 208 xdpdrv enp6s0np1
> $ ./bpftool net
> xdp:
> enp6s0np1(5) driver id 208
> ...
> $ ./bpftool net detach xdpdrv enp6s0np1
> $ ./bpftool net
> xdp:
> ...
>
> While this patch only contains support for XDP, through `net
> attach/detach`, bpftool can further support other prog attach types.
new bpftool net subcommands are added. I guess doc and bash
completion needs update as well.
>
> XDP attach/detach tested on Mellanox ConnectX-4 and Netronome Agilio.
>
> ---
> Changes in v2:
> - command 'load/unload' changed to 'attach/detach' for the consistency
>
> Daniel T. Lee (2):
> tools: bpftool: add net attach command to attach XDP on interface
> tools: bpftool: add net detach command to detach XDP on interface
>
> tools/bpf/bpftool/net.c | 160 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 159 insertions(+), 1 deletion(-)
>
> --
> 2.20.1
>
Powered by blists - more mailing lists