Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Christoph Hellwig
On Tue, Jan 09, 2018 at 11:16:16PM +0100, Arnd Bergmann wrote: > Hmm, these two new syscall entry points turn into four when we add in > support for 64-bit time_t, as we'd have to support all combinations of 32/64 > bit aio_context_t and time_t. At least they'll also replace plain old io_getevents

Re: AF_KEY: memory leak in key_notify_policy

2018-01-10 Thread Steffen Klassert
On Tue, Jan 09, 2018 at 06:23:54PM +0100, Dmitry Vyukov wrote: > Hello, > > syzkaller has hit the following memory leak on 4.15-rc7: > > unreferenced object 0x88001ea69cc0 (size 232): > comm "syz-executor6", pid 4338, jiffies 4294719848 (age 11.965s) > hex dump (first 32 bytes): > 00

Re: BUG: 4.14.11 unable to handle kernel NULL pointer dereference in xfrm_lookup

2018-01-10 Thread Tobias Hommel
On Wed, Jan 10, 2018 at 08:30:38AM +0100, Steffen Klassert wrote: > On Tue, Jan 09, 2018 at 03:49:21PM +0100, Tobias Hommel wrote: > > > > I copied the config from my 4.14.12 sources to a fresh 4.13.16 source tree, > > ran > > `make olddefconfig` and built a new kernel. > > The kernel config is a

[PATCH bpf-next 2/2] net: free RX queue structures

2018-01-10 Thread Jakub Kicinski
Looks like commit e817f85652c1 ("xdp: generic XDP handling of xdp_rxq_info") replaced kvfree(dev->_rx) in free_netdev() with a call to netif_free_rx_queues() which doesn't actually free the rings? While at it remove the unnecessary temporary variable. Fixes: e817f85652c1 ("xdp: generic XDP handli

[PATCH bpf-next 0/2] net: more fixes to the XDP RXQ series

2018-01-10 Thread Jakub Kicinski
Two more trivial fixes to the recent XDP RXQ series. Jakub Kicinski (2): net: use the right variant of kfree net: free RX queue structures net/core/dev.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.15.1

[PATCH bpf-next 1/2] net: use the right variant of kfree

2018-01-10 Thread Jakub Kicinski
kvzalloc'ed memory should be kvfree'd. Fixes: e817f85652c1 ("xdp: generic XDP handling of xdp_rxq_info") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index d7925ef87

[PATCH][bpf-next] bpf: fix spelling mistake: "obusing" -> "abusing"

2018-01-10 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in error message text. Signed-off-by: Colin Ian King --- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 97bbef3eecdf..e388f30c4168 100644 --- a/ke

Re: net: memory leak in socket

2018-01-10 Thread Sergei Shtylyov
Hello! On 1/9/2018 11:53 PM, Al Viro wrote: Argh... Got broken by "make sock_alloc_file() do sock_release() on failures" - cleanup after sock_map_fd() failure got pulled all the way into sock_alloc_file(), but it used to serve the case when sock_map_fd() failed *before* getting to sock_alloc_

RE: [net-next v2 15/15] i40e: link_down_on_close private flag support

2018-01-10 Thread Stachura, Mariusz
Hey Kuba, Did you set private flag before doing ifconfig IFNAME down? "ethtool --set-priv-flags enp5s0f0 link-down-on-close on" "ifconfig enp5s0f0 down" And the link partner should see this port as physically downed. Setting phy_type to 0 is, as you said, a way of fooling FW. I'll try to addres

Re: dvb usb issues since kernel 4.9

2018-01-10 Thread Jesper Dangaard Brouer
On Tue, 9 Jan 2018 10:58:30 -0800 Linus Torvalds wrote: > So I really think "you can use up 90% of CPU time with a UDP packet > flood from the same network" is very very very different - and > honestly not at all as important - as "you want to be able to use a > USB DVB receiver and watch/recor

Re: [PATCH v2 2/3] net: Add BUG_ON() to get_net()

2018-01-10 Thread Eric Dumazet
On Wed, 2018-01-10 at 10:37 +0300, Kirill Tkhai wrote: > On 09.01.2018 21:52, Eric Dumazet wrote: > > On Tue, 2018-01-09 at 18:00 +0300, Kirill Tkhai wrote: > > > Since people may mistakenly obtain destroying net > > > from net_namespace_list and from net::netns_ids > > > without checking for its n

[PATCH bpf-next v3 0/5] Separate error injection table from kprobes

2018-01-10 Thread Masami Hiramatsu
Hi, Here are the 3rd version of patches to moving error injection table from kprobes. This series includes some fixes and error type descriptions which we discussed in the previous thread. Here is the previous version: https://lkml.org/lkml/2017/12/26/26 There are 2 main reasons why I separate

