Re: iproute2: bash completion function for tc

2016-04-28 Thread Quentin Monnet
Hi Alexei, Stephen, 2016-04-27 (22:13 UTC-0700) ~ Stephen Hemminger: > On Wed, 27 Apr 2016 20:19:26 -0700 > Alexei Starovoitov <alexei.starovoi...@gmail.com> wrote: > >> On Tue, Apr 26, 2016 at 09:28:17AM +0200, Quentin Monnet wrote: >>> Hi Jamal, Stephen, >

[PATCH iproute2] tc: add bash-completion function

2016-04-29 Thread Quentin Monnet
AND /etc/bash_completions.d/ exists already. Inside iproute2 repository, the completion code is in a new `bash-completion` toplevel directory. Signed-off-by: Quentin Monnet <quentin.mon...@6wind.com> --- Makefile | 9 + bash-completion/tc

iproute2: bash completion function for tc

2016-04-26 Thread Quentin Monnet
Hi Jamal, Stephen, I searched for a function providing auto-completion for `tc` utility in bash, but I found none. So I have created one, and I would like share it with the community. It is available here: https://github.com/6WIND/tc_bash-completion/blob/master/tc I would like to make it easily

[PATCH iproute2 v2] tc: add bash-completion function

2016-05-03 Thread Quentin Monnet
in /etc/bash_completion.d/ if /usr/share/bash-completion/completions/ is not found; instead, the user can override the installation path with the specific environment variable. Signed-off-by: Quentin Monnet <quentin.mon...@6wind.com> --- Makefile | 3 + bash-completion/tc

Re: [PATCH net-next 0/2] act_bpf, cls_bpf: send eBPF bytecode through

2016-04-20 Thread Quentin Monnet
Hi Daniel, Alexei, and many thanks for your answers, 2016-04-15 (11:44 UTC-0700) ~ Alexei Starovoitov: > On Fri, Apr 15, 2016 at 12:41:05PM +0200, Daniel Borkmann wrote: >> Hi Quentin, >> >> On 04/15/2016 12:07 PM, Quentin Monnet wrote: >>> When a new BPF traffic c

[PATCH net-next 0/2] act_bpf, cls_bpf: send eBPF bytecode through

2016-04-15 Thread Quentin Monnet
package, so as to fix tc utility so as to use the new flags and to display the bytecode in eBPF format when needed. This tc patch is already available at: https://github.com/6WIND/iproute2/commits/netlink_eBPF Quentin Monnet (2): act_bpf: send back eBPF bytecode through netlink socket cls_bpf

[PATCH net-next 1/2] act_bpf: send back eBPF bytecode through netlink socket

2016-04-15 Thread Quentin Monnet
as well (in addition to the file descriptor). It also adds a new BPF netlink attribute (a flag) in order to differenciate what BPF version is in use, so that userspace tools can process it properly. Signed-off-by: Quentin Monnet <quentin.mon...@6wind.com> --- include/uapi/linux/tc_act/tc

[PATCH net-next 2/2] cls_bpf: send back eBPF bytecode through netlink socket

2016-04-15 Thread Quentin Monnet
the socket on userspace side. Signed-off-by: Quentin Monnet <quentin.mon...@6wind.com> --- include/uapi/linux/pkt_cls.h | 1 + net/sched/cls_bpf.c | 25 +++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi

Re: [RFC PATCH net-next 1/2] bpf: Save original ebpf instructions

2017-02-06 Thread Quentin Monnet
Hi Daniel, David, 2017-02-03 (15:28 -0700) ~ David Ahern > On 2/3/17 2:09 PM, Daniel Borkmann wrote: >> On 02/03/2017 09:38 PM, David Ahern wrote: >>> Similar to classic bpf, support saving original ebpf instructions >>> >>> Signed-off-by: David Ahern

Re: [PATCH net-next 2/2] bpf: allow b/h/w/dw access for bpf's cb in ctx

2017-01-12 Thread Quentin Monnet
Hi Daniel, 2017-01-12 (02:21 +0100) ~ Daniel Borkmann > When structs are used to store temporary state in cb[] buffer that is > used with programs and among tail calls, then the generated code will > not always access the buffer in bpf_w chunks. We can ease programming > of

Re: [PATCH iproute2 net-next v2] bpf: add support for generic xdp

2017-05-02 Thread Quentin Monnet
Hi Daniel, Stephen, 2017-05-01 (19:33 +0200) ~ Daniel Borkmann > [ +Quentin ] > > On 05/01/2017 06:29 PM, Stephen Hemminger wrote: >> On Fri, 28 Apr 2017 15:44:29 +0200 >> Daniel Borkmann wrote: >> […] >> Does bash-completion need update? > >

