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

2019-03-21 Thread Heiner Kallweit
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 caused the regression. As Realtek doesn't release datasheets or errata it

Re: [RFC 1/6] netlink: add nlmsg_validate_strict() & nla_validate_strict()

2019-03-21 Thread Johannes Berg
On Thu, 2019-03-21 at 23:50 +0100, Florian Westphal wrote: > Johannes Berg wrote: > > + * nla_validate_strict - Strictly validate a stream of attributes > > + * @head: head of attribute stream > > + * @len: length of attribute stream > > + * @maxtype: maximum attribute type to be expected > > + *

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-21 Thread Cong Wang
On Thu, Mar 21, 2019 at 9:11 PM Herbert Xu wrote: > > On Thu, Mar 21, 2019 at 09:06:05PM -0700, Cong Wang wrote: > > > > Good point. Replacing IPSEC_PROTO_ANY with zero should > > work too, but on the other hand, id.proto is still never allowed to > > be any other protocol than these 6 listed, no?

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-21 Thread Herbert Xu
On Thu, Mar 21, 2019 at 09:06:05PM -0700, Cong Wang wrote: > > Good point. Replacing IPSEC_PROTO_ANY with zero should > work too, but on the other hand, id.proto is still never allowed to > be any other protocol than these 6 listed, no? It should never be IPSEC_PROTO_ANY since that's used as a wil

Re: [Patch net] xfrm: unify xfrm protocol checks

2019-03-21 Thread Cong Wang
On Tue, Mar 19, 2019 at 10:35 PM Herbert Xu wrote: > > On Tue, Mar 19, 2019 at 01:42:53PM -0700, Cong Wang wrote: > > > > IIRC, it is Steffen who suggested to add IPPROTO_ROUTING/IPPROTO_DSTOPTS > > back to commit 6a53b7593233. My xfrm knowledge is not enough to > > figure out IPPROTO_ROUTING/IPPR

Re: [BUG] BPF splat on latest kernels

2019-03-21 Thread Alexei Starovoitov
On Wed, Mar 20, 2019 at 09:49:34PM -0700, Eric Dumazet wrote: > > > On 03/08/2019 04:29 PM, Alexei Starovoitov wrote: > > On Fri, Mar 8, 2019 at 12:33 PM Eric Dumazet wrote: > >> > >> Running test_progs on a LOCKDEP enabled kernel (latest David Miller net > >> tree) > >> > >> I got the followin

Re: [PATCH net-next] fou: Support binding FoU socket

2019-03-21 Thread kbuild test robot
Hi Kristian, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Kristian-Evensen/fou-Support-binding-FoU-socket/20190321-232759 config: x86_64-kexec (attached as .config) compiler: gcc-7 (Debian 7.3.0-1

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

2019-03-21 Thread kbuild test robot
Hi Kevin, Thank you for the patch! Yet something to improve: [auto build test ERROR on net/master] [also build test ERROR on v5.1-rc1 next-20190321] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCHv2 bpf-next 1/3] bpf, tests: tweak endianness selection

2019-03-21 Thread Alexei Starovoitov
On Fri, Mar 22, 2019 at 11:46:52AM +0900, Sergey Senozhatsky wrote: > On (03/21/19 08:49), Stanislav Fomichev wrote: > > On 03/21, Sergey Senozhatsky wrote: > > > On (03/20/19 20:24), Alexei Starovoitov wrote: > > > > On Wed, Mar 20, 2019 at 09:53:33PM +0900, Sergey Senozhatsky wrote: > > > > > Not

Re: [PATCH net v2 00/18] net/sched: validate the control action with all the other parameters

2019-03-21 Thread Cong Wang
On Thu, Mar 21, 2019 at 7:17 PM Cong Wang wrote: > > Hmm, could you be more specific on how RCU grace period is respected > in your v2 patchset? Never mind, I just found patch 18/18 after going over all of them. Technically, patch 18 should come before all action-specific patches, but this is not

Re: [PATCH bpf] bpf: verifier: propagate liveness on all frames

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 02:34:36PM -0700, Jakub Kicinski wrote: > Commit 7640ead93924 ("bpf: verifier: make sure callees don't prune > with caller differences") connected up parentage chains of all > frames of the stack. It didn't, however, ensure propagate_liveness() > propagates all liveness inf

Re: [PATCH bpf-next v3 4/8] bpf: add helper to check for a valid SYN cookie

