[PATCH net-next] net: use bulk free in kfree_skb_list

2019-03-23 Thread Felix Fietkau
Since we're freeing multiple skbs, we might as well use bulk free to save a few cycles. Use the same conditions for bulk free as in napi_consume_skb. Signed-off-by: Felix Fietkau --- net/core/skbuff.c | 35 +++ 1 file changed, 31 insertions(+), 4 deletions(-) dif

Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP

2019-03-23 Thread Eric Dumazet
On 03/23/2019 06:14 PM, Lawrence Brakmo wrote: > There was no eBPF at that time. We like the flexibility we get by programing > the algorithms in eBPF. eBPF being there does not mean we can adopt whatever research work, we want evaluations of the costs and benefits. > > These are not intrusi

Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP

2019-03-23 Thread Eric Dumazet
On 03/23/2019 08:41 AM, Alexei Starovoitov wrote: > On Sat, Mar 23, 2019 at 02:12:39AM -0700, Eric Dumazet wrote: >> Please think about offloading the pacing/throttling in the NIC, >> there is no way we will report back to tcp stack instant notificatiions. > > I don't think 'offload to google

Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP

2019-03-23 Thread Eric Dumazet
On 03/23/2019 08:41 AM, Alexei Starovoitov wrote: > On Sat, Mar 23, 2019 at 02:12:39AM -0700, Eric Dumazet wrote: >> >> >> On 03/23/2019 01:05 AM, brakmo wrote: >>> This patchset adds support for propagating congestion notifications (cn) >>> to TCP from cgroup inet skb egress BPF programs. >>> >

Re: [PATCH net-next] ipv6: Move ipv6 stubs to a separate header file

2019-03-23 Thread Alexei Starovoitov
On Sat, Mar 23, 2019 at 09:40:23PM -0400, David Miller wrote: > From: David Ahern > Date: Fri, 22 Mar 2019 06:06:09 -0700 > > > From: David Ahern > > > > The number of stubs is growing and has nothing to do with addrconf. > > Move the definition of the stubs to a separate header file and update

[RFC PATCH net-next 09/13] net: dsa: sja1105: Add support for ethtool port counters

2019-03-23 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/Makefile | 1 + drivers/net/dsa/sja1105/sja1105.h | 6 + drivers/net/dsa/sja1105/sja1105_ethtool.c | 420 ++ drivers/net/dsa/sja1105/sja1105_main.c| 3 + 4 files changed, 430 insertions(+) c

[RFC PATCH net-next 01/13] lib: Add support for generic packing operations

2019-03-23 Thread Vladimir Oltean
This provides an unified API for accessing register bit fields regardless of memory layout. The basic unit of data for these API functions is the u64. The process of transforming an u64 from native CPU encoding into the peripheral's encoding is called 'pack', and transforming it from peripheral to

[RFC PATCH net-next 10/13] net: dsa: sja1105: Add support for traffic through standalone ports

2019-03-23 Thread Vladimir Oltean
In order to support this, we are creating a make-shift switch tag out of a VLAN trunk configured on the CPU port. Termination on switch ports only works when not under a vlan_filtering bridge. We are making use of the generic CONFIG_NET_DSA_TAG_8021Q code and leveraging it from our own CONFIG_NET_D

[RFC PATCH net-next 04/13] net: dsa: Call driver's setup callback after setting up its switchdev notifier

2019-03-23 Thread Vladimir Oltean
This allows the driver to perform some manipulations of its own during setup, using generic code. One current usage scenario is for the driver to request DSA to set up 802.1Q based switch tagging for its ports. Signed-off-by: Vladimir Oltean --- net/dsa/dsa2.c | 8 1 file changed, 4 ins

[RFC PATCH net-next 11/13] net: dsa: sja1105: Add support for Spanning Tree Protocol

2019-03-23 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/sja1105_main.c | 108 ++--- 1 file changed, 99 insertions(+), 9 deletions(-) diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index 92dc58afd74e..448ab0e71827 100644 --- a/

[RFC PATCH net-next 02/13] net: dsa: Store vlan_filtering as a property of dsa_port

2019-03-23 Thread Vladimir Oltean
This allows drivers to query the VLAN setting imposed by the bridge driver directly from DSA, instead of keeping their own state based on the .port_vlan_filtering callback. Signed-off-by: Vladimir Oltean --- include/net/dsa.h | 1 + net/dsa/port.c| 12 2 files changed, 9 insert

[RFC PATCH net-next 05/13] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-03-23 Thread Vladimir Oltean
This patch provides generic DSA code for using VLAN (802.1Q) tags for the same purpose as a dedicated switch tag for injection/extraction. It is based on the discussions and interest that has been so far expressed in https://www.spinics.net/lists/netdev/msg556125.html. Unlike all other DSA-support

[RFC PATCH net-next 08/13] net: dsa: sja1105: Add support for VLAN operations