Re: [PATCH net-next 4/5] bpftool: implement cgdetach command

2017-12-01 Thread Quentin Monnet
2017-11-30 13:43 UTC+ ~ Roman Gushchin > Implement cgdetach command, which allows to detach the bpf > program from a cgroup. It takes program id and attach type > as arguments. > > Example: > $ ./bpftool cgdetach /sys/fs/cgroup/user.slice/ device 1 > > Signed-off-by: Roman

Re: [PATCH net-next 1/5] libbpf: add ability to guess program type based on section name

2017-12-01 Thread Quentin Monnet
Thanks Roman! One comment in-line. 2017-11-30 13:42 UTC+ ~ Roman Gushchin > The bpf_prog_load() function will guess program type if it's not > specified explicitly. This functionality will be used to implement > loading of different programs without asking a user to specify >

Re: [PATCH v4 net-next 0/4] bpftool: cgroup bpf operations

2017-12-14 Thread Quentin Monnet
out creating additional dependencies. And bpftool seems to be > a right tool to extend with such functionality. Thank you Roman for this series, and for documenting the new commands and flags! Reviewed-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [RFC PATCH net-next] tools/bpf: fix build with binutils >= 2.28

2017-12-19 Thread Quentin Monnet
Hi Roman, thanks for working on this! 2017-12-19 14:38 UTC+ ~ Roman Gushchin > Bpftool build is broken with binutils version 2.28 and later. > The cause is commit 003ca0fd2286 ("Refactor disassembler selection") > in the binutils repo, which changed the disassembler() function >

Re: [RFC PATCH net-next] tools/bpf: fix build with binutils >= 2.28

2017-12-19 Thread Quentin Monnet
2017-12-19 16:10 UTC+ ~ Roman Gushchin <g...@fb.com> > On Tue, Dec 19, 2017 at 03:57:02PM +, Quentin Monnet wrote: >> Hi Roman, thanks for working on this! >> >> 2017-12-19 14:38 UTC+ ~ Roman Gushchin <g...@fb.com> >>> Bpftool build is b

Re: [oss-drivers] [PATCH net 0/2] cls_bpf: fix offload state tracking with block callbacks

2017-12-20 Thread Quentin Monnet
| 93 > +++ > 4 files changed, 92 insertions(+), 69 deletions(-) > Reviewed-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH net-next V3 0/3] tools: bpftool: show filenames of pinned objects

2017-11-06 Thread Quentin Monnet
k for proper output formatting > - Code style: wrapped lines > 80, used reverse christmastree style > > v2->v3: > - Handle multiple bpffs mountpoints > - Code style: fixed line break indentation > Thanks for the changes! This version looks good to me. Acked-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH net-next V2 3/3] tools: bpftool: optionally show filenames of pinned objects

2017-11-02 Thread Quentin Monnet
Bhole <bhole_prashant...@lab.ntt.co.jp> > --- > v2: > - Change command line option from {-l|--pinned} to {-f|--bpffs} > - Updated documentation Acked-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH net-next V2 2/3] tools: bpftool: show filenames of pinned objects

2017-11-02 Thread Quentin Monnet
2017-11-02 16:59 UTC+0900 ~ Prashant Bhole > Added support to show filenames of pinned objects. > > For example: > […] > > Signed-off-by: Prashant Bhole > --- > v2: > - Dynamically identify bpf-fs moutpoint > - Close files

Re: [PATCH net-next V2 1/3] tools: bpftool: open pinned object without type check

2017-11-02 Thread Quentin Monnet
2017-11-02 16:59 UTC+0900 ~ Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> > This was needed for opening any file in bpf-fs without knowing > its object type > > Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> Acked-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH net-next 09/12] tools: bpftool: turn err() and info() macros into functions

2017-11-03 Thread Quentin Monnet
2017-11-002 17:59 UTC-0700 ~ Joe Perches <j...@perches.com> > On Mon, 2017-10-23 at 09:24 -0700, Jakub Kicinski wrote: >> From: Quentin Monnet <quentin.mon...@netronome.com> >> >> Turn err() and info() macros into functions. >> >> In order to avoi

Re: [PATCH v2 net-next 3/4] bpftool: implement prog load command

2017-12-08 Thread Quentin Monnet
ool prog load SOURCE_FILE FILE > > FILE is a non-existing file on bpffs. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Alexei Starovoitov <a...@kernel.org> > Cc: Daniel Borkmann <dan...@iogearbox.net> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com&