2019-03-21 Thread Lorenz Bauer
Ha! I did that because __cookie_v4(6)_check is marked GPL only. I'm happy for the helper to be more permissive if that is possible. On Fri, 22 Mar 2019 at 10:06, Alexei Starovoitov wrote: > > On Fri, Mar 22, 2019 at 09:54:02AM +0800, Lorenz Bauer wrote: > > Using bpf_skc_lookup_tcp it's possible

Re: [PATCHv2 bpf-next 1/3] bpf, tests: tweak endianness selection

2019-03-21 Thread Sergey Senozhatsky
On (03/21/19 08:49), Stanislav Fomichev wrote: > On 03/21, Sergey Senozhatsky wrote: > > On (03/20/19 20:24), Alexei Starovoitov wrote: > > > On Wed, Mar 20, 2019 at 09:53:33PM +0900, Sergey Senozhatsky wrote: > > > > Not all compilers have __builtin_bswap16() and __builtin_bswap32(), > > > > thus

Re: [PATCH] samples: bpf: add xdp_sample_pkts to .gitignore

2019-03-21 Thread Alexei Starovoitov
On Tue, Mar 19, 2019 at 9:17 PM Daniel T. Lee wrote: > > This commit adds xdp_sample_pkts to .gitignore which is > currently ommited from the ignore file. > > Signed-off-by: Daniel T. Lee applied. thanks!

Re: [PATCH net v2 00/18] net/sched: validate the control action with all the other parameters

2019-03-21 Thread Cong Wang
On Wed, Mar 20, 2019 at 7:00 AM Davide Caratti wrote: > Changes since v1: > - reword the cover letter > - condense the extack message in case tc_action_check_ctrlact() is called > with invalid parameters. > - add tcf_action_set_ctrlact() to avoid code duplication an make the > RCU-ification of

Re: [PATCH bpf-next v3 4/8] bpf: add helper to check for a valid SYN cookie

2019-03-21 Thread Alexei Starovoitov
On Fri, Mar 22, 2019 at 09:54:02AM +0800, Lorenz Bauer wrote: > Using bpf_skc_lookup_tcp it's possible to ascertain whether a packet > belongs to a known connection. However, there is one corner case: no > sockets are created if SYN cookies are active. This means that the final > ACK in the 3WHS is

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

2019-03-21 Thread Willem de Bruijn
On Thu, Mar 21, 2019 at 8:16 PM Eric Dumazet wrote: > > 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 is rece

[PATCH bpf-next v3 2/8] bpf: allow helpers to return PTR_TO_SOCK_COMMON

2019-03-21 Thread Lorenz Bauer
It's currently not possible to access timewait or request sockets from eBPF, since there is no way to return a PTR_TO_SOCK_COMMON from a helper. Introduce RET_PTR_TO_SOCK_COMMON to enable this behaviour. Signed-off-by: Lorenz Bauer --- include/linux/bpf.h | 1 + kernel/bpf/verifier.c | 4

[PATCH bpf-next v3 6/8] selftests/bpf: allow specifying helper for BPF_SK_LOOKUP

2019-03-21 Thread Lorenz Bauer
Make the BPF_SK_LOOKUP macro take a helper function, to ease writing tests for new helpers. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/test_verifier.c | 6 +- .../selftests/bpf/verifier/ref_tracking.c | 78 +-- tools/testing/selftests/bpf/verifier/unpriv.c

[PATCH bpf-next v3 0/8] Allow checking SYN cookies from XDP and tc cls act

2019-03-21 Thread Lorenz Bauer
This series adds the necessary helpers to determine wheter a given (encapsulated) TCP packet belongs to a connection known to the network stack. * bpf_skc_lookup_tcp gives access to request and timewait sockets * bpf_tcp_check_syncookie identifies the final 3WHS ACK when syncookies are enabled

[PATCH bpf-next v3 7/8] selftests/bpf: test references to sock_common

2019-03-21 Thread Lorenz Bauer
Make sure that returning a struct sock_common * reference invokes the reference tracking machinery in the verifier. Signed-off-by: Lorenz Bauer --- .../selftests/bpf/verifier/ref_tracking.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/tools/testing/selftests/bpf/v

[PATCH bpf-next v3 3/8] bpf: add skc_lookup_tcp helper

2019-03-21 Thread Lorenz Bauer
Allow looking up a sock_common. This gives eBPF programs access to timewait and request sockets. Signed-off-by: Lorenz Bauer --- include/uapi/linux/bpf.h | 20 +- kernel/bpf/verifier.c| 3 +- net/core/filter.c| 144 +-- 3 files changed, 143

[PATCH bpf-next v3 1/8] bpf: track references based on is_acquire_func

