Re: [PATCH] bpf: use flexible array members, not zero-length

2019-09-30 Thread Daniel Borkmann
On Sat, Sep 28, 2019 at 04:48:14PM +0200, Stephen Kitt wrote: > This switches zero-length arrays in variable-length structs to C99 > flexible array members. GCC will then ensure that the arrays are > always the last element in the struct. > > Coccinelle: > @@ > identifier S, fld; > type T; > @@ >

Re: [net-next PATCH 0/4] Documenting eBPF - extended Berkeley Packet Filter

2017-02-07 Thread Daniel Borkmann
his documentation on the IOvisor mailing-list: Alexander Alemayhu Alexei Starovoitov Daniel Borkmann Quentin Monnet --- Jesper Dangaard Brouer (4): doc/bpf: start eBPF documentation tree bpf/ doc/bpf: document interacting with eBPF maps doc/bpf: describes the differen

Re: [net-next PATCH 0/4] Documenting eBPF - extended Berkeley Packet Filter

2017-02-07 Thread Daniel Borkmann
On 02/07/2017 10:19 PM, Jesper Dangaard Brouer wrote: On Tue, 07 Feb 2017 17:43:38 +0100 Daniel Borkmann wrote: Hi Jesper, On 02/07/2017 03:30 PM, Jesper Dangaard Brouer wrote: Question: What kernel tree should this go into??? If going through Jonathan Corbet, will it appear sooner here

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

2018-04-09 Thread Daniel Borkmann
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 do with > eBPF itself. There is a growing number of such helper functions in the > kernel, but documentation is

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

2018-04-09 Thread Daniel Borkmann
On 04/09/2018 11:21 AM, Markus Heiser wrote: [...] > Do we really need another kernel-doc parser? > > ./scripts/kernel-doc include/uapi/linux/bpf.h > > should already do the job (producing .rst). For more infos, take a look at This has absolutely zero to do with kernel-doc, but rather producin

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

2018-04-09 Thread Daniel Borkmann
On 04/09/2018 11:35 AM, Markus Heiser wrote: > >> Am 09.04.2018 um 11:25 schrieb Daniel Borkmann : >> >> On 04/09/2018 11:21 AM, Markus Heiser wrote: >> [...] >>> Do we really need another kernel-doc parser? >>> >>> ./scripts/kernel-doc incl

Re: [PATCH net-next 2/2] tools: bpf: add bpftool

2017-09-27 Thread Daniel Borkmann
On 09/27/2017 12:45 PM, Jesper Dangaard Brouer wrote: On Wed, 27 Sep 2017 00:02:08 +0100 Jakub Kicinski wrote: On Tue, 26 Sep 2017 15:24:06 -0700, Alexei Starovoitov wrote: On Tue, Sep 26, 2017 at 08:35:22AM -0700, Jakub Kicinski wrote: Add a simple tool for querying and updating BPF objects