Re: [PATCH v2 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-08 Thread Quentin Monnet
x.net> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com> > Cc: Martin KaFai Lau <ka...@fb.com> > Cc: Quentin Monnet <quentin.mon...@netronome.com> > Cc: David Ahern <dsah...@gmail.com> > --- > tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 92 +

Re: [PATCH v2 net-next 1/4] libbpf: add ability to guess program type based on section name

2017-12-08 Thread Quentin Monnet
pe. In first order it will be used by bpftool. > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Alexei Starovoitov <a...@kernel.org> > Cc: Daniel Borkmann <dan...@iogearbox.net> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com> > Cc: Martin KaFai Lau <k

Re: [PATCH v2 net-next 4/4] bpftool: implement cgroup bpf operations

2017-12-08 Thread Quentin Monnet
2017-12-08 14:12 UTC+ ~ Roman Gushchin <g...@fb.com> > On Fri, Dec 08, 2017 at 10:34:16AM +, Quentin Monnet wrote: >> 2017-12-07 18:39 UTC+ ~ Roman Gushchin <g...@fb.com> >>> This patch adds basic cgroup bpf operations to bpftool: >>>

Re: [PATCH net-next 1/5] libbpf: add ability to guess program type based on section name

2017-12-04 Thread Quentin Monnet
2017-12-04 12:34 UTC+ ~ Roman Gushchin <g...@fb.com> > On Fri, Dec 01, 2017 at 02:46:06PM -0800, Jakub Kicinski wrote: >> On Fri, 1 Dec 2017 10:22:57 +, Quentin Monnet wrote: >>> Thanks Roman! >>> One comment in-line. >>> >>> 2017

Re: [PATCH net-next 2/3] tools: bpftool: show filenames of pinned objects

2017-10-31 Thread Quentin Monnet
2017-10-31 16:36 UTC+0900 ~ Prashant Bhole > Added support to show filenames of pinned objects. > > For example: > > root@test# ./bpftool prog > 3: tracepoint name tracepoint__irq tag f677a7dd722299a3 > loaded_at Oct 26/11:39 uid 0 > xlated 160B not

Re: [PATCH net-next 3/3] tools: bpftool: optionally show filenames of pinned objects

2017-10-31 Thread Quentin Monnet
2017-10-31 16:36 UTC+0900 ~ Prashant Bhole > Making it optional to show file names of pinned objects because > it scans complete bpf-fs filesystem which is costly. > Added option -l|--pinned > > Signed-off-by: Prashant Bhole > ---

Re: [RFC PATCH net-next] tools/bpf: fix build with binutils >= 2.28

2017-12-21 Thread Quentin Monnet
2017-12-20 18:32 UTC+ ~ Roman Gushchin <g...@fb.com> > On Tue, Dec 19, 2017 at 04:22:51PM +, Quentin Monnet wrote: >> 2017-12-19 16:10 UTC+ ~ Roman Gushchin <g...@fb.com> >>> On Tue, Dec 19, 2017 at 03:57:02PM +, Quentin Monnet wrote: >

Re: [PATCH bpf-next v4 3/4] bpf: selftest additions for SOCKHASH

2018-05-04 Thread Quentin Monnet
2018-05-03 11:28:27 UTC-0700 ~ John Fastabend > This runs existing SOCKMAP tests with SOCKHASH map type. To do this > we push programs into include file and build two BPF programs. One > for SOCKHASH and one for SOCKMAP. > > We then run the entire test suite with each

Re: [PATCH v3 2/2] bpf: add selftest for rawir_event type program

2018-05-18 Thread Quentin Monnet
2018-05-17 22:01 UTC+0100 ~ Sean Young > On Thu, May 17, 2018 at 10:17:59AM -0700, Y Song wrote: >> On Wed, May 16, 2018 at 2:04 PM, Sean Young wrote: >>> This is simple test over rc-loopback. >>> >>> Signed-off-by: Sean Young >>> --- >>>

Re: [PATCH v3 1/2] media: rc: introduce BPF_PROG_RAWIR_EVENT

2018-05-17 Thread Quentin Monnet
2018-05-16 22:04 UTC+0100 ~ Sean Young > Add support for BPF_PROG_RAWIR_EVENT. This type of BPF program can call > rc_keydown() to reported decoded IR scancodes, or rc_repeat() to report > that the last key should be repeated. > > The bpf program can be attached to using the

[PATCH bpf-next] bpf: change eBPF helper doc parsing script to allow for smaller indent

2018-05-17 Thread Quentin Monnet
n `git show`, so it is likely other helper authors will use the same length. Therefore, allow for helper documentation to use 5 spaces only for the first indent level. Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- scripts/bpf_helpers_doc.py | 8 1 file change

Re: [PATCH bpf-next] bpf: change eBPF helper doc parsing script to allow for smaller indent

2018-05-17 Thread Quentin Monnet
2018-05-17 17:38 UTC+0200 ~ Daniel Borkmann <dan...@iogearbox.net> > On 05/17/2018 02:43 PM, Quentin Monnet wrote: >> Documentation for eBPF helpers can be parsed from bpf.h and eventually >> turned into a man page. Commit 6f96674dbd8c ("bpf: relax constraints on >

Re: [PATCH v3 2/2] bpf: add selftest for rawir_event type program

2018-05-18 Thread Quentin Monnet
2018-05-18 14:33 UTC+0100 ~ Sean Young <s...@mess.org> > On Fri, May 18, 2018 at 11:13:07AM +0100, Quentin Monnet wrote: >> 2018-05-17 22:01 UTC+0100 ~ Sean Young <s...@mess.org> >>> On Thu, May 17, 2018 at 10:17:59AM -0700, Y Song wrote: >>>> On W

Re: [PATCH bpf-next] bpf: clean up eBPF helpers documentation

2018-05-30 Thread Quentin Monnet
On 29 May 2018 at 20:44, Daniel Borkmann wrote: > On 05/29/2018 08:27 PM, Song Liu wrote: >> On Tue, May 29, 2018 at 4:27 AM, Quentin Monnet >> wrote: >>> These are minor edits for the eBPF helpers documentation in >>> include/uapi/linux/bpf.h. >>

[PATCH bpf-next] bpf: clean up eBPF helpers documentation

2018-05-29 Thread Quentin Monnet
e in description of the return value for "bpf_get_stack()" helper. - Removing unnecessary blank lines between "Description" and "Return" sections for the few helpers that would use it, for consistency. Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 21

Re: [PATCH bpf-next 06/11] bpf: add bpf_skb_cgroup_id helper

2018-05-29 Thread Quentin Monnet
Hi Daniel, 2018-05-28 02:43 UTC+0200 ~ Daniel Borkmann > Add a new bpf_skb_cgroup_id() helper that allows to retrieve the > cgroup id from the skb's socket. This is useful in particular to > enable bpf_get_cgroup_classid()-like behavior for cgroup v1 in > cgroup v2 by allowing ID based matching

[PATCH bpf-nex] tools: bpftool: change time format for program 'loaded at:' information

2018-05-01 Thread Quentin Monnet
"ns_inode": 4026531993, "ifname": "foo" }, "loaded_at": 1524068387, "uid": 0, "bytes_xlated": 16, "jited": false, "bytes_memlock&

[PATCH bpf-next v2] bpf: relax constraints on formatting for eBPF helper documentation

2018-05-02 Thread Quentin Monnet
ets from each regex used with match() in the script. They are redundant, as match() tries to match from the beginning of the string by default. v2: Remove unnecessary caret when a regex is used with match(). Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- scripts/bpf_helpers

[PATCH bpf-next] bpf: relax constraints on formatting for eBPF helper documentation

2018-04-30 Thread Quentin Monnet
>> Start of description... *> > Another line of description *..And yet another line of description *> Return *.>0 on success, or a negative error in case of failure ... */ Signed-off-by: Quentin

Re: [PATCH bpf-next 2/3] bpf: fix formatting for bpf_get_stack() helper doc

2018-04-30 Thread Quentin Monnet
2018-04-30 09:12 UTC-0600 ~ David Ahern > On 4/30/18 9:08 AM, Alexei Starovoitov wrote: >>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >>> index 530ff6588d8f..8daef7326bb7 100644 >>> --- a/include/uapi/linux/bpf.h >>> +++ b/include/uapi/linux/bpf.h >>> @@

Re: [PATCH bpf-next] bpf: relax constraints on formatting for eBPF helper documentation

2018-04-30 Thread Quentin Monnet
2018-04-30 17:33 UTC+0100 ~ Edward Cree <ec...@solarflare.com> > On 30/04/18 16:59, Quentin Monnet wrote: >> The Python script used to parse and extract eBPF helpers documentation >> from include/uapi/linux/bpf.h expects a very specific formatting for the >> descript

[PATCH bpf-next 3/3] bpf: update bpf.h uapi header for tools

2018-04-30 Thread Quentin Monnet
Bring fixes for eBPF helper documentation formatting to bpf.h under tools/ as well. Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- tools/include/uapi/linux/bpf.h | 62 +- 1 file changed, 31 insertions(+), 31 deletions(-) diff

[PATCH bpf-next 1/3] bpf: fix formatting for bpf_perf_event_read() helper doc

2018-04-30 Thread Quentin Monnet
. Fixes: c6b5fb8690fa ("bpf: add documentation for eBPF helpers (42-50)") Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/l

[PATCH bpf-next 0/3] bpf: fix formatting for eBPF helper doc

2018-04-30 Thread Quentin Monnet
is fine, but description and return value appear as empty). There is no change to text contents in this set. Quentin Monnet (3): bpf: fix formatting for bpf_perf_event_read() helper doc bpf: fix formatting for bpf_get_stack() helper documentation bpf: update bpf.h uapi header for tools

