Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-20 Thread Magnus Karlsson
On Sun, Oct 20, 2019 at 7:25 PM Alexei Starovoitov wrote: > > On Sun, Oct 20, 2019 at 10:13:49AM +0200, Magnus Karlsson wrote: > > On Sat, Oct 19, 2019 at 11:48 AM Alexei Starovoitov > > wrote: > > > > > > On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > > > > + > > > > + #inc

Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-20 Thread Alexei Starovoitov
On Sun, Oct 20, 2019 at 10:13:49AM +0200, Magnus Karlsson wrote: > On Sat, Oct 19, 2019 at 11:48 AM Alexei Starovoitov > wrote: > > > > On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > > > + > > > + #include > > > + #include "bpf_helpers.h" > > > + > > > + #define MAX_SOCK

Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-20 Thread Magnus Karlsson
On Sat, Oct 19, 2019 at 11:48 AM Alexei Starovoitov wrote: > > On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > > + > > + #include > > + #include "bpf_helpers.h" > > + > > + #define MAX_SOCKS 16 > > + > > + struct { > > +__uint(type, BPF_MAP_TYPE_XSKMAP); > > +

Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-18 Thread Alexei Starovoitov
On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > + > + #include > + #include "bpf_helpers.h" > + > + #define MAX_SOCKS 16 > + > + struct { > +__uint(type, BPF_MAP_TYPE_XSKMAP); > +__uint(max_entries, MAX_SOCKS); > +__uint(key_size, sizeof(int)); >

[PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-18 Thread Magnus Karlsson
Added sections on all the bind flags, libbpf, all the setsockopts and all the getsockopts. Also updated the document to reflect the latest features and to correct some spelling errors. v1 -> v2: * Updated XDP program with latest BTF map format * Added one more FAQ entry * Some minor edits and corr