Re: [PATCH net-next] net: lantiq: Fix return value check in xrx200_probe()

2018-09-17 Thread David Miller
From: Wei Yongjun Date: Sat, 15 Sep 2018 01:33:50 + > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel

Re: [PATCH net-next] net: dsa: gswip: Fix return value check in gswip_probe()

2018-09-17 Thread David Miller
From: Wei Yongjun Date: Sat, 15 Sep 2018 01:33:21 + > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA

Re: [PATCH net] net: dsa: mv88e6xxx: Fix ATU Miss Violation

2018-09-17 Thread David Miller
From: Andrew Lunn Date: Fri, 14 Sep 2018 23:46:12 +0200 > Fix a cut/paste error and a typo which results in ATU miss violations > not being reported. > > Fixes: 0977644c5005 ("net: dsa: mv88e6xxx: Decode ATU problem interrupt") > Signed-off-by: Andrew Lunn Applied and queued up for -stable.

Re: [PATCH net] tls: fix currently broken MSG_PEEK behavior

2018-09-17 Thread David Miller
From: Daniel Borkmann Date: Fri, 14 Sep 2018 23:00:55 +0200 > In kTLS MSG_PEEK behavior is currently failing, strace example: ... > As can be seen from strace, there are two TLS records sent, > i) 'test_read_peek' and ii) '_mult_recs\0' where we end up > peeking

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-17 Thread David Miller
From: Cong Wang Date: Fri, 14 Sep 2018 13:32:42 -0700 > ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, > but its initialization is in the generic netns code, setup_net(). > > Move it to IPv4 specific net init code, inet_init_net(). > > Fixes: d9ff3049739e ("net: Replace

Re: [net-next PATCH] tls: async support causes out-of-bounds access in crypto APIs

2018-09-17 Thread David Miller
From: John Fastabend Date: Fri, 14 Sep 2018 13:01:46 -0700 > When async support was added it needed to access the sk from the async > callback to report errors up the stack. The patch tried to use space > after the aead request struct by directly setting the reqsize field in > aead_request. This

Re: [PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-17 Thread David Miller
From: Stephen Hemminger Date: Fri, 14 Sep 2018 12:54:55 -0700 > The Hyper-V implementation of PCI controller has concept of 32 bit serial > number > (not to be confused with PCI-E serial number). This value is sent in the > protocol > from the host to indicate SR-IOV VF device is attached to

Re: [PATCH net] ipv6: fix possible use-after-free in ip6_xmit()

2018-09-17 Thread David Miller
From: Eric Dumazet Date: Fri, 14 Sep 2018 12:02:31 -0700 > In the unlikely case ip6_xmit() has to call skb_realloc_headroom(), > we need to call skb_set_owner_w() before consuming original skb, > otherwise we risk a use-after-free. > > Bring IPv6 in line with what we do in IPv4 to fix this. >

Re: [PATCH net] bnxt_en: Fix VF mac address regression.

2018-09-17 Thread David Miller
From: Michael Chan Date: Fri, 14 Sep 2018 15:41:29 -0400 > The recent commit to always forward the VF MAC address to the PF for > approval may not work if the PF driver or the firmware is older. This > will cause the VF driver to fail during probe: > > bnxt_en :00:03.0 (unnamed

Re: [PATCH net] pppoe: fix reception of frames with no mac header

2018-09-17 Thread David Miller
From: Guillaume Nault Date: Fri, 14 Sep 2018 16:28:05 +0200 > pppoe_rcv() needs to look back at the Ethernet header in order to > lookup the PPPoE session. Therefore we need to ensure that the mac > header is big enough to contain an Ethernet header. Otherwise > eth_hdr(skb)->h_source might

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Andrew Lunn
On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: > This property copy from "ibm,emac.txt" to describe a shared MIDO bus. > Since emac include MDIO, so If the motherboard has more than one PHY > connected to an MDIO bus, this property will point to the MAC device > that has the MDIO

[PATCH] net: phy: phylink: fix SFP interface autodetection

2018-09-17 Thread Baruch Siach
When the switching to the SFP detected link mode update the main link_interface field as well. Otherwise, the link fails to come up when the configured 'phy-mode' defers from the SFP detected mode. This fixes 1GB SFP module link up on eth3 of the Macchiatobin board that is configured in the DT to

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Willem de Bruijn
On Mon, Sep 17, 2018 at 6:37 AM Steffen Klassert wrote: > > On Fri, Sep 14, 2018 at 01:59:40PM -0400, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > > gro callback configured. > > It would be nice if we could do GRO

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Willem de Bruijn
On Mon, Sep 17, 2018 at 6:24 AM Paolo Abeni wrote: > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c > > index 4f6aa95a9b12..f44fe328aa0f 100644 > > --- a/net/ipv4/udp_offload.c > > +++ b/net/ipv4/udp_offload.c > > @@

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Willem de Bruijn
On Mon, Sep 17, 2018 at 5:03 AM Steffen Klassert wrote: > > On Fri, Sep 14, 2018 at 01:59:40PM -0400, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > > gro callback configured. > > > > Signed-off-by: Willem de Bruijn

Re: [RFC PATCH 2/4] net: enable UDP gro on demand.

2018-09-17 Thread Willem de Bruijn
On Mon, Sep 17, 2018 at 6:18 AM Paolo Abeni wrote: > > On Sun, 2018-09-16 at 14:23 -0400, Willem de Bruijn wrote: > > That udp gro implementation is clearly less complete than yours in > > this patchset. The point I wanted to bring up for discussion is not the > > protocol implementation, but the

Re: [PATCH net] selftests: pmtu: properly redirect stderr to /dev/null

2018-09-17 Thread Stefano Brivio
On Mon, 17 Sep 2018 15:30:06 +0200 Sabrina Dubroca wrote: > The cleanup function uses "$CMD 2 > /dev/null", which doesn't actually > send stderr to /dev/null, so when the netns doesn't exist, the error > message is shown. Use "2> /dev/null" instead, so that those messages > disappear, as was

[PATCH net] selftests: pmtu: properly redirect stderr to /dev/null

2018-09-17 Thread Sabrina Dubroca
The cleanup function uses "$CMD 2 > /dev/null", which doesn't actually send stderr to /dev/null, so when the netns doesn't exist, the error message is shown. Use "2> /dev/null" instead, so that those messages disappear, as was intended. Fixes: d1f1b9cbf34c ("selftests: net: Introduce first PMTU

Re: [PATCH net-next v3 0/2] net: stmmac: Coalesce and tail addr fixes

2018-09-17 Thread Jose Abreu
Hi Jerome, On 14-09-2018 16:06, Jerome Brunet wrote: > > Looks better this time. Stable so far, with even a small throughput > improvement > on the Tx path. > > so for the a113 s400 board (single queue) > Tested-by: Jerome Brunet > Thanks for testing! I sent out a rebased version against net.

Re: [PATCH v3 00/30] backport of IP fragmentation fixes

2018-09-17 Thread Greg KH
On Thu, Sep 13, 2018 at 07:58:32AM -0700, Stephen Hemminger wrote: > Took the set of patches from 4.19 to handle IP fragmentation DoS > and applied them against 4.14.69. Most of these are from Eric. > In a couple case, it required some manual merge conflict resolution. > > Tested normal IP

Re: iproute2: Debian 9 No ELF support

2018-09-17 Thread Daniel Borkmann
On 09/17/2018 01:46 PM, Bo YU wrote: > On Mon, Sep 17, 2018 at 11:57:12AM +0200, Daniel Borkmann wrote: >> On 09/17/2018 10:23 AM, Bo YU wrote: >>> Hello, >>> I have followed the instructions from: >>> >>> https://cilium.readthedocs.io/en/latest/bpf/#bpftool >>> >>> to test xdp program. >>> But i

Re: iproute2: Debian 9 No ELF support

2018-09-17 Thread Bo YU
Hi, On Mon, Sep 17, 2018 at 11:57:12AM +0200, Daniel Borkmann wrote: On 09/17/2018 10:23 AM, Bo YU wrote: Hello, I have followed the instructions from: https://cilium.readthedocs.io/en/latest/bpf/#bpftool to test xdp program. But i can not enable elf support. ./configure --prefix=/usr

[PATCH rdma-next 21/25] IB/mlx5: Set valid umem bit on DEVX

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set valid umem bit on DEVX commands that use umem. This will enforce the umem usage by the firmware and not the 'pas' info. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c | 95 +++ 1 file

[PATCH rdma-next 24/25] IB/mlx5: Enable DEVX white list commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Enable DEVX white list commands without the need for CAP_NET_RAW. DEVX uid must exist from the ucontext or the device so that the firmware will mask unprivileged capabilities. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/devx.c

[PATCH rdma-next 25/25] IB/mlx5: Enable DEVX on IB

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas IB has additional protections with SELinux that cannot be extended to the DEVX domain. SELinux can restrict access to pkeys. The first version of DEVX blocked IB entirely until this could be understood. Since DEVX requires CAP_NET_RAW, it supersedes the SELinux restriction

[PATCH rdma-next 23/25] IB/mlx5: Manage device uid for DEVX white list commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Manage device uid for DEVX white list commands. The created device uid will be used on white list commands if the user didn't supply its own uid. This will enable the firmware to filter out non privileged functionality as of the recognition of the uid. Signed-off-by: Yishai

[PATCH rdma-next 18/25] IB/mlx5: Set uid as part of DCT commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of DCT create command so that the firmware can manage the DCT object in a secured way. The uid for the destroy and drain commands are set by mlx5_core. That will enable using a DCT that was created by verbs application to be used by the DEVX flow in case the

[PATCH rdma-next 15/25] IB/mlx5: Set uid as part of PD commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of PD commands so that the firmware can manage the PD object in a secured way. For example when a QP is created its uid must match the CQ uid which it uses. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/cmd.c

[PATCH rdma-next 13/25] IB/mlx5: Set uid as part of TIS commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of TIS commands so that the firmware can manage the TIS object in a secured way. That will enable using a TIS that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 20/25] IB/mlx5: Set uid as part of MCG commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of MCG commands so that the firmware can manage the MCG object in a secured way. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/cmd.c | 30 ++ drivers/infiniband/hw/mlx5/cmd.h | 4

[PATCH rdma-next 14/25] IB/mlx5: Set uid as part of RQT commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of RQT commands so that the firmware can manage the RQT object in a secured way. That will enable using an RQT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 19/25] IB/mlx5: Set uid as part of XRCD commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of XRCD commands so that the firmware can manage the XRCD object in a secured way. That will enable using an XRCD that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 16/25] IB/mlx5: Set uid as part of TD commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of TD commands so that the firmware can manage the TD object in a secured way. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/cmd.c | 30 ++ drivers/infiniband/hw/mlx5/cmd.h | 4

[PATCH rdma-next 22/25] IB/mlx5: Expose RAW QP device handles to user space

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Expose RAW QP device handles to user space by extending the UHW part of mlx5_ib_create_qp_resp. This data is returned only when DEVX context is used where it may be applicable. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c

[PATCH rdma-next 17/25] IB/mlx5: Set uid as part of SRQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of SRQ create command so that the firmware can manage the SRQ object in a secured way. The uid for the destroy and modify commands are set by mlx5_core. That will enable using a SRQ that was created by verbs application to be used by the DEVX flow in case the

[PATCH rdma-next 11/25] IB/mlx5: Set uid as part of SQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of SQ commands so that the firmware can manage the SQ object in a secured way. The uid for the destroy command is set by mlx5_core. This will enable using an SQ that was created by verbs application to be used by the DEVX flow in case the uid is equal.

[PATCH mlx5-next 04/25] net/mlx5: Set uid as part of SQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of SQ commands so that the firmware can manage the SQ object in a secured way. That will enable using an SQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky

[PATCH rdma-next 12/25] IB/mlx5: Set uid as part of TIR commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of TIR commands so that the firmware can manage the TIR object in a secured way. That will enable using a TIR that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH mlx5-next 07/25] net/mlx5: Update mlx5_ifc with DEVX UID bits