2019-03-21 Thread Lorenz Bauer
So far, the verifier only acquires reference tracking state for RET_PTR_TO_SOCKET_OR_NULL. Instead of extending this for every new return type which desires these semantics, acquire reference tracking state iff the called helper is an acquire function. Signed-off-by: Lorenz Bauer --- kernel/bpf/

[PATCH bpf-next v3 5/8] tools: update include/uapi/linux/bpf.h

2019-03-21 Thread Lorenz Bauer
Pull definitions for bpf_skc_lookup_tcp and bpf_sk_check_syncookie. Signed-off-by: Lorenz Bauer --- tools/include/uapi/linux/bpf.h | 36 +- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.

[PATCH bpf-next v3 8/8] selftests/bpf: add tests for bpf_tcp_check_syncookie and bpf_skc_lookup_tcp

2019-03-21 Thread Lorenz Bauer
Add tests which verify that the new helpers work for both IPv4 and IPv6, by forcing SYN cookies to always on. Use a new network namespace to avoid clobbering the global SYN cookie settings. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/.gitignore| 1 + tools/testing/selft

[PATCH bpf-next v3 4/8] bpf: add helper to check for a valid SYN cookie

2019-03-21 Thread Lorenz Bauer
Using bpf_skc_lookup_tcp it's possible to ascertain whether a packet belongs to a known connection. However, there is one corner case: no sockets are created if SYN cookies are active. This means that the final ACK in the 3WHS is misclassified. Using the helper, we can look up the listening socket

PRIVATE...

2019-03-21 Thread daniele
I have a business Proposal that will be of benefit to the both of us.Kindly contact me on mrmichealwu...@yahoo.com.hk should this be of interest to you.

Where to submit this?

2019-03-21 Thread Ron Murray
I have an ASRock 970A-G/3.1 motherboard, which, with current Linux kernels, occasionally "finds" an extra PCI device on the initial scan. I wouldn't mind, but it finds it early in the piece, and that changes the PCI allocation of my Ethernet board from 02:06.0 to 03:06.0, and, with systemd, Linux c

[PATCH v2 net-next 2/3] tcp: add one skb cache for tx

2019-03-21 Thread Eric Dumazet
On hosts with a lot of cores, RPC workloads suffer from heavy contention on slab spinlocks. 20.69% [kernel] [k] queued_spin_lock_slowpath 5.64% [kernel] [k] _raw_spin_lock 3.83% [kernel] [k] syscall_return_via_sysret 3.48% [kernel] [k] __entry_text_s

[PATCH v2 net-next 1/3] net: convert rps_needed and rfs_needed to new static branch api

2019-03-21 Thread Eric Dumazet
We prefer static_branch_unlikely() over static_key_false() these days. Signed-off-by: Eric Dumazet --- drivers/net/tun.c | 2 +- include/linux/netdevice.h | 4 ++-- include/net/sock.h | 2 +- net/core/dev.c | 10 +- net/core/net-sysfs.c | 4 ++-- n

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

2019-03-21 Thread Eric Dumazet
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 is received on CPU B, and consumes the skb that was in the retransmit queu

[PATCH v2 net-next 3/3] tcp: add one skb cache for rx

2019-03-21 Thread Eric Dumazet
Often times, recvmsg() system calls and BH handling for a particular TCP socket are done on different cpus. This means the incoming skb had to be allocated on a cpu, but freed on another. This incurs a high spinlock contention in slab layer for small rpc, but also a high number of cache line ping

[PATCH v4 3/4] net: dsa: qca8k: remove leftover phy accessors

2019-03-21 Thread Christian Lamparter
This belated patch implements Andrew Lunn's request of "remove the phy_read() and phy_write() functions." While seemingly harmless, this causes the switch's user port PHYs to get registered twice. This is because the DSA subsystem will create a s

Re: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

2019-03-21 Thread Christian Lamparter
On Friday, March 22, 2019 12:01:20 AM CET Marek Behun wrote: > > Hm, it's not really a "external mode". But let's try one more time. > > The idea is that if an external mdio-bus (from the SoC) has already > > registered the PHY 0x0 - 0x4 from the QCA8337, the qca8k should not > > expose the same PH

[PATCH v4 1/4] dt-bindings: net: dsa: qca8k: fix example

2019-03-21 Thread Christian Lamparter
In the example, the phy at phy@0 is clashing with the switch0@0 at the same address. Usually, the switches are accessible through pseudo PHYs which in case of the qca8k are located at 0x10 - 0x18. Reviewed-by: Florian Fainelli Signed-off-by: Christian Lamparter --- Documentation/devicetree/bind

[PATCH v4 2/4] dt-bindings: net: dsa: qca8k: support internal mdio-bus

