[PATCH bpf-next v4 05/10] tools: bpf: sync bpf uapi header

2018-05-23 Thread Sandipan Das
Syncing the bpf.h uapi header with tools so that struct bpf_prog_info has the two new fields for passing on the addresses of the kernel symbols corresponding to each function in a program. Signed-off-by: Sandipan Das --- v3: - Move new fields to the end of bpf_prog_info to avoid breaking user

[PATCH bpf-next v4 03/10] bpf: powerpc64: add JIT support for multi-function programs

2018-05-23 Thread Sandipan Das
This adds support for bpf-to-bpf function calls in the powerpc64 JIT compiler. The JIT compiler converts the bpf call instructions to native branch instructions. After a round of the usual passes, the start addresses of the JITed images for the callee functions are known. Finally, to fixup the bran

[PATCH bpf-next v4 07/10] bpf: fix multi-function JITed dump obtained via syscall

2018-05-23 Thread Sandipan Das
Currently, for multi-function programs, we cannot get the JITed instructions using the bpf system call's BPF_OBJ_GET_INFO_BY_FD command. Because of this, userspace tools such as bpftool fail to identify a multi-function program as being JITed or not. With the JIT enabled and the test program runni

[PATCH bpf-next v4 08/10] bpf: get JITed image lengths of functions via syscall

2018-05-23 Thread Sandipan Das
This adds new two new fields to struct bpf_prog_info. For multi-function programs, these fields can be used to pass a list of the JITed image lengths of each function for a given program to userspace using the bpf system call with the BPF_OBJ_GET_INFO_BY_FD command. This can be used by userspace a

[PATCH bpf-next v4 02/10] bpf: powerpc64: pad function address loads with NOPs

2018-05-23 Thread Sandipan Das
For multi-function programs, loading the address of a callee function to a register requires emitting instructions whose count varies from one to five depending on the nature of the address. Since we come to know of the callee's address only before the extra pass, the number of instructions requir

[PATCH bpf-next v4 04/10] bpf: get kernel symbol addresses via syscall

2018-05-23 Thread Sandipan Das
This adds new two new fields to struct bpf_prog_info. For multi-function programs, these fields can be used to pass a list of kernel symbol addresses for all functions in a given program to userspace using the bpf system call with the BPF_OBJ_GET_INFO_BY_FD command. When bpf_jit_kallsyms is enable

Re: [PATCH net-next v2 0/3] net: sfp: small improvements

2018-05-23 Thread Antoine Tenart
Hi Florian, On Wed, May 23, 2018 at 11:40:50AM -0700, Florian Fainelli wrote: > > Antoine, can you please do CC the people who worked on that code before, > arguably, send an update to MAINTAINERS file to create a specific > section for PHYLINK. My bad, sorry for that, I'll make sure to Cc every

[PATCH bpf-next v4 09/10] tools: bpf: sync bpf uapi header

2018-05-23 Thread Sandipan Das
Syncing the bpf.h uapi header with tools so that struct bpf_prog_info has the two new fields for passing on the JITed image lengths of each function in a multi-function program. Signed-off-by: Sandipan Das --- tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t

[PATCH bpf-next v4 10/10] tools: bpftool: add delimiters to multi-function JITed dumps

2018-05-23 Thread Sandipan Das
This splits up the contiguous JITed dump obtained via the bpf system call into more relatable chunks for each function in the program. If the kernel symbols corresponding to these are known, they are printed in the header for each JIT image dump otherwise the masked start address is printed. Befor

[PATCH bpf-next v4 06/10] tools: bpftool: resolve calls without using imm field

2018-05-23 Thread Sandipan Das
Currently, we resolve the callee's address for a JITed function call by using the imm field of the call instruction as an offset from __bpf_call_base. If bpf_jit_kallsyms is enabled, we further use this address to get the callee's kernel symbol's name. For some architectures, such as powerpc64, th

[PATCH bpf-next v4 00/10] bpf: enhancements for multi-function programs

2018-05-23 Thread Sandipan Das
[1] Support for bpf-to-bpf function calls in the powerpc64 JIT compiler. [2] Provide a way for resolving function calls because of the way JITed images are allocated in powerpc64. [3] Fix to get JITed instruction dumps for multi-function programs from the bpf system call. [4] Fix for bpf

[PATCH 2/4] cpsw_ale: add support functions for switchdev

2018-05-23 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw_ale.c | 129 + drivers/net/ethernet/ti/cpsw_ale.h | 8 +++ 2 files changed, 137 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 93dc05c

[PATCH 3/4] cpsw_switchdev: add switchdev support files

2018-05-23 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/Kconfig | 9 + drivers/net/ethernet/ti/Makefile | 1 + drivers/net/ethernet/ti/cpsw_switchdev.c | 299 +++ drivers/net/ethernet/ti/cpsw_switchdev.h | 4 + 4 files changed, 313 insertions

[PATCH bpf-next v4 01/10] bpf: support 64-bit offsets for bpf function calls