Re: [PATCH bpf-next v3 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-19 Thread Daniel Borkmann
On 04/17/2018 04:34 PM, 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 the patch series, in order to provide a RST document > that can later be converted into a

Re: [PATCH bpf-next v3 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-19 Thread Daniel Borkmann
On 04/17/2018 04:34 PM, 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 the patch series, in order to provide a RST document > that can later be converted into a

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

2018-04-19 Thread Daniel Borkmann
FIG_CGROUP_NET_CLASSID is > required to use the helper. Add a reference to related documentation. > State that placing a task in net_cls controller disables cgroup-bpf. > - bpf_get_route_realm(): State that CONFIG_CGROUP_NET_CLASSID is > required to use this helper. > - bpf_skb_load_

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

2018-04-19 Thread Daniel Borkmann
On 04/17/2018 04:34 PM, 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 the patch series, in order to provide a RST document > that can later be converted into a

Re: [PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50)

2018-04-19 Thread Daniel Borkmann
On 04/17/2018 04:34 PM, 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 the patch series, in order to provide a RST document > that can later be converted into a

Re: [PATCH bpf-next v3 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-19 Thread Daniel Borkmann
ash_recalc() > - bpf_skb_change_tail() > - bpf_skb_pull_data() > - bpf_csum_update() > - bpf_set_hash_invalid() > - bpf_get_numa_node_id() > - bpf_set_hash() > - bpf_skb_adjust_room() > - bpf_xdp_adjust_meta() > > Cc: Daniel Borkmann > S

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

2018-04-23 Thread Daniel Borkmann
On 04/20/2018 08:54 PM, Quentin Monnet wrote: > 2018-04-19 13:16 UTC+0200 ~ Daniel Borkmann >> On 04/17/2018 04:34 PM, Quentin Monnet wrote: >>> Add documentation for eBPF helper functions to bpf.h user header file. >>> This documentation can be parsed with th

Re: [PATCH bpf-next v4 00/10] bpf: document eBPF helpers and add a script to generate man page

2018-04-27 Thread Daniel Borkmann
On 04/25/2018 07:16 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 do with > eBPF itself. There is a growing number of such helper functions in the > kernel, but documentation is

Re: [PATCH bpf-next] bpf, doc: Update bpf_jit_enable limitation for CONFIG_BPF_JIT_ALWAYS_ON

2018-04-27 Thread Daniel Borkmann
On 04/26/2018 04:26 AM, Leo Yan wrote: > When CONFIG_BPF_JIT_ALWAYS_ON is enabled, kernel has limitation for > bpf_jit_enable, so it has fixed value 1 and we cannot set it to 2 > for JIT opcode dumping; this patch is to update the doc for it. > > Signed-off-by: Leo Yan > --- > Documentation/netw

Re: [PATCH bpf-next] bpf, doc: Update bpf_jit_enable limitation for CONFIG_BPF_JIT_ALWAYS_ON

2018-04-27 Thread Daniel Borkmann
On 04/27/2018 11:49 AM, Leo Yan wrote: > On Fri, Apr 27, 2018 at 11:44:44AM +0200, Daniel Borkmann wrote: >> On 04/26/2018 04:26 AM, Leo Yan wrote: >>> When CONFIG_BPF_JIT_ALWAYS_ON is enabled, kernel has limitation for >>> bpf_jit_enable, so it has fixed value 1 and we

Re: [PATCH bpf-next v2] bpf, doc: Update bpf_jit_enable limitation for CONFIG_BPF_JIT_ALWAYS_ON

2018-04-27 Thread Daniel Borkmann
On 04/27/2018 12:02 PM, Leo Yan wrote: > When CONFIG_BPF_JIT_ALWAYS_ON is enabled, kernel has limitation for > bpf_jit_enable, so it has fixed value 1 and we cannot set it to 2 > for JIT opcode dumping; this patch is to update the doc for it. > > Suggested-by: Daniel Borkmann

Re: [PATCH] bpf, doc: clarification for the meaning of 'id'

2018-05-10 Thread Daniel Borkmann
On 05/10/2018 05:09 AM, Wang YanQing wrote: > For me, as a reader whose mother language isn't English, the > old words bring a little difficulty to catch the meaning, this > patch rewords the subsection in a more clarificatory way. > > This patch also add blank lines as separator at two places > t

Re: [PATCH] bpf, doc: Document Jump X addressing mode

2018-10-08 Thread Daniel Borkmann
On 10/07/2018 10:45 AM, Arthur Fabre wrote: > bpf_asm and the other classic BPF tools support jump conditions > comparing register A to register X, in addition to comparing register A > with constant K. > Only the latter was documented in filter.txt, add two new addressing > modes that describe the

Re: [PATCH] bpf: doc: "neg" opcode has no operands

2016-03-29 Thread Daniel Borkmann
On 03/28/2016 11:56 PM, Kees Cook wrote: From: Dave Anderson Fixes a copy-paste-o in the BPF opcode table: "neg" takes no arguments and thus has no addressing modes. Signed-off-by: Dave Anderson Signed-off-by: Kees Cook Acked-by: Daniel Borkmann -- To unsubscribe from this list

Re: sparc: bpf_jit: Rename jump labels in bpf_jit_compile()

2016-09-04 Thread Daniel Borkmann
On 09/04/2016 09:20 AM, SF Markus Elfring wrote: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/Documentation/CodingStyle?id=865a1caa4b6b886babdd9d67e7c3608be4567a51 [ + Jonathan for above commit in linux-next ] You seem to lack understanding of the difference between

Re: Clarification for source code formatting around jump labels

2016-09-04 Thread Daniel Borkmann
On 09/04/2016 03:50 PM, SF Markus Elfring wrote: I am just curious on how much further software development "fun" the recent update by a topic like "CodingStyle: Clarify and complete chapter 7" will trigger. I don't want to drag this thread onwards for (way) too long, but clearly "it is advise

Re: [PATCH bpf-next v5 2/4] selftests/bpf: Add launch time request to xdp_hw_metadata

2025-01-15 Thread Daniel Borkmann
On 1/14/25 4:27 PM, Song Yoong Siang wrote: [...] + /* Add mqprio qdisc with TC and hardware queue one-to-one mapping */ + char map[256] = {0}; + char queues[256] = {0}; + + for (i = 0; i < rxq; i++) { + char buf[8]; + + snprintf(buf, sizeof(buf

Re: [PATCH bpf-next,v3 2/2] selftests/bpf: Enhance XDP Rx metadata handling

2025-07-04 Thread Daniel Borkmann
On 7/4/25 11:58 AM, Jesper Dangaard Brouer wrote: On 04/07/2025 03.17, Song, Yoong Siang wrote: On Friday, July 4, 2025 1:05 AM, Jesper Dangaard Brouer wrote: On 02/07/2025 18.57, Song Yoong Siang wrote: Introduce the XDP_METADATA_SIZE macro as a conservative measure to accommodate any metada

Re: [PATCH bpf-next,v3 2/2] selftests/bpf: Enhance XDP Rx metadata handling

2025-07-09 Thread Daniel Borkmann
On 7/7/25 5:03 PM, Stanislav Fomichev wrote: On 07/04, Daniel Borkmann wrote: On 7/4/25 11:58 AM, Jesper Dangaard Brouer wrote: On 04/07/2025 03.17, Song, Yoong Siang wrote: On Friday, July 4, 2025 1:05 AM, Jesper Dangaard Brouer wrote: On 02/07/2025 18.57, Song Yoong Siang wrote

Re: [PATCH bpf-next,v3 1/2] doc: enhance explanation of XDP Rx metadata layout and METADATA_SIZE

2025-07-03 Thread Daniel Borkmann
On 7/2/25 6:57 PM, Song Yoong Siang wrote: [...] +It is important to note that some devices may utilize the ``data_meta`` area for +their own purposes. For example, the IGC device utilizes ``IGC_TS_HDR_LEN`` +bytes of the ``data_meta`` area for receiving hardware timestamps. Therefore, +the XDP