Re: [PATCH bpf-next] libbpf: clarify flags in ringbuf helpers

2021-04-07 Thread Joe Stringer
Hi Pedro, On Tue, Apr 6, 2021 at 11:58 AM Pedro Tammela wrote: > > In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment. > > For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a > notification to the process if needed. > > Signed-off-by: Pedro Tammela > --- > incl

Re: [ovs-dev] openvswitch crash on i386

2019-03-05 Thread Joe Stringer
pecifying which > > conntrack events (IPCT_*) should be delivered via the Netfilter > > netlink multicast groups. Default behavior depends on the system > > configuration, but typically a lot of events are delivered. This can be > > very chatty for the NF

Re: [PATCH] compiler: Don't perform compiletime_assert with -O0.

2017-08-30 Thread Joe Stringer
On 30 August 2017 at 19:16, Michael Ellerman wrote: > Joe Stringer writes: > >> On 30 August 2017 at 15:59, Andrew Morton wrote: >>> On Tue, 29 Aug 2017 16:01:14 -0700 Joe Stringer wrote: >>> >>>> Recent changes[0] to make use of __compiletime_asser

Re: [PATCH] compiler: Don't perform compiletime_assert with -O0.

2017-08-30 Thread Joe Stringer
On 30 August 2017 at 15:59, Andrew Morton wrote: > On Tue, 29 Aug 2017 16:01:14 -0700 Joe Stringer wrote: > >> Recent changes[0] to make use of __compiletime_assert() from >> container_of() increased the usage of this macro, allowing developers to >> notice ty

Re: [PATCH] compiler: Don't perform compiletime_assert with -O0.

2017-08-30 Thread Joe Stringer
On 30 August 2017 at 03:26, Michal Nazarewicz wrote: > On Tue, Aug 29 2017, Joe Stringer wrote: >> Recent changes[0] to make use of __compiletime_assert() from >> container_of() increased the usage of this macro, allowing developers to >> notice type conflicts in usage

[PATCHv2] compiler: Don't perform compiletime_assert with -O0

2017-08-30 Thread Joe Stringer
n expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~ [0] http://lkml.kernel.org/r/20170525120316.24473-7-abbo...@mev.co.uk Signed-off-by: Joe Stringer Acked-by: Michal Nazarewicz Cc: Ian Abbott Cc: Arnd Bergmann Cc: Kees Cook

[PATCH] compiler: Don't perform compiletime_assert with -O0.

2017-08-29 Thread Joe Stringer
n expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~ [0] http://lkml.kernel.org/r/20170525120316.24473-7-abbo...@mev.co.uk Signed-off-by: Joe Stringer Cc: Ian Abbott Cc: Arnd Bergmann Cc: Michal Nazarewicz Cc: Kees Cook Cc: An

Re: [PATCH net-next] compiler: Document behavior compiling with -O0

2017-08-25 Thread Joe Stringer
On 25 August 2017 at 04:45, Michal Nazarewicz wrote: > On Thu, Aug 24 2017, Joe Stringer wrote: >> Recent changes[0] to make use of __compiletime_assert() from container_of() >> increased the scope of this macro, resulting in a wider set of >> situations where developers cann

Re: [PATCH net-next] compiler: Document behavior compiling with -O0

2017-08-25 Thread Joe Stringer
On 24 August 2017 at 14:20, Arnd Bergmann wrote: > On Thu, Aug 24, 2017 at 6:45 PM, Joe Stringer wrote: >> Recent changes[0] to make use of __compiletime_assert() from container_of() >> increased the scope of this macro, resulting in a wider set of >> situations where deve

Re: [PATCH net-next] compiler: Document behavior compiling with -O0

2017-08-24 Thread Joe Stringer
On 24 August 2017 at 09:45, Joe Stringer wrote: > Recent changes[0] to make use of __compiletime_assert() from container_of() > increased the scope of this macro, resulting in a wider set of > situations where developers cannot compile their code using "-O0". I > noticed t

[PATCH net-next] compiler: Document behavior compiling with -O0

2017-08-24 Thread Joe Stringer
0170525120316.24473-7-abbo...@mev.co.uk Signed-off-by: Joe Stringer --- include/linux/compiler.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index eca8ad75e28b..bb640167fdac 100644 --- a/include/linux/compiler.h +++ b/include/linux/co

Re: [PATCH] openvswitch: Remove unnecessary newlines from OVS_NLERR uses

2017-08-11 Thread Joe Stringer
On 11 August 2017 at 04:26, Joe Perches wrote: > OVS_NLERR already adds a newline so these just add blank > lines to the logging. > > Signed-off-by: Joe Perches Acked-by: Joe Stringer

Re: [PATCH 4.4-only] openvswitch: clear sender cpu before forwarding packets

2017-05-16 Thread Joe Stringer
On 16 May 2017 at 07:25, Anoob Soman wrote: > Similar to commit c29390c6dfee ("xps: must clear sender_cpu before > forwarding") the skb->sender_cpu needs to be cleared before forwarding > packets. > > Fixes: 2bd82484bb4c ("xps: fix xps for stacked devices") > Signed-off-by: Anoob Soman Is this n