[PATCH bpf-next 2/3] bpf: fix formatting for bpf_get_stack() helper doc

2018-04-30 Thread Quentin Monnet
Fix formatting (indent) for bpf_get_stack() helper documentation, so that the doc is rendered correctly with the Python script. Fixes: c195651e565a ("bpf: add bpf_get_stack helper") Cc: Yonghong Song <y...@fb.com> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH bpf-next 0/2] Fix BPF helpers documentation

2018-04-29 Thread Quentin Monnet
bpf: Sync bpf.h to tools/ > > include/uapi/linux/bpf.h | 12 ++-- > tools/include/uapi/linux/bpf.h | 12 ++-- > 2 files changed, 12 insertions(+), 12 deletions(-) Correct. Thanks a lot for the fix, Andrey! Reviewed-by: Quentin Monnet <quentin.mon...@netronome.com>

Re: [PATCH net-next 6/8] tools: bpftool: print all relevant byte opcodes for "load double word"

2017-10-20 Thread Quentin Monnet
Hi David, On 20 October 2017 at 10:59, David Laight wrote: > From: Jakub Kicinski >> Sent: 19 October 2017 23:46 >> The eBPF instruction permitting to load double words (8 bytes) into a >> register need 8-byte long "immediate" field, and thus occupy twice the >> space of