2018-09-17 Thread Leon Romanovsky
From: Leon Romanovsky Add DEVX information to WQ, SRQ, CQ, TRI, TIS, QP, RQ, XRCD, PD, MKEY and MCG. Signed-off-by: Leon Romanovsky --- include/linux/mlx5/mlx5_ifc.h | 67 +++ 1 file changed, 43 insertions(+), 24 deletions(-) diff --git

[PATCH rdma-next 09/25] IB/mlx5: Set uid as part of QP creation

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of QP creation so that the firmware can manage the QP object in a secured way. The uid for the destroy and the modify commands is set by mlx5_core. This will enable using a QP that was created by verbs application to be used by the DEVX flow in case the uid

[PATCH rdma-next 08/25] IB/mlx5: Set uid as part of CQ creation

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of CQ creation so that the firmware can manage the CQ object in a secured way. The uid for the destroy and the modify commands is set by mlx5_core. This will enable using a CQ that was created by verbs application to be used by the DEVX flow in case the uid

[PATCH mlx5-next 05/25] net/mlx5: Set uid as part of SRQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of SRQ commands so that the firmware can manage the SRQ object in a secured way. That will enable using an SRQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 10/25] IB/mlx5: Set uid as part of RQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of RQ commands so that the firmware can manage the RQ object in a secured way. The uid for the destroy command is set by mlx5_core. This will enable using an RQ that was created by verbs application to be used by the DEVX flow in case the uid is equal.