Re: linux-next: build failure after merge of the net tree

2017-02-14 Thread Joe Stringer
On 13 February 2017 at 15:31, Alexei Starovoitov wrote: > On 2/13/17 2:12 PM, Stephen Rothwell wrote: >> >> Hi all, >> >> After merging the net tree, today's linux-next build (powerpc64le perf) >> failed like this: >> >> Warning: tools/include/uapi/linux/bpf.h differs from kernel >> bpf.c: In func

Re: [PATCH v4 0/3] Miscellaneous fixes for BPF (perf tree)

2017-02-10 Thread Joe Stringer
On 10 February 2017 at 09:42, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 08, 2017 at 09:27:41PM +0100, Mickaël Salaün escreveu: >> This series brings some fixes and small improvements to the BPF samples. >> >> This is intended for the perf tree and apply on 7a5980f9c006 ("tools lib bpf: >> Add

[tip:perf/core] tools lib api fs: Add bpf_fs filesystem detector

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: 71dc4c30680fa7e7fd4b82352a845e2fb4d86b2b Gitweb: http://git.kernel.org/tip/71dc4c30680fa7e7fd4b82352a845e2fb4d86b2b Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:20:00 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:07 -0300 tools lib api

[tip:perf/core] perf test: Add libbpf pinning test

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: a26305363d4b3a586a2d3554c22705538aa4e926 Gitweb: http://git.kernel.org/tip/a26305363d4b3a586a2d3554c22705538aa4e926 Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:20:01 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:08 -0300 perf test

[tip:perf/core] tools perf util: Make rm_rf(path) argument const

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: 9a9c733d68c5cb89bd5c5ab91b9821e1a5d69272 Gitweb: http://git.kernel.org/tip/9a9c733d68c5cb89bd5c5ab91b9821e1a5d69272 Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:19:59 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:07 -0300 tools perf

[tip:perf/core] tools lib bpf: Add bpf_object__pin()

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: d5148d8554d08f03b3e34ecc286ab1729c35c24c Gitweb: http://git.kernel.org/tip/d5148d8554d08f03b3e34ecc286ab1729c35c24c Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:19:58 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:06 -0300 tools lib bpf

[tip:perf/core] tools lib bpf: Add bpf_map__pin()

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: b6989f35e80bf830f8dc97b74128d619faef0273 Gitweb: http://git.kernel.org/tip/b6989f35e80bf830f8dc97b74128d619faef0273 Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:19:57 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:06 -0300 tools lib bpf

[tip:perf/core] tools lib bpf: Add BPF program pinning APIs

2017-02-01 Thread tip-bot for Joe Stringer
Commit-ID: f367540c8c13d65603c431e29a0b87a7db893d6c Gitweb: http://git.kernel.org/tip/f367540c8c13d65603c431e29a0b87a7db893d6c Author: Joe Stringer AuthorDate: Thu, 26 Jan 2017 13:19:56 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 31 Jan 2017 16:20:05 -0300 tools lib bpf

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-30 Thread Joe Stringer
On 30 January 2017 at 12:28, Arnaldo Carvalho de Melo wrote: > Em Mon, Jan 30, 2017 at 05:25:06PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Thu, Jan 26, 2017 at 01:19:56PM -0800, Joe Stringer escreveu: >> > Add new APIs to pin a BPF program (or specific instances) to th

[PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-26 Thread Joe Stringer
path) will create the directory 'path' (if it does not exist) and pin each instance within that directory. For instance, path/0, path/1, path/2. Signed-off-by: Joe Stringer --- v3: Add per-instance pinning. Use path for bpf_program__pin() as directory. v2: Don't automount BPF fil

[PATCHv3 perf/core 4/6] tools perf util: Make rm_rf(path) argument const

2017-01-26 Thread Joe Stringer
rm_rf() doesn't modify its path argument, and a future caller will pass a string constant into it to delete. Signed-off-by: Joe Stringer --- v3: Initial post. --- tools/perf/util/util.c | 2 +- tools/perf/util/util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/

[PATCHv3 perf/core 0/6] Libbpf object pinning

2017-01-26 Thread Joe Stringer
utodetect/mount BPFFS). v1: Initial post. Joe Stringer (6): tools lib bpf: Add BPF program pinning APIs. tools lib bpf: Add bpf_map__pin() tools lib bpf: Add bpf_object__pin() tools perf util: Make rm_rf(path) argument const tools lib api fs: Add bpf_fs filesystem detector perf test: Add

[PATCHv3 perf/core 3/6] tools lib bpf: Add bpf_object__pin()

2017-01-26 Thread Joe Stringer
under the path using the name of the map as the file basename. For example, with the directory '/sys/fs/bpf/foo' and a BPF object which contains two instances of a program named 'bar', and a map named 'baz': /sys/fs/bpf/foo/bar/0 /sys/fs/bpf/foo/bar/1 /sys/fs/bpf/foo/ba

