Re: [dm-devel] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-05-02 Thread John Stoffel
located with >> kvmalloc()" flag? I *think* there's extra per-object storage available >> with suitable slab/slub debugging options? Perhaps we could steal one >> bit from the redzone, dunno. >> >> If so then we can >> >> a) set that flag in kvmalloc() if the kmalloc() call succeeded >> >> b) check for that flag in the DMA code, WARN if it is set. >> >> c) in kvfree(), clear that flag before calling kfree() >> >> d) in kfree(), check for that flag and go WARN() if set. >> >> So both potential bugs are detected all the time, dependent upon >> CONFIG_SLUB_DEBUG (and perhaps other slub config options). Mike> Thanks Andrew, definitely the most sane proposal I've seen to resolve Mike> this. Cuts to the heart of the issue I think, and seems pretty sane. Should the WARN be rate limited as well? John

Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options

2018-05-02 Thread John Stoffel
>>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes: Mikulas> On Mon, 30 Apr 2018, John Stoffel wrote: >> >>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes: >> Mikulas> On T

Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options

2018-04-30 Thread John Stoffel
>>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes: Mikulas> On Thu, 26 Apr 2018, John Stoffel wrote: >> >>>>> "James" == James Bottomley <james.bottom...@hansenpartnership.com> >> >>>>> wr

Re: [PATCH bpf-next v3 2/4] bpf: sockmap, add hash map support

2018-04-29 Thread John Fastabend
On 04/29/2018 09:16 AM, Alexei Starovoitov wrote: > On Sat, Apr 28, 2018 at 08:41:28PM -0700, John Fastabend wrote: >> Sockmap is currently backed by an array and enforces keys to be >> four bytes. This works well for many use cases and was originally >> modeled after devmap

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

2018-04-28 Thread John Fastabend
On 04/27/2018 05:10 PM, Alexei Starovoitov wrote: > On Fri, Apr 27, 2018 at 04:24:43PM -0700, John Fastabend wrote: >> 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 SOCKHAS

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

2018-04-28 Thread 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 type. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/i

[PATCH bpf-next v3 4/4] bpf: bpftool, support for sockhash

2018-04-28 Thread John Fastabend
This adds the SOCKHASH map type to bpftools so that we get correct pretty printing. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/bpf/bpftool/map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index a6cdb64..4

[PATCH bpf-next v3 2/4] bpf: sockmap, add hash map support

2018-04-28 Thread John Fastabend
may want to use the 5-tuple of the socket as the lookup key. To support this add hash support. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include/linux/bpf.h | 8 + include/linux/bpf_types.h | 1 + include/uapi/linux/bpf.h | 6 +- kernel/bpf/core.c

[PATCH bpf-next v3 0/4] Hash support for sock

2018-04-28 Thread John Fastabend
and provide only diffs +/- on that. John Fastabend (4): bpf: sockmap, refactor sockmap routines to work with hashmap bpf: sockmap, add hash map support bpf: bpftool, support for sockhash bpf: selftest additions for SOCKHASH include/linux/bpf.h| 8 + include/linux

