Re: [bpf-next PATCH 0/5] bpf, doc: convert Documentation/bpf to RST-formatting

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 6:42 AM, Jesper Dangaard Brouer wrote: > The kernel is moving files under Documentation to use the RST > (reStructuredText) format and Sphinx [1]. This patchset converts the > files under Documentation/bpf/ into RST format. The Sphinx > integration is

Re: [PATCH bpf-next v2 0/5] samples: bpf: fix build after move to full libbpf

2018-05-14 Thread Alexei Starovoitov
On Mon, May 14, 2018 at 10:35:01PM -0700, Jakub Kicinski wrote: > Hi! > > Following patches address build issues after recent move to libbpf. > For out-of-tree builds we would see the following error: > > gcc: error: samples/bpf/../../tools/lib/bpf/libbpf.a: No such file or > directory > >

Re: [PATCH RFC net-next 0/7] net/ipv6: Fix route append and replace use cases

2018-05-14 Thread David Ahern
On 5/14/18 11:21 PM, Tobin C. Harding wrote: > Hi David, > > On Mon, May 14, 2018 at 07:51:05PM -0700, David Ahern wrote: >> This patch set fixes a few append and replace uses cases for IPv6 and >> adds test cases that codifies the expectations of how append and replace >> are expected to work. >

[PATCH bpf-next v2 4/5] samples: bpf: move libbpf from object dependencies to libs

2018-05-14 Thread Jakub Kicinski
Make complains that it doesn't know how to make libbpf.a: scripts/Makefile.host:106: target 'samples/bpf/../../tools/lib/bpf/libbpf.a' doesn't match the target pattern Now that we have it as a dependency of the sources simply add libbpf.a to libraries not objects. Signed-off-by: Jakub Kicinski

[PATCH bpf-next v2 2/5] samples: bpf: rename libbpf.h to bpf_insn.h

2018-05-14 Thread Jakub Kicinski
The libbpf.h file in samples is clashing with libbpf's header. Since it only includes a subset of filter.h instruction helpers rename it to bpf_insn.h. Drop the unnecessary include of bpf/bpf.h. Signed-off-by: Jakub Kicinski Acked-by: Jesper Dangaard Brouer

Re: [PATCH v1 4/4] samples/bpf: an example of a raw IR decoder

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 2:11 PM, Sean Young wrote: > This implements the grundig-16 IR protocol. > > Signed-off-by: Sean Young > --- > samples/bpf/Makefile | 4 + > samples/bpf/bpf_load.c| 9 +- >

[PATCH bpf-next v2 3/5] samples: bpf: fix build after move to compiling full libbpf.a

2018-05-14 Thread Jakub Kicinski
There are many ways users may compile samples, some of them got broken by commit 5f9380572b4b ("samples: bpf: compile and link against full libbpf"). Improve path resolution and make libbpf building a dependency of source files to force its build. Samples should now again build with any of: cd

[PATCH bpf-next v2 1/5] samples: bpf: include bpf/bpf.h instead of local libbpf.h

2018-05-14 Thread Jakub Kicinski
There are two files in the tree called libbpf.h which is becoming problematic. Most samples don't actually need the local libbpf.h they simply include it to get to bpf/bpf.h. Include bpf/bpf.h directly instead. Signed-off-by: Jakub Kicinski Acked-by: Jesper

[PATCH bpf-next v2 5/5] samples: bpf: make the build less noisy

2018-05-14 Thread Jakub Kicinski
Building samples with clang ignores the $(Q) setting, always printing full command to the output. Make it less verbose. Signed-off-by: Jakub Kicinski --- samples/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH bpf-next v2 0/5] samples: bpf: fix build after move to full libbpf

2018-05-14 Thread Jakub Kicinski
Hi! Following patches address build issues after recent move to libbpf. For out-of-tree builds we would see the following error: gcc: error: samples/bpf/../../tools/lib/bpf/libbpf.a: No such file or directory libbpf build system is now always invoked explicitly rather than relying on building

Re: [PATCH net-next] erspan: set bso bit based on mirrored packet's len

2018-05-14 Thread Tobin C. Harding
On Mon, May 14, 2018 at 04:54:36PM -0700, William Tu wrote: > Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not > handled. BSO has 4 possible values: > 00 --> Good frame with no error, or unknown integrity > 11 --> Payload is a Bad Frame with CRC or Alignment Error > 01 -->

Re: [PATCH net-next] sched: cls: enable verbose logging

2018-05-14 Thread Cong Wang
On Mon, May 14, 2018 at 1:47 PM, Marcelo Ricardo Leitner wrote: > On Mon, May 14, 2018 at 01:30:53PM -0700, Cong Wang wrote: >> On Sun, May 13, 2018 at 1:44 PM, Marcelo Ricardo Leitner >> wrote: >> > Currently, when the rule is not to be