Re: [PATCH net-next 6/8] tools: bpftool: print all relevant byte opcodes for "load double word"

2017-10-20 Thread Quentin Monnet
On 20 October 2017 at 17:12, Daniel Borkmann <dan...@iogearbox.net> wrote: > On 10/20/2017 05:50 PM, Quentin Monnet wrote: > [...] >> >> The remaining four bytes are taken from the "immediate" field of the >> second >> instruction, whic

Re: [PATCH net-next] net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set

2018-01-04 Thread Quentin Monnet
Hi Cong, 2018-01-03 18:08 UTC-0800 ~ Cong Wang <xiyou.wangc...@gmail.com> > On Wed, Jan 3, 2018 at 5:30 PM, Jakub Kicinski > <jakub.kicin...@netronome.com> wrote: >> From: Quentin Monnet <quentin.mon...@netronome.com> >> >> The definition of funct

[PATCH bpf-next v2 12/14] nfp: bpf: add signed jump insns

2018-01-10 Thread Quentin Monnet
From: Nic Viljoen This patch adds signed jump instructions (jsgt, jsge, jslt, jsle) to the nfp jit. As well as adding the additional required raw assembler branch mask to nfp_asm.h Signed-off-by: Nic Viljoen Reviewed-by: Jiong Wang

[PATCH bpf-next v2 08/14] nfp: bpf: relocate jump targets just before the load

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Don't translate the program assuming it will be loaded at a given address. This will be required for sharing programs between ports of the same NIC, tail calls and subprograms. It will also make the jump targets easier to understand when

[PATCH bpf-next v2 06/14] nfp: bpf: move jump resolution to jit.c

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Jump target resolution should be in jit.c not offload.c. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/jit.c

[PATCH bpf-next v2 13/14] bpf: export function to write into verifier log buffer

2018-01-10 Thread Quentin Monnet
`verbose()`, but since it is a variadic function, I don't see a clean way without creating two identical wrappers, one for the verifier and one to export. Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- v2: Rep

[PATCH bpf-next v2 00/14] nfp: bpf: relocations, verifier log, signed jumps and other updates

2018-01-10 Thread Quentin Monnet
to BPF offload app at coarser granularity Nic Viljoen (1): nfp: bpf: add signed jump insns Quentin Monnet (2): bpf: export function to write into verifier log buffer nfp: bpf: reuse verifier log for debug messages drivers/net/ethernet/netronome/nfp/bpf/jit.c | 248

[PATCH bpf-next v2 01/14] nfp: don't try to register XDP rxq structures on control queues

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Some RX rings are used for control messages, those will not have a netdev pointer in dp. Skip XDP rxq handling on those rings. Fixes: 7f1c684a8966 ("nfp: setup xdp_rxq_info") Signed-off-by: Jakub Kicinski