[PATCH bpf-next v3 1/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-04-28 Thread John Fastabend
. This avoids storing the key in the metadata which will be useful when keys can be longer than 4 bytes. We rename the sk pointers to sk_redir at this point as well to avoid any confusion between the current sk pointer and the redirect pointer sk_redir. Signed-off-by: John Fastabend

[bpf-next PATCH v2 2/3] bpf: sockmap, add hash map support

2018-04-27 Thread John Fastabend
may want to use the 5-tuple of the socket as the lookup key. To support this add hash support. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include/linux/bpf.h|8 + include/linux/bpf_types.h |1 include/uapi/linux/bpf.h |6 kernel/bpf/

[bpf-next PATCH v2 1/3] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-04-27 Thread John Fastabend
. This avoids storing the key in the metadata which will be useful when keys can be longer than 4 bytes. We rename the sk pointers to sk_redir at this point as well to avoid any confusion between the current sk pointer and the redirect pointer sk_redir. Signed-off-by: John Fastabend

[bpf-next PATCH v2 3/3] bpf: selftest additions for SOCKHASH

2018-04-27 Thread 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 type. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/t

[bpf-next PATCH v2 0/3] Hash support for sock

2018-04-27 Thread John Fastabend
something else tricky. To test this we duplicate all the sockmap testing except swap out the sockmap with a sockhash. v2: fix file stats and add v2 tag --- John Fastabend (3): bpf: sockmap, refactor sockmap routines to work with hashmap bpf: sockmap, add hash map support bpf: selftest

[bpf-next PATCH 0/3] Hash support for sock

2018-04-27 Thread John Fastabend
type which reuses almost all the sockmap code except it needed a few special add/remove handlers. To test this we duplicate all the sockmap testing except swap out the sockmap with a sockhash. --- John Fastabend (3): bpf: sockmap, refactor sockmap routines to work with hashmap bpf

Re: [bpf-next PATCH 0/3] Hash support for sock

2018-04-27 Thread John Fastabend
On 04/27/2018 03:54 PM, Alexei Starovoitov wrote: > On Fri, Apr 27, 2018 at 10:51 PM, John Fastabend > <john.fastab...@gmail.com> wrote: >> In the original sockmap implementation we got away with using an >> array similar to devmap. However, unlike devmap where an i

[bpf-next PATCH 0/3] Hash support for sock

2018-04-27 Thread John Fastabend
type which reuses almost all the sockmap code except it needed a few special add/remove handlers. To test this we duplicate all the sockmap testing except swap out the sockmap with a sockhash. --- John Fastabend (3): bpf: sockmap, refactor sockmap routines to work with hashmap bpf

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

2018-04-27 Thread 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 type. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/t

[bpf-next PATCH 2/3] bpf: sockmap, add hash map support

2018-04-27 Thread John Fastabend
may want to use the 5-tuple of the socket as the lookup key. To support this add hash support. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/bpf/bpftool/map.c|1 + tools/include/uapi/linux/bpf.h |6 +- 2 files changed, 6 insertions(+), 1 deletion(-)

[bpf-next PATCH 1/3] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-04-27 Thread John Fastabend
. This avoids storing the key in the metadata which will be useful when keys can be longer than 4 bytes. We rename the sk pointers to sk_redir at this point as well to avoid any confusion between the current sk pointer and the redirect pointer sk_redir. Signed-off-by: John Fastabend

Re: [dm-devel] [PATCH v5] fault-injection: introduce kvmalloc fallback options

2018-04-26 Thread John Stoffel
, he won't even know that such an option exists. James> I may be an atypical developer but I'd rather have a root canal James> than browse through menuconfig options. The way to get people James> to learn about new debugging options is to blog about it (or James> write an lwn.net article) which google will find the next time James> I ask it how I debug XXX. Google (probably as a service to James> humanity) rarely turns up Kconfig options in response to a James> query. I agree with James here. Looking at the SLAB vs SLUB Kconfig entries tells me *nothing* about why I should pick one or the other, as an example. John

[bpf PATCH] bpf: fix uninitialized variable in bpf tools

2018-04-25 Thread John Fastabend
if (matches(subcmd, "pcap") == 0) { Fixes: fd981e3c321a "filter: bpf_dbg: add minimal bpf debugger" Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/bpf/bpf_dbg.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/bpf/bpf_dbg.c b

[bpf PATCH v2] bpf: fix for lex/yacc build error with gcc-5

2018-04-25 Thread John Fastabend
Fix build error found with Ubuntu shipped gcc-5 ~/git/bpf/tools/bpf$ make all Auto-detecting system features: ...libbfd: [ OFF ] ...disassembler-four-args: [ OFF ] CC bpf_jit_disasm.o LINK bpf_jit_disasm CC bpf_dbg.o /home/john/git/bpf/tools

[bpf PATCH] bpf: fix for lex/yacc build error with gcc-5

2018-04-25 Thread John Fastabend
~/git/bpf/tools/bpf$ make all Auto-detecting system features: ...libbfd: [ OFF ] ...disassembler-four-args: [ OFF ] CC bpf_jit_disasm.o LINK bpf_jit_disasm CC bpf_dbg.o /home/john/git/bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’: /home

Re: [PATCH net-next 4/4] nfp: flower: ignore duplicate cb requests for same rule

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 10:17 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski > <jakub.kicin...@netronome.com> wrote: >> From: John Hurley <john.hur...@netronome.com> >> >> If a flower rule has a r

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 10:13 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 12:02 PM, John Hurley <john.hur...@netronome.com> > wrote: >> On Wed, Apr 25, 2018 at 9:56 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: >>> On Wed, Apr 25,

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 9:56 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 11:51 AM, John Hurley <john.hur...@netronome.com> > wrote: >> On Wed, Apr 25, 2018 at 7:31 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: >>> On Wed,

Re: [PATCH net-next 3/4] nfp: flower: support offloading multiple rules with same cookie

2018-04-25 Thread John Hurley
On Wed, Apr 25, 2018 at 7:31 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 25, 2018 at 7:17 AM, Jakub Kicinski > <jakub.kicin...@netronome.com> wrote: >> From: John Hurley <john.hur...@netronome.com> >> >> When multiple netdevs are a

[bpf-next PATCH] bpf: reduce runtime of test_sockmap tests

2018-04-24 Thread John Fastabend
sts. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/testing/selftests/bpf/test_sockmap.c | 33 ++-- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_s

[bpf PATCH v3 3/3] bpf: sockmap, fix double page_put on ENOMEM error in redirect path

2018-04-23 Thread John Fastabend
configuration of the redirect scatterlist buffer below the sock memory check. Found this while running TCP_STREAM test with netperf using Cilium. Fixes: fa246693a111 ("bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com&

[bpf PATCH v3 1/3] bpf: sockmap, map_release does not hold refcnt for pinned maps

2018-04-23 Thread John Fastabend
. This patch moves the release logic into bpf_map_put_uref() and brings sockmap in-line with how a similar case is handled in prog array maps. Fixes: 3d9e952697de ("bpf: sockmap, fix leaking maps with attached but not detached progs") Signed-off-by: John Fastabend <john.fastab...@gmai

[bpf PATCH v3 0/3] BPF, a couple sockmap fixes

2018-04-23 Thread John Fastabend
page_put() while doing ingress redirects. See individual patches for more details. v2: Incorporated Daniel's feedback to use map ops for uref put op which also fixed the build error discovered in v1. v3: rename map_put_uref to map_release_uref --- John Fastabend (3): bpf: sockmap

[bpf PATCH v3 2/3] bpf: sockmap, sk_wait_event needed to handle blocking cases

2018-04-23 Thread John Fastabend
t;bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- 0 files changed diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index a73d484..aaf50ec 100644 --- a/kernel/bpf/sockmap.c +++ b/kernel/bpf/sockmap.

[bpf-next PATCH 2/4] bpf: sockmap, add a set of tests to run by default

2018-04-23 Thread John Fastabend
If no options are passed to sockmap after this patch we run a set of tests using various options and sendmsg/sendpage sizes. This replaces the sockmap_test.sh script. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_user.c

[bpf-next PATCH 3/4] bpf: sockmap, add selftests

2018-04-23 Thread John Fastabend
./test_sockmap and the result should be, Summary 660 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- tools/include/uapi/linux/bpf.h |1 tools/include/uapi/linux/if_link.h | 39 + tools/lib/bpf/li

[bpf-next PATCH 1/4] bpf: sockmap, code sockmap_test in C

2018-04-23 Thread John Fastabend
the sockmap code path. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_user.c | 209 ++-- 1 file changed, 113 insertions(+), 96 deletions(-) diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c

[bpf-next PATCH 4/4] bpf: sockmap, remove samples program

2018-04-23 Thread John Fastabend
The BPF sample sockmap is redundant now that equivelant tests exist in the BPF selftests. Lets remove this sample and only keep the selftest version that will be run as part of the selftest suite. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/Makefile

[bpf-next PATCH 0/4] selftests for BPF sockmap use cases

2018-04-23 Thread John Fastabend
fixes outstanding against bpf branch that can be detected occosionally by the automated tests here. https://patchwork.ozlabs.org/patch/903138/ https://patchwork.ozlabs.org/patch/903139/ https://patchwork.ozlabs.org/patch/903140/ --- John Fastabend (4): bpf: sockmap, code sockmap_test in C

[bpf PATCH 1/2] bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG

2018-04-23 Thread John Fastabend
that clang uses correct types the '-target bpf' option _must_ be specified. To make this clear add a note to the Documentation. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- 0 files changed diff --git a/Documentation/bpf/bpf_devel_QA.txt b/Documentation/bpf/bpf_devel_QA.txt index 1

[bpf PATCH 2/2] bpf: sockmap sample use clang flag, -target bpf

2018-04-23 Thread John Fastabend
bpf' Fixes: 69e8cc134bcb ("bpf: sockmap sample program") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/Makefile |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/sockmap/Makefile b/samples/sockmap/Makefile index

[bpf PATCH v2 3/3] bpf: sockmap, fix double page_put on ENOMEM error in redirect path

2018-04-23 Thread John Fastabend
configuration of the redirect scatterlist buffer below the sock memory check. Found this while running TCP_STREAM test with netperf using Cilium. Fixes: fa246693a111 ("bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com

[bpf PATCH v2 1/3] bpf: sockmap, map_release does not hold refcnt for pinned maps

2018-04-23 Thread John Fastabend
. This patch moves the release logic into bpf_map_put_uref() and brings sockmap in-line with how a similar case is handled in prog array maps. Fixes: 3d9e952697de ("bpf: sockmap, fix leaking maps with attached but not detached progs") Signed-off-by: John Fastabend <john.fastab

[bpf PATCH v2 2/3] bpf: sockmap, sk_wait_event needed to handle blocking cases

2018-04-23 Thread John Fastabend
t;bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- kernel/bpf/sockmap.c | 44 1 file changed, 44 insertions(+) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf

[bpf PATCH v2 0/3] BPF, a couple sockmap fixes

2018-04-23 Thread John Fastabend
page_put() while doing ingress redirects. See individual patches for more details. v2: Incorporated Daniel's feedback to use map ops for uref put op which also fixed the build error discovered in v1. --- John Fastabend (3): bpf: sockmap, map_release does not hold refcnt for pinned maps

[PATCH] Bluetooth: use wait_event API instead of open-coding it

2018-04-19 Thread John Keeping
by schedule_timeout() is the same as the original timeout (HCI_INIT_TIMEOUT on a system with HZ=1000). Use wait_event_interruptible_timeout() instead of open-coding similar behaviour which is subject to the spurious failure described above. Signed-off-by: John Keeping <j...@metanate.com> --- I saw pr

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 7:18 PM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Wed, Apr 18, 2018 at 3:31 PM, John Hurley <john.hur...@netronome.com> > wrote: >> On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: >>> On Fri,

Re: [net PATCH v2] net: sched, fix OOO packets with pfifo_fast

2018-04-18 Thread John Fastabend
On 04/18/2018 12:28 AM, Paolo Abeni wrote: > Hi, > > let me revive this old thread... > > On Mon, 2018-03-26 at 11:16 -0700, John Fastabend wrote: >> On 03/26/2018 10:30 AM, Cong Wang wrote: >>> On Sat, Mar 24, 2018 at 10:25 PM, John Fastabend >>> <j

Re: [PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2018-04-18 Thread John Hurley
On Wed, Apr 18, 2018 at 8:43 AM, Or Gerlitz <gerlitz...@gmail.com> wrote: > On Fri, Nov 17, 2017 at 4:06 AM, Jakub Kicinski > <jakub.kicin...@netronome.com> wrote: >> From: John Hurley <john.hur...@netronome.com> >> >> Pass information to th

Re: [PATCH v3 1/9] net: phy: new Asix Electronics PHY driver

2018-04-18 Thread John Paul Adrian Glaubitz
et succed. ^^ typo -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

Re: [PATCH v2 3/8] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread John Paul Adrian Glaubitz
t from scratch. I guess you'll have to re-import then, sorry :(. The correct mail address is: Michael Karcher <ker...@mkarcher.dialup.fu-berlin.de> which Michael uses for all his kernel work. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `.

Re: [PATCH v2 3/8] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread John Paul Adrian Glaubitz
On 04/17/2018 04:08 AM, Michael Schmitz wrote: From: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> This should be: From: Michael Karcher <deb...@mkarcher.dialup.fu-berlin.de> -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `

Re: [PATCH v2 6/8] net: ax88796: set IRQF_SHARED flag when IRQ resource is marked as shareable

2018-04-17 Thread John Paul Adrian Glaubitz
On 04/17/2018 04:08 AM, Michael Schmitz wrote: From: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> This should be: From: Michael Karcher <deb...@mkarcher.dialup.fu-berlin.de> -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `

Re: [ethtool] ethtool: Add register dump support for MICROCHIP LAN78xx

2018-04-16 Thread John W. Linville
-by: Raghuram Chary J <raghuramchary.jallipa...@microchip.com> LGTM -- queued for next release... John -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready.

ethtool 4.16 released

2018-04-13 Thread John W. Linville
for the ring_cookie parameter * Feature: Add SFF 8636 date code parsing support John -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready.

[bpf PATCH 3/3] bpf: sockmap, fix double put_page on ENOMEM error in redirect path

2018-04-11 Thread John Fastabend
configuration of the redirect scatterlist buffer below the sock memory check. Found this while running TCP_STREAM test with netperf using Cilium. Fixes: fa246693a111 ("bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com

[bpf PATCH 1/3] bpf: sockmap, map_release does not hold refcnt for pinned maps

2018-04-11 Thread John Fastabend
. This patch moves the release logic into bpf_map_put_uref() and brings sockmap in-line with how a similar case is handled in prog array maps. Fixes: 3d9e952697de ("bpf: sockmap, fix leaking maps with attached but not detached progs") Signed-off-by: John Fastabend <john.fastab

[bpf PATCH 0/3] BPF, a couple sockmap fixes

2018-04-11 Thread John Fastabend
page_put() while doing ingress redirects. See individual patches for more details. Thanks, John --- John Fastabend (3): bpf: sockmap, map_release does not hold refcnt for pinned maps bpf: sockmap, sk_wait_event needed to handle blocking cases bpf: sockmap, fix double put_page

[bpf PATCH 2/3] bpf: sockmap, sk_wait_event needed to handle blocking cases

2018-04-11 Thread John Fastabend
t;bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- kernel/bpf/sockmap.c | 45 + 1 file changed, 45 insertions(+) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf

Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel

2018-04-03 Thread John Fastabend
On 04/03/2018 08:07 AM, David Ahern wrote: > On 4/2/18 12:16 PM, Alexei Starovoitov wrote: >> On Mon, Apr 02, 2018 at 12:09:44PM -0600, David Ahern wrote: >>> On 4/2/18 12:03 PM, John Fastabend wrote: >>>> >>>> Can the above be a normal BPF helper th

Re: [bpf-next PATCH 1/2] bpf: sockmap, free memory on sock close with cork data

2018-04-02 Thread John Fastabend
On 04/02/2018 12:50 PM, John Fastabend wrote: > If a socket with pending cork data is closed we do not return the > memory to the socket until the garbage collector free's the psock > structure. The garbage collector though can run after the sock has > completed its clo

[bpf-next PATCH 2/2] bpf: sockmap, duplicates release calls may NULL sk_prot

2018-04-02 Thread John Fastabend
. This patch resolves this by ensuring we only reset the sk_prot pointer if we have a valid saved state to set. Fixes: 4f738adba30a7 ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- kernel/bpf/

[bpf-next PATCH 1/2] bpf: sockmap, free memory on sock close with cork data

2018-04-02 Thread John Fastabend
because there is still outstanding memory accounted to the sock. To resolve this ensure we return memory to the sock when a socket is closed. Signed-off-by: John Fastabend <john.fastab...@gmail.com> Fixes: 91843d540a13 ("bpf: sockmap, add msg_cork_bytes() helper") --- kernel/bpf/

Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel

2018-04-02 Thread John Fastabend
f > + Can the above be a normal BPF helper that returns an ifindex? Then something roughly like this patter would work for all drivers with redirect support, route_ifindex = ip_route_lookup(__daddr, ) if (!route_ifindex) return do_foo() return xdp_redirect(route_ifindex); So my suggestion is, 1. enable veth xdp (including redirect support) 2. add a helper to lookup route from routing table Alternatively you can skip step (2) and encode the routing table in BPF directly. Maybe we need a more efficient data structure but that should also work. Thanks, John

Re: [bpf-next PATCH 4/4] bpf: sockmap, add hash map support

2018-04-02 Thread John Fastabend
On 04/02/2018 08:54 AM, Alexei Starovoitov wrote: > On Sun, Apr 01, 2018 at 08:01:10AM -0700, John Fastabend wrote: >> Sockmap is currently backed by an array and enforces keys to be >> four bytes. This works well for many use cases and was originally >> modeled after devmap

[bpf-next PATCH 3/4] bpf: sockmap, refactor sockmap routines to work with hashmap

2018-04-01 Thread John Fastabend
. This avoids storing the key in the metadata which will be useful when keys can be longer than 4 bytes. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include/linux/filter.h |3 - include/net/tcp.h |3 - kernel/bpf/sockmap.c

[bpf-next PATCH 2/4] bpf: sockmap, duplicates release calls may NULL sk_prot

2018-04-01 Thread John Fastabend
. This patch resolves this by ensuring we only reset the sk_prot pointer if we have a valid saved state to set. Fixes: 4f738adba30a7 ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- kernel/bpf/

[bpf-next PATCH 4/4] bpf: sockmap, add hash map support

2018-04-01 Thread John Fastabend
may want to use the 5-tuple of the socket as the lookup key. To support this add hash support. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include/linux/bpf.h |8 include/linux/bpf_types.h |1 include/uapi/linux

[bpf-next PATCH 1/4] bpf: sockmap, free memory on sock close with cork data

2018-04-01 Thread John Fastabend
because there is still outstanding memory accounted to the sock. To resolve this ensure we return memory to the sock when a socket is closed. Signed-off-by: John Fastabend <john.fastab...@gmail.com> Fixes: 91843d540a13 ("bpf: sockmap, add msg_cork_bytes() helper") --- kernel/bpf/

[bpf-next PATCH 0/4] Sockmap Updates

2018-04-01 Thread John Fastabend
to be extended to support multiple programs in as single file with different types. --- John Fastabend (4): bpf: sockmap, free memory on sock close with cork data bpf: sockmap, duplicates release calls may NULL sk_prot bpf: sockmap, refactor sockmap routines to work with hashmap bpf

[PATCH net] ibmvnic: Disable irqs before exiting reset from closed state

2018-03-30 Thread John Allen
the irqs from being enabled twice in this case and reporting a number of noisy warning traces. Signed-off-by: John Allen <jal...@linux.vnet.ibm.com> --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 0389a7a..b492af6 100644 --- a/drivers/net/ethern

Re: [PATCH v2 bpf-next 1/2] lib/scatterlist: add sg_init_marker() helper

2018-03-29 Thread John Fastabend
hen scatterlist is embedded inside other struct and that > container struct is zeroed out > > Suggested-by: Daniel Borkmann <dan...@iogearbox.net> > Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> > --- Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH v2 bpf-next 0/2] sockmap: fix sg api usage

2018-03-29 Thread John Fastabend
: > - Patch1 adds new helper function in sg api. sg_init_marker() > - Patch2 sg_init_marker() and sg_init_table() in appropriate places > > Backgroud: > While reviewing v1, John Fastabend raised a valid point about > unnecessary memset in sg_init_table() because sockmap use

Re: [PATCH v2 bpf-next 2/2] bpf: sockmap: initialize sg table entries properly

2018-03-29 Thread John Fastabend
_marker > - In bpf_tcp_push: Replace memset with sg_init_table where consumed > sg entry needs to be re-initialized. > > Signed-off-by: Prashant Bhole <bhole_prashant...@lab.ntt.co.jp> > --- > kernel/bpf/sockmap.c | 13 - > 1 file changed, 8 insertio

Re: [PATCH ethtool] ethtool: don't fall back to grxfhindir when context was specified

2018-03-29 Thread John W. Linville
ethtool: add support for extra RSS contexts and RSS > steering filters") > Signed-off-by: Edward Cree <ec...@solarflare.com> LGTM -- queued for next release... Thanks, John -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready.

[bpf-next PATCH v3 4/4] bpf: sockmap, more BPF_SK_SKB_STREAM_VERDICT tests

2018-03-28 Thread John Fastabend
Add BPF_SK_SKB_STREAM_VERDICT tests for ingress hook. While we do this also bring stream tests in-line with MSG based testing. A map for skb options is added for userland to push options at BPF programs. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_

[bpf-next PATCH v3 3/4] bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT:

2018-03-28 Thread John Fastabend
Add support for the BPF_F_INGRESS flag in skb redirect helper. To do this convert skb into a scatterlist and push into ingress queue. This is the same logic that is used in the sk_msg redirect helper so it should feel familiar. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- i

[bpf-next PATCH v3 2/4] bpf: sockmap, add BPF_F_INGRESS tests

2018-03-28 Thread John Fastabend
Add a set of tests to verify ingress flag in redirect helpers works correctly with various msg sizes. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_kern.c | 41 +-- samples/sockmap/sockmap_test.sh

[bpf-next PATCH v3 0/4] bpf, sockmap BPF_F_INGRESS support

2018-03-28 Thread John Fastabend
mem_uncharge in recvmsg op moved receive_queue check outside of RCU region --- John Fastabend (4): bpf: sockmap redirect ingress support bpf: sockmap, add BPF_F_INGRESS tests bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT: bpf: sockmap, more

[bpf-next PATCH v3 1/4] bpf: sockmap redirect ingress support

2018-03-28 Thread John Fastabend
to write side) so that we have a way to wake up polling socks when a scatterlist is redirected to that sock. After this all that is needed is for the redirect helper to push the scatterlist into the psock receive queue. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include

Re: [bpf-next PATCH v2 3/4] bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT:

2018-03-28 Thread John Fastabend
On 03/28/2018 07:21 AM, Daniel Borkmann wrote: > On 03/27/2018 07:23 PM, John Fastabend wrote: >> Add support for the BPF_F_INGRESS flag in skb redirect helper. To >> do this convert skb into a scatterlist and push into ingress queue. >> This is the same logic that is used i

[bpf-next PATCH v2 3/4] bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT:

2018-03-27 Thread John Fastabend
Add support for the BPF_F_INGRESS flag in skb redirect helper. To do this convert skb into a scatterlist and push into ingress queue. This is the same logic that is used in the sk_msg redirect helper so it should feel familiar. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- i

[bpf-next PATCH v2 4/4] bpf: sockmap, more BPF_SK_SKB_STREAM_VERDICT tests

2018-03-27 Thread John Fastabend
Add BPF_SK_SKB_STREAM_VERDICT tests for ingress hook. While we do this also bring stream tests in-line with MSG based testing. A map for skb options is added for userland to push options at BPF programs. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_

[bpf-next PATCH v2 0/4] bpf, sockmap BPF_F_INGRESS support

2018-03-27 Thread John Fastabend
and four add tests for the corresponding ingress redirect hooks. Follow on patches can address busy polling support, but next series from me will move the sockmap sample program into selftests. v2: added static to function definition caught by kbuild bot --- John Fastabend (4): bpf

[bpf-next PATCH v2 2/4] bpf: sockmap, add BPF_F_INGRESS tests

2018-03-27 Thread John Fastabend
Add a set of tests to verify ingress flag in redirect helpers works correctly with various msg sizes. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_kern.c | 41 +-- samples/sockmap/sockmap_test.sh

[bpf-next PATCH v2 1/4] bpf: sockmap redirect ingress support

2018-03-27 Thread John Fastabend
to write side) so that we have a way to wake up polling socks when a scatterlist is redirected to that sock. After this all that is needed is for the redirect helper to push the scatterlist into the psock receive queue. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include

Re: [bpf-next PATCH] net: br_vlan build error

2018-03-27 Thread John Fastabend
On 03/27/2018 08:49 AM, Nikolay Aleksandrov wrote: > On 27/03/18 18:38, John Fastabend wrote: >> Fix build error in br_if.c >> >> net/bridge/br_if.c: In function ‘br_mtu’: >> net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member >> named ‘vlan_e

Re: [bpf-next PATCH] net: br_vlan build error

2018-03-27 Thread John Fastabend
On 03/27/2018 08:38 AM, John Fastabend wrote: > Fix build error in br_if.c > > net/bridge/br_if.c: In function ‘br_mtu’: > net/bridge/br_if.c:458:8: error: ‘const struct net_bridge’ has no member > named ‘vlan_enabled’ > if (br->vlan_enabled) > ^ > net/br

[bpf-next PATCH] net: br_vlan build error

2018-03-27 Thread John Fastabend
ype] } ^ Fixes: 419d14af9e07f ("bridge: Allow max MTU when multiple VLANs present") Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- net/bridge/br_if.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_if.c b

Re: [PATCH bpf-next] bpf: sockmap: initialize sg table entries properly

2018-03-26 Thread John Fastabend
_page(page); > m->sg_copy[m->sg_end] = true; > Nice, catch. I probably should audit though code paths as well and run the test suite with CONFIG_DEBUG_SG. There might be a couple other spots where I open coded the sg elements. Thanks, John

Re: [net PATCH v2] net: sched, fix OOO packets with pfifo_fast

2018-03-26 Thread John Fastabend
On 03/26/2018 10:30 AM, Cong Wang wrote: > On Sat, Mar 24, 2018 at 10:25 PM, John Fastabend > <john.fastab...@gmail.com> wrote: >> After the qdisc lock was dropped in pfifo_fast we allow multiple >> enqueue threads and dequeue threads to run in parallel. On the >> enq

[bpf-next PATCH 4/4] bpf: sockmap, more BPF_SK_SKB_STREAM_VERDICT tests

2018-03-26 Thread John Fastabend
Add BPF_SK_SKB_STREAM_VERDICT tests for ingress hook. While we do this also bring stream tests in-line with MSG based testing. A map for skb options is added for userland to push options at BPF programs. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_

[bpf-next PATCH 0/4] bpf, sockmap BPF_F_INGRESS support

2018-03-26 Thread John Fastabend
and four add tests for the corresponding ingress redirect hooks. Follow on patches can address busy polling support, but next series from me will move the sockmap sample program into selftests. Thanks, John --- John Fastabend (4): bpf: sockmap redirect ingress support bpf: sockmap

[bpf-next PATCH 3/4] bpf: sockmap, BPF_F_INGRESS flag for BPF_SK_SKB_STREAM_VERDICT:

2018-03-26 Thread John Fastabend
Add support for the BPF_F_INGRESS flag in skb redirect helper. To do this convert skb into a scatterlist and push into ingress queue. This is the same logic that is used in the sk_msg redirect helper so it should feel familiar. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- i

[bpf-next PATCH 2/4] bpf: sockmap, add BPF_F_INGRESS tests

2018-03-26 Thread John Fastabend
Add a set of tests to verify ingress flag in redirect helpers works correctly with various msg sizes. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- samples/sockmap/sockmap_kern.c | 41 +-- samples/sockmap/sockmap_test.sh

[bpf-next PATCH 1/4] bpf: sockmap redirect ingress support

2018-03-26 Thread John Fastabend
to write side) so that we have a way to wake up polling socks when a scatterlist is redirected to that sock. After this all that is needed is for the redirect helper to push the scatterlist into the psock receive queue. Signed-off-by: John Fastabend <john.fastab...@gmail.com> --- include

