[net-next 1/6] net/dcb: Add dcbnl buffer attribute

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen In this patch, we add dcbnl buffer attribute to allow user change the NIC's buffer configuration such as priority to buffer mapping and buffer size of individual buffer. This attribute combined with pfc attribute allows advance user to fine tune the qos setting for specific prio

[pull request][net-next 0/6] Mellanox, mlx5e updates 2018-05-19

2018-05-21 Thread Saeed Mahameed
Hi Dave, This is a mlx5e only pull request, for more information please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit eb38401c779d350e9e31396471ea072fa29aec9b: net: stmmac: Populate missing callbacks in HWIF init

[net-next 6/6] net/mlx5e: Receive buffer support for DCBX

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add dcbnl's set/get buffer configuration callback that allows user to set/get buffer size configuration and priority to buffer mapping. By default, firmware controls receive buffer configuration and priority of buffer mapping based on the changes in pfc settings. When set buffer

[net-next 3/6] net/mlx5e: Move port speed code from en_ethtool.c to en/port.c

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Move four below functions from en_ethtool.c to en/port.c. These functions are used by both en_ethtool.c and en_main.c. Downstream patches will use these functions without ethtool link mode dependency. u32 mlx5e_port_ptys2speed(u32 eth_proto_oper); int mlx5e_port_linkspeed(str

[net-next 4/6] net/mlx5e: PPTB and PBMC register firmware command support

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add firmware command interface to read and write PPTB and PBMC registers. PPTB register enables mappings priority to a specific receive buffer. PBMC registers enables changing the receive buffer's configuration such as buffer size, xon/xoff thresholds, buffer's lossy property a

[net-next 5/6] net/mlx5e: Receive buffer configuration

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add APIs for buffer configuration based on the changes in pfc configuration, cable len, buffer size configuration, and priority to buffer mapping. Note that the xoff fomula is as below xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B] xoff_threshold = buffer_size -

[net-next 2/6] net/mlx5: Add pbmc and pptb in the port_access_reg_cap_mask

2018-05-21 Thread Saeed Mahameed
From: Huy Nguyen Add pbmc and pptb in the port_access_reg_cap_mask. These two bits determine if device supports receive buffer configuration. Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed --- include/linux/mlx5/device.h | 3 +++ include/linux/mlx5/mlx5_ifc.h | 12 2

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

2018-05-21 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