[PATCH mlx5-next 06/25] net/mlx5: Set uid as part of DCT commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of DCT commands so that the firmware can manage the DCT object in a secured way. That will enable using a DCT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon

[PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Leon Romanovsky
From: Leon Romanovsky >From Yishai, This series comes to enable the DEVX functionality in some wider scope, specifically, - It enables using kernel objects that were created by the verbs API in the DEVX flow. - It enables white list commands without DEVX user context. - It enables the IB link

[PATCH mlx5-next 01/25] net/mlx5: Set uid as part of CQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of CQ commands so that the firmware can manage the CQ object in a secured way. This will enable using a CQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky

[PATCH mlx5-next 02/25] net/mlx5: Set uid as part of QP commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of QP commands so that the firmware can manage the QP object in a secured way. That will enable using a QP that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky

[PATCH mlx5-next 03/25] net/mlx5: Set uid as part of RQ commands

2018-09-17 Thread Leon Romanovsky
From: Yishai Hadas Set uid as part of RQ commands so that the firmware can manage the RQ object in a secured way. That will enable using an RQ that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky

[PATCH][net-next] veth: rename pcpu_vstats as pcpu_lstats

2018-09-17 Thread Li RongQing
struct pcpu_vstats and pcpu_lstats have same members and usage, and pcpu_lstats is used in many files, so rename pcpu_vstats as pcpu_lstats to reduce duplicate definition Signed-off-by: Zhang Yu Signed-off-by: Li RongQing --- drivers/net/veth.c| 22 --

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Steffen Klassert
On Fri, Sep 14, 2018 at 01:59:40PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > gro callback configured. It would be nice if we could do GRO not just for GRO configured sockets, but also for flows that are going

[PATCH rdma-next 0/4] mlx5 vport loopback

2018-09-17 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This is short series from Mark which extends handling of loopback traffic. Originally mlx5 IB dynamically enabled/disabled both unicast and multicast based on number of users. However RAW ethernet QPs need more granular access. Thanks Mark Bloch (4): net/mlx5:

[PATCH rdma-next 4/4] RDMA/mlx5: Enable vport loopback when user context or QP mandate

2018-09-17 Thread Leon Romanovsky
From: Mark Bloch A user can create a QP which can accept loopback traffic, but that's not enough. We need to enable loopback on the vport as well. Currently vport loopback is enabled only when more than 1 users are using the IB device, update the logic to consider whatever a QP which supports

[PATCH rdma-next 2/4] RDMA/mlx5: Refactor transport domain bookkeeping logic

2018-09-17 Thread Leon Romanovsky
From: Mark Bloch In preparation to enable loopback on a single user context move the logic that enables/disables loopback to separate functions and group variables under a single struct. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky ---

[PATCH rdma-next 3/4] RDMA/mlx5: Allow creating RAW ethernet QP with loopback support

2018-09-17 Thread Leon Romanovsky
From: Mark Bloch Expose two new flags: MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC Those flags can be used at creation time in order to allow a QP to be able to receive loopback traffic (unicast and multicast). We store the state in the QP to be used on the destroy path

[PATCH mlx5-next 1/4] net/mlx5: Rename incorrect naming in IFC file

2018-09-17 Thread Leon Romanovsky
From: Mark Bloch Remove a trailing underscore from the multicast/unicast names. Signed-off-by: Mark Bloch Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 2 +-

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Paolo Abeni
On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c > index 4f6aa95a9b12..f44fe328aa0f 100644 > --- a/net/ipv4/udp_offload.c > +++ b/net/ipv4/udp_offload.c > @@ -405,7 +405,7 @@ static struct sk_buff *udp4_gro_receive(struct

Re: [PATCH bpf-next] tools/bpf: bpftool: improve output format for bpftool net

2018-09-17 Thread Daniel Borkmann
On 09/14/2018 11:49 PM, Yonghong Song wrote: > This is a followup patch for Commit f6f3bac08ff9 > ("tools/bpf: bpftool: add net support"). > Some improvements are made for the bpftool net output. > Specially, plain output is more concise such that > per attachment should nicely fit in one line. >

Re: [RFC PATCH 2/4] net: enable UDP gro on demand.

2018-09-17 Thread Paolo Abeni
On Sun, 2018-09-16 at 14:23 -0400, Willem de Bruijn wrote: > That udp gro implementation is clearly less complete than yours in > this patchset. The point I wanted to bring up for discussion is not the > protocol implementation, but the infrastructure for enabling it > conditionally. I'm still

Re: [RFC PATCH 3/4] udp: implement GRO plain UDP sockets.

2018-09-17 Thread Paolo Abeni
Hi, On Fri, 2018-09-14 at 09:48 -0700, Eric Dumazet wrote: > Are you sure the data is actually fully copied to user space ? > > tools/testing/selftests/net/udpgso_bench_rx.c > > uses : > > static char rbuf[ETH_DATA_LEN]; >/* MSG_TRUNC will make return value full datagram length */ >ret

Re: [PATH RFC net-next 0/8] Continue towards using linkmode in phylib

2018-09-17 Thread Maxime Chevallier
Hi Andrew, On Fri, 14 Sep 2018 23:38:48 +0200 Andrew Lunn wrote: >These patches contain some further cleanup and helpers, and the first >real patch towards using linkmode bitmaps in phylink. > >It is RFC because i don't like patch #7 and maybe somebody has a >better idea how to do this.

[PATCH v2 2/2] netlink: add ethernet address policy types

2018-09-17 Thread Johannes Berg
From: Johannes Berg Commonly, ethernet addresses are just using a policy of { .len = ETH_ALEN } which leaves userspace free to send more data than it should, which may hide bugs. Introduce NLA_EXACT_LEN which checks for exact size, rejecting the attribute if it's not exactly that

[PATCH v2 1/2] netlink: add NLA_REJECT policy type

2018-09-17 Thread Johannes Berg
From: Johannes Berg In some situations some netlink attributes may be used for output only (kernel->userspace) or may be reserved for future use. It's then helpful to be able to prevent userspace from using them in messages sent to the kernel, since they'd otherwise be ignored and any future

Re: iproute2: Debian 9 No ELF support

2018-09-17 Thread Daniel Borkmann
On 09/17/2018 10:23 AM, Bo YU wrote: > Hello, > I have followed the instructions from: > > https://cilium.readthedocs.io/en/latest/bpf/#bpftool > > to test xdp program. > But i can not enable elf support. > > ./configure --prefix=/usr > ```output > TC schedulers > ATM    no > > libc has setns:

Re: [PATH RFC net-next 5/8] net: phy: Add limkmode equivalents to some of the MII ethtool helpers

2018-09-17 Thread Maxime Chevallier
On Fri, 14 Sep 2018 23:38:53 +0200 Andrew Lunn wrote: >Add helpers which take a linkmode rather than a u32 ethtool for >advertising settings. > >Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier

Re: [PATH RFC net-next 4/8] net: phy: Add helper for advertise to lcl value

2018-09-17 Thread Maxime Chevallier
On Fri, 14 Sep 2018 23:38:52 +0200 Andrew Lunn wrote: >Add a helper to convert the local advertising to an LCL capabilities, >which is then used to resolve pause flow control settings. > >Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier

Re: [PATH RFC net-next 3/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-17 Thread Maxime Chevallier
On Fri, 14 Sep 2018 23:38:51 +0200 Andrew Lunn wrote: >The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE >register in the PHY. Since this changes the state of the PHY, we need >to make the same change to phydev->advertising. Add a helper which can >convert the register value

Re: [PATH RFC net-next 2/8] net: phy: Add phydev_warn()

2018-09-17 Thread Maxime Chevallier
On Fri, 14 Sep 2018 23:38:50 +0200 Andrew Lunn wrote: >Not all new style LINK_MODE bits can be converted into old style >SUPPORTED bits. We need to warn when such a conversion is attempted. >Add a helper for this. > >Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier

Re: [PATH RFC net-next 1/8] net: phy: Move linkmode helpers to somewhere public

2018-09-17 Thread Maxime Chevallier
On Fri, 14 Sep 2018 23:38:49 +0200 Andrew Lunn wrote: >phylink has some useful helpers to working with linkmode bitmaps. >Move them to there own header so other code can use them. > >Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier

Re: [PATCH net-next RFC 7/8] udp: gro behind static key

2018-09-17 Thread Steffen Klassert
On Fri, Sep 14, 2018 at 01:59:40PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > gro callback configured. > > Signed-off-by: Willem de Bruijn ... > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c

[PATCH v2 4/4] net: qcom/emac: add acpi shared mdio bus support

2018-09-17 Thread Wang Dongsheng
Parsing _DSD package "mdio-device". Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/drivers/net/ethernet/qualcomm/emac/emac-phy.c b/drivers/net/ethernet/qualcomm/emac/emac-phy.c index

[PATCH v2 3/4] net: qcom/emac: add of shared mdio bus support

2018-09-17 Thread Wang Dongsheng
Share the mii_bus for others MAC device because EMAC include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 63 ++- drivers/net/ethernet/qualcomm/emac/emac.c | 8 ++-

[PATCH v2 1/4] net: qcom/emac: split phy_config to mdio bus create and get phy device

2018-09-17 Thread Wang Dongsheng
This patch separate emac_mdio_bus_create and emac_get_phydev from emac_phy_config, and do some codes clean. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 99 +++ 1 file changed, 57 insertions(+), 42 deletions(-) diff --git

[PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Wang Dongsheng
This property copy from "ibm,emac.txt" to describe a shared MIDO bus. Since emac include MDIO, so If the motherboard has more than one PHY connected to an MDIO bus, this property will point to the MAC device that has the MDIO bus. Signed-off-by: Wang Dongsheng --- V2: s/Since QDF2400 emac/Since

[PATCH v2 0/4] net: qcom/emac: add shared mdio bus support

2018-09-17 Thread Wang Dongsheng
The emac include MDIO controller, and the motherboard has more than one PHY connected to an MDIO bus. So share the shared mii_bus for others MAC device that not has MDIO bus connected. Tested: QDF2400 (ACPI), buildin/insmod/rmmod V2: - Separate patch. - bindings: s/Since QDF2400 emac/Since

Re: [PATCH net] netfilter: bridge: Don't sabotage nf_hook calls from an l3mdev

2018-09-17 Thread Pablo Neira Ayuso
On Sun, Sep 16, 2018 at 09:14:42PM -0700, David Ahern wrote: > Pablo: > > DaveM has this marked as waiting for upstream. Any comment on this patch? Please, resend a Cc netfilter-de...@vger.kernel.org Thanks David.

iproute2: Debian 9 No ELF support

2018-09-17 Thread Bo YU
Hello, I have followed the instructions from: https://cilium.readthedocs.io/en/latest/bpf/#bpftool to test xdp program. But i can not enable elf support. ./configure --prefix=/usr ```output TC schedulers ATM no libc has setns: yes SELinux support: no ELF support: no libmnl support: yes

[PATCH net 0/2] net: stmmac: Coalesce and tail addr fixes

2018-09-17 Thread Jose Abreu
The fix for coalesce timer and a fix in tail address setting that impacts XGMAC2 operation. The series is: Tested-by: Jerome Brunet on a113 s400 board (single queue) Cc: Florian Fainelli Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: David S. Miller Cc:

[PATCH net 2/2] net: stmmac: Fixup the tail addr setting in xmit path

2018-09-17 Thread Jose Abreu
Currently we are always setting the tail address of descriptor list to the end of the pre-allocated list. According to databook this is not correct. Tail address should point to the last available descriptor + 1, which means we have to update the tail address everytime we call the xmit function.

[PATCH net 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-17 Thread Jose Abreu
This follows David Miller advice and tries to fix coalesce timer in multi-queue scenarios. We are now using per-queue coalesce values and per-queue TX timer. Coalesce timer default values was changed to 1ms and the coalesce frames to 25. Tested in B2B setup between XGMAC2 and GMAC5.

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-17 Thread Kirill Tkhai
On 14.09.2018 23:32, Cong Wang wrote: > ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, > but its initialization is in the generic netns code, setup_net(). > > Move it to IPv4 specific net init code, inet_init_net(). > > Fixes: d9ff3049739e ("net: Replace ip_ra_lock with

[PATCH net-next v2 04/10] net: sched: add helper function to take reference to Qdisc

2018-09-17 Thread Vlad Buslov
Implement function to take reference to Qdisc that relies on rcu read lock instead of rtnl mutex. Function only takes reference to Qdisc if reference counter isn't zero. Intended to be used by unlocked cls API. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- include/net/sch_generic.h | 13

[PATCH net-next v2 10/10] net: sched: use reference counting for tcf blocks on rules update

2018-09-17 Thread Vlad Buslov
In order to remove dependency on rtnl lock on rules update path, always take reference to block while using it on rules update path. Change tcf_block_get() error handling to properly release block with reference counting, instead of just destroying it, in order to accommodate potential concurrent

[PATCH net-next v2 07/10] net: sched: implement functions to put and flush all chains

2018-09-17 Thread Vlad Buslov
Extract code that flushes and puts all chains on tcf block to two standalone function to be shared with functions that locklessly get/put reference to block. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_api.c | 55 + 1

[PATCH net-next v2 01/10] net: core: netlink: add helper refcount dec and lock function

2018-09-17 Thread Vlad Buslov
Rtnl lock is encapsulated in netlink and cannot be accessed by other modules directly. This means that reference counted objects that rely on rtnl lock cannot use it with refcounter helper function that atomically releases decrements reference and obtains mutex. This patch implements simple

[PATCH net-next v2 09/10] net: sched: implement tcf_block_refcnt_{get|put}()

2018-09-17 Thread Vlad Buslov
Implement get/put function for blocks that only take/release the reference and perform deallocation. These functions are intended to be used by unlocked rules update path to always hold reference to block while working with it. They use on new fine-grained locking mechanisms introduced in previous

[PATCH net-next v2 03/10] net: sched: extend Qdisc with rcu

2018-09-17 Thread Vlad Buslov
Currently, Qdisc API functions assume that users have rtnl lock taken. To implement rtnl unlocked classifiers update interface, Qdisc API must be extended with functions that do not require rtnl lock. Extend Qdisc structure with rcu. Implement special version of put function qdisc_put_unlocked()

[PATCH net-next v2 05/10] net: sched: use Qdisc rcu API instead of relying on rtnl lock

2018-09-17 Thread Vlad Buslov
As a preparation from removing rtnl lock dependency from rules update path, use Qdisc rcu and reference counting capabilities instead of relying on rtnl lock while working with Qdiscs. Create new tcf_block_release() function, and use it to free resources taken by tcf_block_find(). Currently, this

[PATCH net-next v2 02/10] net: sched: rename qdisc_destroy() to qdisc_put()

2018-09-17 Thread Vlad Buslov
Current implementation of qdisc_destroy() decrements Qdisc reference counter and only actually destroy Qdisc if reference counter value reached zero. Rename qdisc_destroy() to qdisc_put() in order for it to better describe the way in which this function currently implemented and used. Extract

[PATCH net-next v2 08/10] net: sched: protect block idr with spinlock

2018-09-17 Thread Vlad Buslov
Protect block idr access with spinlock, instead of relying on rtnl lock. Take tn->idr_lock spinlock during block insertion and removal. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_api.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git

[PATCH net-next v2 06/10] net: sched: change tcf block reference counter type to refcount_t

2018-09-17 Thread Vlad Buslov
As a preparation for removing rtnl lock dependency from rules update path, change tcf block reference counter type to refcount_t to allow modification by concurrent users. In block put function perform decrement and check reference counter once to accommodate concurrent modification by unlocked

[PATCH net-next v2 00/10] Refactor classifier API to work with Qdisc/blocks without rtnl lock

2018-09-17 Thread Vlad Buslov
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 from TC rules update path. Recently, new rtnl registration flag

<    1   2