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
>>>>> "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
>>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes:
Mikulas> On Thu, 26 Apr 2018, John Stoffel wrote:
>> >>>>> "James" == James Bottomley <james.bottom...@hansenpartnership.com>
>> >>>>> wr
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
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
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
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
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
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
. 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
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/
. 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
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
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
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
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
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
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
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(-)
. 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
, 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
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
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
~/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
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
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,
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,
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
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
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&
.
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
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
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.
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
./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
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
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
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
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'
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
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
.
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
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
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
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
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,
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
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
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
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
`.
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
`
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
`
-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.
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.
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
.
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
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
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
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
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
.
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/
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/
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
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
. 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
.
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/
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
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/
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
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
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>
:
> - 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
_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
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.
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_
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
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
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
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
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
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
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_
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
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
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
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
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
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
_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
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
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_
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
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
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
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
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
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
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
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
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
&
301 - 400 of 2993 matches
Mail list logo