Re: [PATCH bpf-next 3/7] bpf: btf: Check array->index_type

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: Instead of ingoring the array->index_type field. Enforce that it must be an unsigned BTF_KIND_INT. Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 83 1 file changed, 59 insertions(

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

2018-05-21 Thread Niklas Cassel
The following problem was observed when running iperf: [ 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] 4.0- 5.0 sec 0.00 Bytes 0.00 bits/sec

Re: [PATCH] bpf: fix mem leak in error path of lwt bpf setup

2018-05-21 Thread Daniel Borkmann
On 05/21/2018 07:44 PM, Martin KaFai Lau wrote: > On Sun, May 20, 2018 at 02:08:57PM +0100, Mathieu Xhonneux wrote: >> In bpf_parse_prog, if bpf_prog_get_type fails, the function is >> immediately terminated without freeing the previously allocated >> prog->name. >> This patch adds a kfree before t

net merged into net-next

2018-05-21 Thread David Miller
Please double check my work, although the conflict resolutions were relatively trivial this time. Especially interested for some of us is that now both networking tree have the fixes to objtool for gcc-8 which was causing tons of bogus warnings to be emitted. Recent upgrades to Fedora 28 would h

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

2018-05-21 Thread Niklas Cassel
On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote: > On Thu, 17 May 2018 at 16:16, Niklas Cassel > wrote: > > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c > b/drivers/net/wireless/ath/ath10k/txrx.c > > index cda164f6e9f6..1d3b2d2c3fee 100644 > > --- a/drivers/net/wireless/ath/

[PATCH net-next v14 7/7] sch_cake: Conditionally split GSO segments

2018-05-21 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on ban

[PATCH net-next v14 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth 20

[PATCH net-next v14 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature is

[PATCH net-next v14 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most d

[PATCH net-next v14 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs capab

[PATCH net-next v14 2/7] sch_cake: Add ingress mode

2018-05-21 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to alway

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

2018-05-21 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack me

[PATCH net-next v14 5/7] sch_cake: Add DiffServ handling

2018-05-21 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple, three-tier

Re: [PATCH net-next 0/5] TI Ethernet driver warnings fixes

2018-05-21 Thread David Miller
From: Florian Fainelli Date: Mon, 21 May 2018 11:45:50 -0700 > Hi all, > > This patch series attempts to fix properly the warnings observed with turning > on COMPILE_TEST and TI Ethernet drivers on 64-bit hosts. > > Since I don't have any of this hardware, please review carefully for possible >

Re: [PATCH bpf-next 2/7] bpf: btf: Change how section is supported in btf_header

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: There are currently unused section descriptions in the btf_header. Those sections are here to support future BTF use cases. For example, the func section (func_off) is to support function signature (e.g. the BPF prog function signature). Instead of

Re: [PATCH 07/33] iwlwifi: mvm: use match_string() helper

2018-05-21 Thread Luca Coelho
On Mon, 2018-05-21 at 19:57 +0800, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > > Cc: Kalle Valo > Cc: Intel Linux Wireless > Cc: Johannes Berg > Cc: Emmanuel Grumbach > Cc: linux-wirel...@vger.kern

Re: [RFC PATCH ghak32 V2 13/13] debug audit: read container ID of a process

2018-05-21 Thread Paul Moore
On Mon, May 21, 2018 at 3:19 PM, Eric W. Biederman wrote: > Steve Grubb writes: > >> On Friday, March 16, 2018 5:00:40 AM EDT Richard Guy Briggs wrote: >>> Add support for reading the container ID from the proc filesystem. >> >> I think this could be useful in general. Please consider this to be

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

2018-05-21 Thread Vlad Buslov
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 e1e992e52faa ("[NET_SCHED] protect action config/dump from irqs")

Re: [PATCH bpf-next 1/7] bpf: Expose check_uarg_tail_zero()

2018-05-21 Thread Yonghong Song
On 5/18/18 5:16 PM, Martin KaFai Lau wrote: This patch exposes check_uarg_tail_zero() which will be reused by a later BTF patch. Its name is changed to bpf_check_uarg_tail_zero(). Signed-off-by: Martin KaFai Lau Acked-by: Yonghong Song

Re: [PATCH bpf v2 6/6] bpf: fix JITed dump for multi-function programs via syscall

2018-05-21 Thread Sandipan Das
Hi Daniel, On 05/18/2018 09:21 PM, Daniel Borkmann wrote: > On 05/18/2018 02:50 PM, Sandipan Das wrote: >> 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

[PATCH net 1/1] qed: Fix mask for physical address in ILT entry

2018-05-21 Thread Shahed Shaikh
ILT entry requires 12 bit right shifted physical address. Existing mask for ILT entry of physical address i.e. ILT_ENTRY_PHY_ADDR_MASK is not sufficient to handle 64bit address because upper 8 bits of 64 bit address were getting masked which resulted in completer abort error on PCIe bus due to inva

Re: [RFC PATCH ghak32 V2 13/13] debug audit: read container ID of a process

2018-05-21 Thread Eric W. Biederman
Steve Grubb writes: > On Friday, March 16, 2018 5:00:40 AM EDT Richard Guy Briggs wrote: >> Add support for reading the container ID from the proc filesystem. > > I think this could be useful in general. Please consider this to be part of > the full patch set and not something merely used to deb

Re: [RFC PATCH ghak32 V2 03/13] audit: log container info of syscalls

2018-05-21 Thread Steve Grubb
On Thursday, May 17, 2018 5:41:02 PM EDT Richard Guy Briggs wrote: > On 2018-05-17 17:09, Steve Grubb wrote: > > On Fri, 16 Mar 2018 05:00:30 -0400 > > > > Richard Guy Briggs wrote: > > > Create a new audit record AUDIT_CONTAINER_INFO to document the > > > container ID of a process if it is prese

Re: [RFC PATCH ghak32 V2 13/13] debug audit: read container ID of a process

2018-05-21 Thread Steve Grubb
On Friday, March 16, 2018 5:00:40 AM EDT Richard Guy Briggs wrote: > Add support for reading the container ID from the proc filesystem. I think this could be useful in general. Please consider this to be part of the full patch set and not something merely used to debug the patches. -Steve > Thi

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

2018-05-21 Thread Alexei Starovoitov
On Mon, May 21, 2018 at 02:29:30PM +0200, Eugene Syromiatnikov wrote: > Hello. > > This patch set adds ability to set default values for > kernel.unprivileged_bpf_disable, net.core.bpf_jit_harden, > net.core.bpf_jit_kallsyms sysctl knobs as well as option to override > them via a boot-time kernel

Re: [RFC feedback] AF_XDP and non-Intel hardware

2018-05-21 Thread Björn Töpel
2018-05-21 14:34 GMT+02:00 Mykyta Iziumtsev : > Hi Björn and Magnus, > > (This thread is a follow up to private dialogue. The intention is to > let community know that AF_XDP can be enhanced further to make it > compatible with wider range of NIC vendors). > Mykyta, thanks for doing the write-up a

[PATCH net-next 4/5] net: ethernet: davinci_emac: Fix printing of base address

2018-05-21 Thread Florian Fainelli
Use %pa which is the correct formatter to print a physical address, instead of %p which is just a pointer. Fixes: a6286ee630f6 ("net: Add TI DaVinci EMAC driver") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/davinci_emac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH net-next 5/5] ti: ethernet: davinci: Fix cast to int warnings

2018-05-21 Thread Florian Fainelli
Now that we can compile test this driver on 64-bit hosts, we get some warnings about how a pointer/address is written/read to/from a register (sw_token). Fix this by doing the appropriate conversions, we cannot possibly have the driver work on 64-bit hosts the way the tokens are managed though, sin

[PATCH net-next 0/5] TI Ethernet driver warnings fixes

2018-05-21 Thread Florian Fainelli
Hi all, This patch series attempts to fix properly the warnings observed with turning on COMPILE_TEST and TI Ethernet drivers on 64-bit hosts. Since I don't have any of this hardware, please review carefully for possible breakage! Thank you! Florian Fainelli (5): ti: ethernet: cpdma: Use corr

[PATCH net-next 2/5] net: ethernet: ti: cpts: Fix timestamp print

2018-05-21 Thread Florian Fainelli
On 64-bit hosts we will get the following warning: drivers/net/ethernet/ti/cpts.c: In function 'cpts_overflow_check': drivers/net/ethernet/ti/cpts.c:297:11: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type '__kernel_time_t {aka long int}' [-Wformat=] pr_de

[PATCH net-next 1/5] ti: ethernet: cpdma: Use correct format for genpool_*

2018-05-21 Thread Florian Fainelli
Now that we can compile davinci_cpdma.c on 64-bit hosts, we can see that the format used for printing a size_t type is incorrect, use %zd accordingly. Fixes: aeec3021043b ("net: ethernet: ti: cpdma: remove used_desc counter") Signed-off-by: Florian Fainelli --- drivers/net/ethernet/ti/davinci_cp

[PATCH net-next 3/5] net: ethernet: ti: cpsw: Fix cpsw_add_ch_strings() printk format

2018-05-21 Thread Florian Fainelli
When building on a 64-bit host we will get the following warning: drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_add_ch_strings': drivers/net/ethernet/ti/cpsw.c:1284:19: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=] "%s DMA cha

Re: [PATCH net-next 0/8] tcp: default RACK loss recovery

2018-05-21 Thread hiren panchasara
On 05/17/18 at 03:45P, David Miller wrote: > From: Yuchung Cheng > Date: Wed, 16 May 2018 16:40:09 -0700 > > > This patch set implements the features correspond to the > > draft-ietf-tcpm-rack-03 version of the RACK draft. > > https://datatracker.ietf.org/meeting/101/materials/slides-101-tcpm-upd

Re: [PATCH net] ipmr: properly check rhltable_init() return value

2018-05-21 Thread Nikolay Aleksandrov
On 05/21/2018 08:51 PM, Eric Dumazet wrote: > commit 8fb472c09b9d ("ipmr: improve hash scalability") > added a call to rhltable_init() without checking its return value. > > This problem was then later copied to IPv6 and factorized in commit > 0bbbf0e7d0e7 ("ipmr, ip6mr: Unite creation of new mr_t

RE: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-21 Thread Jon Rosen (jrosen)
On Monday, May 21, 2018 1:07 PM, Willem de Bruijn wrote: >On Mon, May 21, 2018 at 8:57 AM, Jon Rosen (jrosen) wrote: >> On Sunday, May 20, 2018 7:22 PM, Willem de Bruijn >> wrote: >>> On Sun, May 20, 2018 at 6:51 PM, Willem de Bruijn >>> wrote: On Sat, May 19, 2018 at 8:07 AM, Jon Rosen w

Re: [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 11:08 AM, Eric Dumazet wrote: > > > On 05/21/2018 10:35 AM, Toke Høiland-Jørgensen wrote: > >> Ah yes, sequence number wrapping. I was thinking I needed to deal with >> that, and then got sidetracked and forgot about it. Will fix. >> >> Other than that, do you agree that this app

Re: INFO: rcu detected stall in corrupted

2018-05-21 Thread David Ahern
On 5/21/18 12:13 PM, 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/ipv6/route.c:779 [inline] >

Re: INFO: rcu detected stall in corrupted

2018-05-21 Thread Eric Dumazet
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/ipv6/route.c:779 [inline] > > Hmmm, endless loop in find_rr_leaf or similar? >

Re: INFO: rcu detected stall in corrupted

2018-05-21 Thread David Miller
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/ipv6/route.c:779 [inline] Hmmm, endless loop in find_rr_leaf or similar?

Re: [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 10:35 AM, Toke Høiland-Jørgensen wrote: > Ah yes, sequence number wrapping. I was thinking I needed to deal with > that, and then got sidetracked and forgot about it. Will fix. > > Other than that, do you agree that this approach to SACK and header > handling can work? Unfortunat

INFO: rcu detected stall in corrupted

2018-05-21 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:771c577c23ba Linux 4.17-rc6 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1713435780 kernel config: https://syzkaller.appspot.com/x/.config?x=982e2df1b9e60b02 dashboard link: https://syzkaller.a

[PATCH net] ipmr: properly check rhltable_init() return value

2018-05-21 Thread Eric Dumazet
commit 8fb472c09b9d ("ipmr: improve hash scalability") added a call to rhltable_init() without checking its return value. This problem was then later copied to IPv6 and factorized in commit 0bbbf0e7d0e7 ("ipmr, ip6mr: Unite creation of new mr_table") kasan: CONFIG_KASAN_INLINE enabled kasan: GPF

Re: [PATCH] bpf: fix mem leak in error path of lwt bpf setup

2018-05-21 Thread Martin KaFai Lau
On Sun, May 20, 2018 at 02:08:57PM +0100, Mathieu Xhonneux wrote: > In bpf_parse_prog, if bpf_prog_get_type fails, the function is > immediately terminated without freeing the previously allocated > prog->name. > This patch adds a kfree before the return. > > Signed-off-by: Mathieu Xhonneux > ---

pull request Cavium liquidio vswitch firmware v1.7.2

2018-05-21 Thread Felix Manlunas
The following changes since commit 2a9b2cf50fb32e36e4fc1586c2f6f1421913b553: Merge branch 'for-upstreaming-v1.7.2' of https://github.com/felix-cavium/linux-firmware (2018-05-18 08:35:22 -0400) are available in the git repository at: https://github.com/felix-cavium/linux-firmware.git for-ups

Re: [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
Eric Dumazet writes: > On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote: > >> +while (oplen_tmp >= 8) { >> +u32 right_b = get_unaligned_be32(sack_tmp + 4); >> +u32 left_b = get_unaligned_be32(sack_tmp); >> + >> +if (left_

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

2018-05-21 Thread dsahern
From: 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 b/tools/testing/selftests/net/fib

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

2018-05-21 Thread dsahern
From: 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 insertions(+) diff --git a/driv

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

2018-05-21 Thread dsahern
From: 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 com

[PATCH] ipvs: drop templates for never established TCP connections

2018-05-21 Thread Michal Koutný
IPVS includes protection against filling the ip_vs_conn_tab by dropping 1/32 of feasible entries every second. The template entries (for persistent services) are never directly deleted by this mechanism but when a picked TCP connection entry is being dropped (1), the respective template entry is dr

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

2018-05-21 Thread dsahern
From: 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 chang

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

2018-05-21 Thread dsahern
From: David Ahern Bring consistency to ipv6 route replace and append semantics. 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

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

2018-05-21 Thread dsahern
From: 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

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

2018-05-21 Thread dsahern
From: 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 insert

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

2018-05-21 Thread dsahern
From: 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

Re: [PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Eric Dumazet
On 05/21/2018 09:24 AM, Toke Høiland-Jørgensen wrote: > + while (oplen_tmp >= 8) { > + u32 right_b = get_unaligned_be32(sack_tmp + 4); > + u32 left_b = get_unaligned_be32(sack_tmp); > + > + if (left_b >= right_b) > +

Re: [PATCH bpf-next 3/5] selftests/bpf: test_sockmap, fix test timeout

2018-05-21 Thread John Fastabend
On 05/20/2018 10:15 PM, Prashant Bhole wrote: > > > On 5/19/2018 1:47 AM, John Fastabend wrote: >> On 05/18/2018 12:17 AM, Prashant Bhole wrote: >>> In order to reduce runtime of tests, recently timout for select() call >>> was reduced from 1sec to 10usec. This was causing many tests failures. >>

Re: [PATCH bpf-next 2/5] selftests/bpf: test_sockmap, join cgroup in selftest mode

2018-05-21 Thread John Fastabend
On 05/20/2018 10:15 PM, Prashant Bhole wrote: > > > On 5/19/2018 1:45 AM, John Fastabend wrote: >> On 05/18/2018 12:17 AM, Prashant Bhole wrote: >>> In case of selftest mode, temporary cgroup environment is created but >>> cgroup is not joined. It causes test failures. Fixed by joining the >>> cg

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

2018-05-21 Thread John Fastabend
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 caught >>> previously because failure in RX/TX thread was not notified to the >>> main thr

Re: [PATCH v2] packet: track ring entry use using a shadow ring to prevent RX ring overrun

2018-05-21 Thread Willem de Bruijn
On Mon, May 21, 2018 at 8:57 AM, Jon Rosen (jrosen) wrote: > On Sunday, May 20, 2018 7:22 PM, Willem de Bruijn > wrote: >> On Sun, May 20, 2018 at 6:51 PM, Willem de Bruijn >> wrote: >>> On Sat, May 19, 2018 at 8:07 AM, Jon Rosen wrote: Fix PACKET_RX_RING bug for versions TPACKET_V1 and TP

[PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Heiner Kallweit
The driver uses pm_runtime_get_sync() in few places and relies on the device being fully runtime-resumed after this call. So far however the runtime resume callback triggers an asynchronous reset. Avoid this and perform the reset synchronously. Signed-off-by: Heiner Kallweit --- drivers/net/eth

[PATCH bpf-next 6/7] bpf: btf: Sync bpf.h and btf.h to tools/include/uapi/linux/

2018-05-21 Thread Martin KaFai Lau
This patch sync the uapi's bpf.h and btf.h to tools/. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 8 tools/include/uapi/linux/btf.h | 28 +++- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/tools/include/uapi/linux/bpf.

Re: [RFC PATCH net-next 10/12] vhost_net: build xdp buff

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:31 +0800 Jason wrote: > This patch implement build XDP buffers in vhost_net. The idea is do > userspace copy in vhost_net and build XDP buff based on the > page. Vhost_net can then submit one or an array of XDP buffs to > underlayer socket (e.g TUN). TUN can choose to do X

Re: [RFC PATCH net-next 04/12] vhost_net: split out datacopy logic

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:25 +0800 Jason wrote: > Instead of mixing zerocopy and datacopy logics, this patch tries to > split datacopy logic out. This results for a more compact code and > specific optimization could be done on top more easily. > > Signed-off-by: Jason Wang > --- > drivers/vhost

Re: [PATCH v2 net] stmmac: strip vlan tag on reception only for 8021q tagged frames

2018-05-21 Thread Florian Fainelli
On 05/21/2018 08:48 AM, David Miller wrote: > From: David Miller > Date: Thu, 17 May 2018 12:43:56 -0400 (EDT) > >> Giuseppe and Alexandre, please review this patch. > > If nobody thinks this patch is important enough to actually > review, I'm tossing it. > > Sorry. > How about looping in Jos

Re: [RFC PATCH net-next 03/12] vhost_net: introduce vhost_has_more_pkts()

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:24 +0800 Jason wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/net.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index de544ee..4ebac76 100644 > --- a/drivers/vhost/net.c > ++

Re: [PATCH net-next] vmcore: move get_vmcore_size out of __init

2018-05-21 Thread David Miller
From: Rahul Lakkireddy Date: Mon, 21 May 2018 19:07:50 +0530 > Fix below build warning: > > WARNING: vmlinux.o(.text+0x422bb8): Section mismatch in reference from > the function vmcore_add_device_dump() to the function > .init.text:get_vmcore_size.constprop.5() > > The function vmcore_add_devic

Re: [PATCH net-next 2/8] qed: Add support for tlv request processing.

2018-05-21 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 21 May 2018 03:40:12 -0700 > +struct qed_tlv_parsed_buf { > + /* To be filled with the address to set in Value field */ > + u8 *p_val; Assignments to this pointer are cast hundreds of times, like: > + p_buf->p_val = (u8 *)&p_d

Re: [RFC PATCH net-next 02/12] vhost_net: introduce vhost_exceeds_weight()

2018-05-21 Thread Jesse Brandeburg
On Mon, 21 May 2018 17:04:23 +0800 Jason wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/net.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index 15d191a..de544ee 100644 > --- a/drivers/vhost/net.c > +

Re: [PATCH] [RFC] bpf: tracing: new helper bpf_get_current_cgroup_ino

2018-05-21 Thread Alexei Starovoitov
On Sun, May 13, 2018 at 07:33:18PM +0200, Alban Crequy wrote: > > +BPF_CALL_2(bpf_get_current_cgroup_ino, u32, hierarchy, u64, flags) > +{ > + // TODO: pick the correct hierarchy instead of the mem controller > + struct cgroup *cgrp = task_cgroup(current, memory_cgrp_id); > + > + if (

[PATCH net-next v13 2/7] sch_cake: Add ingress mode

2018-05-21 Thread Toke Høiland-Jørgensen
The ingress mode is meant to be enabled when CAKE runs downlink of the actual bottleneck (such as on an IFB device). The mode changes the shaper to also account dropped packets to the shaped rate, as these have already traversed the bottleneck. Enabling ingress mode will also tune the AQM to alway

[PATCH net-next v13 0/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
This patch series adds the CAKE qdisc, and has been split up to ease review. I have attempted to split out each configurable feature into its own patch. The first commit adds the base shaper and packet scheduler, while subsequent commits add the optional features. The full userspace API and most d

[PATCH net-next v13 5/7] sch_cake: Add DiffServ handling

2018-05-21 Thread Toke Høiland-Jørgensen
This adds support for DiffServ-based priority queueing to CAKE. If the shaper is in use, each priority tier gets its own virtual clock, which limits that tier's rate to a fraction of the overall shaped rate, to discourage trying to game the priority mechanism. CAKE defaults to a simple, three-tier

[PATCH net-next v13 7/7] sch_cake: Conditionally split GSO segments

2018-05-21 Thread Toke Høiland-Jørgensen
At lower bandwidths, the transmission time of a single GSO segment can add an unacceptable amount of latency due to HOL blocking. Furthermore, with a software shaper, any tuning mechanism employed by the kernel to control the maximum size of GSO segments is thrown off by the artificial limit on ban

[PATCH net-next v13 6/7] sch_cake: Add overhead compensation support to the rate shaper

2018-05-21 Thread Toke Høiland-Jørgensen
This commit adds configurable overhead compensation support to the rate shaper. With this feature, userspace can configure the actual bottleneck link overhead and encapsulation mode used, which will be used by the shaper to calculate the precise duration of each packet on the wire. This feature is

[PATCH net-next v13 1/7] sched: Add Common Applications Kept Enhanced (cake) qdisc

2018-05-21 Thread Toke Høiland-Jørgensen
sch_cake targets the home router use case and is intended to squeeze the most bandwidth and latency out of even the slowest ISP links and routers, while presenting an API simple enough that even an ISP can configure it. Example of use on a cable ISP uplink: tc qdisc add dev eth0 cake bandwidth 20

[PATCH net-next v13 3/7] sch_cake: Add optional ACK filter

2018-05-21 Thread Toke Høiland-Jørgensen
The ACK filter is an optional feature of CAKE which is designed to improve performance on links with very asymmetrical rate limits. On such links (which are unfortunately quite prevalent, especially for DSL and cable subscribers), the downstream throughput can be limited by the number of ACKs capab

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

2018-05-21 Thread Toke Høiland-Jørgensen
When CAKE is deployed on a gateway that also performs NAT (which is a common deployment mode), the host fairness mechanism cannot distinguish internal hosts from each other, and so fails to work correctly. To fix this, we add an optional NAT awareness mode, which will query the kernel conntrack me

Re: [RFC PATCH net-next 01/12] vhost_net: introduce helper to initialize tx iov iter

2018-05-21 Thread Jesse Brandeburg
Hi Jason, a few nits. On Mon, 21 May 2018 17:04:22 +0800 Jason wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/net.c | 34 +++--- > 1 file changed, 23 insertions(+), 11 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index c4b49fc.

Re: [PATCH net-next] cxgb4/cxgb4vf: link management changes for new SFP

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 14:46:35 +0530 > newer SFPs like SFP28 and QSFP28 Transceiver Modules present > several new possibilities which we haven't faced before. Fix the > assumptions in the code reflecting the more limited capabilities > of previous Transceiver Module systems >

Re: [PATCH net-next] cxgb4: do L1 config when module is inserted

2018-05-21 Thread David Miller
From: David Miller Date: Mon, 21 May 2018 12:21:04 -0400 (EDT) > From: Ganesh Goudar > Date: Mon, 21 May 2018 14:45:43 +0530 > >> trigger an L1 configure operation when a transceiver module >> is inserted in order to cause current "sticky" options like >> Requested Forward Error Correction to b

Re: [PATCH net-next] cxgb4: do L1 config when module is inserted

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 14:45:43 +0530 > trigger an L1 configure operation when a transceiver module > is inserted in order to cause current "sticky" options like > Requested Forward Error Correction to be reapplied. > > Signed-off-by: Casey Leedom > Signed-off-by: Ganesh Gou

[PATCH net] dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()

2018-05-21 Thread Alexey Kodanev
Syzbot reported the use-after-free in timer_is_static_object() [1]. This can happen because the structure for the rto timer (ccid2_hc_tx_sock) is removed in dccp_disconnect(), and ccid2_hc_tx_rto_expire() can be called after that. The report [1] is similar to the one in commit 120e9dabaf55 ("dccp

Re: [PACTH net-next] cxgb4: copy the length of cpl_tx_pkt_core to fw_wr

2018-05-21 Thread David Miller
From: Ganesh Goudar Date: Mon, 21 May 2018 12:26:36 +0530 > immdlen field of FW_ETH_TX_PKT_WR is filled in a wrong way, > we must copy the length of all the cpls encapsulated in fw > work request. In the xmit path we missed adding the length > of CPL_TX_PKT_CORE but we added the length of WR_HDR

Re: [PATCH net-next] net: ethernet: Sort Kconfig sourcing alphabetically

2018-05-21 Thread David Miller
From: Florian Fainelli Date: Sun, 20 May 2018 20:58:28 -0700 > A number of entries were not alphabetically sorted, remedy that. > > Signed-off-by: Florian Fainelli Applied.

Re: [PATCH net-next] net: phy: phylink: Don't release NULL GPIO

2018-05-21 Thread David Miller
From: Florian Fainelli Date: Sun, 20 May 2018 20:49:47 -0700 > If CONFIG_GPIOLIB is disabled, gpiod_put() becomes a stub that produces a > warning, this helped identify that we could be attempting to release a NULL > pl->link_gpio GPIO descriptor, so guard against that. > > Fixes: daab3349ad1a (

[PATCH v2 bpf-next 0/3] bpf: Add MTU check to fib lookup helper

2018-05-21 Thread dsahern
From: David Ahern Packets that exceed the egress MTU can not be forwarded in the fast path. Add IPv4 and IPv6 MTU helpers that take a FIB lookup result (versus the typical dst path) and add the calls to bpf_ipv{4,6}_fib_lookup. v2 - add ip6_mtu_from_fib6 to ipv6_stub - only call the new MTU help

[PATCH v2 bpf-next 3/3] bpf: Add mtu checking to FIB forwarding helper

2018-05-21 Thread dsahern
From: David Ahern Add check that egress MTU can handle packet to be forwarded. If the MTU is less than the packet length, return 0 meaning the packet is expected to continue up the stack for help - eg., fragmenting the packet or sending an ICMP. The XDP path needs to leverage the FIB entry for a

[PATCH v2 bpf-next 1/3] net/ipv4: Add helper to return path MTU based on fib result

2018-05-21 Thread dsahern
From: David Ahern Determine path MTU from a FIB lookup result. Logic is a distillation of ip_dst_mtu_maybe_forward. Signed-off-by: David Ahern --- include/net/ip_fib.h | 2 ++ net/ipv4/route.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/include/ne

[PATCH v2 bpf-next 2/3] net/ipv6: Add helper to return path MTU based on fib result

2018-05-21 Thread dsahern
From: David Ahern Determine path MTU from a FIB lookup result. Logic is based on ip6_dst_mtu_forward plus lookup of nexthop exception. Add ip6_dst_mtu_forward to ipv6_stubs to handle access by core bpf code. Signed-off-by: David Ahern --- include/net/addrconf.h | 2 ++ include/net/ip6_fib.

Re: [PATCH net] sctp: fix the issue that flags are ignored when using kernel_connect

2018-05-21 Thread Marcelo Ricardo Leitner
On Sun, May 20, 2018 at 04:39:10PM +0800, Xin Long wrote: > Now sctp uses inet_dgram_connect as its proto_ops .connect, and the flags > param can't be passed into its proto .connect where this flags is really > needed. > > sctp works around it by getting flags from socket file in __sctp_connect. >

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Marcelo Ricardo Leitner
On Mon, May 21, 2018 at 04:09:31PM +0200, Michael Tuexen wrote: > > On 21. May 2018, at 15:48, Neil Horman wrote: > > > > On Mon, May 21, 2018 at 02:16:56PM +0200, Michael Tuexen wrote: > >>> On 21. May 2018, at 13:39, Neil Horman wrote: > >>> > >>> On Sun, May 20, 2018 at 10:54:04PM -0300, Mar

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

2018-05-21 Thread David Miller
From: Antoine Tenart Date: Thu, 17 May 2018 10:29:05 +0200 > This series was part of the mvpp2 phylink one but as we reworked it to > use fixed-link on the DB boards, the SFP commits weren't needed > anymore for our use case. Two of the three patches still are needed I > believe (I ditched the on

<    1   2   3   >