Re: [PATCH v1 3/4] media: rc bpf: move ir_raw_event to uapi

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 2:11 PM, Sean Young wrote: > The context provided to a BPF_PROG_RAWIR_DECODER is a struct ir_raw_event; > ensure user space has a a definition. > > Signed-off-by: Sean Young > --- > include/media/rc-core.h| 19 +-- >

Re: [PATCH v1 2/4] media: bpf: allow raw IR decoder bpf programs to be used

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 2:10 PM, Sean Young wrote: > This implements attaching, detaching, querying and execution. The target > fd has to be the /dev/lircN device. > > Signed-off-by: Sean Young > --- > drivers/media/rc/ir-bpf-decoder.c | 191

Re: [PATCH RFC net-next 0/7] net/ipv6: Fix route append and replace use cases

2018-05-14 Thread Tobin C. Harding
Hi David, On Mon, May 14, 2018 at 07:51:05PM -0700, David Ahern wrote: > This patch set fixes a few append and replace uses cases for IPv6 and > adds test cases that codifies the expectations of how append and replace > are expected to work. Nood question: what commit does this apply on top of

Re: possible deadlock in sk_diag_fill

2018-05-14 Thread Dmitry Vyukov
On Mon, May 14, 2018 at 8:00 PM, Andrei Vagin wrote: >> >> Hello, >> >> >> >> syzbot found the following crash on: >> >> >> >> HEAD commit:c1c07416cdd4 Merge tag 'kbuild-fixes-v4.17' of >> >> git://git.k.. >> >> git tree: upstream >> >> console output:

Re: [PATCH v1 1/4] media: rc: introduce BPF_PROG_IR_DECODER

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 2:10 PM, Sean Young wrote: > Add support for BPF_PROG_IR_DECODER. This type of BPF program can call > rc_keydown() to reported decoded IR scancodes, or rc_repeat() to report > that the last key should be repeated. > > Signed-off-by: Sean Young

Re: [PATCH net-next 2/3] net: qualcomm: rmnet: Add support for ethtool private stats

2018-05-14 Thread kbuild test robot
Hi Subash, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Subash-Abhinov-Kasiviswanathan/net-qualcomm-rmnet-Updates-2018-05-14/20180515-115355 config: i386-allmodconfig (attached as .config)

[PATCH net] tcp: purge write queue in tcp_connect_init()

2018-05-14 Thread Eric Dumazet
syzkaller found a reliable way to crash the host, hitting a BUG() in __tcp_retransmit_skb() Malicous MSG_FASTOPEN is the root cause. We need to purge write queue in tcp_connect_init() at the point we init snd_una/write_seq. This patch also replaces the BUG() by a less intrusive WARN_ON_ONCE()

Re: [PATCH iproute2] ip: do not drop capabilities if net_admin=i is set

2018-05-14 Thread Stephen Hemminger
On Fri, 11 May 2018 13:39:56 +0100 Luca Boccassi wrote: > Users have reported a regression due to ip now dropping capabilities > unconditionally. > zerotier-one VPN and VirtualBox use ambient capabilities in their > binary and then fork out to ip to set routes and links, and

mounting NFS on the same host leads to D state

2018-05-14 Thread maowenan
Hi, Recently I have tested NFS and exportfs scenario, that NFS server and client are in the same host. And I found mounting NFS filesystm onto the same host can lead to rpc.mountd and related task become D state. My kernel version is based on 3.10, and I find 4.15 has the same appearance. My

Re: [RFC v2 bpf-next 8/9] bpf: Provide helper to do lookups in kernel FIB table

2018-05-14 Thread David Ahern
On 4/29/18 7:13 PM, David Ahern wrote: > > The idea here is to fast pass packets that fit a supported profile and > are to be forwarded. Everything else should continue up the stack as it > has wider capabilities. The helper and XDP programs should make no > assumptions on what the broader kernel

Re: [PATCH] lib/rhashtable: reorder some inititalization sequences

2018-05-14 Thread Herbert Xu
On Mon, May 14, 2018 at 10:52:13PM -0400, David Miller wrote: > From: Davidlohr Bueso > Date: Mon, 14 May 2018 08:13:32 -0700 > > > rhashtable_init() allocates memory at the very end of the > > call, once everything is setup; with the exception of the > > nelems parameter.

Re: [PATCH ghak81 RFC V2 3/5] audit: use inline function to get audit context

2018-05-14 Thread Richard Guy Briggs
On 2018-05-14 23:05, Richard Guy Briggs wrote: > On 2018-05-14 17:44, Paul Moore wrote: > > On Sat, May 12, 2018 at 9:58 PM, Richard Guy Briggs wrote: > > > Recognizing that the audit context is an internal audit value, use an > > > access function to retrieve the audit context