2018-05-23 Thread Sandipan Das
The imm field of a bpf instruction is a signed 32-bit integer. For JITed bpf-to-bpf function calls, it holds the offset of the start address of the callee's JITed image from __bpf_call_base. For some architectures, such as powerpc64, this offset may be as large as 64 bits and cannot be accomodated

[PATCH 4/4] cpsw: add switchdev support

2018-05-23 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 503 +++- drivers/net/ethernet/ti/cpsw_priv.h | 9 +- 2 files changed, 450 insertions(+), 62 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index

[PATCH 1/4] cpsw: move common headers definitions to cpsw_priv.h

2018-05-23 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 111 +--- drivers/net/ethernet/ti/cpsw_priv.h | 141 2 files changed, 142 insertions(+), 110 deletions(-) create mode 100644 drivers/net/ethernet/ti/cpsw_priv.h

[PATCH 0/4] RFC CPSW switchdev mode

2018-05-23 Thread Ilias Apalodimas
Hello, This is adding a new mode on the cpsw driver based around switchdev. In order to enable this you need to enable CONFIG_NET_SWITCHDEV, CONFIG_BRIDGE_VLAN_FILTERING, CONFIG_TI_CPSW_SWITCHDEV and add to udev config: SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="0f011900", \

Re: [PATCH net-next v4 2/2] openvswitch: Support conntrack zone limit

2018-05-23 Thread Pravin Shelar
On Mon, May 21, 2018 at 5:16 PM, Yi-Hung Wei wrote: > Currently, nf_conntrack_max is used to limit the maximum number of > conntrack entries in the conntrack table for every network namespace. > For the VMs and containers that reside in the same namespace, > they share the same conntrack table, an

Re: [patch iproute2/net-next 2/2] devlink: introduce support for showing port number and split subport number

2018-05-23 Thread Jiri Pirko
Wed, May 23, 2018 at 10:05:49PM CEST, dsah...@gmail.com wrote: >On 5/20/18 2:15 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> devlink/devlink.c| 6 ++ >> include/uapi/linux/devlink.h | 2 ++ >> 2 files changed, 8 insertions(+) >> >> diff --

Re: [PATCH bpf-next v3 01/15] net: initial AF_XDP skeleton

2018-05-23 Thread Björn Töpel
2018-05-24 0:50 GMT+02:00 Stephen Hemminger : > On Wed, 2 May 2018 13:01:22 +0200 > Björn Töpel wrote: > >> diff --git a/net/xdp/Kconfig b/net/xdp/Kconfig >> new file mode 100644 >> index ..90e4a7152854 >> --- /dev/null >> +++ b/net/xdp/Kconfig >> @@ -0,0 +1,7 @@ >> +config XDP_SOCKET

[PATCH net-next 1/1] bnx2x: Collect the device debug information during Tx timeout.

2018-05-23 Thread Sudarsana Reddy Kalluru
Tx-timeout mostly happens due to some issue in the device. In such cases, debug dump would be helpful for identifying the cause of the issue. This patch adds support to spill debug data during the Tx timeout. Here bnx2x_panic_dump() API is used instead of bnx2x_panic(), since we still want to allow

Re: [PATCH v3] powerpc: Implement csum_ipv6_magic in assembly

2018-05-23 Thread Christophe LEROY
Le 23/05/2018 à 20:34, Segher Boessenkool a écrit : On Tue, May 22, 2018 at 08:57:01AM +0200, Christophe Leroy wrote: The generic csum_ipv6_magic() generates a pretty bad result Please try with a more recent compiler, what you used is pretty ancient. It's not like recent compilers do great

Re: STMMAC driver with TSO enabled issue

2018-05-23 Thread Bhadram Varka
Hi Jose, On 5/17/2018 7:43 PM, Jose Abreu wrote: Hi Bhadram, On 15-05-2018 07:44, Bhadram Varka wrote: Hi Jose, On 5/10/2018 9:15 PM, Jose Abreu wrote: On 10-05-2018 16:08, Bhadram Varka wrote: Hi Jose, On 5/10/2018 7:59 PM, Jose Abreu wrote: Hi Bhadram, On 10-05-2018 09:55, Jose Abreu

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-23 Thread Heiner Kallweit
Am 24.05.2018 um 00:04 schrieb Andrew Lunn: > On Wed, May 23, 2018 at 10:15:29PM +0200, Heiner Kallweit wrote: >> I have the issue that suspending the MAC-integrated PHY gives an >> error during system suspend. The sequence is: >> >> 1. unconnected PHY/MAC are runtime-suspended already >> 2. system

Re: [PATCH bpf-next v4 3/7] tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf

2018-05-23 Thread Martin KaFai Lau
On Wed, May 23, 2018 at 05:18:43PM -0700, Yonghong Song wrote: > Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and > implement bpf_task_fd_query() in libbpf. The test programs > in samples/bpf and tools/testing/selftests/bpf, and later bpftool > will use this libbpf function to query k