[PATCH bpf-next v2 03/14] nfp: bpf: round up the size of the stack

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Kernel enforces the alignment of the bottom of the stack, NFP deals with positive offsets better so we should align the top of the stack. Round the stack size to NFP word size (4B). Signed-off-by: Jakub Kicinski

[PATCH bpf-next v2 02/14] nfp: fix incumbent kdoc warnings

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski We should use % instead of @ for documenting preprocessor defines. Add missing documentation of __NFP_REPR_TYPE_MAX. This gets rid of all remaining kdoc warnings in the driver. Signed-off-by: Jakub Kicinski ---

[PATCH bpf-next v2 07/14] nfp: bpf: add helpers for modifying branch addresses

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski In preparation for better handling of relocations move existing helper for setting branch offset to nfp_asm.c and add two more. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang ---

[PATCH bpf-next v2 09/14] nfp: bpf: don't depend on high order allocations for program image

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski The translator pre-allocates a buffer of maximal program size. Due to HW/FW limitations the program buffer can't currently be longer than 128Kb, so we used to kmalloc() it, and then map for DMA directly. Now that the late branch resolution is

[PATCH bpf-next v2 04/14] nfp: bpf: don't allow changing MTU above BPF offload limit when active

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski When BPF offload is active we need may need to restrict the MTU changes more than just to the limitation of the kernel XDP datapath. Allow the BPF code to veto a MTU change. Signed-off-by: Jakub Kicinski ---

[PATCH bpf-next v2 10/14] nfp: bpf: use a large constant in unresolved branches

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski To make absolute relocated branches (branches which will be completely rewritten with br_set_offset()) distinguishable in user space dumps from normal jumps add a large offset to them. Signed-off-by: Jakub Kicinski

[PATCH bpf-next v2 11/14] nfp: hand over to BPF offload app at coarser granularity

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski <jakub.kicin...@netronome.com> Instead of having an app callback per message type hand off all offload-related handling to apps with one "rest of ndo_bpf" callback. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Quent

Re: [PATCH bpf-next 13/14] bpf: export function to write into verifier log buffer

2018-01-10 Thread Quentin Monnet
Hi Daniel, 2018-01-10 11:32 UTC+0100 ~ Daniel Borkmann <dan...@iogearbox.net> > On 01/10/2018 06:07 AM, Jakub Kicinski wrote: >> From: Quentin Monnet <quentin.mon...@netronome.com> >> >> Rename the BPF verifier `verbose()` to `bpf_verifier_log_write()` and >&

[PATCH bpf-next v2 05/14] nfp: bpf: allow disabling TC offloads when XDP active

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski TC BPF offload was added first, so we used to assume that the ethtool TC HW offload flag cannot be touched whenever any BPF program is loaded on the NIC. This unncessarily limits changes to the TC flag when offloaded program is XDP.

[PATCH bpf-next v2 14/14] nfp: bpf: reuse verifier log for debug messages

2018-01-10 Thread Quentin Monnet
Now that `bpf_verifier_log_write()` is exported from the verifier and makes it possible to reuse the verifier log to print messages to the standard output, use this instead of the kernel logs in the nfp driver for printing error messages occurring at verification time. Signed-off-by: Quentin

Re: [PATCH bpf-next] bpftool: recognize BPF_PROG_TYPE_CGROUP_DEVICE programs

2018-01-15 Thread Quentin Monnet
ted 105B memlock 4096B > > Signed-off-by: Roman Gushchin <g...@fb.com> > Cc: Jakub Kicinski <jakub.kicin...@netronome.com> > Cc: Quentin Monnet <quentin.mon...@netronome.com> > Cc: Daniel Borkmann <dan...@iogearbox.net> > Cc: Alexei Starovoitov <a...@kernel.

Re: [PATCH bpf-next] bpftool: recognize BPF_PROG_TYPE_CGROUP_DEVICE programs

2018-01-19 Thread Quentin Monnet
2018-01-19 14:17 UTC+ ~ Roman Gushchin <g...@fb.com> > On Mon, Jan 15, 2018 at 07:32:01PM +, Quentin Monnet wrote: [...] >> Looks good, thanks Roman! >> Would you mind updating the map names as well? It seems the >> BPF_MAP_TYPE_CPUMAP is missing from th

Re: [PATCH bpf-next v2 02/11] net: sched: prepare extack support for offload via tc_cls_common_offload

2018-01-16 Thread Quentin Monnet
2018-01-16 10:33 UTC+0100 ~ Jiri Pirko <j...@resnulli.us> > Tue, Jan 16, 2018 at 03:08:36AM CET, jakub.kicin...@netronome.com wrote: >> From: Quentin Monnet <quentin.mon...@netronome.com> >> >> Prepare for extack support for hardware offload of classifiers. In or