Re: [RFC bpf-next 11/11] Documentation: Describe bpf reference tracking

2018-05-14 Thread Alexei Starovoitov
On Wed, May 09, 2018 at 02:07:09PM -0700, Joe Stringer wrote: > Signed-off-by: Joe Stringer > --- > Documentation/networking/filter.txt | 64 > + > 1 file changed, 64 insertions(+) > > diff --git a/Documentation/networking/filter.txt >

Re: [RFC bpf-next 07/11] bpf: Add helper to retrieve socket in BPF

2018-05-14 Thread Alexei Starovoitov
On Fri, May 11, 2018 at 05:54:33PM -0700, Joe Stringer wrote: > On 11 May 2018 at 14:41, Martin KaFai Lau wrote: > > On Fri, May 11, 2018 at 02:08:01PM -0700, Joe Stringer wrote: > >> On 10 May 2018 at 22:00, Martin KaFai Lau wrote: > >> > On Wed, May 09, 2018 at

Re: [PATCH net-next v3 0/3] sctp: Introduce sctp_flush_ctx

2018-05-14 Thread David Miller
From: Marcelo Ricardo Leitner Date: Mon, 14 May 2018 14:35:17 -0300 > This struct will hold all the context used during the outq flush, so we > don't have to pass lots of pointers all around. > > Checked on x86_64, the compiler inlines all these functions and there is

Re: [PATCH ghak81 RFC V2 3/5] audit: use inline function to get audit context

2018-05-14 Thread Richard Guy Briggs
On 2018-05-14 17:44, Paul Moore wrote: > On Sat, May 12, 2018 at 9:58 PM, Richard Guy Briggs wrote: > > Recognizing that the audit context is an internal audit value, use an > > access function to retrieve the audit context pointer for the task > > rather than reaching directly

Re: [RFC bpf-next 06/11] bpf: Add reference tracking to verifier

2018-05-14 Thread Alexei Starovoitov
On Wed, May 09, 2018 at 02:07:04PM -0700, Joe Stringer wrote: > Allow helper functions to acquire a reference and return it into a > register. Specific pointer types such as the PTR_TO_SOCKET will > implicitly represent such a reference. The verifier must ensure that > these references are

Re: [PATCH net-next v3 0/8] sctp: refactor sctp_outq_flush

2018-05-14 Thread David Miller
From: Marcelo Ricardo Leitner Date: Mon, 14 May 2018 14:34:35 -0300 > Currently sctp_outq_flush does many different things and arguably > unrelated, such as doing transport selection and outq dequeueing. > > This patchset refactors it into smaller and more dedicated

Re: [PATCH] lib/rhashtable: reorder some inititalization sequences

2018-05-14 Thread David Miller
From: Davidlohr Bueso Date: Mon, 14 May 2018 08:13:32 -0700 > rhashtable_init() allocates memory at the very end of the > call, once everything is setup; with the exception of the > nelems parameter. However, unless the user is doing something > bogus with params for which

[PATCH RFC net-next 3/7] selftests: fib_tests: Add success-fail counts

2018-05-14 Thread David Ahern
As more tests are added, it is convenient to have a tally at the end. Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_tests.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/net/fib_tests.sh

[PATCH RFC net-next 5/7] selftests: fib_tests: Add option to pause after each test

2018-05-14 Thread David Ahern
Add option to pause after each test before cleanup is done. Allows user to do manual inspection or more ad-hoc testing after each test with the setup in tact. Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_tests.sh | 13 + 1 file changed, 13

[PATCH RFC net-next 2/7] net/ipv6: Simplify route replace and appending into multipath route

2018-05-14 Thread David Ahern
Remove rt6_qualify_for_ecmp which is just guess work. It fails in 2 cases: 1. can not replace a route with a reject route. Existing code appends a new route instead of replacing the existing one. 2. can not have a multipath route where a leg uses a dev only nexthop Existing use cases affected

[PATCH RFC net-next 6/7] selftests: fib_tests: Add ipv6 route add append replace tests

2018-05-14 Thread David Ahern
Add IPv6 route tests covering add, append and replace permutations. Assumes the ability to add a basic single path route works; this is required for example when adding an address to an interface. $ fib_tests.sh -t ipv6_rt IPv6 route add / append tests TEST: Attempt to add duplicate route -

[PATCH RFC net-next 0/7] net/ipv6: Fix route append and replace use cases

2018-05-14 Thread David Ahern
This patch set fixes a few append and replace uses cases for IPv6 and adds test cases that codifies the expectations of how append and replace are expected to work. In paricular it allows a multipath route to have a dev-only nexthop, something Thomas tried to accomplish with commit edd7ceb78296