[PATCHv3 perf/core 6/6] perf test: Add libbpf pinning test

2017-01-26 Thread Joe Stringer
generation : Ok 37.4: BPF relocation checker : Ok # tools/perf/perf test 37 -v 2>&1 | grep pinned libbpf: pinned map '/sys/fs/bpf/perf_test/flip_table' libbpf: pinned program '/sys/fs/bpf/perf_test/func=SyS_epoll_wait/0' Sign

[PATCHv3 perf/core 5/6] tools lib api fs: Add bpf_fs filesystem detector

2017-01-26 Thread Joe Stringer
Allow mounting of the BPF filesystem at /sys/fs/bpf. Signed-off-by: Joe Stringer --- v3: Initial post. --- tools/lib/api/fs/fs.c | 16 tools/lib/api/fs/fs.h | 1 + 2 files changed, 17 insertions(+) diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c index f99f49e4a31e

[PATCHv3 perf/core 2/6] tools lib bpf: Add bpf_map__pin()

2017-01-26 Thread Joe Stringer
Add a new API to pin a BPF map to the filesystem. The user can specify the path full path within a BPF filesystem to pin the map. Signed-off-by: Joe Stringer --- v3: No change. v2: Don't automount BPF filesystem Split program, map, object pinning into separate APIs and separate pa

Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin()

2017-01-26 Thread Joe Stringer
On 26 January 2017 at 11:32, Arnaldo Carvalho de Melo wrote: > Em Wed, Jan 25, 2017 at 10:18:22AM +0800, Wangnan (F) escreveu: >> On 2017/1/25 9:16, Joe Stringer wrote: >> > On 24 January 2017 at 17:06, Wangnan (F) wrote: >> > > On 2017/1/25 9:04, Wangnan (F) wrote

[tip:perf/core] tools lib bpf: Fix map offsets in relocation

2017-01-26 Thread tip-bot for Joe Stringer
Commit-ID: 94e5adece8b37a23d99fb1f8a5de94b23194f387 Gitweb: http://git.kernel.org/tip/94e5adece8b37a23d99fb1f8a5de94b23194f387 Author: Joe Stringer AuthorDate: Sun, 22 Jan 2017 17:11:22 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Jan 2017 11:42:56 -0300 tools lib bpf

[tip:perf/core] tools lib bpf: Add set/is helpers for all prog types

2017-01-26 Thread tip-bot for Joe Stringer
Commit-ID: 7803ba73099867d1f6ca866857277d92e0da4080 Gitweb: http://git.kernel.org/tip/7803ba73099867d1f6ca866857277d92e0da4080 Author: Joe Stringer AuthorDate: Sun, 22 Jan 2017 17:11:24 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Jan 2017 11:42:58 -0300 tools lib bpf

[tip:perf/core] tools lib bpf: Define prog_type fns with macro

2017-01-26 Thread tip-bot for Joe Stringer
Commit-ID: ed7940731ac89616b8a516c560a76dca44a152a8 Gitweb: http://git.kernel.org/tip/ed7940731ac89616b8a516c560a76dca44a152a8 Author: Joe Stringer AuthorDate: Sun, 22 Jan 2017 17:11:23 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Jan 2017 11:42:57 -0300 tools lib bpf

[tip:perf/core] tools lib bpf: Add libbpf_get_error()

2017-01-26 Thread tip-bot for Joe Stringer
Commit-ID: e28ff1a8382ee02b10cf11cf3b48541dc3d14a58 Gitweb: http://git.kernel.org/tip/e28ff1a8382ee02b10cf11cf3b48541dc3d14a58 Author: Joe Stringer AuthorDate: Sun, 22 Jan 2017 17:11:25 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Jan 2017 11:42:58 -0300 tools lib bpf

Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin()

2017-01-24 Thread Joe Stringer
On 24 January 2017 at 17:06, Wangnan (F) wrote: > > > On 2017/1/25 9:04, Wangnan (F) wrote: >> >> >> >> On 2017/1/23 9:11, Joe Stringer wrote: >>> >>> Add a new API to pin a BPF program to the filesystem. The user can >>> specify t

Re: [PATCHv2 perf/core 0/7] Libbpf improvements

2017-01-24 Thread Joe Stringer
On 24 January 2017 at 08:12, Arnaldo Carvalho de Melo wrote: > Em Sun, Jan 22, 2017 at 05:11:21PM -0800, Joe Stringer escreveu: >> Patch 1 fixes an issue when using drastically different BPF map definitions >> inside ELFs from a client using libbpf, vs the map definit

[PATCHv2 perf/core 2/7] tools lib bpf: Define prog_type fns with macro

2017-01-22 Thread Joe Stringer
Turning this into a macro allows future prog types to be added with a single line per type. Signed-off-by: Joe Stringer Acked-by: Wang Nan --- v2: Add ack. --- tools/lib/bpf/libbpf.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a

Re: [PATCH perf/core 0/6] Libbpf improvements