Re: [net PATCH v2] net: sched, fix OOO packets with pfifo_fast

2018-03-26 Thread John Fastabend
On 03/26/2018 09:36 AM, David Miller wrote: > From: John Fastabend <john.fastab...@gmail.com> > Date: Sat, 24 Mar 2018 22:25:06 -0700 > >> After the qdisc lock was dropped in pfifo_fast we allow multiple >> enqueue threads and dequeue threads to run in parallel. On the

[net PATCH v2] net: sched, fix OOO packets with pfifo_fast

2018-03-24 Thread John Fastabend
NICs we can still have a dequeue in-flight per qdisc, which is typically per CPU. Fixes: c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array") Reported-by: Jakob Unterwurzacher <jakob.unterwurzac...@theobroma-systems.com> Signed-off-by: John Fastabend <john.fastab...@gmail.co

Re: [net PATCH] net: sched, fix OOO packets with pfifo_fast

2018-03-24 Thread John Fastabend
On 03/24/2018 02:15 PM, Eric Dumazet wrote: > > > On 03/24/2018 01:13 PM, John Fastabend wrote: >> After the qdisc lock was dropped in pfifo_fast we allow multiple >> enqueue threads and dequeue threads to run in parallel. On the >> enqueue side the skb bit ooo_okay is

[net PATCH] net: sched, fix OOO packets with pfifo_fast

2018-03-24 Thread John Fastabend
NICs we can still have a dequeue in-flight per qdisc, which is typically per CPU. Fixes: c5ad119fb6c0 ("net: sched: pfifo_fast use skb_array") Reported-by: Jakob Unterwurzacher <jakob.unterwurzac...@theobroma-systems.com> Signed-off-by: John Fastabend <john.fastab...@gmail.co

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-24 Thread John Fastabend
On 03/22/2018 03:16 AM, Jakob Unterwurzacher wrote: > On 21.03.18 21:52, John Fastabend wrote: >> Can you try this, >> >> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h >> index d4907b5..1e596bd 100644 >> --- a/include/net/sch_generic.h &

<    1   2   3   4   5   6   7   8   9   10   >