[PATCH RFC net-next 1/7] mlxsw: spectrum_router: Add support for route append

2018-05-14 Thread David Ahern
Handle append for gateway based routes. Dev-only multipath routes will be handled by a follow on patch. Signed-off-by: Ido Schimmel Signed-off-by: David Ahern --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 ++ 1 file changed, 2

[PATCH RFC net-next 4/7] selftests: fib_tests: Add command line options

2018-05-14 Thread David Ahern
Add command line options for controlling pause on fail, controlling specific tests to run and verbose mode rather than relying on environment variables. Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_tests.sh | 53 1 file

[PATCH RFC net-next 7/7] selftests: fib_tests: Add ipv4 route add append replace tests

2018-05-14 Thread David Ahern
Add IPv4 route tests covering add, append and replace permutations. Assumes the ability to add a basic single path route works; this is required for example when adding an address to an interface. $ fib_tests.sh -t ipv4_rt IPv4 route add / append tests TEST: Attempt to add duplicate route -

Re: [PATCH net-next] cxgb4: add tc flower match support for tunnel VNI

2018-05-14 Thread David Miller
From: Ganesh Goudar Date: Mon, 14 May 2018 17:51:21 +0530 > From: Kumar Sanghvi > > Adds support for matching flows based on tunnel VNI value. > Introduces fw APIs for allocating/removing MPS entries related > to encapsulation. And uses the same while

Re: [PATCH net 2/2] vmxnet3: use DMA memory barriers where required

2018-05-14 Thread David Miller
From: Date: Mon, 14 May 2018 08:14:49 -0400 > The gen bits must be read first from (resp. written last to) DMA memory. > The proper way to enforce this on Linux is to call dma_rmb() (resp. > dma_wmb()). > > Signed-off-by: Regis Duchesne > Acked-by: Ronak

Re: [PATCH net 1/2] vmxnet3: set the DMA mask before the first DMA map operation

2018-05-14 Thread David Miller
From: Date: Mon, 14 May 2018 08:28:26 -0400 > The DMA mask must be set before, not after, the first DMA map operation, or > the first DMA map operation could in theory fail on some systems. > > Fixes: b0eb57cb97e78 ("VMXNET3: Add support for virtual IOMMU") > Signed-off-by:

Re: [PATCH net] cxgb4: Correct ntuple mask validation for hash filters

2018-05-14 Thread David Miller
From: Ganesh Goudar Date: Mon, 14 May 2018 16:27:34 +0530 > From: Kumar Sanghvi > > Earlier code of doing bitwise AND with field width bits was wrong. > Instead, simplify code to calculate ntuple_mask based on supplied > fields and then compare with

Re: [PATCH net-next] net: stmmac: Add Jose Abreu as co-maintainer

2018-05-14 Thread David Miller
From: Jose Abreu Date: Mon, 14 May 2018 10:29:56 +0100 > I'm offering to be a co-maintainer for stmmac driver. > > As per discussion with Alexandre, I will arranje to get STM32 boards to > test patches in GMAC version 3.x and 4.1. I also have HW to test GMAC > version

Re: [RFC bpf-next 04/11] bpf: Add PTR_TO_SOCKET verifier type

2018-05-14 Thread Alexei Starovoitov
On Wed, May 09, 2018 at 02:07:02PM -0700, Joe Stringer wrote: > Teach the verifier a little bit about a new type of pointer, a > PTR_TO_SOCKET. This pointer type is accessed from BPF through the > 'struct bpf_sock' structure. > > Signed-off-by: Joe Stringer > --- >

Re: [PATCH v1 2/4] media: bpf: allow raw IR decoder bpf programs to be used

2018-05-14 Thread kbuild test robot
Hi Sean, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc5] [cannot apply to next-20180514] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day

Re: [PATCH bpf-next v2 0/8] Minor follow-up cleanups in BPF JITs and optimized imm emission

2018-05-14 Thread Alexei Starovoitov
On Mon, May 14, 2018 at 11:22:26PM +0200, Daniel Borkmann wrote: > This series follows up mostly with with some minor cleanups on top > of 'Move ld_abs/ld_ind to native BPF' as well as implements better > 32/64 bit immediate load into register and saves tail call init on > cBPF for the arm64 JIT.

Re: [PATCH bpf-next v2 8/8] bpf: add ld64 imm test cases

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 2:22 PM, Daniel Borkmann wrote: > Add test cases where we combine semi-random imm values, mainly for testing > JITs when they have different encoding options for 64 bit immediates in > order to reduce resulting image size. > > Signed-off-by: Daniel