2019-03-21 Thread Christian Lamparter
This patch updates the qca8k's binding to document to the approach for using the internal mdio-bus of the supported qca8k switches. Reviewed-by: Florian Fainelli Signed-off-by: Christian Lamparter --- .../devicetree/bindings/net/dsa/qca8k.txt | 69 +-- 1 file changed, 64 ins

[PATCH v4 4/4] net: dsa: qca8k: extend slave-bus implementations

2019-03-21 Thread Christian Lamparter
This patch implements accessors for the QCA8337 MDIO access through the MDIO_MASTER register, which makes it possible to access the PHYs on slave-bus through the switch. In cases where the switch ports are already mapped via external "phy-phandles", the internal mdio-bus is disabled in order to pre

Re: [PATCH bpf-next v6] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Luca Boccassi
On Thu, 2019-03-21 at 15:43 -0700, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 10:33:17PM +, luca.bocca...@gmail.com > wrote: > > From: Luca Boccassi > > > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. >

[PATCH bpf-next v7] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread luca . boccassi
From: Luca Boccassi Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi Acked-by: Andrey Ignatov --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its ow

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

2019-03-21 Thread Yi-Hung Wei
> > +static void ovs_ct_add_timeout(struct net *net, struct nf_conn *ct, > > + const char *timeout_name, u16 l3num, u8 > > l4num) > > +{ > This code looks very similar to xt_ct_set_timeout(), can you refactor > it to avoid code duplication? Thanks Prvain's feedback. I

Re: [net-next V2 12/15] net: Add IANA_VXLAN_UDP_PORT definition to vxlan header file

2019-03-21 Thread Saeed Mahameed
On Thu, 2019-03-21 at 15:54 -0700, Jakub Kicinski wrote: > On Thu, 21 Mar 2019 15:51:39 -0700, Saeed Mahameed wrote: > > From: Moshe Shemesh > > > > Added IANA_VXLAN_UDP_PORT (4789) definition to vxlan header file so > > it > > can be used by drivers instead of local definition. > > Updated drive

Re: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

2019-03-21 Thread Marek Behun
> Hm, it's not really a "external mode". But let's try one more time. > The idea is that if an external mdio-bus (from the SoC) has already > registered the PHY 0x0 - 0x4 from the QCA8337, the qca8k should not > expose the same PHYs as it's own mdio-bus because then the PHYs end > up being register

Re: [net-next V2 12/15] net: Add IANA_VXLAN_UDP_PORT definition to vxlan header file

2019-03-21 Thread Jakub Kicinski
On Thu, 21 Mar 2019 15:51:39 -0700, Saeed Mahameed wrote: > From: Moshe Shemesh > > Added IANA_VXLAN_UDP_PORT (4789) definition to vxlan header file so it > can be used by drivers instead of local definition. > Updated drivers which locally defined it as 4789 to use it. > > Signed-off-by: Moshe

Re: [net-next V2 09/15] net: Move the definition of the default Geneve udp port to public header file

2019-03-21 Thread Jakub Kicinski
On Thu, 21 Mar 2019 15:51:36 -0700, Saeed Mahameed wrote: > From: Moshe Shemesh > > Move the definition of the default Geneve udp port from the geneve > source to the header file, so we can re-use it from drivers. > Modify existing drivers to use it. > > Signed-off-by: Moshe Shemesh > Reviewed-

[net-next V2 14/15] net/mlx5e: Support VLAN modify action

2019-03-21 Thread Saeed Mahameed
From: Eli Britstein Support VLAN modify action by emulating a rewrite action for the VLAN fields. Currently, the only supported field is the vid. The prio in the action must be set to 0 to indicate no change. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --

[net-next V2 05/15] net/mlx5e: Fix port buffer function documentation format

2019-03-21 Thread Saeed Mahameed
This patch fixes compiler warnings: In drivers/.../mlx5/core/en/port_buffer.c:190: warning: Function parameter or member 'pfc_en' not described... ... warning: Function parameter or member 'change' not described... Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Reviewed-by: Eran B

[pull request][net-next V2 00/15] Mellanox, mlx5 updates 2019-03-20

2019-03-21 Thread Saeed Mahameed
Hi Dave, 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 feedback. Thanks, Saeed. --- The following changes since commit 83b038db

[net-next V2 11/15] net/mlx5e: TX, Add geneve tunnel stateless offload support

2019-03-21 Thread Saeed Mahameed
From: Moshe Shemesh Currently support only default geneve udp port (6081). For the tx side, the HW is assisted by SW parsing, which sets the headers offset to offload tunneled LSO and csum. Note that for udp tunnels, we don't use special rx offloads, as rss on the outer headers is enough, we supp

[net-next V2 08/15] net/mlx5: E-Switch, Protect from invalid memory access in offload fdb table

2019-03-21 Thread Saeed Mahameed
From: Roi Dayan The esw offloads structures share a union with the legacy mode structs. Reset the offloads struct to zero in init to protect from null assumptions made by the legacy mode code. Signed-off-by: Roi Dayan Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- drivers/net/ethe

[net-next V2 01/15] net/mlx5: Simplify sriov enable/disable flow

2019-03-21 Thread Saeed Mahameed
From: Parav Pandit Simplify sriov enable/disable flow for below two checks. 1. PCI core driver allows sriov configuration only on a PF. This is done in drivers/pci/pci-sysfs.c sriov_attrs_are_visible(). 2. PCI core driver allow sriov enablement if the sriov is currently disabled for for a PF. T

[net-next V2 09/15] net: Move the definition of the default Geneve udp port to public header file

2019-03-21 Thread Saeed Mahameed
From: Moshe Shemesh Move the definition of the default Geneve udp port from the geneve source to the header file, so we can re-use it from drivers. Modify existing drivers to use it. Signed-off-by: Moshe Shemesh Reviewed-by: Or Gerlitz Cc: John Hurley Cc: Jakub Kicinski Reviewed-by: Tariq To

[net-next V2 02/15] net/mlx5: Rename total_vfs to total_vports

2019-03-21 Thread Saeed Mahameed
From: Parav Pandit Macro MLX5_TOTAL_VPORTS() returns total number of vports. Therefore, rename variable total_vfs to total_vports to improve code readability. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitc

[net-next V2 07/15] net/mlx5e: Remove redundant assignment

2019-03-21 Thread Saeed Mahameed
From: "Gustavo A. R. Silva" Remove redundant assignment to tun_entropy->enabled. Addesses-Coverity-ID: 1477328 ("Unused value") Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Roi Dayan Reviewed-by:

[net-next V2 15/15] net/mlx5e: Replace TC VLAN pop and push actions with VLAN modify

2019-03-21 Thread Saeed Mahameed
From: Eli Britstein Changing the VLAN header may be implemented by pop the existing header and push a new one. Translate those operations as VLAN modify. Applicable for use cases such as OVS where the controller translates a vlan modify meta (OF) rule to DP pop+push actions rule. Signed-off-by:

Re: [PATCH net-next 3/3] tcp: add one skb cache for rx

2019-03-21 Thread Eric Dumazet
On 03/21/2019 03:17 PM, Eric Dumazet wrote: > Often times, recvmsg() system calls and BH handling for a particular > TCP socket are done on different cpus. ... > Note that if rps/rfs is used, we do not enable this feature, because > there is high chance that the same cpu is handling both the r

[net-next V2 13/15] net/mlx5e: Add VLAN ID rewrite fields

2019-03-21 Thread Saeed Mahameed
From: Eli Britstein Add VLAN ID rewrite fields as a pre-step to support this rewrite. Signed-off-by: Eli Britstein Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 ++ include/linux/mlx5/mlx5_ifc.h | 1 + 2 files c

[net-next V2 12/15] net: Add IANA_VXLAN_UDP_PORT definition to vxlan header file

2019-03-21 Thread Saeed Mahameed
From: Moshe Shemesh Added IANA_VXLAN_UDP_PORT (4789) definition to vxlan header file so it can be used by drivers instead of local definition. Updated drivers which locally defined it as 4789 to use it. Signed-off-by: Moshe Shemesh Reviewed-by: Or Gerlitz Cc: John Hurley Cc: Jakub Kicinski C

[net-next V2 10/15] net/mlx5e: Take SW parser code to a separate function

2019-03-21 Thread Saeed Mahameed
From: Moshe Shemesh Refactor mlx5e_ipsec_set_swp() code, split the part which sets the eseg software parser (SWP) offsets and flags, so it can be used in a downstream patch by other mlx5e functionality which needs to set eseg SWP. The new function mlx5e_set_eseg_swp() is useful for setting swp fo

[net-next V2 04/15] net/mlx5: Fix compilation warning in eq.c

2019-03-21 Thread Saeed Mahameed
mlx5_eq_table_get_rmap is being used only when CONFIG_RFS_ACCEL is enabled, this patch fixes the below warning when CONFIG_RFS_ACCEL is disabled. drivers/.../mlx5/core/eq.c:903:18: [-Werror=missing-prototypes] error: no previous prototype for ‘mlx5_eq_table_get_rmap’ Fixes: f2f3df550139 ("net/mlx

[net-next V2 03/15] net/mlx5: Simplify mlx5_sriov_is_enabled() by using pci core API

2019-03-21 Thread Saeed Mahameed
From: Parav Pandit It is desired to get rid of num_vfs stored inside mlx5_core_sriov to safely support vports more than vfs. To reduce dependency on mlx5_core_sriov num_vfs, start using pci_num_vf() from pci core. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahame

[net-next V2 06/15] net/mlx5e: Fix compilation warning in en_tc.c

2019-03-21 Thread Saeed Mahameed
Amazingly a mlx5e_tc function is being called from the eswitch layer, which is by itself very terrible! The function was declared locally in eswitch_offloads.c so it could be used there, which caused the following compilation warning, fix that. drivers/.../mlx5/core/en_tc.c:3242:6: [-Werror=missin

Re: [RFC 1/6] netlink: add nlmsg_validate_strict() & nla_validate_strict()

2019-03-21 Thread Florian Westphal
Johannes Berg wrote: > + * nla_validate_strict - Strictly validate a stream of attributes > + * @head: head of attribute stream > + * @len: length of attribute stream > + * @maxtype: maximum attribute type to be expected > + * @policy: validation policy > + * @extack: extended ACK report struct >

Re: [PATCH bpf-next v6] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 10:33:17PM +, luca.bocca...@gmail.com wrote: > From: Luca Boccassi > > Generate a libbpf.pc file at build time so that users can rely > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > Signed-off-by: Luca Boccassi > Acked-by: Andrey Ignatov > --- > v2:

Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Luca Boccassi
On Thu, 2019-03-21 at 23:19 +0100, Daniel Borkmann wrote: > On 03/21/2019 11:01 PM, Alexei Starovoitov wrote: > > On Thu, Mar 21, 2019 at 04:00:46PM +, Andrey Ignatov wrote: > > > luca.bocca...@gmail.com [Thu, 2019-03- > > > 21 03:26 -0700]: > > > > From: Luca Boccassi > > > > > > > > Genera

[PATCH bpf-next v6] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread luca . boccassi
From: Luca Boccassi Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi Acked-by: Andrey Ignatov --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its ow

[PATCH bpf-next v5] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread luca . boccassi
From: Luca Boccassi Generate a libbpf.pc file at build time so that users can rely on pkg-config to find the library, its CFLAGS and LDFLAGS. Signed-off-by: Luca Boccassi Acked-by: Andrey Ignatov --- v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, save kernel version in its ow

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

2019-03-21 Thread Soheil Hassas Yeganeh
On Thu, Mar 21, 2019 at 6:17 PM Eric Dumazet wrote: > > On hosts with many cpus we can observe a very verious 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 is rece

Re: [PATCH 6/7] net/core: Declare a local function 'static'

2019-03-21 Thread Sagi Grimberg
This can be dropped. Dave merged a fix for it already On 3/21/19 3:19 PM, Bart Van Assche wrote: This patch avoids that the compiler complains about a missing prototype when building with W=1. Cc: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- net/core/datagram.c |

Re: [PATCH 7/7] net/utils: Use strlcpy() instead of open-coding it

2019-03-21 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

2019-03-21 Thread Christian Lamparter
(Bottom post?) On Thursday, March 21, 2019 8:55:55 PM CET Marek Behun wrote: > Hi, > > Oh, I didn't know about Christian's patch. > > I shall test on our device tomorrow. If it works, we will use internal > PHY access. > > But I think that qca8k_port_to_phy should be used in the external mode >

Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Luca Boccassi
On Thu, 2019-03-21 at 15:01 -0700, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 04:00:46PM +, Andrey Ignatov wrote: > > luca.bocca...@gmail.com [Thu, 2019-03-21 > > 03:26 -0700]: > > > From: Luca Boccassi > > > > > > Generate a libbpf.pc file at build time so that users can rely > > >

[PATCH 2/7] net/core: Document all dev_ioctl() arguments

2019-03-21 Thread Bart Van Assche
This patch avoids that the following warnings are reported when building with W=1: net/core/dev_ioctl.c:378: warning: Function parameter or member 'ifr' not described in 'dev_ioctl' net/core/dev_ioctl.c:378: warning: Function parameter or member 'need_copyout' not described in 'dev_ioctl' net/co

[PATCH 5/7] net/core: Allow the compiler to verify declaration and definition consistency

2019-03-21 Thread Bart Van Assche
Instead of declaring a function in a .c file, declare it in a header file and include that header file from the source files that define and that use the function. That allows the compiler to verify consistency of declaration and definition. See also commit 52267790ef52 ("sock: add MSG_ZEROCOPY") #

[PATCH 4/7] net/core: Fix rtnetlink kernel-doc headers

2019-03-21 Thread Bart Van Assche
This patch avoids that the following warnings are reported when building with W=1: net/core/rtnetlink.c:3580: warning: Function parameter or member 'ndm' not described in 'ndo_dflt_fdb_add' net/core/rtnetlink.c:3580: warning: Function parameter or member 'tb' not described in 'ndo_dflt_fdb_add'

[PATCH 6/7] net/core: Declare a local function 'static'

2019-03-21 Thread Bart Van Assche
This patch avoids that the compiler complains about a missing prototype when building with W=1. Cc: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- net/core/datagram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/datagram.c b/net/core/datagram.c index c42

[PATCH 7/7] net/utils: Use strlcpy() instead of open-coding it

2019-03-21 Thread Bart Van Assche
This patch does not change any functionality but makes the code easier to read. Cc: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- net/core/utils.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/core/utils.c b/net/core/utils.c index 2a597ac

[PATCH 3/7] net/core: Document __skb_flow_dissect() flags argument

2019-03-21 Thread Bart Van Assche
This patch avoids that the following warning is reported when building with W=1: warning: Function parameter or member 'flags' not described in '__skb_flow_dissect' Cc: Tom Herbert Fixes: cd79a2382aa5 ("flow_dissector: Add flags argument to skb_flow_dissector functions") # v4.3. Signed-off-by:

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

2019-03-21 Thread Bart Van Assche
Hi Dave, 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 when building the code in net/core with W=1. Please consider th

[PATCH 1/7] net/core: Document reuseport_add_sock() bind_inany argument

2019-03-21 Thread Bart Van Assche
This patch avoids that the following warning is reported when building with W=1: warning: Function parameter or member 'bind_inany' not described in 'reuseport_add_sock' Cc: Martin KaFai Lau Fixes: 2dbb9b9e6df6 ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT") # v4.19. Signed-off-by: Bart Van Assch

Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Daniel Borkmann
On 03/21/2019 11:01 PM, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 04:00:46PM +, Andrey Ignatov wrote: >> luca.bocca...@gmail.com [Thu, 2019-03-21 03:26 >> -0700]: >>> From: Luca Boccassi >>> >>> Generate a libbpf.pc file at build time so that users can rely >>> on pkg-config to fin

[PATCH net-next 1/3] net: convert rps_needed and rfs_needed to new static branch api

2019-03-21 Thread Eric Dumazet
We prefer static_branch_unlikely() over static_key_false() these days. Signed-off-by: Eric Dumazet --- include/linux/netdevice.h | 4 ++-- include/net/sock.h | 2 +- net/core/dev.c | 10 +- net/core/net-sysfs.c | 4 ++-- net/core/sysctl_net_core.c | 8 -

[PATCH net-next 3/3] tcp: add one skb cache for rx

2019-03-21 Thread Eric Dumazet
Often times, recvmsg() system calls and BH handling for a particular TCP socket are done on different cpus. This means the incoming skb had to be allocated on a cpu, but freed on another. This incurs a high spinlock contention in slab layer for small rpc, but also a high number of cache line ping

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

2019-03-21 Thread Eric Dumazet
On hosts with many cpus we can observe a very verious 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 is received on CPU B, and consumes the skb that was in the retransmit queu

[PATCH net-next 2/3] tcp: add one skb cache for tx

2019-03-21 Thread Eric Dumazet
On hosts with a lot of cores, RPC workloads suffer from heavy contention on slab spinlocks. 20.69% [kernel] [k] queued_spin_lock_slowpath 5.64% [kernel] [k] _raw_spin_lock 3.83% [kernel] [k] syscall_return_via_sysret 3.48% [kernel] [k] __entry_text_s

[RFC 5/6] netlink: add strict parsing for future attributes

2019-03-21 Thread Johannes Berg
From: Johannes Berg Unfortunately, we cannot add strict parsing for all attributes, as that would break existing userspace. We currently warn about it, but that's about all we can do. For new attributes, however, the story is better: nobody is using them, so we can reject bad sizes. Also, for n

[RFC 3/6] netlink: add NLA_MIN_LEN

2019-03-21 Thread Johannes Berg
From: Johannes Berg Rather than using NLA_UNSPEC for this type of thing, use NLA_MIN_LEN so we can make NLA_UNSPEC be NLA_REJECT under certain conditions for future attributes. While at it, also use NLA_EXACT_LEN for the struct example. Signed-off-by: Johannes Berg --- include/net/netlink.h |

[RFC 0/7] netlink/genetlink: stricter parsing

2019-03-21 Thread Johannes Berg
It seems that everytime David and I meet, we have further ideas for netlink ;-) This time, we talked about attribute parsing and making policy parsing (even) stricter. I'm not entirely happy with this patchset, due to the mistake David made when he added the strict parsing. At that time, the stri

[RFC 4/6] genetlink: optionally validate strictly/dumps

2019-03-21 Thread Johannes Berg
From: Johannes Berg Add options to strictly validate messages and dump messages, sometimes perhaps validating dump messages non-strictly may be required, so add an option for that as well. Since none of this can really be applied to existing commands, set the options everwhere using the followin

[RFC 6/6] nl80211: tag policies with strict_start_type

2019-03-21 Thread Johannes Berg
From: Johannes Berg Tag all the nl80211 policies with strict_start_type so that strict validation is done for all types that we have a policy for. Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/net/wireless/nl

[RFC 2/6] genetlink: add genlmsg_parse_strict()

2019-03-21 Thread Johannes Berg
From: Johannes Berg Signed-off-by: Johannes Berg --- include/net/genetlink.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 6850c7b1a3a6..4a25c341244c 100644 --- a/include/net/genetlink.h +++ b/include/net/genetli

[RFC 1/6] netlink: add nlmsg_validate_strict() & nla_validate_strict()

2019-03-21 Thread Johannes Berg
From: Johannes Berg These are needed since we want to separate validation and parsing in some cases, e.g. in generic netlink to ensure that dump messages are valid, but we don't typically parse them. Signed-off-by: Johannes Berg --- include/net/netlink.h | 26 + lib/nla

Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 04:00:46PM +, Andrey Ignatov wrote: > luca.bocca...@gmail.com [Thu, 2019-03-21 03:26 > -0700]: > > From: Luca Boccassi > > > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > Signe

[PATCH] genetlink: make policy common to family

2019-03-21 Thread Johannes Berg
From: Johannes Berg Since maxattr is common, the policy can't really differ sanely, so make it common as well. The only user that did in fact manage to make a non-common policy is taskstats, which has to be really careful about it (since it's still using a common maxattr!). This is no longer sup

Re: [PATCH v2 net-next] net: phy: aquantia: add downshift support

2019-03-21 Thread Florian Fainelli
On 3/21/19 1:08 PM, Heiner Kallweit wrote: > Aquantia PHY's of the AQR107 family support the downshift feature. > Add support for it as standard PHY tunable so that it can be controlled > via ethtool. > The AQCS109 supports a proprietary 2-pair 1Gbps mode. If two such PHY's > are connected to each

[PATCH bpf] bpf: verifier: propagate liveness on all frames

2019-03-21 Thread Jakub Kicinski
Commit 7640ead93924 ("bpf: verifier: make sure callees don't prune with caller differences") connected up parentage chains of all frames of the stack. It didn't, however, ensure propagate_liveness() propagates all liveness information along those chains. This means pruning happening in the callee

Re: [PATCH net-next v3 00/12] Refactor flower classifier to remove dependency on rtnl lock

2019-03-21 Thread David Miller
From: Vlad Buslov Date: Thu, 21 Mar 2019 15:17:32 +0200 > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a third step to remove > rtnl lock dependency f

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Stanislav Fomichev
On 03/21, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 9:13 AM Willem de Bruijn > wrote: > > > > On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov > > wrote: > > > > > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > > > > > If we can agree that we switch eve

Re: [PATCH net-next] nfp: remove defines for unused control bits

2019-03-21 Thread David Miller
From: Jakub Kicinski Date: Wed, 20 Mar 2019 21:01:53 -0700 > NFP driver ABI contains bits for L2 switching which were never > implemented in initially envisioned form. > > Remove the defines, and open up the possibility of > reclaiming the bits for other uses. > > Signed-off-by: Jakub Kicinski

Re: [RFC bpf-next v2 1/9] net: introduce __init_skb{,_data,_shinfo} helpers

2019-03-21 Thread Alexei Starovoitov
On Thu, Mar 21, 2019 at 9:13 AM Willem de Bruijn wrote: > > On Thu, Mar 21, 2019 at 12:01 PM Alexei Starovoitov > wrote: > > > > On Thu, Mar 21, 2019 at 08:44:33AM -0700, Stanislav Fomichev wrote: > > > > > > If we can agree that we switch everything to xpd-like, do we deprecate the > > > skb-one

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

2019-03-21 Thread David Miller
I'm expecting a new revision of this pull with updates to patches #9 and #13 based upon Jakub's feedback. Thanks.

  1   2   3   >