[PATCH bpf-next v3 1/5] tracing/kprobe: bpf: Check error injectable event is on function entry

2018-01-10 Thread Masami Hiramatsu
Check whether error injectable event is on function entry or not. Currently it checks the event is ftrace-based kprobes or not, but that is wrong. It should check if the event is on the entry of target function. Since error injection will override a function to just return with modified return valu

Re: AM43x boot broken on linux-next

2018-01-10 Thread Keerthy
On Tuesday 09 January 2018 03:22 PM, Keerthy wrote: > On Tuesday 09 January 2018 02:03 PM, Keerthy wrote: >> Hi, > > Adding netdev@vger.kernel.org > >> >> Seems like AM437x boot is broken on latest linux-next. >> Log here: >> >> https://pastebin.ubuntu.com/26351906/ Git bisect pointed me to th

[PATCH bpf-next v3 5/5] error-injection: Support fault injection framework

2018-01-10 Thread Masami Hiramatsu
Support in-kernel fault-injection framework via debugfs. This allows you to inject a conditional error to specified function using debugfs interfaces. Here is the result of test script described in Documentation/fault-injection/fault-injection.txt === # ./test_fail_function.sh 1+0 r

[PATCH bpf-next v3 4/5] error-injection: Add injectable error types

2018-01-10 Thread Masami Hiramatsu
Add injectable error types for each error-injectable function. One motivation of error injection test is to find software flaws, mistakes or mis-handlings of expectable errors. If we find such flaws by the test, that is a program bug, so we need to fix it. But if the tester miss input the error (

[PATCH bpf-next v3 3/5] error-injection: Separate error-injection from kprobe

2018-01-10 Thread Masami Hiramatsu
Since error-injection framework is not limited to be used by kprobes, nor bpf. Other kernel subsystems can use it freely for checking safeness of error-injection, e.g. livepatch, ftrace etc. So this separate error-injection framework from kprobes. Some differences has been made: - "kprobe" word i

[PATCH bpf-next v3 2/5] tracing/kprobe: bpf: Compare instruction pointer with original one

2018-01-10 Thread Masami Hiramatsu
Compare instruction pointer with original one on the stack instead using per-cpu bpf_kprobe_override flag. This patch also consolidates reset_current_kprobe() and preempt_enable_no_resched() blocks. Those can be done in one place. Signed-off-by: Masami Hiramatsu --- kernel/trace/bpf_trace.c

Re: [PATCH bpf-next 13/14] bpf: export function to write into verifier log buffer

2018-01-10 Thread Daniel Borkmann
On 01/10/2018 06:07 AM, Jakub Kicinski wrote: > From: Quentin Monnet > > Rename the BPF verifier `verbose()` to `bpf_verifier_log_write()` and > export it, so that other components (in particular, drivers for BPF > offload) can reuse the user buffer log to dump error messages at > verification ti

RE: [PATCH net-next 3/3] xfrm: Add ESN support for IPSec HW offload

2018-01-10 Thread Yossef Efraim
Ok Doc updated. Sending this patch again with all the fixes. Thanks! > -Original Message- > From: Steffen Klassert [mailto:steffen.klass...@secunet.com] > Sent: Friday, December 01, 2017 8:23 AM > To: Yossef Efraim > Cc: David S. Miller ; Herbert Xu > ; netdev@vger.kernel.org; linux- >

[PATCH net-next v2] xfrm: Add ESN support for IPSec HW offload

2018-01-10 Thread yossefe
From: Yossef Efraim This patch adds ESN support to IPsec device offload. Adding new xfrm device operation to synchronize device ESN. Signed-off-by: Yossef Efraim --- Changes from v1: - Added documentation --- Documentation/networking/xfrm_device.txt | 3 +++ include/linux/netdevice.h

Re: AM43x boot broken on linux-next

2018-01-10 Thread Keerthy
On Wednesday 10 January 2018 03:47 PM, Keerthy wrote: > > > On Tuesday 09 January 2018 03:22 PM, Keerthy wrote: >> On Tuesday 09 January 2018 02:03 PM, Keerthy wrote: >>> Hi, >> >> Adding netdev@vger.kernel.org >> >>> >>> Seems like AM437x boot is broken on latest linux-next. >>> Log here: >>>

Re: [PATCH][bpf-next] bpf: fix spelling mistake: "obusing" -> "abusing"

2018-01-10 Thread Daniel Borkmann
On 01/10/2018 10:20 AM, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in error message text. > > Signed-off-by: Colin Ian King > --- > kernel/bpf/verifier.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/bpf/verifier.c b/kernel/b

[patch net 1/2] mlxsw: pci: Wait after reset before accessing HW

2018-01-10 Thread Jiri Pirko
From: Yuval Mintz After performing reset driver polls on HW indication until learning that the reset is done, but immediately after reset the device becomes unresponsive which might lead to completion timeout on the first read. Wait for 100ms before starting the polling. Fixes: 233fa44bd67a ("m

[patch net 2/2] mlxsw: spectrum_qdisc: Don't use variable array in mlxsw_sp_tclass_congestion_enable

2018-01-10 Thread Jiri Pirko
From: Jiri Pirko Resolve the sparse warning: "sparse: Variable length array is used." Use 2 arrays for 2 PRM register accesses. Fixes: 96f17e0776c2 ("mlxsw: spectrum: Support RED qdisc offload") Signed-off-by: Jiri Pirko Reviewed-by: Yuval Mintz --- drivers/net/ethernet/mellanox/mlxsw/spectru

[patch net 0/2] mlxsw: couple of fixes

2018-01-10 Thread Jiri Pirko
From: Jiri Pirko Couple of small fixes for mlxsw driver. Jiri Pirko (1): mlxsw: spectrum_qdisc: Don't use variable array in mlxsw_sp_tclass_congestion_enable Yuval Mintz (1): mlxsw: pci: Wait after reset before accessing HW drivers/net/ethernet/mellanox/mlxsw/pci.c| 7

Re: BUG: 4.14.6 unable to handle kernel NULL pointer dereference at xfrm_output_resume

2018-01-10 Thread Darius Ski
Hi, On Fri, Jan 5, 2018 at 11:38 AM, Steffen Klassert wrote: > On Tue, Dec 19, 2017 at 10:50:42AM +0200, Darius Ski wrote: >> Hi, >> >> thanks a lot for the patch. I have applied it to 4.14.7 and crossed >> fingers, hopefully no more problems. >> >> I will let community know if there are any more

Re: [PATCH v2 2/3] net: Add BUG_ON() to get_net()

2018-01-10 Thread Kirill Tkhai
On 10.01.2018 12:58, Eric Dumazet wrote: > On Wed, 2018-01-10 at 10:37 +0300, Kirill Tkhai wrote: >> On 09.01.2018 21:52, Eric Dumazet wrote: >>> On Tue, 2018-01-09 at 18:00 +0300, Kirill Tkhai wrote: Since people may mistakenly obtain destroying net from net_namespace_list and from net::

[PATCH v7 7/8] dt-bindings: can: m_can: Document new can transceiver binding

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr Add information regarding can-transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Signed-off-

[PATCH v7 8/8] dt-bindings: can: can-transceiver: Document new binding

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr Add documentation to describe usage of the new can-transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Signed-off-by: Faiz Abbas --- .../bindi

[PATCH v7 6/8] can: m_can: Support higher speed CAN-FD bitrates

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr During test transmitting using CAN-FD at high bitrates (> 2 Mbps) would fail. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode automatically. It

[PATCH v7 5/8] can: m_can: Add PM Support

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr Add support for CONFIG_PM which is the new way to handle managing clocks. Move the clock management to pm_runtime_resume() and pm_runtime_suspend() callbacks for the driver. CONFIG_PM is required by OMAP based devices to handle clock management. Therefore, this allows

[PATCH v7 4/8] can: m_can: Move allocation of net device to probe

2018-01-10 Thread Faiz Abbas
With the version no longer required to allocate the net device, it can be moved to probe and the alloc_m_can_dev() function can be simplified. Therefore, move the allocation of net device to probe and change alloc_m_can_dev() to setup_m_can_dev(). Signed-off-by: Faiz Abbas --- drivers/net/can/m

[PATCH v7 3/8] can: m_can: Remove check for version when allocating m_can net device

2018-01-10 Thread Faiz Abbas
Currently the m_can version is used to set the tx_fifo_count to 1 when allocating the net device. However, this is redundant as a value of 1 for the tx_fifo_count needs to be provided in the bosch,mram-cfg property of the device tree node anyway. Therefore, remove check for version when allocating

Re: [PATCH 13/36] befs: Define usercopy region in befs_inode_cache slab cache

2018-01-10 Thread Luis de Bethencourt
On 01/09/2018 08:55 PM, Kees Cook wrote: > From: David Windsor > > befs symlink pathnames, stored in struct befs_inode_info.i_data.symlink > and therefore contained in the befs_inode_cache slab cache, need to be > copied to/from userspace. > > cache object allocation: > fs/befs/linuxvfs.c: >

[PATCH v7 0/8] Add MCAN Support for Dra76 platform

2018-01-10 Thread Faiz Abbas
This patch series adds support for M_CAN on the TI Dra76 platform. Device tree patches will be sent separately. A bunch of patches were sent before by Franklin Cooper . I have clubbed the series together and rebased to the latest kernel. v7 changes: Added support for bitrate_max to be read from th

Re: [PATCH bpf-next 2/2] net: free RX queue structures

2018-01-10 Thread Jesper Dangaard Brouer
On Wed, 10 Jan 2018 01:20:02 -0800 Jakub Kicinski wrote: > Looks like commit e817f85652c1 ("xdp: generic XDP handling of > xdp_rxq_info") replaced kvfree(dev->_rx) in free_netdev() with > a call to netif_free_rx_queues() which doesn't actually free > the rings? > > While at it remove the unneces

[PATCH v7 1/8] can: dev: Add support for limiting configured bitrate

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to discover these limitations at runt

Re: [PATCH bpf-next 1/2] net: use the right variant of kfree

2018-01-10 Thread Jesper Dangaard Brouer
On Wed, 10 Jan 2018 01:20:01 -0800 Jakub Kicinski wrote: > kvzalloc'ed memory should be kvfree'd. > > Fixes: e817f85652c1 ("xdp: generic XDP handling of xdp_rxq_info") > Signed-off-by: Jakub Kicinski > Reviewed-by: Simon Horman > --- > net/core/dev.c | 2 +- > 1 file changed, 1 insertion(+),

[PATCH v7 2/8] can: m_can: Add call to of_can_transceiver

2018-01-10 Thread Faiz Abbas
From: Franklin S Cooper Jr Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Sekhar Nori Signed-off-by: Fa

Re: [patch iproute2 v7 1/2] lib/libnetlink: Add functions rtnl_talk_msg and rtnl_talk_iov

2018-01-10 Thread Phil Sutter
Hi Chris, On Wed, Jan 10, 2018 at 03:00:23AM +, Chris Mi wrote: [...] > > Drop this and use 'continue' instead of 'goto next' below? > Actually there are two loops, I need go to the outer while loop instead of > the inner for loop. Oh, I missed that. Sorry for the noise! Cheers, Phil

Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Arnd Bergmann
On Wed, Jan 10, 2018 at 9:11 AM, Christoph Hellwig wrote: > On Tue, Jan 09, 2018 at 11:16:16PM +0100, Arnd Bergmann wrote: >> Hmm, these two new syscall entry points turn into four when we add in >> support for 64-bit time_t, as we'd have to support all combinations of 32/64 >> bit aio_context_t a

Re: [PATCH bpf-next 0/2] net: more fixes to the XDP RXQ series

2018-01-10 Thread Daniel Borkmann
On 01/10/2018 10:20 AM, Jakub Kicinski wrote: > Two more trivial fixes to the recent XDP RXQ series. > > Jakub Kicinski (2): > net: use the right variant of kfree > net: free RX queue structures > > net/core/dev.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) This one lan

Re: BUG: 4.14.6 unable to handle kernel NULL pointer dereference at xfrm_output_resume

2018-01-10 Thread Steffen Klassert
On Wed, Jan 10, 2018 at 12:42:47PM +0200, Darius Ski wrote: > Hi, > > On Fri, Jan 5, 2018 at 11:38 AM, Steffen Klassert > wrote: > > On Tue, Dec 19, 2017 at 10:50:42AM +0200, Darius Ski wrote: > >> Hi, > >> > >> thanks a lot for the patch. I have applied it to 4.14.7 and crossed > >> fingers, hop

RE: [PATCH net-next 3/3] xfrm: Add ESN support for IPSec HW offload

2018-01-10 Thread Yossef Efraim
> On 11/28/2017 1:49 AM, yoss...@mellanox.com wrote: > > From: Yossef Efraim > > > > This patch adds ESN support to IPsec device offload. > > Adding new xfrm device operation to synchronize device ESN. > > > > Signed-off-by: Yossef Efraim > > --- > > include/linux/netdevice.h | 1 + > > inclu

Re: [patch iproute2 v8 2/2] tc: Add batchsize feature for filter and actions

2018-01-10 Thread Marcelo Ricardo Leitner
On Wed, Jan 10, 2018 at 12:27:42PM +0900, Chris Mi wrote: > Currently in tc batch mode, only one command is read from the batch > file and sent to kernel to process. With this support, at most 128 > commands can be accumulated before sending to kernel. > > Now it only works for the following succe

[PATCH net] ipv6: fix possible mem leaks in ipv6_make_skb()

2018-01-10 Thread Eric Dumazet
From: Eric Dumazet ip6_setup_cork() might return an error, while memory allocations have been done and must be rolled back. Fixes: 6422398c2ab0 ("ipv6: introduce ipv6_make_skb") Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Reported-by: Mike Maloney ---  net/ipv6/ip6_output.c |5 +++--  1

Re: [PATCH net-next 4/4] ipv6: Add support for non-equal-cost multipath

2018-01-10 Thread Ido Schimmel
Hi David, On Tue, Jan 09, 2018 at 08:48:37PM -0700, David Ahern wrote: > On 1/9/18 7:40 AM, Ido Schimmel wrote: > > The use of hash-threshold instead of modulo-N makes it trivial to add > > support for non-equal-cost multipath. > > > > Instead of dividing the multipath hash function's output spac

Re: [PATCH net-next 3/4] ipv6: Use hash-threshold instead of modulo-N

2018-01-10 Thread Ido Schimmel
On Tue, Jan 09, 2018 at 08:54:00PM -0700, David Ahern wrote: > Did you consider adding the net->ipv4.sysctl_fib_multipath_use_neigh > check as well? ie., if set, verify neighbor is alive before picking that hop No, but I'll add it to my TODO list. It's what effectively happens in mlxsw. If the ne

Re: [PATCH bpf-next 13/14] bpf: export function to write into verifier log buffer

2018-01-10 Thread Quentin Monnet
Hi Daniel, 2018-01-10 11:32 UTC+0100 ~ Daniel Borkmann > On 01/10/2018 06:07 AM, Jakub Kicinski wrote: >> From: Quentin Monnet >> >> Rename the BPF verifier `verbose()` to `bpf_verifier_log_write()` and >> export it, so that other components (in particular, drivers for BPF >> offload) can reuse

[PATCH bpf-next v2 00/14] nfp: bpf: relocations, verifier log, signed jumps and other updates

2018-01-10 Thread Quentin Monnet
Jakub says: Hi! This series starts with a fix to Jesper's recent work, somehow I forgot about control rings during review. Second patch is cleaning up a vNIC header, in kdoc we should not use @ for #define constants. Aligning of the top of the stack as well as bottom (last bytes will be unused)

[PATCH bpf-next v2 01/14] nfp: don't try to register XDP rxq structures on control queues

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Some RX rings are used for control messages, those will not have a netdev pointer in dp. Skip XDP rxq handling on those rings. Fixes: 7f1c684a8966 ("nfp: setup xdp_rxq_info") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome

[PATCH bpf-next v2 03/14] nfp: bpf: round up the size of the stack

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Kernel enforces the alignment of the bottom of the stack, NFP deals with positive offsets better so we should align the top of the stack. Round the stack size to NFP word size (4B). Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 2 +-

[PATCH bpf-next v2 02/14] nfp: fix incumbent kdoc warnings

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski We should use % instead of @ for documenting preprocessor defines. Add missing documentation of __NFP_REPR_TYPE_MAX. This gets rid of all remaining kdoc warnings in the driver. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 111 +

[PATCH bpf-next v2 05/14] nfp: bpf: allow disabling TC offloads when XDP active

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski TC BPF offload was added first, so we used to assume that the ethtool TC HW offload flag cannot be touched whenever any BPF program is loaded on the NIC. This unncessarily limits changes to the TC flag when offloaded program is XDP. Signed-off-by: Jakub Kicinski --- drive

[PATCH bpf-next v2 14/14] nfp: bpf: reuse verifier log for debug messages

2018-01-10 Thread Quentin Monnet
Now that `bpf_verifier_log_write()` is exported from the verifier and makes it possible to reuse the verifier log to print messages to the standard output, use this instead of the kernel logs in the nfp driver for printing error messages occurring at verification time. Signed-off-by: Quentin Monne

[PATCH bpf-next v2 13/14] bpf: export function to write into verifier log buffer

2018-01-10 Thread Quentin Monnet
Rename the BPF verifier `verbose()` to `bpf_verifier_log_write()` and export it, so that other components (in particular, drivers for BPF offload) can reuse the user buffer log to dump error messages at verification time. Renaming `verbose()` was necessary in order to avoid a name so generic to be

[PATCH bpf-next v2 12/14] nfp: bpf: add signed jump insns

2018-01-10 Thread Quentin Monnet
From: Nic Viljoen This patch adds signed jump instructions (jsgt, jsge, jslt, jsle) to the nfp jit. As well as adding the additional required raw assembler branch mask to nfp_asm.h Signed-off-by: Nic Viljoen Reviewed-by: Jiong Wang Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netrono

[PATCH bpf-next v2 08/14] nfp: bpf: relocate jump targets just before the load

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Don't translate the program assuming it will be loaded at a given address. This will be required for sharing programs between ports of the same NIC, tail calls and subprograms. It will also make the jump targets easier to understand when dumping the program to user space.

[PATCH bpf-next v2 06/14] nfp: bpf: move jump resolution to jit.c

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Jump target resolution should be in jit.c not offload.c. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 23 +++ drivers/net/ethernet/netronome/nfp/bpf/main.h| 1 +

[PATCH bpf-next v2 11/14] nfp: hand over to BPF offload app at coarser granularity

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski Instead of having an app callback per message type hand off all offload-related handling to apps with one "rest of ndo_bpf" callback. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/main.c | 5 +-- drivers/net/eth

[PATCH bpf-next v2 07/14] nfp: bpf: add helpers for modifying branch addresses

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski In preparation for better handling of relocations move existing helper for setting branch offset to nfp_asm.c and add two more. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 12 --- drivers/net/ethernet/ne

[PATCH bpf-next v2 09/14] nfp: bpf: don't depend on high order allocations for program image

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski The translator pre-allocates a buffer of maximal program size. Due to HW/FW limitations the program buffer can't currently be longer than 128Kb, so we used to kmalloc() it, and then map for DMA directly. Now that the late branch resolution is copying the program image anyway

[PATCH bpf-next v2 10/14] nfp: bpf: use a large constant in unresolved branches

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski To make absolute relocated branches (branches which will be completely rewritten with br_set_offset()) distinguishable in user space dumps from normal jumps add a large offset to them. Signed-off-by: Jakub Kicinski Reviewed-by: Jiong Wang --- drivers/net/ethernet/netronom

[PATCH bpf-next v2 04/14] nfp: bpf: don't allow changing MTU above BPF offload limit when active

2018-01-10 Thread Quentin Monnet
From: Jakub Kicinski When BPF offload is active we need may need to restrict the MTU changes more than just to the limitation of the kernel XDP datapath. Allow the BPF code to veto a MTU change. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c | 20

Re: [PATCH net-next 0/4] ipv6: Add support for non-equal-cost multipath

2018-01-10 Thread Ido Schimmel
On Tue, Jan 09, 2018 at 09:38:14PM -0700, David Ahern wrote: > Also, have you considered support for sysctl_fib_multipath_hash_policy? No, but I'm not sure what you expect it control? Note that unlike IPv4, we have the flow label in the IP header, which we use for the multipath hash.

[PATCH net v2] ipv6: sr: fix TLVs not being copied using setsockopt

2018-01-10 Thread Mathieu Xhonneux
Function ipv6_push_rthdr4 allows to add an IPv6 Segment Routing Header to a socket through setsockopt, but the current implementation doesn't copy possible TLVs at the end of the SRH received from userspace. Therefore, the execution of the following branch if (sr_has_hmac(sr_phdr)) { ... } will ne

[PATCH net-next 1/4] cxgb4: add data structures to support vxlan

2018-01-10 Thread Ganesh Goudar
Add data structures and macros to be used in vxlan offload. Original work by: Santosh Rastapur Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 164 ++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 17 +++ drivers/net/ethernet/chelsio/c

[PATCH net-next 2/4] cxgb4: implement udp tunnel callbacks

2018-01-10 Thread Ganesh Goudar
Implement ndo_udp_tunnel_add and ndo_udp_tunnel_del to support vxlan tunnelling. Original work by: Santosh Rastapur Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 15 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 130 drivers

[PATCH net-next 3/4] cxgb4: add support for vxlan segmentation offload

2018-01-10 Thread Ganesh Goudar
add changes to t4_eth_xmit to enable vxlan segmentation offload support. Original work by: Santosh Rastapur Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 + drivers/net/ethernet/chelsio/cxgb4/sge.c

[PATCH net-next 4/4] cxgb4: implement ndo_features_check

2018-01-10 Thread Ganesh Goudar
Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index d0e08f6..3293980 100644 --- a/drivers/

[PATCH net-next] netfilter: nf_queue: remove duplicated include from nf_queue.c

2018-01-10 Thread Wei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun --- net/netfilter/nf_queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 7f55af5..d67a96a 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -15,8 +15,6 @

[PATCH net-next] netfilter: nf_flow_table: remove duplicated include from nf_flow_table_ipv6.c

2018-01-10 Thread Wei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun --- net/ipv6/netfilter/nf_flow_table_ipv6.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv6/netfilter/nf_flow_table_ipv6.c b/net/ipv6/netfilter/nf_flow_table_ipv6.c index 0c3b9d3..fff2160 100644 --- a/net/ipv6/netfilter/nf_flow_t

Re: [PATCH net-next] netfilter: core: make local function __nf_unregister_net_hook static

2018-01-10 Thread Pablo Neira Ayuso
On Wed, Jan 10, 2018 at 07:05:06AM +, Wei Yongjun wrote: > Fixes the following sparse warning: > > net/netfilter/core.c:380:6: warning: > symbol '__nf_unregister_net_hook' was not declared. Should it be static? Also applied, thanks.

Re: [PATCH net-next] netfilter: nf_tables: fix a typo in nf_tables_getflowtable()

2018-01-10 Thread Pablo Neira Ayuso
On Wed, Jan 10, 2018 at 07:04:54AM +, Wei Yongjun wrote: > Fix a typo, we should check 'flowtable' instead of 'table'. Applied, thanks.

Re: [PATCH net-next] net: phy: marvell: mv88e6390 temperature sensor reading

2018-01-10 Thread Andrew Lunn
On Tue, Jan 09, 2018 at 04:14:44PM -0800, Florian Fainelli wrote: > On 01/09/2018 01:42 PM, Andrew Lunn wrote: > > The internal PHYs in the mv88e6390 switch have a temperature sensor. > > It uses a different register layout to other PHY currently supported. > > It also has an errata, in that some r

[patch net-next] mlxsw: spectrum: Fix typo in firmware upgrade message

2018-01-10 Thread Jiri Pirko
From: Ido Schimmel Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index

[patch net-next 10/11] mlxsw: spectrum: qdiscs: Create a generic replace function

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Create a generic qdisc replace function. For that goal, add three functions to the qdisc ops struct: * check_params: Checks if the given parameters are offloadable. * replace: Offload the given parameters. * clean_stats: clean the qdisc stats for the offloaded qdisc. integrate

[patch net-next 02/11] net: sch: red: Change the name of the stats struct to be generic

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Change the name of the stats struct to be generic, so it could be used for other qdisc offload, that will be added in the next patches. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c

[patch net-next 05/11] mlxsw: spectrum: qdiscs: Make the clean stats function to be for RED only

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Improve readability by changing the clean stats function to handle only RED. Qdiscs that will be offloaded in the future will have a clean stats function of their own. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- .../net/ethernet/mel

[patch net-next 11/11] mlxsw: spectrum: qdiscs: Remove qdisc before setting a new one

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel If a qdisc is being replaced by another qdisc of the same type, it can simply override over its configuration. However, if it replaces a qdisc of another type, it needs to be removed before setting the new qdisc. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-

[patch net-next 08/11] mlxsw: spectrum: qdiscs: Add an ops struct

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Qdisc struct have the Qdisc_class_ops struct. This patch introduces the similar ops struct for the mlxsw_sp_qdisc_ops struct. It allows better readability as well as code reusability for the common parts of some functions like destroy. The first operations to be added are the

[patch net-next 06/11] mlxsw: spectrum: qdiscs: Add tclass number to the mlxsw_sp_qdisc

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Tclass number is needed for most of the operations related to the qdisc in the driver. Create a field for it in the mlxsw_sp_qdisc instead of passing it to every function as parameter. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- ...

Re: [PATCH net] ipv6: fix possible mem leaks in ipv6_make_skb()

2018-01-10 Thread Mike Maloney
Acked-by: Mike Maloney Thanks Eric! On Wed, Jan 10, 2018 at 6:45 AM, Eric Dumazet wrote: > From: Eric Dumazet > > ip6_setup_cork() might return an error, while memory allocations have > been done and must be rolled back. > > Fixes: 6422398c2ab0 ("ipv6: introduce ipv6_make_skb") > Signed-off-b

[patch net-next 01/11] mlxsw: spectrum: qdiscs: Move qdisc's declarations to its designated file

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Move all the qdisc related data from the spectrum.h to spectrum_qdisc.c. Create an init and fini functions for the qdiscs. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++ d

[patch net-next 09/11] mlxsw: spectrum: qdiscs: Create a generic destroy function

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Add a destroy function to the qdiscs ops struct. Create a generic qdisc destroy function, that clears the qdisc metadata as well as calling the specific qdisc destroy function. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- .../net/eth

[patch net-next 07/11] mlxsw: spectrum: qdiscs: Unite all handle checks

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Every qdisc op gets the qdisc handle ID as well as its location. Each one of them, beside replace, checks if the handle doesn't match the qdisc in the given location, and if so, it returns without running the actual op. Unite these checks to one comparison function and avoid

[patch net-next 03/11] net: sch: red: Change offloaded xstats to be incremental

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Change the value of the xstats requested from the driver for offloaded RED to be incremental, like the normal stats. It increases consistency - if a qdisc stops being offloaded its xstats don't change. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jir

[patch net-next 04/11] mlxsw: spectrum: qdiscs: Clean qdisc statistics structs

2018-01-10 Thread Jiri Pirko
From: Nogah Frankel Clean RED offloaded stats and make them more generic by breaking the generic qdisc stats to a struct of their own. Signed-off-by: Nogah Frankel Reviewed-by: Yuval Mintz Signed-off-by: Jiri Pirko --- .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 63 +++--

[patch net-next 00/11] mlxsw qdisc refactoring

2018-01-10 Thread Jiri Pirko
From: Jiri Pirko This patchset refactors the qdisc handling in mlxsw driver in order to make it more object oriented like. It helps readability, laying the groundwork for the offloading of additional qdiscs by the driver This patchset also makes the qdiscs statistics more generic. Patch 1 moves

[PATCH] ptr_ring: document usage around __ptr_ring_peek

2018-01-10 Thread Michael S. Tsirkin
This explains why is the net usage of __ptr_ring_peek actually ok without locks. Signed-off-by: Michael S. Tsirkin --- John - I think this is more or less what you meant. Is that right? include/linux/ptr_ring.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a

Re: [PATCH bpf-next v2 00/14] nfp: bpf: relocations, verifier log, signed jumps and other updates

2018-01-10 Thread Daniel Borkmann
On 01/10/2018 01:25 PM, Quentin Monnet wrote: > Jakub says: > > Hi! > > This series starts with a fix to Jesper's recent work, somehow I forgot > about control rings during review. Second patch is cleaning up a vNIC > header, in kdoc we should not use @ for #define constants. Aligning of > the

Re: [PATCH net-next] net: phy: marvell: mv88e6390 temperature sensor reading

2018-01-10 Thread Andrew Lunn
> > > +static int m88e6390_hwmon_probe(struct phy_device *phydev) > > > +{ > > > + return marvell_hwmon_probe(phydev, &m88e6390_hwmon_chip_info); > > > +} > > > #else > > > static int m88e1121_hwmon_probe(struct phy_device *phydev) > > > { > > > @@ -1794,6 +1927,11 @@ static int m88e1510_hwmon_p

Re: [PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq()

2018-01-10 Thread Jesper Dangaard Brouer
On Wed, 10 Jan 2018 07:30:53 + Wei Yongjun wrote: > Fix to return a negative error code from the xdp_rxq_info_reg() error > handling case instead of 0, as done elsewhere in this function. > > Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info") > Signed-off-by: Wei Yongjun > --- > drivers

Re: [PATCH net-next] netfilter: nf_queue: remove duplicated include from nf_queue.c

2018-01-10 Thread Pablo Neira Ayuso
On Wed, Jan 10, 2018 at 01:06:46PM +, Wei Yongjun wrote: > Remove duplicated include. Applied.

Re: [PATCH net-next] netfilter: nf_flow_table: remove duplicated include from nf_flow_table_ipv6.c

2018-01-10 Thread Pablo Neira Ayuso
On Wed, Jan 10, 2018 at 01:07:06PM +, Wei Yongjun wrote: > Remove duplicated include. I'm going to collapse this patch to: http://patchwork.ozlabs.org/patch/858284/ and call it "netfilter: remove duplicated include" So we don't need two patches for the same thing. OK?

RE: [PATCH net-next] netfilter: nf_flow_table: remove duplicated include from nf_flow_table_ipv6.c

2018-01-10 Thread weiyongjun (A)
> > On Wed, Jan 10, 2018 at 01:07:06PM +, Wei Yongjun wrote: > > Remove duplicated include. > > I'm going to collapse this patch to: > > http://patchwork.ozlabs.org/patch/858284/ > > and call it "netfilter: remove duplicated include" > > So we don't need two patches for the same thing. >

Re: [PATCH 31/31] aio: implement io_pgetevents

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 12:03:24PM +0100, Arnd Bergmann wrote: > I'd suggest passing a variant of timespec with two 64-bit members. > Deepa has posted patches for this structure in the past and was planning > to do a new version (with minor changes from review) soon, but we > can just well use it i

[PATCH iproute2 v2 0/2] tests: fix issues in autopkgtest environment

2018-01-10 Thread Christian Ehrhardt
Hi, while working on Debian bug [1] and the Ubuntu counterpart of it I found that the tests can throw a broken pipe warning. I kept the associated check-and-retry of the length separate to discuss the changes individually - feel free to squash them on commit if preferred. *Updates in v2* tag with

[PATCH iproute2 v2 1/2] tests: read limited amount from /dev/urandom

2018-01-10 Thread Christian Ehrhardt
In some test environments like e.g. Ubuntu & Debian autopkgtest it can happen that while generating random device names the pipes between tr and head are considered dead while processing. That prints (non fatal) issues like: Running ip/link/new_link.t [iproute2-this/4.13.0-17-generic]: tr: write

  1   2   3   4   >