Re: [PATCH v1 3/4] media: rc bpf: move ir_raw_event to uapi

2018-05-14 Thread kbuild test robot
Hi Sean, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.17-rc5] [cannot apply to next-20180514] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH v4 1/1] drivers core: multi-threading device shutdown

2018-05-14 Thread Pavel Tatashin
Hi Andy, Thank you for your comments. I will send an updated patch soon. My replies are below: On 05/14/2018 04:04 PM, Andy Shevchenko wrote: > Can we still preserve an order here? (Yes, even if the entire list is > not fully ordered) > In the context I see it would go before netdevice.h.

Re: [PATCH 05/14] net: sched: always take reference to action

2018-05-14 Thread kbuild test robot
Hi Vlad, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] [also build test WARNING on v4.17-rc5 next-20180514] [cannot apply to net-next/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url

[RFC PATCH] net: sched: __tcf_idr_check() can be static

2018-05-14 Thread kbuild test robot
Fixes: 446adedb5339 ("net: sched: always take reference to action") Signed-off-by: Fengguang Wu --- act_api.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 9459cce..27e80cf 100644 ---

Re: [kbuild-all] [PATCH net-next 2/2] sctp: add sctp_make_op_error_limited and reuse inner functions

2018-05-14 Thread Ye Xiaolong
On 05/14, Marcelo Ricardo Leitner wrote: >On Mon, May 14, 2018 at 07:47:20PM +0800, Ye Xiaolong wrote: >> On 05/14, Marcelo Ricardo Leitner wrote: >> >On Mon, May 14, 2018 at 03:40:53PM +0800, Ye Xiaolong wrote: >> >> >> config: x86_64-randconfig-x006-201817 (attached as .config) >> >> >>

Re: [PATCH v3] kvmalloc: always use vmalloc if CONFIG_DEBUG_SG

2018-05-14 Thread Joonsoo Kim
Hello, Mikulas. On Tue, Apr 24, 2018 at 02:41:47PM -0400, Mikulas Patocka wrote: > > > On Tue, 24 Apr 2018, Matthew Wilcox wrote: > > > On Tue, Apr 24, 2018 at 08:29:14AM -0400, Mikulas Patocka wrote: > > > > > > > > > On Mon, 23 Apr 2018, Matthew Wilcox wrote: > > > > > > > On Mon, Apr 23,

Re: [PATCH bpf-next] selftests/bpf: make sure build-id is on

2018-05-14 Thread Y Song
On Mon, May 14, 2018 at 5:11 PM, Alexei Starovoitov wrote: > --build-id may not be a default linker config. > Make sure it's used when linking urandom_read test program. > Otherwise test_stacktrace_build_id[_nmi] tests will be failling. > > Signed-off-by: Alexei Starovoitov

[PATCH bpf-next] selftests/bpf: make sure build-id is on

2018-05-14 Thread Alexei Starovoitov
--build-id may not be a default linker config. Make sure it's used when linking urandom_read test program. Otherwise test_stacktrace_build_id[_nmi] tests will be failling. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1

[PATCH net-next] erspan: set bso bit based on mirrored packet's len

2018-05-14 Thread William Tu
Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not handled. BSO has 4 possible values: 00 --> Good frame with no error, or unknown integrity 11 --> Payload is a Bad Frame with CRC or Alignment Error 01 --> Payload is a Short Frame 10 --> Payload is an Oversized Frame Based

Re: [PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-14 Thread Eric Dumazet
On 05/14/2018 04:30 PM, Willem de Bruijn wrote: > I don't quite follow. The reported crash happens in the protocol layer, > because of this check. With pagedlen we have not allocated > sufficient space for the skb_put. > > if (!(rt->dst.dev->features_F_SG)) { >

Re: [PATCH 01/14] net: sched: use rcu for action cookie update

2018-05-14 Thread kbuild test robot
Hi Vlad, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net/master] [also build test WARNING on v4.17-rc5 next-20180514] [cannot apply to net-next/master] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url

Re: [PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-14 Thread Willem de Bruijn
On Mon, May 14, 2018 at 7:12 PM, Eric Dumazet wrote: > > > On 05/14/2018 04:07 PM, Willem de Bruijn wrote: >> From: Willem de Bruijn >> >> Paged allocation stores most payload in skb frags. This helps udp gso >> by avoiding copying from the gso skb to

Re: [PATCH v1 1/4] media: rc: introduce BPF_PROG_IR_DECODER

2018-05-14 Thread Randy Dunlap
On 05/14/2018 02:10 PM, Sean Young wrote: > Add support for BPF_PROG_IR_DECODER. This type of BPF program can call Kconfig file below uses IR_BPF_DECODER instead of the symbol name above. and then patch 3 says a third choice: The context provided to a BPF_PROG_RAWIR_DECODER is a struct

Re: [net 1/1] net/mlx5: Fix build break when CONFIG_SMP=n

2018-05-14 Thread Randy Dunlap
On 05/14/2018 03:38 PM, Saeed Mahameed wrote: > Avoid using the kernel's irq_descriptor and return IRQ vector affinity > directly from the driver. > > This fixes the following build break when CONFIG_SMP=n > > include/linux/mlx5/driver.h: In function ‘mlx5_get_vector_affinity_hint’: >

Re: [PATCH net-next 2/3] gso: limit udp gso to egress-only virtual devices

2018-05-14 Thread Willem de Bruijn
On Mon, May 14, 2018 at 7:07 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Until the udp receive stack supports large packets (UDP GRO), GSO > packets must not loop from the egress to the ingress path. > > Revert the change that

Re: [PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-14 Thread Eric Dumazet
On 05/14/2018 04:07 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Paged allocation stores most payload in skb frags. This helps udp gso > by avoiding copying from the gso skb to segment skb in skb_segment. > > But without scatter-gather, data must be linear, so

Re: [PATCH net-next] udp: Fix kernel panic in UDP GSO path

2018-05-14 Thread Eric Dumazet
On 05/14/2018 03:45 PM, stran...@codeaurora.org wrote: > On 2018-05-11 17:16, Willem de Bruijn wrote: > >>> Hmm, no, we absolutely need to fix GSO instead. >>> >>> Think of a bonding device (or any virtual devices), your patch wont avoid >>> the crash. > > Hi Eric. Can you clarify what you

Re: [PATCH v3 bpf-next 0/2] bpf: enable stackmap with build_id in nmi

2018-05-14 Thread Daniel Borkmann
On 05/07/2018 07:50 PM, Song Liu wrote: > Changes v2 -> v3: > Improve syntax based on suggestion by Tobin C. Harding. > > Changes v1 -> v2: > 1. Rename some variables to (hopefully) reduce confusion; > 2. Check irq_work status with IRQ_WORK_BUSY (instead of work->sem); > 3. In Kconfig,

[PATCH net-next 3/3] udp: only use paged allocation with scatter-gather

2018-05-14 Thread Willem de Bruijn
From: Willem de Bruijn Paged allocation stores most payload in skb frags. This helps udp gso by avoiding copying from the gso skb to segment skb in skb_segment. But without scatter-gather, data must be linear, so do not use paged mode unless NETIF_F_SG. Fixes: 15e36f5b8e98

Re: [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options

2018-05-14 Thread Daniel Borkmann
On 05/14/2018 12:20 PM, Jesper Dangaard Brouer wrote: > > On Mon, 14 May 2018 17:29:15 +0900 Prashant Bhole > wrote: > >> Updated optstring parameter for getopt_long() to accept short options. >> Also updated usage() function. >> >> Signed-off-by: Prashant

[PATCH net-next 2/3] gso: limit udp gso to egress-only virtual devices

2018-05-14 Thread Willem de Bruijn
From: Willem de Bruijn Until the udp receive stack supports large packets (UDP GRO), GSO packets must not loop from the egress to the ingress path. Revert the change that added NETIF_F_GSO_UDP_L4 to various virtual devices through NETIF_F_GSO_ENCAP_ALL as this included

Re: [PATCH net-next] udp: Fix kernel panic in UDP GSO path

2018-05-14 Thread Willem de Bruijn
>> Paged skbuffs is an optimization for gso, but the feature should >> continue to work even if gso skbs are linear, indeed (if at the cost >> of copying during skb_segment). >> >> We need to make paged contingent on scatter-gather. Rough >> patch below. That is for ipv4 only, the same will be

[PATCH net-next 0/3] udp gso fixes

2018-05-14 Thread Willem de Bruijn
From: Willem de Bruijn A few small fixes: - disallow segmentation with XFRM - do not leak gso packets into the ingress path - fix a panic if scatter-gather is disabled Willem de Bruijn (3): udp: exclude gso from xfrm paths gso: limit udp gso to egress-only virtual

[PATCH net-next 1/3] udp: exclude gso from xfrm paths

2018-05-14 Thread Willem de Bruijn
From: Willem de Bruijn UDP GSO conflicts with transformations in the XFRM layer. Return an error if GSO is attempted. Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT") CC: Michal Kubecek Signed-off-by: Willem de Bruijn ---

Re: [PATCH net-next] udp: Fix kernel panic in UDP GSO path

2018-05-14 Thread stranche
On 2018-05-11 17:16, Willem de Bruijn wrote: Hmm, no, we absolutely need to fix GSO instead. Think of a bonding device (or any virtual devices), your patch wont avoid the crash. Hi Eric. Can you clarify what you mean by "fix GSO?" Is that just having the GSO path work regardless of

Re: [PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2018-05-14 Thread Daniel Borkmann
On 05/12/2018 07:25 PM, Mathieu Xhonneux wrote: [...] > +BPF_CALL_4(bpf_lwt_seg6_store_bytes, struct sk_buff *, skb, u32, offset, > +const void *, from, u32, len) > +{ > +#if IS_ENABLED(CONFIG_IPV6_SEG6_BPF) > + struct seg6_bpf_srh_state *srh_state = > +

[net 1/1] net/mlx5: Fix build break when CONFIG_SMP=n

2018-05-14 Thread Saeed Mahameed
Avoid using the kernel's irq_descriptor and return IRQ vector affinity directly from the driver. This fixes the following build break when CONFIG_SMP=n include/linux/mlx5/driver.h: In function ‘mlx5_get_vector_affinity_hint’: include/linux/mlx5/driver.h:1299:13: error: ‘struct irq_desc’

Re: [PATCH] net/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()'

2018-05-14 Thread Saeed Mahameed
On Mon, May 14, 2018 at 11:56 AM, David Miller wrote: > From: Christophe JAILLET > Date: Sat, 12 May 2018 19:09:25 +0200 > >> 'out' is allocated with 'kvzalloc()'. 'kvfree()' must be used to free it. >> >> Signed-off-by: Christophe JAILLET

[PATCH net-stable 03/24] hv_netvsc: Rename tx_send_table to tx_table

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit 39e91cfbf6f5fb26ba64cc2e8874372baf1671e7 upstream. Simplify the variable name: tx_send_table Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller --- drivers/net/hyperv/hyperv_net.h | 2 +-

[PATCH net-stable 05/24] hv_netvsc: Set tx_table to equal weight after subchannels open

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit a6fb6aa3cfa9047b62653dbcfc9bcde6e2272b41 upstream. In some cases, like internal vSwitch, the host doesn't provide send indirection table updates. This patch sets the table to be equal weight after subchannels are all open. Otherwise, all

[PATCH net-stable 09/24] hv_netvsc: Use the num_online_cpus() for channel limit

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit 25a39f7f975c3c26a0052fbf9b59201c06744332 upstream Since we no longer localize channel/CPU affiliation within one NUMA node, num_online_cpus() is used as the number of channel cap, instead of the number of processors in a NUMA node. This patch

[PATCH net-stable 02/24] hv_netvsc: Rename ind_table to rx_table

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit 47371300dfc269dd8d150e5b872bdbbda98ba809 upstream. Rename this variable because it is the Receive indirection table. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller ---

[PATCH net-stable 04/24] hv_netvsc: Add initialization of tx_table in netvsc_device_add()

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit 6b0cbe315868d613123cf387052ccda5f09d49ea upstream. tx_table is part of the private data of kernel net_device. It is only zero-ed out when allocating net_device. We may recreate netvsc_device w/o recreating net_device, so the private netdev

[PATCH net-stable 10/24] hv_netvsc: avoid retry on send during shutdown

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 12f69661a49446840d742d8feb593ace022d9f66 upstream Change the initialization order so that the device is ready to transmit (ie connect vsp is completed) before setting the internal reference to the device with RCU. This avoids any races

[PATCH net-stable 14/24] hv_netvsc: fix race in napi poll when rescheduling

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit d64e38ae690e3337db0d38d9b149a193a1646c4b upstream There is a race between napi_reschedule and re-enabling interrupts which could lead to missed host interrrupts. This occurs when interrupts are re-enabled (hv_end_read) and vmbus irq

[PATCH net-stable 12/24] hv_netvsc: fix error unwind handling if vmbus_open fails

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit fcfb4a00d1e514e8313277a01ef919de1113025b upstream Need to delete NAPI association if vmbus_open fails. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller ---

[PATCH net-stable 07/24] hv_netvsc: preserve hw_features on mtu/channels/ringparam changes

2018-05-14 Thread Stephen Hemminger
From: Vitaly Kuznetsov commit aefd80e874e98a864915df5b7d90824a4340b450 upstream. rndis_filter_device_add() is called both from netvsc_probe() when we initially create the device and from set channels/mtu/ringparam routines where we basically remove the device and add it

[PATCH net-stable 08/24] hv_netvsc: empty current transmit aggregation if flow blocked

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit cfd8afd986cdb59ea9adac873c5082498a1eb7c0 upstream If the transmit queue is known full, then don't keep aggregating data. And the cp_partial flag which indicates that the current aggregation buffer is full can be folded in to avoid more

[PATCH net-stable 21/24] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-05-14 Thread Stephen Hemminger
From: Mohammed Gamal commit 7992894c305eaf504d005529637ff8283d0a849d upstream Split each of the functions into two for each of send/recv buffers. This will be needed in order to implement a fine-grained messaging sequence to the host so that we accommodate the requirements of

[PATCH net-stable 17/24] hv_netvsc: use RCU to fix concurrent rx and queue changes

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 02400fcee2542ee334a2394e0d9f6efd969fe782 upstream The receive processing may continue to happen while the internal network device state is in RCU grace period. The internal RNDIS structure is associated with the internal netvsc_device

[PATCH net-stable 18/24] hv_netvsc: change GPAD teardown order on older versions

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 0ef58b0a05c127762f975c3dfe8b922e4aa87a29 upstream On older versions of Windows, the host ignores messages after vmbus channel is closed. Workaround this by doing what Windows does and send the teardown before close on older versions of

[PATCH net-stable 22/24] hv_netvsc: Ensure correct teardown message sequence order

2018-05-14 Thread Stephen Hemminger
From: Mohammed Gamal commit a56d99d714665591fed8527b90eef21530ea61e0 upstream Prior to commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") the call sequence in netvsc_device_remove() was as follows (as implemented in netvsc_destroy_buf()): 1- Send

[PATCH net-stable 19/24] hv_netvsc: common detach logic

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 7b2ee50c0cd513a176a26a71f2989facdd75bfea upstream Make common function for detaching internals of device during changes to MTU and RSS. Make sure no more packets are transmitted and all packets have been received before doing device

[PATCH net-stable 20/24] hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown

2018-05-14 Thread Stephen Hemminger
From: Mohammed Gamal commit 2afc5d61a7197de25a61f54ea4ecfb4cb62b1d42A upstram When changing network interface settings, Windows guests older than WS2016 can no longer shutdown. This was addressed by commit 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older

[PATCH net-stable 24/24] hv_netvsc: set master device

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 97f3efb64323beb0690576e9d74e94998ad6e82a upstream The hyper-v transparent bonding should have used master_dev_link. The netvsc device should look like a master bond device not like the upper side of a tunnel. This makes the semantics

[PATCH net-stable 23/24] hv_netvsc: Fix net device attach on older Windows hosts

2018-05-14 Thread Stephen Hemminger
From: Mohammed Gamal commit 55be9f25be1ca5bda75c39808fc77e42691bc07f upstream On older windows hosts the net_device instance is returned to the caller of rndis_filter_device_add() without having the presence bit set first. This would cause any subsequent calls to network

[PATCH net-stable 15/24] hv_netvsc: defer queue selection to VF

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit b3bf5666a51068ad5ddd89a76ed877101ef3bc16 upstream When VF is used for accelerated networking it will likely have more queues (and different policy) than the synthetic NIC. This patch defers the queue policy to the VF so that all the

[PATCH net-stable 01/24] hv_netvsc: Fix the real number of queues of non-vRSS cases

2018-05-14 Thread Stephen Hemminger
From: Haiyang Zhang commit 6450f8f269a9271985e4a8c13920b7e4cf21c0f3 upstream. For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting. Fixes: 8195b1396ec8

[PATCH net-stable 13/24] hv_netvsc: cancel subchannel setup before halting device

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit a7483ec0267c69b34e818738da60b392623da94b upstream Block setup of multiple channels earlier in the teardown process. This avoids possible races between halt and subchannel initialization. Suggested-by: Haiyang Zhang

[PATCH net-stable 00/24] hv_netvsc patches for 4.14 stable

2018-05-14 Thread Stephen Hemminger
These patches are backport of latest stability related patches from upstream. Although it looks like a lot it encompasses three main areas: 1. The set of patches to get rid of races when MTU or number of queues is changed while device is up. And make this work on older versions of

[PATCH net-stable 06/24] hv_netvsc: netvsc_teardown_gpadl() split

2018-05-14 Thread Stephen Hemminger
From: Vitaly Kuznetsov commit 0cf737808ae7cb25e952be619db46b9147a92f46 upstream. It was found that in some cases host refuses to teardown GPADL for send/ receive buffers (probably when some work with these buffere is scheduled or ongoing). Change the teardown logic to be:

[PATCH net-stable 16/24] hv_netvsc: disable NAPI before channel close

2018-05-14 Thread Stephen Hemminger
From: Stephen Hemminger commit 8348e0460ab1473f06c8b824699dd2eed3c1979d upstream This makes sure that no CPU is still process packets when the channel is closed. Fixes: 76bb5db5c749 ("netvsc: fix use after free on module removal") Signed-off-by: Stephen Hemminger

  1   2   3   4   >