Re: [PATCH bpf-next v4 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Martin KaFai Lau
On Wed, May 23, 2018 at 05:18:42PM -0700, Yonghong Song wrote: > Currently, suppose a userspace application has loaded a bpf program > and attached it to a tracepoint/kprobe/uprobe, and a bpf > introspection tool, e.g., bpftool, wants to show which bpf program > is attached to which tracepoint/kpro

Re: [PATCH bpf-next 0/5] fix test_sockmap

2018-05-23 Thread John Fastabend
On 05/23/2018 09:47 PM, Prashant Bhole wrote: > > > On 5/23/2018 6:44 PM, Prashant Bhole wrote: >> >> >> On 5/22/2018 2:08 AM, John Fastabend wrote: >>> On 05/20/2018 10:13 PM, Prashant Bhole wrote: On 5/19/2018 1:42 AM, John Fastabend wrote: > On 05/18/2018 12:17 AM, Prashant

Re: [Cake] [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-23 Thread Kevin Darbyshire-Bryant
> On 23 May 2018, at 23:40, Toke Høiland-Jørgensen wrote: > > > Hmm, and we still have an issue with ingress filtering (where cake is > running on an ifb interface). That runs pre-NAT in the conntrack case, > and we can't do the RX trick. Here we do the lookup manually in > conntrack (and thi

Re: [PATCH bpf-next 0/5] fix test_sockmap

2018-05-23 Thread Prashant Bhole
On 5/23/2018 6:44 PM, Prashant Bhole wrote: On 5/22/2018 2:08 AM, John Fastabend wrote: On 05/20/2018 10:13 PM, Prashant Bhole wrote: On 5/19/2018 1:42 AM, John Fastabend wrote: On 05/18/2018 12:17 AM, Prashant Bhole wrote: This series fixes bugs in test_sockmap code. They weren't caugh

[PATCH net-next] bpfilter: fix build dependency

2018-05-23 Thread Alexei Starovoitov
BPFILTER could have been enabled without INET causing this build error: ERROR: "bpfilter_process_sockopt" [net/bpfilter/bpfilter.ko] undefined! Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Reported-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov --- net/bpfilter/Kcon

[PATCH net-next 7/8] nfp: flower: implement host cmsg handler for LAG

2018-05-23 Thread Jakub Kicinski
From: John Hurley Adds the control message handler to synchronize offloaded group config with that of the kernel. Such messages are sent from fw to driver and feature the following 3 flags: - Data: an attached cmsg could not be processed - store for retransmission - Xon: FW can accept new messag

[PATCH net-next 5/8] net: include hash policy in LAG changeupper info

2018-05-23 Thread Jakub Kicinski
From: John Hurley LAG upper event notifiers contain the tx type used by the LAG device. Extend this to also include the hash policy used for tx types that utilize hashing. Signed-off-by: John Hurley --- CC: Jiri Pirko CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek drivers/net/b

[PATCH net-next 8/8] nfp: flower: compute link aggregation action

2018-05-23 Thread Jakub Kicinski
From: John Hurley If the egress device of an offloaded rule is a LAG port, then encode the output port to the NFP with a LAG identifier and the offloaded group ID. A prelag action is also offloaded which must be the first action of the series (although may appear after other pre-actions - e.g. t

[PATCH net-next 4/8] nfp: flower: add per repr private data for LAG offload

2018-05-23 Thread Jakub Kicinski
From: John Hurley Add a bitmap to each flower repr to track its state if it is enslaved by a bond. This LAG state may be different to the port state - for example, the port may be up but LAG state may be down due to the selection in an active/backup bond. Signed-off-by: John Hurley Reviewed-by:

[PATCH net-next 6/8] nfp: flower: monitor and offload LAG groups

2018-05-23 Thread Jakub Kicinski
From: John Hurley Monitor LAG events via the NETDEV_CHANGEUPPER/NETDEV_CHANGELOWERSTATE notifiers to maintain a list of offloadable groups. Sync these groups with HW via a delayed workqueue to prevent excessive re-configuration. When the workqueue is triggered it may generate multiple control mes

[PATCH net-next 0/8] nfp: offload LAG for tc flower egress

2018-05-23 Thread Jakub Kicinski
Hi! This series from John adds bond offload to the nfp driver. Patch 5 exposes the hash type for NETDEV_LAG_TX_TYPE_HASH to make sure nfp hashing matches that of the software LAG. This may be unnecessarily conservative, let's see what LAG maintainers think :) John says: This patchset sets up t

[PATCH net-next 3/8] nfp: flower: check for/turn on LAG support in firmware

2018-05-23 Thread Jakub Kicinski
From: John Hurley Check if the fw contains the _abi_flower_balance_sync_enable symbol. If it does then write a 1 to this indicating that the driver is willing to receive NIC to kernel LAG related control messages. If the write is successful, update the list of extra features supported by the fw

[PATCH net-next 1/8] nfp: add ndo_set_mac_address for representors

2018-05-23 Thread Jakub Kicinski
From: John Hurley Adding a netdev to a bond requires that its mac address can be modified. The default eth_mac_addr is sufficient to satisfy this requirement. Signed-off-by: John Hurley Reviewed-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/n

[PATCH net-next 2/8] nfp: nfpcore: add rtsym writing function

2018-05-23 Thread Jakub Kicinski
From: John Hurley Add an rtsym API function that combines the lookup of a symbol and the writing of a value to it. Values can be written as unsigned 32 or 64 bits. Signed-off-by: John Hurley Reviewed-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- .../ethernet/netronome/nfp/nfpc

Re: [PATCH v3 net-next 0/2] bpfilter

2018-05-23 Thread Alexei Starovoitov
On 5/23/18 6:50 PM, Jakub Kicinski wrote: On Wed, 23 May 2018 18:33:52 -0700, Jakub Kicinski wrote: Minor glitch with Ubuntu 18.04: $ gcc --version gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0 In file included from /usr/include/fcntl.h:290:0, from ../net/bpfilter/main.c:7: In function ‘

Re: [PATCH v3 net-next 0/2] bpfilter

2018-05-23 Thread Jakub Kicinski
On Wed, 23 May 2018 18:33:52 -0700, Jakub Kicinski wrote: > Minor glitch with Ubuntu 18.04: > > $ gcc --version > gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0 > > In file included from /usr/include/fcntl.h:290:0, > from ../net/bpfilter/main.c:7: > In function ‘open’, > inlined from ‘ma

Re: [PATCH v3 net-next 0/2] bpfilter

2018-05-23 Thread Jakub Kicinski
Minor glitch with Ubuntu 18.04: $ gcc --version gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0 In file included from /usr/include/fcntl.h:290:0, from ../net/bpfilter/main.c:7: In function ‘open’, inlined from ‘main’ at ../net/bpfilter/main.c:58:13: /usr/include/x86_64-linux-gnu/bits/fcnt

[PATCH net v2] enic: set DMA mask to 47 bit

2018-05-23 Thread Govindarajulu Varadarajan
In commit 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") DMA mask was changed from 40 bits to 64 bits. Hardware actually supports only 47 bits. Fixes: 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") Signed-off-by: Govindarajulu Varadarajan -

Re: [PATCH RFC net-next 00/11] udp gso

2018-05-23 Thread Willem de Bruijn
On Wed, May 23, 2018 at 8:02 PM, Marcelo Ricardo Leitner wrote: > On Wed, Apr 18, 2018 at 09:49:18AM -0400, Willem de Bruijn wrote: >> I just hacked up a sendmmsg extension to the benchmark to verify. >> Indeed that does not have nearly the same benefit as GSO: >> >> udp tx:976 MB/s 695394 c

[PATCH net-next] hv_netvsc: fix bogus ifalias on network device

2018-05-23 Thread Stephen Hemminger
If the guest network adapter is not configured with DeviceNaming enabled on the host, then the query for friendly name will return success but with a zero length name. Which then leads to a garbage value (stack contents) for ifalias. Fix is simple, just don't set name if host doesn't return it.

[PATCH bpf] bpf: properly enforce index mask to prevent out-of-bounds speculation

2018-05-23 Thread Daniel Borkmann
While reviewing the verifier code, I recently noticed that the following two program variants in relation to tail calls can be loaded. Variant 1: # bpftool p d x i 15 0: (15) if r1 == 0x0 goto pc+3 1: (18) r2 = map[id:5] 3: (05) goto pc+2 4: (18) r2 = map[id:6] 6: (b7) r3 =

[PATCH bpf-next v4 5/7] samples/bpf: add a samples/bpf test for BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
This is mostly to test kprobe/uprobe which needs kernel headers. Signed-off-by: Yonghong Song --- samples/bpf/Makefile | 4 + samples/bpf/task_fd_query_kern.c | 19 ++ samples/bpf/task_fd_query_user.c | 382 +++ 3 files changed, 405 insertions(+

[PATCH bpf-next v4 6/7] tools/bpf: add two BPF_TASK_FD_QUERY tests in test_progs

2018-05-23 Thread Yonghong Song
The new tests are added to query perf_event information for raw_tracepoint and tracepoint attachment. For tracepoint, both syscalls and non-syscalls tracepoints are queries as they are treated slightly differently inside the kernel. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/te

[PATCH bpf-next v4 7/7] tools/bpftool: add perf subcommand

2018-05-23 Thread Yonghong Song
The new command "bpftool perf [show | list]" will traverse all processes under /proc, and if any fd is associated with a perf event, it will print out related perf event information. Documentation is also added. Below is an example to show the results using bcc commands. Running the following 4 bc

[PATCH bpf-next v4 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf program is attached to which tracepoint/kprobe/uprobe. Such attachment information will be really useful to underst

[PATCH bpf-next v4 1/7] perf/core: add perf_get_event() to return perf_event given a struct file

2018-05-23 Thread Yonghong Song
A new extern function, perf_get_event(), is added to return a perf event given a struct file. This function will be used in later patches. Signed-off-by: Yonghong Song --- include/linux/perf_event.h | 5 + kernel/events/core.c | 8 2 files changed, 13 insertions(+) diff --git

[PATCH bpf-next v4 3/7] tools/bpf: sync kernel header bpf.h and add bpf_task_fd_query in libbpf

2018-05-23 Thread Yonghong Song
Sync kernel header bpf.h to tools/include/uapi/linux/bpf.h and implement bpf_task_fd_query() in libbpf. The test programs in samples/bpf and tools/testing/selftests/bpf, and later bpftool will use this libbpf function to query kernel. Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf

[PATCH bpf-next v4 4/7] tools/bpf: add ksym_get_addr() in trace_helpers

2018-05-23 Thread Yonghong Song
Given a kernel function name, ksym_get_addr() will return the kernel address for this function, or 0 if it cannot find this function name in /proc/kallsyms. This function will be used later when a kernel address is used to initiate a kprobe perf event. Acked-by: Martin KaFai Lau Signed-off-by: Yo

[PATCH bpf-next v4 0/7] bpf: implement BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf program is attached to which tracepoint/kprobe/uprobe. Such attachment information will be really useful to underst

[PATCH v2 net-next 2/3] net/ipv6: Udate fib6_table_lookup tracepoint

2018-05-23 Thread dsahern
From: David Ahern Commit bb0ad1987e96 ("ipv6: fib6_rules: support for match on sport, dport and ip proto") added support for protocol and ports to FIB rules. Update the FIB lookup tracepoint to dump the parameters. Signed-off-by: David Ahern --- include/trace/events/fib6.h | 29 +++

[PATCH v2 net-next 0/3] net: Update fib_table_lookup tracepoints

2018-05-23 Thread dsahern
From: David Ahern Update the FIB lookup tracepoints to include ip proto and port fields from the flow struct. In the process make the IPv4 tracepoint inline with IPv6 which is much easier to use and follow the lookup and result. Remove the tracepoint in fib_validate_source which does not provide

[PATCH v2 net-next 3/3] net/ipv4: Remove tracepoint in fib_validate_source

2018-05-23 Thread dsahern
From: David Ahern Tracepoint does not add value and the call to fib_lookup follows it which shows the same information and the fib lookup result. Signed-off-by: David Ahern --- include/trace/events/fib.h | 35 --- net/ipv4/fib_frontend.c| 2 -- 2 files chan

[PATCH v2 net-next 1/3] net/ipv4: Udate fib_table_lookup tracepoint

2018-05-23 Thread dsahern
From: David Ahern Commit 4a2d73a4fb36 ("ipv4: fib_rules: support match on sport, dport and ip proto") added support for protocol and ports to FIB rules. Update the FIB lookup tracepoint to dump the parameters. In addition, make the IPv4 tracepoint similar to the IPv6 one where the lookup paramet

Re: [PATCH RFC net-next 00/11] udp gso

2018-05-23 Thread Marcelo Ricardo Leitner
On Wed, Apr 18, 2018 at 09:49:18AM -0400, Willem de Bruijn wrote: > I just hacked up a sendmmsg extension to the benchmark to verify. > Indeed that does not have nearly the same benefit as GSO: > > udp tx:976 MB/s 695394 calls/s 16557 msg/s > > This matches the numbers seen from TCP withou

Re: [PATCH 05/15] mtd: nand: pxa3xx: remove the dmaengine compat need

2018-05-23 Thread Daniel Mack
Hi Robert, Please refer to the attached patch instead of the one I sent earlier. I missed to also remove the platform_get_resource(IORESOURCE_DMA) call. Thanks, Daniel On Friday, May 18, 2018 11:31 PM, Daniel Mack wrote: Hi Robert, Thanks for this series. On Monday, April 02, 2018 04:26

Re: [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-23 Thread Toke Høiland-Jørgensen
Pablo Neira Ayuso writes: > On Tue, May 22, 2018 at 04:11:06PM +0200, Toke Høiland-Jørgensen wrote: >> Pablo Neira Ayuso writes: >> >> > Hi Toke, >> > >> > On Tue, May 22, 2018 at 03:57:38PM +0200, Toke Høiland-Jørgensen wrote: >> >> When CAKE is deployed on a gateway that also performs NAT (wh

[PATCH V4] mlx4_core: allocate ICM memory in page size chunks

2018-05-23 Thread Qing Huang
When a system is under memory presure (high usage with fragments), the original 256KB ICM chunk allocations will likely trigger kernel memory management to enter slow path doing memory compact/migration ops in order to complete high order memory allocations. When that happens, user processes calli

Re: [PATCH net-next v3] net: sched: don't disable bh when accessing action idr

2018-05-23 Thread Cong Wang
On Wed, May 23, 2018 at 1:52 AM, Vlad Buslov wrote: > Initial net_device implementation used ingress_lock spinlock to synchronize > ingress path of device. This lock was used in both process and bh context. > In some code paths action map lock was obtained while holding ingress_lock. > Commit e1e9

Re: INFO: rcu detected stall in corrupted

2018-05-23 Thread Marcelo Ricardo Leitner
On Mon, May 21, 2018 at 11:13:46AM -0700, Eric Dumazet wrote: > > > On 05/21/2018 11:09 AM, David Miller wrote: > > From: syzbot > > Date: Mon, 21 May 2018 11:05:02 -0700 > > > >> find_match+0x244/0x13a0 net/ipv6/route.c:691 > >> find_rr_leaf net/ipv6/route.c:729 [inline] > >> rt6_select net

Re: [PATCH v2] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread Paul Mackerras
On Wed, May 23, 2018 at 02:37:38PM -0700, Eric Biggers wrote: > From: Eric Biggers > > The PPPIOCDETACH ioctl effectively tries to "close" the given ppp file > before f_count has reached 0, which is fundamentally a bad idea. It > does check 'f_count < 2', which excludes concurrent operations on

Re: [PATCH net-next] net:sched: add action inheritdsfield to skbmod

2018-05-23 Thread Cong Wang
On Thu, May 17, 2018 at 12:33 PM, Fu, Qiaobin wrote: > net/sched: add action inheritdsfield to skbmod > > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->prioriry. This enables > later classification of packets based on the DS field. > > Original idea by Jama

[PATCH RFC net-next 8/9] net/ipv6: Add support for specifying metric of connected routes

2018-05-23 Thread dsahern
From: David Ahern Add support for IFA_RT_PRIORITY to ipv6 addresses. If the metric is changed on an existing address then the new route is inserted before removing the old one. Since the metric is one of the route keys, the prefix route can not be atomically replaced. Signed-off-by: David Ahern

[PATCH RFC net-next 4/9] net/ipv6: Pass ifa6_config struct to inet6_addr_add

2018-05-23 Thread dsahern
From: David Ahern Move the creation of struct ifa6_config up to callers of inet6_addr_add. Signed-off-by: David Ahern --- net/ipv6/addrconf.c | 112 ++-- 1 file changed, 57 insertions(+), 55 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ip

[PATCH RFC net-next 2/9] net/ipv6: Convert ipv6_add_addr to struct ifa6_config

2018-05-23 Thread dsahern
From: David Ahern Convert ipv6_add_addr from a list of address parameters to use the new ifa6_config struct. Mapping of variable changes: addr --> cfg->pfx peer_addr --> cfg->peer_pfx pfxlen--> cfg->plen flags --> cfg->ifa_flags scope, valid_lft, prefered_lft ha

[PATCH RFC net-next 7/9] net/ipv4: Add support for specifying metric of connected routes

2018-05-23 Thread dsahern
From: David Ahern Add support for IFA_RT_PRIORITY to ipv4 addresses. If the metric is changed on an existing address then the new route is inserted before removing the old one. Since the metric is one of the route keys, the prefix route can not be replaced. Signed-off-by: David Ahern --- incl

[PATCH RFC net-next 6/9] net: Add IFA_RT_PRIORITY address attribute

2018-05-23 Thread dsahern
From: David Ahern Currently, if two interfaces have addresses in the same connected route, then the order of the prefix route entries is determined by the order in which the addresses are assigned or the links brought up. Add IFA_RT_PRIORITY to allow user to specify the metric of the prefix rout

[PATCH RFC net-next 3/9] net/ipv6: Remove temp variables in ipv6_create_tempaddr

2018-05-23 Thread dsahern
From: David Ahern Remove temp variables in favor of ifa6_config struct. Signed-off-by: David Ahern --- net/ipv6/addrconf.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index eff925b2064e..4988f2265882

[PATCH RFC net-next 5/9] net/ipv6: Pass ifa6_config struct to inet6_addr_modify

2018-05-23 Thread dsahern
From: David Ahern Update inet6_addr_modify to take ifa6_config. Signed-off-by: David Ahern --- net/ipv6/addrconf.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2db1acf70610..1b

[PATCH RFC net-next 0/9] net: Add address attribute to control metric of prefix route

2018-05-23 Thread dsahern
From: David Ahern For use cases such as VRR (Virtual Router Redundancy) interface managers want efficient control over the order of prefix routes when multiple interfaces have addresses with overlapping/duplicate subnets. Currently, if two interfaces have addresses in the same subnet, the order

[PATCH RFC net-next 1/9] net/ipv6: Introduce ifa6_config struct

2018-05-23 Thread dsahern
From: David Ahern Move config parameters for adding an ipv6 address to a struct. struct names stem from inet6_rtm_newaddr which is the modern handler for adding an address. Signed-off-by: David Ahern --- include/net/addrconf.h | 12 1 file changed, 12 insertions(+) diff --git a/i

[PATCH RFC net-next 9/9] selftests: fib_tests: Add prefix route tests with metric

2018-05-23 Thread dsahern
From: David Ahern Add tests verifying prefix routes are inserted with expected metric. IPv6 prefix route tests TEST: Default metric [ OK ] TEST: User specified metric on first device [ OK ] TEST: User specified metric on second devic

Re: [PATCH net-next v4 0/2] openvswitch: Support conntrack zone limit

2018-05-23 Thread Pravin Shelar
On Wed, May 23, 2018 at 10:13 AM, David Miller wrote: > From: Yi-Hung Wei > Date: Mon, 21 May 2018 17:16:03 -0700 > >> v3->v4: >> - Addresses comments from Parvin that include simplify netlink API, >> and remove unncessary RCU lockings. >> - Rebases to master. > > Pravin, please review.

Re: [PATCH v2 net] netfilter: provide correct argument to nla_strlcpy()

2018-05-23 Thread Pablo Neira Ayuso
On Tue, May 22, 2018 at 08:14:39AM +0200, Florian Westphal wrote: > Eric Dumazet wrote: > > Recent patch forgot to remove nla_data(), upsetting syzkaller a bit. > > Duuuh Thanks Eric. > Acked-by: Florian Westphal Applied, thanks!

Re: [PATCH bpf-next v3 01/15] net: initial AF_XDP skeleton

2018-05-23 Thread Stephen Hemminger
On Wed, 2 May 2018 13:01:22 +0200 Björn Töpel wrote: > diff --git a/net/xdp/Kconfig b/net/xdp/Kconfig > new file mode 100644 > index ..90e4a7152854 > --- /dev/null > +++ b/net/xdp/Kconfig > @@ -0,0 +1,7 @@ > +config XDP_SOCKETS > + bool "XDP sockets" > + depends on BPF_SYSCAL

Re: [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-23 Thread Pablo Neira Ayuso
On Tue, May 22, 2018 at 04:11:06PM +0200, Toke Høiland-Jørgensen wrote: > Pablo Neira Ayuso writes: > > > Hi Toke, > > > > On Tue, May 22, 2018 at 03:57:38PM +0200, Toke Høiland-Jørgensen wrote: > >> When CAKE is deployed on a gateway that also performs NAT (which is a > >> common deployment mode

Re: [PATCH v2] ath10k: transmit queued frames after waking queues

2018-05-23 Thread Niklas Cassel
On Wed, May 23, 2018 at 06:25:49PM +0200, Erik Stromdahl wrote: > > > On 05/22/2018 11:15 PM, Niklas Cassel wrote: > > > > > > > > Earlier we observed performance issues in calling push_pending from each > > > tx completion. IMHO this change may introduce the same problem again. > > > > I pre

Re: [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-23 Thread Toke Høiland-Jørgensen
David Miller writes: > From: Toke Høiland-Jørgensen > Date: Wed, 23 May 2018 23:05:16 +0200 > >> Ah, right, that could work. Is there any particular field in sk_buff >> we should stomp on for this purpose, or would you prefer a new one? >> Looking through it, the only obvious one that comes to m

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

2018-05-23 Thread Marcelo Ricardo Leitner
On Tue, May 15, 2018 at 09:23:08AM +0800, Ye Xiaolong wrote: > 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:

Re: [PATCH iproute2] ip route: Print expires as signed int

2018-05-23 Thread Stephen Hemminger
On Wed, 23 May 2018 11:50:01 -0700 dsah...@kernel.org wrote: > From: David Ahern > > rta_expires is a signed int; print it as one. > > Fixes: 663c3cb23103f ("iproute: implement JSON and color output") > Signed-off-by: David Ahern Applied, thanks.

Re: [PATCH iproute2] Allow to configure /var/run/netns directory

2018-05-23 Thread Stephen Hemminger
On Fri, 18 May 2018 15:44:00 -0700 Pavel Maltsev wrote: > Currently NETNS_RUN_DIR is hardcoded and refers to /var/run/netns. > However, some systems (e.g. Android) doesn't have /var > which results in error attempts to create network namespaces on these > systems. This change makes NETNS_RUN_DIR

[Patch net-next] net_sched: switch to rcu_work

2018-05-23 Thread Cong Wang
Commit 05f0fe6b74db ("RCU, workqueue: Implement rcu_work") introduces new API's for dispatching work in a RCU callback. Now we can just switch to the new API's for tc filters. This could get rid of a lot of code. Cc: Tejun Heo Cc: "Paul E. McKenney" Cc: Jamal Hadi Salim Signed-off-by: Cong Wang

Re: [PATCH v3] ath10k: transmit queued frames after processing rx packets

2018-05-23 Thread Niklas Cassel
On Thu, May 24, 2018 at 12:15:08AM +0200, Niklas Cassel wrote: > This problem cannot be reproduced on low-latency devices, e.g. pci, > since they call ath10k_mac_tx_push_pending() from > ath10k_htt_txrx_compl_task(). ath10k_htt_txrx_compl_task() is not called > on high-latency devices. > Fix the pr

Re: [PATCH 2/4] arcnet: com20020: bindings for smsc com20020

2018-05-23 Thread Andrea Greco
On 05/23/2018 06:49 PM, Rob Herring wrote: > One typo, otherwise: > > Reviewed-by: Rob Herring Yes typo, Fixed over my branch, sorry for that... I expect a comment about bps, Bit per Second, used in `bus-speed-bps` You will add it by your self in property-units.txt, or required my patch? If your

[PATCH v3] ath10k: transmit queued frames after processing rx packets

2018-05-23 Thread Niklas Cassel
When running iperf on ath10k SDIO, TX can stop working: iperf -c 192.168.1.1 -i 1 -t 20 -w 10K [ 3] 0.0- 1.0 sec 2.00 MBytes 16.8 Mbits/sec [ 3] 1.0- 2.0 sec 3.12 MBytes 26.2 Mbits/sec [ 3] 2.0- 3.0 sec 3.25 MBytes 27.3 Mbits/sec [ 3] 3.0- 4.0 sec 655 KBytes 5.36 Mbits/sec [ 3]

Re: [PATCH] net: phy: replace bool members in struct phy_device with bit-fields

2018-05-23 Thread Andrew Lunn
On Wed, May 23, 2018 at 08:05:20AM +0200, Heiner Kallweit wrote: > In struct phy_device we have a number of flags being defined as type > bool. Similar to e.g. struct pci_dev we can save some space by using > bit-fields. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-23 Thread Andrew Lunn
On Wed, May 23, 2018 at 10:15:29PM +0200, Heiner Kallweit wrote: > I have the issue that suspending the MAC-integrated PHY gives an > error during system suspend. The sequence is: > > 1. unconnected PHY/MAC are runtime-suspended already > 2. system suspend commences > 3. mdio_bus_phy_suspend is ca

Re: [PATCH bpf-next v2 0/3] bpf: add boot parameters for sysctl knobs

2018-05-23 Thread Alexei Starovoitov
On Wed, May 23, 2018 at 02:18:19PM +0200, Eugene Syromiatnikov wrote: > Some BPF sysctl knobs affect the loading of BPF programs, and during > system boot/init stages these sysctls are not yet configured. > A concrete example is systemd, that has implemented loading of BPF > programs. > > Thus, to

Re: [PATCH v6 0/5] PCI: Improve PCIe link status reporting

2018-05-23 Thread Bjorn Helgaas
[+to Davem] On Thu, May 03, 2018 at 03:00:07PM -0500, Bjorn Helgaas wrote: > This is based on Tal's recent work to unify the approach for reporting PCIe > link speed/width and whether the device is being limited by a slower > upstream link. > > The new pcie_print_link_status() interface appeared

[PATCH v2] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread Eric Biggers
From: Eric Biggers The PPPIOCDETACH ioctl effectively tries to "close" the given ppp file before f_count has reached 0, which is fundamentally a bad idea. It does check 'f_count < 2', which excludes concurrent operations on the file since they would only be possible with a shared fd table, in wh

Re: [PATCH bpf-next v3 10/10] tools: bpftool: add delimiters to multi-function JITed dumps

2018-05-23 Thread Jakub Kicinski
On Wed, 23 May 2018 16:07:40 +0530, Sandipan Das wrote: > "name": "bpf_prog_196af774a3477707_F", > "insns": [{ > "pc": "0x0", > "operation": "nop", > "operands": [null > ] > },{ > "pc": "0x4"

Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
On 5/23/18 2:04 PM, Alexei Starovoitov wrote: On Wed, May 23, 2018 at 10:13:22AM -0700, Martin KaFai Lau wrote: + __u32 prog_id;/* output: prod_id */ + __u32 attach_info;/* output: BPF_ATTACH_* */ + __u64 probe

Re: [PATCH bpf-next v3 2/7] bpf: introduce bpf subcommand BPF_TASK_FD_QUERY

2018-05-23 Thread Yonghong Song
On 5/23/18 10:13 AM, Martin KaFai Lau wrote: On Tue, May 22, 2018 at 09:30:46AM -0700, Yonghong Song wrote: Currently, suppose a userspace application has loaded a bpf program and attached it to a tracepoint/kprobe/uprobe, and a bpf introspection tool, e.g., bpftool, wants to show which bpf pr

Re: [PATCH net-next v15 4/7] sch_cake: Add NAT awareness to packet classifier

2018-05-23 Thread David Miller
From: Toke Høiland-Jørgensen Date: Wed, 23 May 2018 23:05:16 +0200 > Ah, right, that could work. Is there any particular field in sk_buff > we should stomp on for this purpose, or would you prefer a new one? > Looking through it, the only obvious one that comes to mind is, well, > skb->_nfct :) >

Re: [PATCH] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread Eric Biggers
On Wed, May 23, 2018 at 11:56:36AM -0400, David Miller wrote: > From: Guillaume Nault > Date: Wed, 23 May 2018 15:57:08 +0200 > > > I'd rather add > > + if (cmd == PPPIOCDETACH) { > > + err = -EINVAL; > > + goto out; > > + } > > > > Making PPPIOCDETACH unknown to ppp_gene

Re: [PATCH net-next] net:sched: add action inheritdsfield to skbmod

2018-05-23 Thread Marcelo Ricardo Leitner
Hi, Some style fixes: On Thu, May 17, 2018 at 07:33:08PM +, Fu, Qiaobin wrote: > net/sched: add action inheritdsfield to skbmod This extra line above should not be here. > > The new action inheritdsfield copies the field DS of > IPv4 and IPv6 packets into skb->prioriry. This enables

  1   2   3   4   >