Re: [PATCH v2 bpf-next 2/2] tools/bpftool: fix bpftool build with bintutils >= 2.8

2017-12-22 Thread Quentin Monnet
Hi Roman, 2017-12-22 16:11 UTC+ ~ Roman Gushchin > Bpftool build is broken with binutils version 2.28 and later. Could you check the binutils version? I believe it changed in 2.29 instead of 2.28. Could you update your commit log and subject accordingly, please? > The cause is

Re: [PATCH bpf-net] bpf: Change bpf_fib_lookup to return lookup status

2018-06-19 Thread Quentin Monnet
Hi David, 2018-06-17 08:18 UTC-0700 ~ dsah...@kernel.org > From: David Ahern > > For ACLs implemented using either FIB rules or FIB entries, the BPF > program needs the FIB lookup status to be able to drop the packet. > Since the bpf_fib_lookup API has not reached a released kernel yet, >

[PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Quentin Monnet
ftool: add simple perf event output reader") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- tools/bpf/bpftool/map_perf_ring.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/map_perf_ring.c b/tools/bpf/bpftool/map_perf_ring.c index 18

Re: [PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Quentin Monnet
2018-08-23 20:35 UTC+0300 ~ Sergei Shtylyov > Hello! > > On 08/23/2018 07:46 PM, Quentin Monnet wrote: > >> When command line parsing fails in the while loop in do_event_pipe() >> because the number of arguments is incorrect or because the keyword is >> unknown,

[PATCH bpf-next 3/3] tools: bpf: build and install man page for eBPF helpers from bpftool/

2018-07-12 Thread Quentin Monnet
e from bpftool directory makes us able to package the helpers man page with bpftool, and to install it along with bpftool documentation, so that the doc for helpers becomes easily available to developers through the "man" program. Cc: linux-...@vger.kernel.org Suggested-by: Daniel Borkm

[PATCH bpf-next 1/3] bpf: fix documentation for eBPF helpers

2018-07-12 Thread Quentin Monnet
Minor formatting edits for eBPF helpers documentation, including blank lines removal, fix of item list for return values in bpf_fib_lookup(), and missing prefix on bpf_skb_load_bytes_relative(). Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- include/uapi/linux/bpf.h | 6

[PATCH bpf-next 2/3] tools: bpf: synchronise BPF UAPI header with tools

2018-07-12 Thread Quentin Monnet
Update with latest changes from include/uapi/linux/bpf.h header. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- tools/include/uapi/linux/bpf.h | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b

[PATCH bpf-next 0/3] bpf: install eBPF helper man page along with bpftool doc

2018-07-12 Thread Quentin Monnet
for generating the documentation (man pages) about eBPF helpers. The targets defined in this file can also be called from the bpftool directory (please refer to relevant commit logs for details). Quentin Monnet (3): bpf: fix documentation for eBPF helpers tools: bpf: synchronise BPF UAPI header

[RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-06 Thread Quentin Monnet
I can offer no guaranty at this time that they would accept to take the generated man page. Cc: linux-...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 2237 -

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-10 Thread Quentin Monnet
2018-04-09 18:47 UTC-0700 ~ Alexei Starovoitov <alexei.starovoi...@gmail.com> > On Mon, Apr 09, 2018 at 02:25:26PM +0100, Quentin Monnet wrote: >> >> Anyway, I am fine with keeping just signatures, descriptions and return >> values for now. I will submit a new ve

[RFC bpf-next v2 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-10 Thread Quentin Monnet
() - bpf_msg_cork_bytes() - bpf_msg_pull_data() Cc: John Fastabend <john.fastab...@gmail.com> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 140 +++ 1 file changed, 140 insertions(+) diff --git a/includ

[RFC bpf-next v2 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-10 Thread Quentin Monnet
() - bpf_skb_load_bytes() - bpf_csum_diff() - bpf_skb_get_tunnel_opt() - bpf_skb_set_tunnel_opt() - bpf_skb_change_proto() - bpf_skb_change_type() Cc: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux

[RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-10 Thread Quentin Monnet
() - bpf_skb_get_tunnel_key() - bpf_skb_set_tunnel_key() - bpf_redirect() - bpf_perf_event_output() - bpf_get_stackid() - bpf_get_current_task() Cc: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux

[RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-10 Thread Quentin Monnet
() - bpf_trace_printk() - bpf_skb_store_bytes() - bpf_l3_csum_replace() - bpf_l4_csum_replace() - bpf_tail_call() - bpf_clone_redirect() Cc: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux

[RFC bpf-next v2 0/8] bpf: document eBPF helpers and add a script to generate man page

2018-04-10 Thread Quentin Monnet
documentation is supposed to be processed. - Update Python script accordingly (remove the same sections, and remove paragraphs on program types and GPL restrictions from man page header). - Split series into several patches. Cc: linux-...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off

[RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-10 Thread Quentin Monnet
not available directly in the header files (pre-processor directives are used to produce them at the beginning of the compilation process). Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 406 ++--

[RFC bpf-next v2 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-10 Thread Quentin Monnet
() - bpf_get_numa_node_id() - bpf_set_hash() - bpf_skb_adjust_room() - bpf_xdp_adjust_meta() Cc: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 155 +++ 1 file

[RFC bpf-next v2 6/8] bpf: add documentation for eBPF helpers (42-50)

2018-04-10 Thread Quentin Monnet
; Cc: Sargun Dhillon <sar...@sargun.me> Cc: Thomas Graf <tg...@suug.ch> Cc: Gianluca Borello <g.bore...@gmail.com> Cc: Chenbo Feng <fe...@google.com> Signed-off-by: Quentin Monnet <quentin.mon...@netronome.com> --- include/uapi/linux/bpf.h | 158 ++

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-10 Thread Quentin Monnet
() - bpf_perf_prog_read_value() Helper from Josef: - bpf_override_return() Helper from Andrey: - bpf_bind() Cc: Lawrence Brakmo <bra...@fb.com> Cc: Yonghong Song <y...@fb.com> Cc: Josef Bacik <jba...@fb.com> Cc: Andrey Ignatov <r...@fb.com> Signed-off-by: Quentin Monnet <q

[RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-11 Thread Quentin Monnet
2018-04-10 11:16 UTC-0700 ~ Alexei Starovoitov <alexei.starovoi...@gmail.com> > On Tue, Apr 10, 2018 at 03:41:50PM +0100, Quentin Monnet wrote: >> Remove previous "overview" of eBPF helpers from user bpf.h header. >> Replace it by a comment explaining how t

[RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-11 Thread Quentin Monnet
2018-04-10 15:43 UTC-0700 ~ Alexei Starovoitov <alexei.starovoi...@gmail.com> > On Tue, Apr 10, 2018 at 03:41:52PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the P

[RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-11 Thread Quentin Monnet
2018-04-10 10:56 UTC-0700 ~ Alexei Starovoitov <alexei.starovoi...@gmail.com> > On Tue, Apr 10, 2018 at 03:41:51PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the P

[RFC bpf-next v2 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-11 Thread Quentin Monnet
2018-04-11 12:17 UTC+0200 ~ Jesper Dangaard Brouer <bro...@redhat.com> > On Tue, 10 Apr 2018 15:41:57 +0100 > Quentin Monnet <quentin.mon...@netronome.com> wrote: > >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >> index 7343af4196c8..db090ad0

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-10 09:58 UTC-0700 ~ Yonghong Song <y...@fb.com> > On 4/10/18 7:41 AM, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commit of

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-10 10:50 UTC-0700 ~ Andrey Ignatov <r...@fb.com> > Quentin Monnet <quentin.mon...@netronome.com> [Tue, 2018-04-10 07:43 -0700]: >> + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int >> addr_len) >> + * Description >>

Re: [RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-11 16:44 UTC+0100 ~ Quentin Monnet <quentin.mon...@netronome.com> > 2018-04-10 09:58 UTC-0700 ~ Yonghong Song <y...@fb.com> >> On 4/10/18 7:41 AM, Quentin Monnet wrote: >>> Add documentation for eBPF helper functions to bpf.h user header file. >&g

Re: [RFC bpf-next v2 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-13 Thread Quentin Monnet
2018-04-12 17:28 UTC-0700 ~ Alexei Starovoitov <alexei.starovoi...@gmail.com> > On Tue, Apr 10, 2018 at 03:41:53PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the P

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 11:01 UTC+0200 ~ Daniel Borkmann <dan...@iogearbox.net> > On 04/06/2018 01:11 PM, Quentin Monnet wrote: >> eBPF helper functions can be called from within eBPF programs to perform >> a variety of tasks that would be otherwise hard or impossible to d

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 12:52 UTC+0200 ~ Markus Heiser > >> Am 09.04.2018 um 12:08 schrieb Daniel Borkmann : > [...] > >>> May I completely misunderstood you, so correct my if I'am wrong: >>> >>> - ./scripts/bpf_helpers_doc.py : produces reST markup from

  1   2   >