2019-03-23 Thread Vladimir Oltean
VLAN filtering cannot be properly disabled in SJA1105. So in order to emulate the "no VLAN awareness" behavior (not dropping traffic that is tagged with a VID that isn't configured on the port), we need to hack another switch feature: programmable TPID (which is 0x8100 for 802.1Q). We are reprogram

[RFC PATCH net-next 07/13] net: dsa: sja1105: Add support for FDB and MDB management

2019-03-23 Thread Vladimir Oltean
Currently only the (more difficult) first generation E/T series is supported. Here the TCAM is only 4-way associative, and to know where the hardware will search for a FDB entry, we need to perform the same hash algorithm in order to install the entry in the correct bin. On P/Q/R/S, the TCAM shoul

[RFC PATCH net-next 13/13] dt-bindings: net: dsa: Add documentation for NXP SJA1105 driver

2019-03-23 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- .../devicetree/bindings/net/dsa/sja1105.txt | 123 ++ 1 file changed, 123 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/sja1105.txt diff --git a/Documentation/devicetree/bindings/net/dsa/sja1105.txt b/Documentati

[RFC PATCH net-next 12/13] Documentation: networking: dsa: Add details about NXP SJA1105 driver

2019-03-23 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- Documentation/networking/dsa/sja1105.txt | 83 1 file changed, 83 insertions(+) create mode 100644 Documentation/networking/dsa/sja1105.txt diff --git a/Documentation/networking/dsa/sja1105.txt b/Documentation/networking/dsa/sja1105.t

[RFC PATCH net-next 00/13] NXP SJA1105 DSA driver

2019-03-23 Thread Vladimir Oltean
This patchset adds a DSA driver for the SPI-managed NXP SJA1105 driver. Due to the hardware's unfriendliness, most of its state needs to be shadowed in kernel memory by the driver. To support this and keep a decent amount of cleanliness in the code, a new generic API for converting between CPU-acce

[RFC PATCH net-next 03/13] net: dsa: Create a more convenient function for installing port VLANs

2019-03-23 Thread Vladimir Oltean
This refactors the two-phase transaction from dsa_slave_vlan_rx_add_vid and also makes that code available for other functions from within DSA. The newly exposed function either adds or deletes the specified VLAN entry based on a boolean argument. Signed-off-by: Vladimir Oltean --- net/dsa/dsa_p

Re: [patch net] net: devlink: skip info_get op call if it is not defined in dumpit

2019-03-23 Thread Jakub Kicinski
On Sun, 24 Mar 2019 00:21:03 +0100, Jiri Pirko wrote: > From: Jiri Pirko > > In dumpit, unlike doit, the check for info_get op being defined > is missing. Add it and avoid null pointer dereference in case driver > does not define this op. > > Fixes: f9cf22882c60 ("devlink: add device information

Re: [patch net-next v2 11/15] nfp: move devlink port type set after netdev registration

2019-03-23 Thread Jakub Kicinski
On Sat, 23 Mar 2019 23:47:50 +0100, Jiri Pirko wrote: > >type setting. I'd rather those calls happened on fully initialized > >netdev (and port), could you perhaps just take this patch into the > > I don't get it, you are commenting cleanup part. On init, the type set > happens on fully initial

Re: [PATCH net-next 0/7] net: aquantia: RX performance optimization patches

2019-03-23 Thread David Miller
From: Igor Russkikh Date: Sat, 23 Mar 2019 15:23:29 + > Here is a set of patches targeting for performance improvement > on various platforms and protocols. ... Series applied, thanks.

Re: [pull request][net-next V3 00/14] Mellanox, mlx5 updates 2019-03-20

2019-03-23 Thread David Miller
From: Saeed Mahameed Date: Fri, 22 Mar 2019 12:12:41 -0700 > This series includes mlx5 updates. > For more information please see tag log below. > > Please pull and let me know if there is any problem. > > v1->v2: > Remove NFP specific vxlan/geneve port #defines based upon Jakub's > feedba

Re: [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-03-22

2019-03-23 Thread David Miller
From: Jeff Kirsher Date: Fri, 22 Mar 2019 10:33:13 -0700 > This series contains updates to ice driver only. Pulled, thanks Jeff.

Re: [PATCH v3 net-next 0/3] tcp: add rx/tx cache to reduce lock contention

2019-03-23 Thread David Miller
From: Eric Dumazet Date: Fri, 22 Mar 2019 08:56:37 -0700 > On hosts with many cpus we can observe a very serious contention > on spinlocks used in mm slab layer. > > The following can happen quite often : > > 1) TX path > sendmsg() allocates one (fclone) skb on CPU A, sends a clone. > ACK i

Re: [PATCH net-next v3 0/2] net: dev: BYPASS for lockless qdisc

2019-03-23 Thread David Miller
From: Paolo Abeni Date: Fri, 22 Mar 2019 16:01:54 +0100 > This patch series is aimed at improving xmit performances of lockless qdisc > in the uncontended scenario. > > After the lockless refactor pfifo_fast can't leverage the BYPASS optimization. > Due to retpolines the overhead for the avoidab

Re: [PATCH net-next] tcp: add documentation for tcp_ca_state

2019-03-23 Thread David Miller
From: Soheil Hassas Yeganeh Date: Fri, 22 Mar 2019 10:59:47 -0400 > From: Soheil Hassas Yeganeh > > Add documentation to the tcp_ca_state enum, since this enum is > exposed in uapi. > > Signed-off-by: Neal Cardwell > Signed-off-by: Yuchung Cheng > Signed-off-by: Eric Dumazet > Signed-off-by

Re: [PATCH net-next] tcp: remove conditional branches from tcp_mstamp_refresh()

2019-03-23 Thread David Miller
From: Eric Dumazet Date: Fri, 22 Mar 2019 06:26:29 -0700 > tcp_clock_ns() (aka ktime_get_ns()) is using monotonic clock, > so the checks we had in tcp_mstamp_refresh() are no longer > relevant. > > This patch removes cpu stall (when the cache line is not hot) > > Signed-off-by: Eric Dumazet A

Re: [PATCH net-next] ipv6: Move ipv6 stubs to a separate header file

2019-03-23 Thread David Miller
From: David Ahern Date: Fri, 22 Mar 2019 06:06:09 -0700 > From: David Ahern > > The number of stubs is growing and has nothing to do with addrconf. > Move the definition of the stubs to a separate header file and update > users. In the move, drop the vxlan specific comment before ipv6_stub. >

Re: [PATCH net] r8169: fix cable re-plugging issue

2019-03-23 Thread David Miller
From: Heiner Kallweit Date: Fri, 22 Mar 2019 07:39:35 +0100 > Bartek reported that after few cable unplug/replug cycles suddenly > replug isn't detected any longer. His system uses a RTL8106, I wasn't > able to reproduce the issue with RTL8168g. According to his bisect > the referenced commit cau

Re: [PATCH] net: phy: bcm54xx: Encode link speed and activity into LEDs

2019-03-23 Thread Florian Fainelli
On 3/23/2019 3:18 PM, Vladimir Oltean wrote: > Previously the green and amber LEDs on this quad PHY were solid, to > indicate an encoding of the link speed (10/100/1000). > > This keeps the LEDs always on just as before, but now they flash on > Rx/Tx activity. > We should probably revamp the

Re: [net-next] net: dsa: Avoid null pointer when failing to connect to PHY

2019-03-23 Thread Florian Fainelli
On 3/23/2019 4:24 PM, Vladimir Oltean wrote: > When phylink_of_phy_connect fails, dsa_slave_phy_setup tries to save the > day by connecting to an alternative PHY, none other than a PHY on the > switch's internal MDIO bus, at an address equal to the port's index. > > However this does not take i

Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP

2019-03-23 Thread Lawrence Brakmo
On 3/23/19, 10:12 AM, "Eric Dumazet" wrote: On 03/23/2019 01:05 AM, brakmo wrote: > This patchset adds support for propagating congestion notifications (cn) > to TCP from cgroup inet skb egress BPF programs. > > Current cgroup skb BPF programs cannot trigger TCP c

Re: [PATCH net-next 3/3] net: phy: aquantia: inform about proprietary 1000Base-T2 mode being in use

2019-03-23 Thread Florian Fainelli
On 3/23/2019 6:16 AM, Heiner Kallweit wrote: > The AQCS109 supports a proprietary 2-pair 1Gbps mode. The standard > registers don't allow to tell between 1000BaseT and 1000BaseT2. > Add reporting this proprietary mode based on a vendor register. > > Signed-off-by: Heiner Kallweit Reviewed-by:

Re: [PATCH net-next 2/3] net: phy: aquantia: report PHY details like firmware version

2019-03-23 Thread Florian Fainelli
On 3/23/2019 6:15 AM, Heiner Kallweit wrote: > Add reporting firmware details. These details are available only once > the firmware has finished initializing the chip. This can take some > time and we need to poll for init completion. > > Signed-off-by: Heiner Kallweit > --- [snip] > > +/*

Re: [PATCH net-next 1/3] net: phy: aquantia: report remote capabilities if link partner is Aquantia PHY

2019-03-23 Thread Florian Fainelli
On 3/23/2019 6:14 AM, Heiner Kallweit wrote: > If both link partners are Aquantia PHY's then additional information is > exchanged as part of the auto-negotiation. Report remote capabilities > if link partner is Aquantia PHY. > > Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli

Re: [PATCH net] net: phy: don't clear BMCR in genphy_soft_reset

2019-03-23 Thread Florian Fainelli
On 3/22/2019 12:00 PM, Heiner Kallweit wrote: > So far we effectively clear the BMCR register. Some PHY's can deal > with this (e.g. because they reset BMCR to a default as part of a > soft-reset) whilst on others this causes issues because e.g. the > autoneg bit is cleared. Marvell is an exampl

Re: [PATCH 0/7] net/core patches for kernel v5.2

2019-03-23 Thread David Miller
From: Bart Van Assche Date: Thu, 21 Mar 2019 15:19:39 -0700 > While inspecting the code of inet6_pton() I found an open-coded strlcpy() > implementation in that function. The last patch in this series simplifies > inet6_pton() and the first six patches address the compiler warnings reported > whe

[PATCH bpf-next 14/21] selftests/bpf: Test file_pos field in bpf_sysctl ctx

2019-03-23 Thread Andrey Ignatov
Test access to file_pos field of bpf_sysctl context, both read (incl. narrow read) and write. # ./test_sysctl ... Test case: ctx:file_pos sysctl:read read ok .. [PASS] Test case: ctx:file_pos sysctl:read read ok narrow .. [PASS] Test case: ctx:file_pos sysctl:read write ok .. [PASS] ..

[PATCH bpf-next 15/21] bpf: Introduce ARG_PTR_TO_{INT,LONG} arg types

2019-03-23 Thread Andrey Ignatov
Currently the way to pass result from BPF helper to BPF program is to provide memory area defined by pointer and size: func(void *, size_t). It works great for generic use-case, but for simple types, such as int, it's overkill and consumes two arguments when it could use just one. Introduce new a

[PATCH bpf-next 16/21] bpf: Introduce bpf_strtol and bpf_strtoul helpers

2019-03-23 Thread Andrey Ignatov
Add bpf_strtol and bpf_strtoul to convert a string to long and unsigned long correspondingly. It's similar to user space strtol(3) and strtoul(3) with a few changes to the API: * instead of NUL-terminated C string the helpers expect buffer and buffer length; * resulting long or unsigned long is

[PATCH bpf-next 13/21] selftests/bpf: Test bpf_sysctl_{get,set}_new_value helpers

2019-03-23 Thread Andrey Ignatov
Test that new value provided by user space on sysctl write can be read by bpf_sysctl_get_new_value and overridden by bpf_sysctl_set_new_value. # ./test_sysctl ... Test case: sysctl_get_new_value sysctl:read EINVAL .. [PASS] Test case: sysctl_get_new_value sysctl:write ok .. [PASS] Test c

[PATCH bpf-next 17/21] bpf: Sync bpf.h to tools/

2019-03-23 Thread Andrey Ignatov
Sync bpf_strtoX related bpf UAPI changes to tools/. Signed-off-by: Andrey Ignatov --- tools/include/uapi/linux/bpf.h | 51 +- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 01faa2

[PATCH bpf-next 10/21] selftests/bpf: Test BPF_CGROUP_SYSCTL

2019-03-23 Thread Andrey Ignatov
Add unit test for BPF_PROG_TYPE_CGROUP_SYSCTL program type. Test that program can allow/deny access. Test both valid and invalid accesses to ctx->write. Example of output: # ./test_sysctl Test case: sysctl wrong attach_type .. [PASS] Test case: sysctl:read allow all .. [PASS] Test case: s

[PATCH bpf-next 11/21] selftests/bpf: Test bpf_sysctl_get_name helper

2019-03-23 Thread Andrey Ignatov
Test w/ and w/o BPF_F_SYSCTL_BASE_NAME, buffers with enough space and too small buffers to get E2BIG and truncated result, etc. # ./test_sysctl ... Test case: sysctl_get_name sysctl_value:base ok .. [PASS] Test case: sysctl_get_name sysctl_value:base E2BIG truncated .. [PASS] Test case:

[PATCH bpf-next 12/21] selftests/bpf: Test sysctl_get_current_value helper

2019-03-23 Thread Andrey Ignatov
Test sysctl_get_current_value on sysctl read and write, buffers with enough space and too small buffers to get E2BIG and truncated result, etc. # ./test_sysctl ... Test case: sysctl_get_current_value sysctl:read ok, gt .. [PASS] Test case: sysctl_get_current_value sysctl:read ok, eq .. [PA

[PATCH bpf-next 09/21] selftests/bpf: Test sysctl section name

2019-03-23 Thread Andrey Ignatov
Add unit test to verify that program and attach types are properly identified for "cgroup/sysctl" section name. Signed-off-by: Andrey Ignatov --- tools/testing/selftests/bpf/test_section_names.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/bpf/test_section_nam

[PATCH bpf-next 08/21] libbpf: Support sysctl hook

2019-03-23 Thread Andrey Ignatov
Support BPF_PROG_TYPE_CGROUP_SYSCTL program in libbpf: identifying program and attach types by section name, probe. Signed-off-by: Andrey Ignatov --- tools/lib/bpf/libbpf.c| 3 +++ tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/lib/bpf/libbpf.c

[PATCH bpf-next 01/21] bpf: Add base proto function for cgroup-bpf programs

2019-03-23 Thread Andrey Ignatov
Currently kernel/bpf/cgroup.c contains only one program type and one proto function cgroup_dev_func_proto(). It'd be useful to have base proto function that can be reused for new cgroup-bpf program types coming soon. Introduce cgroup_base_func_proto(). Signed-off-by: Andrey Ignatov --- kernel/b

[PATCH bpf-next 18/21] selftests/bpf: Add sysctl and strtoX helpers to bpf_helpers.h

2019-03-23 Thread Andrey Ignatov
Add bpf_sysctl_* and bpf_strtoX helpers to bpf_helpers.h. Signed-off-by: Andrey Ignatov --- tools/testing/selftests/bpf/bpf_helpers.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h in

[PATCH bpf-next 05/21] bpf: Introduce bpf_sysctl_{get,set}_new_value helpers

2019-03-23 Thread Andrey Ignatov
Add helpers to work with new value being written to sysctl by user space. bpf_sysctl_get_new_value() copies value being written to sysctl into provided buffer. bpf_sysctl_set_new_value() overrides new value being written by user space with a one from provided buffer. Buffer should contain string

[PATCH bpf-next 20/21] selftests/bpf: Test bpf_strtol and bpf_strtoul helpers

2019-03-23 Thread Andrey Ignatov
Test that bpf_strtol and bpf_strtoul helpers can be used to convert provided buffer to long or unsigned long correspondingly and return both correct result and number of consumed bytes, or proper errno. Example of output: # ./test_sysctl .. Test case: bpf_strtoul one number string .. [PASS]

[PATCH bpf-next 21/21] selftests/bpf: C based test for sysctl and strtoX

2019-03-23 Thread Andrey Ignatov
Add C based test for a few bpf_sysctl_* helpers and bpf_strtoul. Make sure that sysctl can be identified by name and that multiple integers can be parsed from sysctl value with bpf_strtoul. net/ipv4/tcp_mem is chosen as a testing sysctl, it contains 3 unsigned longs, they all are parsed and compa

[PATCH bpf-next 07/21] bpf: Sync bpf.h to tools/

2019-03-23 Thread Andrey Ignatov
Sync BPF_PROG_TYPE_CGROUP_SYSCTL related bpf UAPI changes to tools/. Signed-off-by: Andrey Ignatov --- tools/include/uapi/linux/bpf.h | 90 +- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/b

[PATCH bpf-next 19/21] selftests/bpf: Test ARG_PTR_TO_LONG arg type

2019-03-23 Thread Andrey Ignatov
Test that verifier handles new argument types properly, including uninitialized or partially initialized value, misaligned stack access, etc. Example of output: #456/p ARG_PTR_TO_LONG uninitialized OK #457/p ARG_PTR_TO_LONG half-uninitialized OK #458/p ARG_PTR_TO_LONG misaligned OK #459/p

[PATCH bpf-next 04/21] bpf: Introduce bpf_sysctl_get_current_value helper

2019-03-23 Thread Andrey Ignatov
Add bpf_sysctl_get_current_value() helper to copy current sysctl value into provided by BPF_PROG_TYPE_CGROUP_SYSCTL program buffer. It provides same string as user space can see by reading corresponding file in /proc/sys/, including new line, etc. Documentation for the new helper is provided in b

[PATCH bpf-next 06/21] bpf: Add file_pos field to bpf_sysctl ctx

2019-03-23 Thread Andrey Ignatov
Add file_pos field to bpf_sysctl context to read and write sysctl file position at which sysctl is being accessed (read or written). The field can be used to e.g. override whole sysctl value on write to sysctl even when sys_write is called by user space with file_pos > 0. Or BPF program may reject

[PATCH bpf-next 02/21] bpf: Sysctl hook

2019-03-23 Thread Andrey Ignatov
Containerized applications may run as root and it may create problems for whole host. Specifically such applications may change a sysctl and affect applications in other containers. Furthermore in existing infrastructure it may not be possible to just completely disable writing to sysctl, instead

[PATCH bpf-next 03/21] bpf: Introduce bpf_sysctl_get_name helper

2019-03-23 Thread Andrey Ignatov
Add bpf_sysctl_get_name() helper to copy sysctl name (/proc/sys/ entry) into provided by BPF_PROG_TYPE_CGROUP_SYSCTL program buffer. By default full name (w/o /proc/sys/) is copied, e.g. "net/ipv4/tcp_mem". If BPF_F_SYSCTL_BASE_NAME flag is set, only base name will be copied, e.g. "tcp_mem". Doc

[PATCH bpf-next 00/21] bpf: Sysctl hook

2019-03-23 Thread Andrey Ignatov
The patch set introduces new BPF hook for sysctl. It adds new program type BPF_PROG_TYPE_CGROUP_SYSCTL and attach type BPF_CGROUP_SYSCTL. BPF_CGROUP_SYSCTL hook is placed before calling to sysctl's proc_handler so that accesses (read/write) to sysctl can be controlled for specific cgroup and eith

[net-next] net: dsa: Avoid null pointer when failing to connect to PHY

2019-03-23 Thread Vladimir Oltean
When phylink_of_phy_connect fails, dsa_slave_phy_setup tries to save the day by connecting to an alternative PHY, none other than a PHY on the switch's internal MDIO bus, at an address equal to the port's index. However this does not take into consideration the scenario when the switch that failed

[patch net] net: devlink: skip info_get op call if it is not defined in dumpit

2019-03-23 Thread Jiri Pirko
From: Jiri Pirko In dumpit, unlike doit, the check for info_get op being defined is missing. Add it and avoid null pointer dereference in case driver does not define this op. Fixes: f9cf22882c60 ("devlink: add device information API") Reported-by: Ido Schimmel Signed-off-by: Jiri Pirko --- ne

Re: [patch net-next v2 11/15] nfp: move devlink port type set after netdev registration

2019-03-23 Thread Jiri Pirko
Sat, Mar 23, 2019 at 09:31:02PM CET, jakub.kicin...@netronome.com wrote: >On Fri, 22 Mar 2019 17:56:32 +0100, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Similar to other driver, move the port type set after netdev registration >> is done. Along with that, clear the type before unregistration. >>

[PATCH] net: phy: bcm54xx: Encode link speed and activity into LEDs

2019-03-23 Thread Vladimir Oltean
Previously the green and amber LEDs on this quad PHY were solid, to indicate an encoding of the link speed (10/100/1000). This keeps the LEDs always on just as before, but now they flash on Rx/Tx activity. Signed-off-by: Vladimir Oltean --- drivers/net/phy/broadcom.c | 13 + include

Re: [PATCH net-next v2] tls: Add SOL_TLS to uapi

2019-03-23 Thread David Miller
From: Boris Pismenny Date: Fri, 22 Mar 2019 14:32:45 + > The source for this is not known to me. > I've saw that this issue was mentioned and fixed in libc: > http://sourceware.org/ml/libc-alpha/2016-05/msg00322.html ... > Maybe libc maintainers need to be notified whenever linux/socket.h is

Re: [PATCH net-next] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-23 Thread Pravin Shelar
On Sat, Mar 23, 2019 at 2:18 AM wenxu wrote: > > On 2019/3/23 下午3:50, Pravin Shelar wrote: > > On Thu, Mar 21, 2019 at 3:34 AM wrote: > > From: wenxu > > There is currently no support for the multicasti/broadcst aspects > of VXLAN in ovs. In the datapath flow the tun_dst must specific. > But in

Re: [patch net-next v2 11/15] nfp: move devlink port type set after netdev registration

2019-03-23 Thread Jakub Kicinski
On Fri, 22 Mar 2019 17:56:32 +0100, Jiri Pirko wrote: > From: Jiri Pirko > > Similar to other driver, move the port type set after netdev registration > is done. Along with that, clear the type before unregistration. > > Signed-off-by: Jiri Pirko > diff --git a/drivers/net/ethernet/netronome/nf

[PATCH iproute2 2/2] tc: pie: update man page

2019-03-23 Thread Leslie Monis
Update man page to reflect the changes made in Linux. Signed-off-by: Leslie Monis --- man/man8/tc-pie.8 | 40 ++-- man/man8/tc.8 | 1 + 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/man/man8/tc-pie.8 b/man/man8/tc-pie.8 index 278293bd..

[PATCH iproute2 1/2] tc: pie: change maximum integer value of tc_pie_xstats->prob

2019-03-23 Thread Leslie Monis
tc_pie_xstats->prob has a maximum value of (2^64 - 1). Signed-off-by: Leslie Monis --- tc/q_pie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/q_pie.c b/tc/q_pie.c index f7924ef5..6566ca10 100644 --- a/tc/q_pie.c +++ b/tc/q_pie.c @@ -198,7 +198,7 @@ static int pie_print

[PATCH iproute2 0/2] tc: pie: make tc/q_pie.c consistent with the kernel

2019-03-23 Thread Leslie Monis
The PIE qdisc implementation in Linux has recently been aligned with RFC 8033. This patch series makes tc/q_pie.c consistent with that implementation and also updates the man page tc-pie(8). Leslie Monis (2): tc: pie: change maximum integer value of tc_pie_xstats->prob tc: pie: update man page

[PATCH net-next] net: dsa: mv88e6xxx: remove unneeded cmode initialization

2019-03-23 Thread Heiner Kallweit
This partially reverts ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode"). I missed that chip->ports[].cmode is overwritten anyway by the cmode caching in mv88e6xxx_setup(). Signed-off-by: Heiner Kallweit --- The old code causes no issues, therefore

[PATCH net] net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode

2019-03-23 Thread Heiner Kallweit
This patches fixes few issues in mv88e6390x_port_set_cmode(). 1. When entering the function the old cmode may be 0, in this case mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail out and have no chance to set a new mode. Therefore deal properly with -ENODEV. 2. Once we have

Re: [RFC PATCH 1/1 v2] net: sched: Introduce conndscp action

2019-03-23 Thread Kevin 'ldir' Darbyshire-Bryant
Hi Cong, Thanks for your responses so far. > On 22 Mar 2019, at 23:09, Cong Wang wrote: > > On Fri, Mar 22, 2019 at 3:06 PM Kevin 'ldir' Darbyshire-Bryant > wrote: >> >> >> >>> On 22 Mar 2019, at 21:31, Cong Wang wrote: >>> >>> On Fri, Mar 22, 2019 at 1:50 PM Kevin 'ldir' Darbyshire-Bryan

Re: [PATCH 1/2] netfilter: Export nf_ct_{set,destroy}_timeout()

2019-03-23 Thread kbuild test robot
/linux/commits/Yi-Hung-Wei/netfilter-Export-nf_ct_-set-destroy-_timeout/20190323-195349 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: x86_64-randconfig-b0-03232323 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the

[PATCH bpf-next v2] bpf: silence uninitialized var warning in bpf_skb_net_grow

2019-03-23 Thread Willem de Bruijn
From: Willem de Bruijn These three variables are set in one branch and used in another with the same condition. But on some architectures they still generate compiler warnings of the kind: warning: 'inner_trans' may be used uninitialized in this function [-Wmaybe-uninitialized] Silence these

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-23 Thread Stanislav Fomichev
On 03/22, Alexei Starovoitov wrote: > On Fri, Mar 22, 2019 at 06:19:57PM -0700, Stanislav Fomichev wrote: > > Are we ok with breaking api in this case? I'm all in on removing this > > extra information. We can always put it back if somebody complains (and > > manually parse in eth_get_headlen case)

Re: [PATCH bpf-next v3 00/13] bpf tc tunneling

2019-03-23 Thread Willem de Bruijn
On Sat, Mar 23, 2019 at 6:53 AM Daniel Borkmann wrote: > > Hey Willem, > > On 03/22/2019 07:32 PM, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > BPF allows for dynamic tunneling, choosing the tunnel destination and > > features on-demand. Extend bpf_skb_adjust_room to allow for effic

[PATCH bpf-next] bpf: silence uninitialized var warning in bpf_skb_net_grow

2019-03-23 Thread Willem de Bruijn
From: Willem de Bruijn These three variables are set in one branch and used in another with the same condition. But on some architectures they still generate compiler warnings of the kind: warning: 'inner_trans' may be used uninitialized in this function [-Wmaybe-uninitialized] Silence these

Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP

2019-03-23 Thread Alexei Starovoitov
On Sat, Mar 23, 2019 at 02:12:39AM -0700, Eric Dumazet wrote: > > > On 03/23/2019 01:05 AM, brakmo wrote: > > This patchset adds support for propagating congestion notifications (cn) > > to TCP from cgroup inet skb egress BPF programs. > > > > Current cgroup skb BPF programs cannot trigger TCP c

[PATCH net-next 4/7] net: aquantia: Make RX default frame size 2K

2019-03-23 Thread Igor Russkikh
This correlates with default internet MTU. This also allows page flip/reuse to be activated, since each allocated RX page now serves for two frags/packets. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next 6/7] net: aquantia: improve LRO configuration

2019-03-23 Thread Igor Russkikh
From: Nikita Danilov Default LRO HW configuration was very conservative. Low Number of Descriptors per LRO Sequence, small session timeout, inefficient settings in interrupt generation logic. Change max number of LRO descriptors from 2 to 16 to increase performance. Increase maximum coalescing

[PATCH net-next 1/7] net: aquantia: optimize rx path using larger preallocated skb len

2019-03-23 Thread Igor Russkikh
Atlantic driver used 14 bytes preallocated skb size. That made L3 protocol processing inefficient because pskb_pull had to fetch all the L3/L4 headers from extra fragments. Specially on UDP flows that caused extra packet drops because CPU was overloaded with pskb_pull. This patch uses eth_get_hea

[PATCH net-next 0/7] net: aquantia: RX performance optimization patches

2019-03-23 Thread Igor Russkikh
Here is a set of patches targeting for performance improvement on various platforms and protocols. Our main target was rx performance on iommu systems, notably NVIDIA Jetson TX2 and NVIDIA Xavier platforms. We introduce page reuse strategy to better deal with iommu dma mapping costs. With it we s

[PATCH net-next 2/7] net: aquantia: optimize rx performance by page reuse strategy

2019-03-23 Thread Igor Russkikh
We introduce internal aq_rxpage wrapper over regular page where extra field is tracked: rxpage offset inside of allocated page. This offset allows to reuse one page for multiple packets. When needed (for example with large frames processing), allocated pageorder could be customized. This gives eve

[PATCH net-next 7/7] net: aquantia: enable driver build for arm64 or compile_test

2019-03-23 Thread Igor Russkikh
The driver is now constantly tested in our lab on aarch64 hardware: Jetson tx2, Pascal and Xavier tegra based hardware. Many of tegra smmu related HW bugs were fixed or workarounded already. Thus, add ARM64 into Kconfig. Add also COMPILE_TEST dependency. Signed-off-by: Igor Russkikh --- driver

[PATCH net-next 3/7] net: aquantia: Introduce rx refill threshold value

2019-03-23 Thread Igor Russkikh
Before that, we've refilled ring even on single descriptor move. Under high packet load that caused page allocation logic to be triggered too often. That made overall ring processing slower. Moreover, with page buffer reuse implemented, we should give a chance higher networking levels to process r

[PATCH net-next 5/7] net: aquantia: Increase rx ring default size from 1K to 2K

2019-03-23 Thread Igor Russkikh
For multigig rates 1K ring size is often not enough and causes extra packet drops in hardware. Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h b/d

Re: [PATCH 1/2] netfilter: Export nf_ct_{set,destroy}_timeout()

2019-03-23 Thread kbuild test robot
/linux/commits/Yi-Hung-Wei/netfilter-Export-nf_ct_-set-destroy-_timeout/20190323-195349 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: x86_64-rhel (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux

[PATCH net-next] vti4: eliminated some duplicate code.

2019-03-23 Thread Jeremy Sowden
The ipip tunnel introduced in commit dd9ee3444014 ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel") largely duplicated the existing vti_input and vti_recv functions. Refactored to deduplicate the common code. Signed-off-by: Jeremy Sowden --- net/ipv4/ip_vti.c | 60 ++

Re: [PATCH 2/2] openvswitch: Add timeout support to ct action

2019-03-23 Thread kbuild test robot
/linux/commits/Yi-Hung-Wei/netfilter-Export-nf_ct_-set-destroy-_timeout/20190323-195349 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: i386-randconfig-n1-201911 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached

[PATCH net] net: usb: aqc111: Extend HWID table by QNAP device

2019-03-23 Thread Igor Russkikh
From: Dmitry Bezrukov New device of QNAP based on aqc111u Add this ID to blacklist of cdc_ether driver as well Signed-off-by: Dmitry Bezrukov --- drivers/net/usb/aqc111.c| 15 +++ drivers/net/usb/cdc_ether.c | 8 2 files changed, 23 insertions(+) diff --git a/drivers

[PATCH] net: sched: Kconfig: update reference link for PIE

2019-03-23 Thread Leslie Monis
RFC 8033 replaces the IETF draft for PIE Signed-off-by: Leslie Monis --- net/sched/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 1b9afdee5ba9..5c02ad97ef23 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig @@ -358,8

[PATCH net-next] net: phy: aquantia: simplify aqr_config_aneg

2019-03-23 Thread Heiner Kallweit
Simplify aqr_config_aneg(). Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_main.c | 45 ++--- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 1013711e1..37032f3ba 1006

[PATCH net-next 2/3] net: phy: aquantia: report PHY details like firmware version

2019-03-23 Thread Heiner Kallweit
Add reporting firmware details. These details are available only once the firmware has finished initializing the chip. This can take some time and we need to poll for init completion. Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_main.c | 58 + 1 fil

[PATCH net-next 3/3] net: phy: aquantia: inform about proprietary 1000Base-T2 mode being in use

2019-03-23 Thread Heiner Kallweit
The AQCS109 supports a proprietary 2-pair 1Gbps mode. The standard registers don't allow to tell between 1000BaseT and 1000BaseT2. Add reporting this proprietary mode based on a vendor register. Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_main.c | 14 +- 1 file change

[PATCH net-next 1/3] net: phy: aquantia: report remote capabilities if link partner is Aquantia PHY

2019-03-23 Thread Heiner Kallweit
If both link partners are Aquantia PHY's then additional information is exchanged as part of the auto-negotiation. Report remote capabilities if link partner is Aquantia PHY. Signed-off-by: Heiner Kallweit --- drivers/net/phy/aquantia_main.c | 49 + 1 file changed

[PATCH net-next 0/3] net: phy: aquantia: report Aquantia-specific settings and features

2019-03-23 Thread Heiner Kallweit
This series detects and reports quite some Aquantia-specific settings and features. Heiner Kallweit (3): net: phy: aquantia: report remote capabilities if link partner is Aquantia PHY net: phy: aquantia: add debug message with PHY details like firmware version net: phy: aquantia: inf

[BUG][iproute2][5.0] ip route show table default: "Error: ipv4: FIB table does not exist."

2019-03-23 Thread emersonbernier
After upgrading iproute2 from 4.20 to 5.0 the following error occurs: $ ip route show table default Error: ipv4: FIB table does not exist. Dump terminated The command works for all tables other than 'default' one. It seems related to this commit[1] I also saw "Error: ipv4: MR table does not exi

[PATCH net-next v2] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-23 Thread wenxu
From: wenxu There is currently no support for the multicast/broadcast aspects of VXLAN in ovs. In the datapath flow the tun_dst must specific. But in the IP_TUNNEL_INFO_BRIDGE mode the tun_dst can not be specific. And the packet can forward through the fdb table of vxlan devcice. In this mode the

Re: [PATCH bpf-next v3 00/13] bpf tc tunneling

2019-03-23 Thread Daniel Borkmann
Hey Willem, On 03/22/2019 07:32 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > BPF allows for dynamic tunneling, choosing the tunnel destination and > features on-demand. Extend bpf_skb_adjust_room to allow for efficient > tunneling at the TC hooks. Patch 9 in this series caused the f

Re: [PATCH net-next] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-23 Thread wenxu
On 2019/3/23 下午3:50, Pravin Shelar wrote: > >> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c >> index 691da85..033df5c 100644 >> --- a/net/openvswitch/flow_netlink.c >> +++ b/net/openvswitch/flow_netlink.c >> @@ -403,6 +403,7 @@ size_t ovs_key_attr_size(void) >>

  1   2   >