2017-01-22 Thread Joe Stringer
On 19 January 2017 at 02:24, Wangnan (F) wrote: > > > On 2017/1/19 7:57, Joe Stringer wrote: >> >> Patch 1 fixes an issue when using drastically different BPF map >> definitions >> inside ELFs from a client using libbpf, vs the map definition libbpf uses. &g

[PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin()

2017-01-22 Thread Joe Stringer
Add a new API to pin a BPF program to the filesystem. The user can specify the path full path within a BPF filesystem to pin the program. Programs with multiple instances are pinned as 'foo', 'foo_1', 'foo_2', and so on. Signed-off-by: Joe Stringer --- v2:

[PATCHv2 perf/core 6/7] tools lib bpf: Add bpf_map__pin()

2017-01-22 Thread Joe Stringer
Add a new API to pin a BPF map to the filesystem. The user can specify the path full path within a BPF filesystem to pin the map. Signed-off-by: Joe Stringer --- v2: Don't automount BPF filesystem Split program, map, object pinning into separate APIs and separate patches. --- tool

[PATCHv2 perf/core 7/7] tools lib bpf: Add bpf_object__pin()

2017-01-22 Thread Joe Stringer
ory '/sys/fs/bpf/foo': /sys/fs/bpf/foo/progs/PROG_NAME /sys/fs/bpf/foo/maps/MAP_NAME Signed-off-by: Joe Stringer --- v2: Don't automount BPF filesystem Split program, map, object pinning into separate APIs and separate patche

[PATCHv2 perf/core 3/7] tools lib bpf: Add set/is helpers for all prog types

2017-01-22 Thread Joe Stringer
These bpf_prog_types were exposed in the uapi but there were no corresponding functions to set these types for programs in libbpf. Signed-off-by: Joe Stringer Acked-by: Wang Nan --- v2: Add ack. --- tools/lib/bpf/libbpf.c | 5 + tools/lib/bpf/libbpf.h | 10 ++ 2 files changed, 15

[PATCHv2 perf/core 4/7] tools lib bpf: Add libbpf_get_error()

2017-01-22 Thread Joe Stringer
This function will turn a libbpf pointer into a standard error code (or 0 if the pointer is valid). This also allows removal of the dependency on linux/err.h in the public header file, which causes problems in userspace programs built against libbpf. Signed-off-by: Joe Stringer Acked-by: Wang

[PATCHv2 perf/core 1/7] tools lib bpf: Fix map offsets in relocation

2017-01-22 Thread Joe Stringer
pf relocation: map_idx 3 large than 2 Fix map relocation by checking the exact offset of maps when doing relocation. Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps resolution") Signed-off-by: Joe Stringer Signed-off-by: Wang Nan [Allow different map size in an object] Cc: Alexei Star

[PATCHv2 perf/core 0/7] Libbpf improvements

2017-01-22 Thread Joe Stringer
l post. v2: Wang Nan provided improvements to patch 1. Dropped patch 2 from v1. Added acks for acked patches. Split the bpf_obj__pin() to also provide map / program pinning APIs. Allow users to provide full filesystem path (don't autodetect/mount BPFFS). Joe Stringer (7): tools li

Re: [PATCH perf/core 6/6] tools lib bpf: Add bpf_object__pin()

2017-01-19 Thread Joe Stringer
On 19 January 2017 at 02:22, Wangnan (F) wrote: > > > On 2017/1/19 7:57, Joe Stringer wrote: >> >> Add a new API to pin a BPF object to the filesystem. The user can >> specify a subdirectory under the BPF filesystem to pin these programs. >> >> For example

[PATCH perf/core 6/6] tools lib bpf: Add bpf_object__pin()

2017-01-18 Thread Joe Stringer
specified an alternative BPF filesystem mountpoint via /proc/mounts, that will be read and used instead. Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.c | 136 + tools/lib/bpf/libbpf.h | 1 + 2 files changed, 137 insertions(+) diff --g

[PATCH perf/core 1/6] tools lib bpf: Fix map offsets in relocation

2017-01-18 Thread Joe Stringer
pf relocation: map_idx 3 large than 2 Fix map relocation by tracking the size of the map definition during map counting, then reuse this instead of the size of the libbpf map structure. With this patch applied, libbpf will accept such ELFs. Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps reso

[PATCH perf/core 3/6] tools lib bpf: Define prog_type fns with macro

2017-01-18 Thread Joe Stringer
Turning this into a macro allows future prog types to be added with a single line per type. Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib

[PATCH perf/core 5/6] tools lib bpf: Add libbpf_get_error()

2017-01-18 Thread Joe Stringer
This function will turn a libbpf pointer into a standard error code (or 0 if the pointer is valid). This also allows removal of the dependency on linux/err.h in the public header file, which causes problems in userspace programs built against libbpf. Signed-off-by: Joe Stringer --- tools/lib

[PATCH perf/core 2/6] tools lib bpf: Fix grammar in map_idx warning

2017-01-18 Thread Joe Stringer
"Larger" is the comparative adjective form of "large". Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 350ee4c59f85..653b1b368deb 100644 --- a/to

[PATCH perf/core 0/6] Libbpf improvements

2017-01-18 Thread Joe Stringer
/maps/$mapname. The first program with a particular name will be mounted with its progname and the suffix "_0"; subsequent programs with the same will have "_1", and so on; duplicate maps with the same name are disallowed. Joe Stringer (6): tools lib bpf: Fix map offsets in reloca

[PATCH perf/core 4/6] tools lib bpf: Add set/is helpers for all prog types

2017-01-18 Thread Joe Stringer
These bpf_prog_types were exposed in the uapi but there were no corresponding functions to set these types for programs in libbpf. Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.c | 5 + tools/lib/bpf/libbpf.h | 10 ++ 2 files changed, 15 insertions(+) diff --git a/tools/lib

[tip:perf/urgent] samples/bpf: Move open_raw_sock to separate header

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 9899694a7f67714216665b87318eb367e2c5c901 Gitweb: http://git.kernel.org/tip/9899694a7f67714216665b87318eb367e2c5c901 Author: Joe Stringer AuthorDate: Thu, 8 Dec 2016 18:46:20 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 20 Dec 2016 12:00:40 -0300 samples/bpf

[tip:perf/urgent] samples/bpf: Remove perf_event_open() declaration

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 205c8ada314f78e6637342089e5b585a051d6cf5 Gitweb: http://git.kernel.org/tip/205c8ada314f78e6637342089e5b585a051d6cf5 Author: Joe Stringer AuthorDate: Thu, 8 Dec 2016 18:46:19 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 20 Dec 2016 12:00:40 -0300 samples/bpf

[tip:perf/urgent] tools lib bpf: Add bpf_prog_{attach,detach}

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 5dc880de6e7c8566fbc8bc5dfc3a922d2d1c5ee3 Gitweb: http://git.kernel.org/tip/5dc880de6e7c8566fbc8bc5dfc3a922d2d1c5ee3 Author: Joe Stringer AuthorDate: Wed, 14 Dec 2016 14:05:26 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 20 Dec 2016 12:00:39 -0300 tools lib bpf

[tip:perf/urgent] samples/bpf: Switch over to libbpf

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 43371c83f382bd495a2294e91a32f30763cfdbef Gitweb: http://git.kernel.org/tip/43371c83f382bd495a2294e91a32f30763cfdbef Author: Joe Stringer AuthorDate: Wed, 14 Dec 2016 14:43:39 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 20 Dec 2016 12:00:38 -0300 samples/bpf

[tip:perf/urgent] tools lib bpf: use __u32 from linux/types.h

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 83d994d02bf4594d6bfa9b2b67befb6cff7f9380 Gitweb: http://git.kernel.org/tip/83d994d02bf4594d6bfa9b2b67befb6cff7f9380 Author: Joe Stringer AuthorDate: Thu, 8 Dec 2016 18:46:15 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 15 Dec 2016 16:25:46 -0300 tools lib bpf

[tip:perf/urgent] tools lib bpf: Add flags to bpf_create_map()

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: a5580c7f7a6d078696458d283df5d6547ad1c740 Gitweb: http://git.kernel.org/tip/a5580c7f7a6d078696458d283df5d6547ad1c740 Author: Joe Stringer AuthorDate: Thu, 8 Dec 2016 18:46:16 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 15 Dec 2016 16:25:47 -0300 tools lib bpf

[tip:perf/urgent] samples/bpf: Make samples more libbpf-centric

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: d40fc181ebec6b1d560e2167208276baa4f3bbf0 Gitweb: http://git.kernel.org/tip/d40fc181ebec6b1d560e2167208276baa4f3bbf0 Author: Joe Stringer AuthorDate: Wed, 14 Dec 2016 14:43:38 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 15 Dec 2016 16:25:47 -0300 samples/bpf

[tip:perf/urgent] tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h

2016-12-20 Thread tip-bot for Joe Stringer
Commit-ID: 0cb34dc2a37290f4069c5b01735c9725dc0a1b5c Gitweb: http://git.kernel.org/tip/0cb34dc2a37290f4069c5b01735c9725dc0a1b5c Author: Joe Stringer AuthorDate: Thu, 8 Dec 2016 18:46:14 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 15 Dec 2016 16:25:46 -0300 tools lib bpf

Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach}

2016-12-20 Thread Joe Stringer
On 20 December 2016 at 06:32, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 20, 2016 at 11:18:51AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Dec 14, 2016 at 02:43:40PM -0800, Joe Stringer escreveu: >> > Commit d8c5b17f2bc0 ("samples: bpf: add userspace example

[PATCHv5 perf/core 2/5] samples/bpf: Switch over to libbpf

2016-12-16 Thread Joe Stringer
Now that libbpf under tools/lib/bpf/* is synced with the version from samples/bpf, we can get rid most of the libbpf library here. Committer notes: Tested it the same way as the previous patch in this series. Signed-off-by: Joe Stringer Tested-by: Arnaldo Carvalho de Melo Cc: Alexei

[PATCHv5 perf/core 3/5] tools lib bpf: Add bpf_prog_{attach,detach}

2016-12-16 Thread Joe Stringer
Commit d8c5b17f2bc0 ("samples: bpf: add userspace example for attaching eBPF programs to cgroups") added these functions to samples/libbpf, but during this merge all of the samples libbpf functionality is shifting to tools/lib/bpf. Shift these functions there. Signed-off-by: Joe String

[PATCHv5 perf/core 5/5] samples/bpf: Move open_raw_sock to separate header

2016-12-16 Thread Joe Stringer
This function was declared in libbpf.c and was the only remaining function in this library, but has nothing to do with BPF. Shift it out into a new header, sock_example.h, and include it from the relevant samples. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang

[PATCHv5 perf/core 4/5] samples/bpf: Remove perf_event_open() declaration

2016-12-16 Thread Joe Stringer
/bpf/bpf_load.o HOSTLD samples/bpf/trace_event HOSTLD samples/bpf/sampleip HOSTLD samples/bpf/tc_l2_redirect make[1]: Leaving directory '/home/build/v4.9.0-rc8+' $ Signed-off-by: Joe Stringer Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Daniel Bor

[PATCHv5 perf/core 0/5] Reuse libbpf from samples/bpf

2016-12-16 Thread Joe Stringer
/msg135088.html First post. Joe Stringer (5): samples/bpf: Make samples more libbpf-centric samples/bpf: Switch over to libbpf tools lib bpf: Add bpf_prog_{attach,detach} samples/bpf: Remove perf_event_open() declaration samples/bpf: Move open_raw_sock to separate header sampl

[PATCHv5 perf/core 1/5] samples/bpf: Make samples more libbpf-centric

2016-12-16 Thread Joe Stringer
ommon;__wake_up_sync_key;pipe_write;__vfs_write;vfs_write;sys_write;entry_SYSCALL_64_fastpath;;Timer 13 JS Helper;entry_SYSCALL_64_fastpath;sys_futex;do_futex;futex_wait;futex_wait_queue_me;schedule;__schedule;-;try_to_wake_up;do_futex;sys_futex;entry_SYSCALL_64_fastpath;;firefox 2 # Signed-off-by

Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf

2016-12-15 Thread Joe Stringer
On 15 December 2016 at 14:00, Joe Stringer wrote: > On 15 December 2016 at 10:34, Arnaldo Carvalho de Melo > wrote: >> Em Thu, Dec 15, 2016 at 03:29:18PM -0300, Arnaldo Carvalho de Melo escreveu: >>> Em Thu, Dec 15, 2016 at 12:50:22PM -0300, Arnaldo Carvalho de Melo escrev

Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf

2016-12-15 Thread Joe Stringer
On 15 December 2016 at 10:34, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 15, 2016 at 03:29:18PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Thu, Dec 15, 2016 at 12:50:22PM -0300, Arnaldo Carvalho de Melo escreveu: >> > Em Wed, Dec 14, 2016 at 02:43:39PM -0800, Joe

Re: [PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf

2016-12-15 Thread Joe Stringer
On 15 December 2016 at 07:50, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 14, 2016 at 02:43:39PM -0800, Joe Stringer escreveu: >> Now that libbpf under tools/lib/bpf/* is synced with the version from >> samples/bpf, we can get rid most of the libbpf library here. >>

[PATCH perf/core REBASE 5/5] samples/bpf: Move open_raw_sock to separate header

2016-12-14 Thread Joe Stringer
This function was declared in libbpf.c and was the only remaining function in this library, but has nothing to do with BPF. Shift it out into a new header, sock_example.h, and include it from the relevant samples. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang

[PATCH perf/core REBASE 4/5] samples/bpf: Remove perf_event_open() declaration

2016-12-14 Thread Joe Stringer
/bpf/bpf_load.o HOSTLD samples/bpf/trace_event HOSTLD samples/bpf/sampleip HOSTLD samples/bpf/tc_l2_redirect make[1]: Leaving directory '/home/build/v4.9.0-rc8+' $ Signed-off-by: Joe Stringer Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Daniel Bor

[PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach}

2016-12-14 Thread Joe Stringer
Commit d8c5b17f2bc0 ("samples: bpf: add userspace example for attaching eBPF programs to cgroups") added these functions to samples/libbpf, but during this merge all of the samples libbpf functionality is shifting to tools/lib/bpf. Shift these functions there. Signed-off-by: Jo

[PATCH perf/core REBASE 1/5] samples/bpf: Make samples more libbpf-centric

2016-12-14 Thread Joe Stringer
Switch all of the sample code to use the function names from tools/lib/bpf so that they're consistent with that, and to declare their own log buffers. This allow the next commit to be purely devoted to getting rid of the duplicate library in samples/bpf. Signed-off-by: Joe Stringer Cc: A

[PATCH perf/core REBASE 2/5] samples/bpf: Switch over to libbpf

2016-12-14 Thread Joe Stringer
Now that libbpf under tools/lib/bpf/* is synced with the version from samples/bpf, we can get rid most of the libbpf library here. Signed-off-by: Joe Stringer Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Wang Nan Link: http://lkml.kernel.org/r/20161209024620.31660-6-...@ovn.org [ Use -I

[PATCH perf/core REBASE 0/5] Reuse libbpf from samples/bpf

2016-12-14 Thread Joe Stringer
tch samples/bpf over to using tools/lib/. (Was "libbpf: Synchronize implementations") v2: Don't shift non-bpf code into libbpf. Drop the patch to synchronize ELF definitions with tc. v1: https://www.mail-archive.com/netdev@vger.kernel.org/msg135088.html First post. Joe Str

Re: [PATCHv3 perf/core 0/7] Reuse libbpf from samples/bpf

2016-12-14 Thread Joe Stringer
On 14 December 2016 at 06:55, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 14, 2016 at 10:25:01AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Fri, Dec 09, 2016 at 04:30:54PM +0100, Daniel Borkmann escreveu: >> > On 12/09/2016 04:09 PM, Arnaldo Carvalho de Melo wrote: >> > Please note that thi

Re: [PATCHv3 perf/core 5/7] samples/bpf: Switch over to libbpf

2016-12-09 Thread Joe Stringer
On 8 December 2016 at 21:18, Wangnan (F) wrote: > > > On 2016/12/9 13:04, Wangnan (F) wrote: >> >> >> >> On 2016/12/9 10:46, Joe Stringer wrote: >> >> [SNIP] >> >>> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile >>

[PATCH perf/core] samples/bpf: Drop unnecessary build targets.

2016-12-09 Thread Joe Stringer
e. Reported-by: Wang Nan Signed-off-by: Joe Stringer --- samples/bpf/Makefile | 1 - tools/lib/bpf/Makefile | 2 -- 2 files changed, 3 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 9ffa6a2c061d..60ffc8115b67 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Mak

[PATCHv3 perf/core 6/7] samples/bpf: Remove perf_event_open() declaration

2016-12-08 Thread Joe Stringer
This declaration was made in samples/bpf/libbpf.c for convenience, but there's already one in tools/perf/perf-sys.h. Reuse that one. Signed-off-by: Joe Stringer --- v3: First post. --- samples/bpf/Makefile| 3 ++- samples/bpf/bpf_load.c | 3 ++- samples/bpf/lib

[PATCHv3 perf/core 0/7] Reuse libbpf from samples/bpf

2016-12-08 Thread Joe Stringer
ttps://www.mail-archive.com/netdev@vger.kernel.org/msg135088.html First post. Joe Stringer (7): tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h tools lib bpf: use __u32 from linux/types.h tools lib bpf: Add flags to bpf_create_map() samples/bpf: Make samples more libbpf-centric samples/b

[PATCHv3 perf/core 1/7] tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h

2016-12-08 Thread Joe Stringer
The tools version of this header is out of date; update it to the latest version from the kernel headers. Signed-off-by: Joe Stringer Acked-by: Wang Nan --- v3: Add ack. v2: No change. --- tools/include/uapi/linux/bpf.h | 51 ++ 1 file changed, 51

[PATCHv3 perf/core 7/7] samples/bpf: Move open_raw_sock to separate header

2016-12-08 Thread Joe Stringer
This function was declared in libbpf.c and was the only remaining function in this library, but has nothing to do with BPF. Shift it out into a new header, sock_example.h, and include it from the relevant samples. Signed-off-by: Joe Stringer --- v3: First post. --- samples/bpf/Makefile

[PATCHv3 perf/core 3/7] tools lib bpf: Add flags to bpf_create_map()

2016-12-08 Thread Joe Stringer
The map_flags argument to bpf_create_map() was previously not exposed. By exposing it, users can access flags such as whether or not to preallocate the map. Signed-off-by: Joe Stringer --- v3: Split from "tools lib bpf: Sync with samples/bpf/libbpf". --- tools/lib/bpf/bpf.c| 3

[PATCHv3 perf/core 4/7] samples/bpf: Make samples more libbpf-centric

2016-12-08 Thread Joe Stringer
Switch all of the sample code to use the function names from tools/lib/bpf so that they're consistent with that, and to declare their own log buffers. This allow the next commit to be purely devoted to getting rid of the duplicate library in samples/bpf. Signed-off-by: Joe Stringer --- sa

[PATCHv3 perf/core 5/7] samples/bpf: Switch over to libbpf

2016-12-08 Thread Joe Stringer
Now that libbpf under tools/lib/bpf/* is synced with the version from samples/bpf, we can get rid most of the libbpf library here. Signed-off-by: Joe Stringer --- v3: First post. --- samples/bpf/Makefile | 60 +- samples/bpf/README.rst | 4 +- samples/bpf/libbpf.c

[PATCHv3 perf/core 2/7] tools lib bpf: use __u32 from linux/types.h

2016-12-08 Thread Joe Stringer
Fixes the following issue when building without access to 'u32' type: ./tools/lib/bpf/bpf.h:27:23: error: unknown type name ‘u32’ Signed-off-by: Joe Stringer --- v3: Split from "tools lib bpf: Sync with samples/bpf/libbpf" --- tools/lib/bpf/bpf.c | 4 ++-- tools/lib/bpf/bpf

Re: [PATCHv2 perf/core 2/2] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-16 Thread Joe Stringer
On 16 November 2016 at 19:39, Wangnan (F) wrote: > > > On 2016/11/17 10:46, Joe Stringer wrote: >> >> On 16 November 2016 at 18:10, Wangnan (F) wrote: >>> >>> I'm also working on improving bpf.c. Please have a look at: >>> >>> https

Re: [PATCHv2 perf/core 2/2] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-16 Thread Joe Stringer
On 16 November 2016 at 19:21, Wangnan (F) wrote: > > > On 2016/11/17 10:46, Joe Stringer wrote: >> >> On 16 November 2016 at 18:10, Wangnan (F) wrote: >>> >>> I'm also working on improving bpf.c. Please have a look at: >>> >>> https

Re: [PATCHv2 perf/core 2/2] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-16 Thread Joe Stringer
e patches to rework the samples/bpf/* code to use libbpf instead of the sample code that is there, is it worth me submitting that? It will need to wait for your patch to go in, plus a merge with davem's tree. > > On 2016/11/17 1:43, Joe Stringer wrote: >> >> Extend the tools/

[PATCHv2 perf/core 1/2] tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h

2016-11-16 Thread Joe Stringer
The tools version of this header is out of date; update it to the latest version from the kernel headers. Signed-off-by: Joe Stringer --- v2: No change. --- tools/include/uapi/linux/bpf.h | 51 ++ 1 file changed, 51 insertions(+) diff --git a/tools

[PATCHv2 perf/core 2/2] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-16 Thread Joe Stringer
Extend the tools/ version of libbpf to include all of the functionality provided in the samples/bpf version. Signed-off-by: Joe Stringer --- v2: Don't shift non-bpf changes across. Various type cleanups, removal of extraneous declarations --- tools/lib/bpf/bpf.c

[PATCHv2 perf/core 0/2] libbpf: Synchronize implementations

2016-11-16 Thread Joe Stringer
ugh first, then take the samples through net-next at a later time. --- v2: Don't shift non-bpf code into libbpf. Drop the patch to synchronize ELF definitions with tc. v1: https://www.mail-archive.com/netdev@vger.kernel.org/msg135088.html First post. Joe Stringer (2): tools lib bpf: S

Re: [PATCH 1/8] tools lib bpf: add error functions

2016-10-18 Thread Joe Stringer
On 16 October 2016 at 14:18, Eric Leblond wrote: > The include of err.h is not explicitely needed in exported > functions and it was causing include conflict with some existing > code due to redefining some macros. > > To fix this, let's have error handling functions provided by the > library. Fur

Re: [ovs-dev] [PATCH] openvswitch: call only into reachable nf-nat code

2016-03-19 Thread Joe Stringer
On 17 March 2016 at 02:56, Arnd Bergmann wrote: > On Wednesday 16 March 2016 14:25:36 Pablo Neira Ayuso wrote: >> Not related with this patch, just a side note/recommendation. >> >> I understand this code just got into tree, and that this needs a bit >> work/iterations but this thing above is ugly

Re: [ovs-dev] [PATCH] openvswitch: call only into reachable nf-nat code

2016-03-19 Thread Joe Stringer
() > with two "if (IS_ENABLED())" checks that should catch all corner > cases also make the code more readable. > > The same #ifdef exists ovs_ct_nat_to_attr(), where it does not > cause a link error, but for consistency I'm changing it the same > way. > > Signed-off-by: Arnd Bergmann > Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Thanks for the fix, LGTM. Acked-by: Joe Stringer

[PATCH nf-next] netfilter: nf_defrag_ipv4: Drop redundant ip_send_check()

2016-02-03 Thread Joe Stringer
Since commit 0848f6428ba3 ("inet: frags: fix defragmented packet's IP header for af_packet"), ip_send_check() would be called twice for defragmentation that occurs from netfilter ipv4 defrag hooks. Remove the extra call. Signed-off-by: Joe Stringer --- net/ipv4/netfilter/nf_de

[PATCH net] openvswitch: Fix template leak in error cases.

2015-12-23 Thread Joe Stringer
st, or nf_ct_put() will never free it. Fix the issue by acquiring a reference to the template immediately after allocation. Fixes: cae3a2627520 ("openvswitch: Allow attaching helpers to ct action") Fixes: 5b48bb8506c5 ("openvswitch: Fix helper reference leak") Signed-off-by

[PATCHv3] openvswitch: Rename LABEL->LABELS

2015-10-01 Thread Joe Stringer
Conntrack LABELS (plural) are exposed by conntrack; rename the OVS name for these to be consistent with conntrack. Fixes: c2ac667 "openvswitch: Allow matching on conntrack label" Signed-off-by: Joe Stringer --- v3: Fix build with !CONFIG_NF_CONNTRACK v2: Change ct_label struct names

  1   2   3   >