Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Jesper Dangaard Brouer
On Thu, 20 Apr 2017 00:51:31 +0200 Daniel Borkmann wrote: > On 04/19/2017 10:02 PM, Andy Gospodarek wrote: > [...] > > and then lookup this dest in a table we have the option to make that > > dest an ifindex/socket/other. > > > > I did also look at JohnF's patch and I do like the simplicity of th

[PATCH] nl80211: fix enumeration type

2017-04-19 Thread Stefan Agner
Use type enum nl80211_rate_info for bitrate information. This fixes a warning when compiling with clang: warning: implicit conversion from enumeration type 'enum nl80211_rate_info' to different enumeration type 'enum nl80211_attrs' Signed-off-by: Stefan Agner --- net/wireless/nl80211.c | 2 +

Re: [PATCH v4 04/18] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-04-19 Thread Corentin Labbe
On Thu, Apr 20, 2017 at 12:38:50AM +0100, André Przywara wrote: > On 12/04/17 12:13, Corentin Labbe wrote: > > This patch adds documentation for Device-Tree bindings for the > > syscon present in allwinner devices. > > > > Signed-off-by: Corentin Labbe > > --- > > .../devicetree/bindings/misc/al

(From: Mr. James Tan (Urgent & Confidential)

2017-04-19 Thread James Tan
-- From: Mr James Tan (Urgent & Confidential) Good Day, Please Read. My name is Mr. James Tan, I am the Bill and Exchange manager here in Bank of Africa (BOA) Lome-Togo,West-Africa. I have a business proposal in the tune of $9.7m, (Nine Million Seven hundred Thousand United States Dollars)only,

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-19 Thread Jason Wang
On 2017年04月19日 04:21, Willem de Bruijn wrote: +static void virtnet_napi_tx_enable(struct virtnet_info *vi, + struct virtqueue *vq, + struct napi_struct *napi) +{ + if (!napi->weight) + return; + + if (!v

Re: [PATCH net-next v2 5/5] virtio-net: keep tx interrupts disabled unless kick

2017-04-19 Thread Jason Wang
On 2017年04月19日 04:21, Willem de Bruijn wrote: From: Willem de Bruijn Tx napi mode increases the rate of transmit interrupts. Suppress some by masking interrupts while more packets are expected. The interrupts will be reenabled before the last packet is sent. This optimization reduces the thr

Re: [net-next 04/14] i40e: dump VF information in debugfs

2017-04-19 Thread Or Gerlitz
On Thu, Apr 20, 2017 at 4:57 AM, Jeff Kirsher wrote: > From: Mitch Williams > > Dump some internal state about VFs through debugfs. This provides > information not available with 'ip link show'. such as? donnwantobethedebugfspolice, but still, in the 2-3 times we tried to push debugfs to MLNX N

Re: [PATCH net] netdevice: Prefer NETIF_F_HW_CSUM when intersecting features

2017-04-19 Thread Michal Kubecek
On Wed, Apr 19, 2017 at 09:12:23PM -0400, Vladislav Yasevich wrote: > While hardware device use either NETIF_F_(IP|IPV6)_CSUM or > NETIF_F_HW_CSUM, all of the software devices use HW_CSUM. > This results in an interesting situation when the software > device is configured on top of hw device using

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-19 Thread Jason Wang
On 2017年04月19日 04:21, Willem de Bruijn wrote: From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission o

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-19 Thread Jesper Dangaard Brouer
On Wed, 19 Apr 2017 19:56:13 -0700 Alexei Starovoitov wrote: > On Thu, Apr 20, 2017 at 12:51:31AM +0200, Daniel Borkmann wrote: > > > > Is there a concrete reason that all the proposed future cases like sockets > > have to be handled within the very same XDP_REDIRECT return code? F.e. why > > no

Re: __sk_buff.data_end

2017-04-19 Thread Johannes Berg
On Thu, 2017-04-20 at 02:38 +0200, Daniel Borkmann wrote: > > Since wifi skbs have only eth in headlen, there is not much > > pointing adding support for data/data_end to wifi. > > Just use ld_abs/ld_ind instructions and load_bytes() helper. > > Afaik, the ld_abs/ld_ind are not an option due to t

Re: __sk_buff.data_end

2017-04-19 Thread Johannes Berg
On Wed, 2017-04-19 at 17:12 -0700, Alexei Starovoitov wrote: > > also didn't we discuss that wifi has crazy non-linear skb? Not always, depends on the driver. But also, you have to remember that this filter would be before the conversion to Ethernet header. Right now, when packets enter the stac

Re: __sk_buff.data_end

2017-04-19 Thread Johannes Berg
On Thu, 2017-04-20 at 02:01 +0200, Daniel Borkmann wrote: > > Yeah, should work as well for the 32 bit archs, on 64 bit we > have this effectively already: Right. [...] > Can you elaborate on why this works for mac80211? It uses cb > only up to that point from where you invoke the prog? No, it

Re: [PATCH net-next 2/2] tcp: remove poll() flakes with FastOpen

2017-04-19 Thread Yuchung Cheng
On Tue, Apr 18, 2017 at 9:45 AM, Eric Dumazet wrote: > > When using TCP FastOpen for an active session, we send one wakeup event > from tcp_finish_connect(), right before the data eventually contained in > the received SYNACK is queued to sk->sk_receive_queue. > > This means that depending on mach

Re: [net-next 00/15][pull request] 10GbE Intel Wired LAN Driver Updates 2017-04-18

2017-04-19 Thread Alexei Starovoitov
On Tue, Apr 18, 2017 at 04:01:50PM -0700, Jeff Kirsher wrote: > The following are changes since commit > 4116c97689b9b1732ac5b68afd922406f9fc842e: > Merge branch 'ftgmac100-batch5-features' > and are available in the git repository at: > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/n

Re: [PATCH ipsec-next] esp4/6: Fix GSO path for non-GSO SW-crypto packets

2017-04-19 Thread Steffen Klassert
On Wed, Apr 19, 2017 at 08:41:01AM +0300, il...@mellanox.com wrote: > From: Ilan Tayari > > If esp*_offload module is loaded, outbound packets take the > GSO code path, being encapsulated at layer 3, but encrypted > in layer 2. validate_xmit_xfrm calls esp*_xmit for that. > > esp*_xmit was wrong

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-19 Thread John Fastabend
On 17-04-19 09:58 PM, Alexei Starovoitov wrote: > On Wed, Apr 19, 2017 at 09:38:44PM -0700, John Fastabend wrote: >> On 17-04-19 07:56 PM, Alexei Starovoitov wrote: >>> On Thu, Apr 20, 2017 at 12:51:31AM +0200, Daniel Borkmann wrote: Is there a concrete reason that all the proposed future

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-19 Thread Alexei Starovoitov
On Wed, Apr 19, 2017 at 09:38:44PM -0700, John Fastabend wrote: > On 17-04-19 07:56 PM, Alexei Starovoitov wrote: > > On Thu, Apr 20, 2017 at 12:51:31AM +0200, Daniel Borkmann wrote: > >> > >> Is there a concrete reason that all the proposed future cases like sockets > >> have to be handled within

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread John Fastabend
[...] > JohnF, any test results with this you can share? Presumably you tested with > virtio-net, right? > For my patches using the xdp_redirect with virtio-net showed no measurable difference from running just the straight XDP_TX in the PPS column. However virtio_net XDP_TX was quite low to st

Re: xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-19 Thread John Fastabend
On 17-04-19 07:56 PM, Alexei Starovoitov wrote: > On Thu, Apr 20, 2017 at 12:51:31AM +0200, Daniel Borkmann wrote: >> >> Is there a concrete reason that all the proposed future cases like sockets >> have to be handled within the very same XDP_REDIRECT return code? F.e. why >> not XDP_TX_NIC that on

Re: [PATCH net-next] brcmfmac: fix build without CONFIG_BRCMFMAC_PROTO_BCDC

2017-04-19 Thread Kalle Valo
Arnd Bergmann writes: > With CONFIG_BRCMFMAC_PROTO_BCDC unset, we cannot build the fwsignal.c file: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c: In function > 'brcmf_fws_notify_credit_map': > drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:1590:31: error: > impli

[PATCH 1/1] bonding: remove unnecessary return

2017-04-19 Thread Zhu Yanjun
The type of the function bond_update_speed_duplex is void. So the return in the end of the function should be removed. Signed-off-by: Zhu Yanjun --- drivers/net/bonding/bond_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_mai

Re: [PATCH] xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND

2017-04-19 Thread Juergen Gross
On 20/04/17 01:10, Stefano Stabellini wrote: > Juergen, I have committed this patch to for-linus-4.12 and linux-next, I > hope that's OK. Sure. Juergen > > Og Wed, 19 Apr 2017, Stefano Stabellini wrote: >> On Wed, 19 Apr 2017, Arnd Bergmann wrote: >>> All Xen frontends need to select this symb

xdp_redirect ifindex vs port. Was: best API for returning/setting egress port?

2017-04-19 Thread Alexei Starovoitov
On Thu, Apr 20, 2017 at 12:51:31AM +0200, Daniel Borkmann wrote: > > Is there a concrete reason that all the proposed future cases like sockets > have to be handled within the very same XDP_REDIRECT return code? F.e. why > not XDP_TX_NIC that only assumes ifindex as proposed in the patch, and futu

[net-next 05/14] i40e/i40evf: Add tracepoints

2017-04-19 Thread Jeff Kirsher
From: Scott Peterson This patch adds tracepoints to the i40e and i40evf drivers to which BPF programs can be attached for feature testing and verification. It's expected that an attached BPF program will identify and count or log some interesting subset of traffic. The bcc-tools package is helpfu

[net-next 04/14] i40e: dump VF information in debugfs

2017-04-19 Thread Jeff Kirsher
From: Mitch Williams Dump some internal state about VFs through debugfs. This provides information not available with 'ip link show'. To use, write "dump vf " to the command file, or just "dump vf" to dump information on all of the VFs. Change-ID: Ibe32b7f4ae55d4358c0b903217475f708ada1ecd Signed

[net-next 02/14] i40e/i40evf: Remove VF Rx csum offload for tunneled packets

2017-04-19 Thread Jeff Kirsher
From: alice michael Rx checksum offload for tunneled packets was never being negotiated or requested by VF. This capability was assumed by default and enabled in current hardware for VF. Going forward, this feature needs to be disabled or advanced ptypes should be negotiated with PF in the future

[net-next 11/14] i40e: remove I40E_FLAG_IN_NETPOLL entirely

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller This flag was originally intended to be used to let some driver code know when we were running from netpoll. Ultimately this was not necessary and we never used it. Let's remove it Change-ID: I43b72483d91c1638071d2a7f389ab171ec5b796a Signed-off-by: Jacob Keller Tested-by: And

[net-next 13/14] i40e: reset all VFs in parallel when rebuilding PF

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller When there are a lot of active VFs, it can take multiple seconds to finish resetting all of them during certain flows., which can cause some VFs to fail to wait long enough for the reset to occur. The user might see messages like "Never saw reset" or "Reset never finished" and

[net-next 08/14] i40e: factor out queue control from i40e_vsi_control_(tx|rx)

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller A future patch will need to be able to handle controlling queues without waiting until all VSIs are handled. Factor out the direct queue modification so that we can easily re-use this code. The result is also a bit easier to read since we don't embed multiple single-letter loop

[net-next 03/14] i40e: Fix support for flow director programming status

2017-04-19 Thread Jeff Kirsher
From: Alexander Duyck This patch fixes an issue I introduced when I converted the code over to using the length field to determine if a descriptor was done or not. It turns out that we are also processing programming descriptors in the Rx path and need to have these processed even though the leng

[net-next 06/14] i40e: new AQ commands

2017-04-19 Thread Jeff Kirsher
From: Jingjing Wu Add admin queue functions for Pipeline Personalization Profile AQ commands: - Write Recipe Command buffer (Opcode: 0x0270) - Get Applied Profiles list (Opcode: 0x0271) Change-ID: I558b4145364140f624013af48d4bbf79d21ebb0d Signed-off-by: Jingjing Wu Tested-by: Andrew Bowers S

[net-next 12/14] i40e: split some code in i40e_reset_vf into helpers

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller A future patch is going to want to re-use some of the code in i40e_reset_vf, so lets break up the beginning and ending parts into their own helper functions. The first function will be used to initialize the reset on a VF, while the second function will be used to finalize the

[net-next 09/14] i40e: fix CONFIG_BUSY checks in i40e_set_settings function

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller The check for I40E_CONFIG_BUSY state bit in the i40e_set_link_ksettings function is fishy. First we can notice a few things about the check here. First a similar check was introduced by commit 'c7d05ca89f8e ("i40e: driver ethtool core")' Later a commit introducing the link se

[net-next 10/14] i40e: reduce wait time for adminq command completion

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller When sending an adminq command, we wait for the command to complete in a loop. This loop waits for an entire millisecond, when in practice the adminq command is processed often much faster. Change the loop to use i40e_usec_delay instead, and wait for 50 usecs each time instead

[net-next 14/14] i40e: use i40e_stop_rings_no_wait to implement PORT_SUSPENDED state

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller This state bit was added as a way for DCB to avoid having to wait for the queues to disable when handling LLDP events. The logic for this was burried deep within stop Tx and stop Rx queue code. First, let's rename it so that it does not appear to only affect Tx when infact it m

[net-next 07/14] i40e: don't hold RTNL lock while waiting for VF reset to finish

2017-04-19 Thread Jeff Kirsher
From: Jacob Keller We made some effort to reduce the RTNL lock scope when resetting and rebuilding the PF. Unfortunately we still held the RTNL lock during the VF reset operation, which meant that multiple PFs could not reset in parallel due to the global lock. For now, further reduce the scope b

[net-next 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-19

2017-04-19 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only, most notable being the addition of trace points for BPF programs. Tobias Klauser updates i40evf to use net_device stats struct instead of a local private copy. Preethi updates the VF driver to not enable receive checksum offload by default for

[net-next 01/14] i40evf: Use net_device_stats from struct net_device

2017-04-19 Thread Jeff Kirsher
From: Tobias Klauser Instead of using a private copy of struct net_device_stats in struct i40evf_adapter, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/

Re: [PATCH 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Sorry for the chatter, forgot to include “net-next” in the title, sending again. Jarno > On Apr 19, 2017, at 6:49 PM, Jarno Rajahalme wrote: > > Fix typo in a comment. > > Signed-off-by: Jarno Rajahalme > --- > net/openvswitch/conntrack.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

[PATCH net-next 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Fix typo in a comment. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 7b2c2fc..58de4c2 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitc

[PATCH 2/2] openvswitch: Add eventmask support to CT action.

2017-04-19 Thread Jarno Rajahalme
Add a new optional conntrack action attribute OVS_CT_ATTR_EVENTMASK, which can be used in conjunction with the commit flag (OVS_CT_ATTR_COMMIT) to set the mask of bits specifying which conntrack events (IPCT_*) should be delivered via the Netfilter netlink multicast groups. Default behavior depend

[PATCH 1/2] openvswitch: Typo fix.

2017-04-19 Thread Jarno Rajahalme
Fix typo in a comment. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 7b2c2fc..58de4c2 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitc

[PATCH net-next 2/2] openvswitch: Add eventmask support to CT action.

2017-04-19 Thread Jarno Rajahalme
Add a new optional conntrack action attribute OVS_CT_ATTR_EVENTMASK, which can be used in conjunction with the commit flag (OVS_CT_ATTR_COMMIT) to set the mask of bits specifying which conntrack events (IPCT_*) should be delivered via the Netfilter netlink multicast groups. Default behavior depend

Re: [PATCH net-next v6 05/11] seccomp: Split put_seccomp_filter() with put_seccomp()

2017-04-19 Thread Kees Cook
On Wed, Apr 19, 2017 at 3:18 PM, Mickaël Salaün wrote: > > On 19/04/2017 00:47, Mickaël Salaün wrote: >> >> On 19/04/2017 00:23, Kees Cook wrote: >>> On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: The semantic is unchanged. This will be useful for the Landlock integration with s

Re: [PATCH net-next v6 09/11] seccomp: Enhance test_harness with an assert step mechanism

2017-04-19 Thread Kees Cook
On Wed, Apr 19, 2017 at 3:05 PM, Mickaël Salaün wrote: > > > On 20/04/2017 00:02, Kees Cook wrote: >> On Wed, Apr 19, 2017 at 2:51 PM, Mickaël Salaün wrote: >>> >>> On 19/04/2017 02:02, Kees Cook wrote: On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: > This is useful to return an

Re: [PATCH net-next v6 04/11] landlock: Add LSM hooks related to filesystem

2017-04-19 Thread Kees Cook
On Wed, Apr 19, 2017 at 3:03 PM, Mickaël Salaün wrote: > > On 19/04/2017 01:40, Kees Cook wrote: >> On Tue, Apr 18, 2017 at 4:16 PM, Casey Schaufler >> wrote: >>> On 4/18/2017 3:44 PM, Mickaël Salaün wrote: On 19/04/2017 00:17, Kees Cook wrote: > On Tue, Mar 28, 2017 at 4:46 PM, Mickaël

Re: [PATCH v4 net-next RFC] net: Generic XDP

2017-04-19 Thread David Miller
From: Andy Gospodarek Date: Wed, 19 Apr 2017 10:29:03 -0400 > So I tried a variety of things and the simplest change on top of yours that > works well for xdp1, xdp2, and xdp_tx_iptunnel. > > diff --git a/net/core/dev.c b/net/core/dev.c > index b3d3a6e..1bab3dc 100644 > --- a/net/core/dev.c > +

RE: IT Newsletter

2017-04-19 Thread Gary Knight
From: Gary Knight Sent: 20 April 2017 01:10 Subject: IT Newsletter Dear colleagues, To keep you abreast of ICT developments of the Organization and to keep your technical skills up to date, the latest IT Newsletter issue is now available at

[PATCH net] netdevice: Prefer NETIF_F_HW_CSUM when intersecting features

2017-04-19 Thread Vladislav Yasevich
While hardware device use either NETIF_F_(IP|IPV6)_CSUM or NETIF_F_HW_CSUM, all of the software devices use HW_CSUM. This results in an interesting situation when the software device is configured on top of hw device using (IP|IPV6)_CSUM. In this situation, the user can't turn off checksum offloadi

Re: __sk_buff.data_end

2017-04-19 Thread Daniel Borkmann
On 04/20/2017 02:12 AM, Alexei Starovoitov wrote: On Thu, Apr 20, 2017 at 02:01:49AM +0200, Daniel Borkmann wrote: On 04/20/2017 12:20 AM, Johannes Berg wrote: On Wed, 2017-04-19 at 23:31 +0200, Johannes Berg wrote: Hi Alexei, Daniel, I'm looking at adding the __wifi_sk_buff I talked about, a

[PATCH next] bonding: fix wq initialization for links created via netlink

2017-04-19 Thread Mahesh Bandewar
From: Mahesh Bandewar Earlier patch 4493b81bea ("bonding: initialize work-queues during creation of bond") moved the work-queue initialization from bond_open() to bond_create(). However this caused the link those are created using netlink 'create bond option' (ip link add bondX type bond); create

Re: [PATCH v4 net-next RFC] net: Generic XDP

2017-04-19 Thread Alexei Starovoitov
On Wed, Apr 19, 2017 at 04:25:43PM -0400, Andy Gospodarek wrote: > On Wed, Apr 19, 2017 at 10:44:59AM -0700, John Fastabend wrote: > > On 17-04-19 10:17 AM, Alexei Starovoitov wrote: > > > On Wed, Apr 19, 2017 at 10:29:03AM -0400, Andy Gospodarek wrote: > > >> > > >> I ran this on top of a card tha

Re: __sk_buff.data_end

2017-04-19 Thread Alexei Starovoitov
On Thu, Apr 20, 2017 at 02:01:49AM +0200, Daniel Borkmann wrote: > On 04/20/2017 12:20 AM, Johannes Berg wrote: > >On Wed, 2017-04-19 at 23:31 +0200, Johannes Berg wrote: > >>Hi Alexei, Daniel, > >> > >>I'm looking at adding the __wifi_sk_buff I talked about, and I notice > >>that it uses CB space

Re: __sk_buff.data_end

2017-04-19 Thread Daniel Borkmann
On 04/20/2017 12:20 AM, Johannes Berg wrote: On Wed, 2017-04-19 at 23:31 +0200, Johannes Berg wrote: Hi Alexei, Daniel, I'm looking at adding the __wifi_sk_buff I talked about, and I notice that it uses CB space to store data_end. Unfortunately, in a lot of cases, we don't have any CB space to

Re: [kernel-hardening] Re: [PATCH net-next v6 04/11] landlock: Add LSM hooks related to filesystem

2017-04-19 Thread Casey Schaufler
On 4/19/2017 3:03 PM, Mickaël Salaün wrote: > On 19/04/2017 01:40, Kees Cook wrote: >> On Tue, Apr 18, 2017 at 4:16 PM, Casey Schaufler >> wrote: >>> On 4/18/2017 3:44 PM, Mickaël Salaün wrote: On 19/04/2017 00:17, Kees Cook wrote: > On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote

Re: __sk_buff.data_end

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 11:31 PM, Johannes Berg wrote: Hi Alexei, Daniel, I'm looking at adding the __wifi_sk_buff I talked about, and I notice that it uses CB space to store data_end. Unfortunately, in a lot of cases, we don't have any CB space to spare in wifi. Is there any way to generate a series of

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-19 Thread David Ahern
On 4/19/17 5:47 PM, Cong Wang wrote: > On Wed, Apr 19, 2017 at 9:12 AM, Andrey Konovalov > wrote: >> >> Anyway, I just finished simplifying the reproducer. Give this one a try. > > Thanks for providing such a minimal reproducer! > > The following patch could fix this crash, but I am not 100% su

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-04-19 Thread Cong Wang
On Wed, Apr 19, 2017 at 9:12 AM, Andrey Konovalov wrote: > > Anyway, I just finished simplifying the reproducer. Give this one a try. Thanks for providing such a minimal reproducer! The following patch could fix this crash, but I am not 100% sure if we should just clear these bits or reject them

Re: [PATCH v4 04/18] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-04-19 Thread André Przywara
On 12/04/17 12:13, Corentin Labbe wrote: > This patch adds documentation for Device-Tree bindings for the > syscon present in allwinner devices. > > Signed-off-by: Corentin Labbe > --- > .../devicetree/bindings/misc/allwinner,syscon.txt | 19 > +++ > 1 file changed, 19 inser

Re: [RFC PATCH net] net/mlx5e: Race between mlx5e_update_stats() and getting the stats

2017-04-19 Thread Eric Dumazet
On Wed, 2017-04-19 at 14:53 -0700, Martin KaFai Lau wrote: > Right, a temp and a memcpy should be enough to solve our spike problem. > It may be the right fix for net. > > Agree that using a spinlock is better (likely changing state_lock > to spinlock). A quick grep shows 80 line changes. Saeed

[PATCH net v2] net/mlx5e: Fix race in mlx5e_sw_stats and mlx5e_vport_stats

2017-04-19 Thread Martin KaFai Lau
We have observed a sudden spike in rx/tx_packets and rx/tx_bytes reported under /proc/net/dev. There is a race in mlx5e_update_stats() and some of the get-stats functions (the one that we hit is the mlx5e_get_stats() which is called by ndo_get_stats64()). In particular, the very first thing mlx5e

Re: FEC on i.MX 7 transmit queue timeout

2017-04-19 Thread Stefan Agner
On 2017-04-19 01:45, Andy Duan wrote: > On 2017年04月19日 13:56, Stefan Agner wrote: >> On 2017-04-18 22:28, Andy Duan wrote: >>> From: Stefan Agner Sent: Wednesday, April 19, 2017 1:02 PM To: Andy Duan Cc: fugang.d...@freescale.com; feste...@gmail.com; netdev@vger.kernel.org; netdev-

Re: [PATCH] xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND

2017-04-19 Thread Stefano Stabellini
Juergen, I have committed this patch to for-linus-4.12 and linux-next, I hope that's OK. Og Wed, 19 Apr 2017, Stefano Stabellini wrote: > On Wed, 19 Apr 2017, Arnd Bergmann wrote: > > All Xen frontends need to select this symbol to avoid a link error: > > > > net/built-in.o: In function `p9_trans

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 10:02 PM, Andy Gospodarek wrote: [...] and then lookup this dest in a table we have the option to make that dest an ifindex/socket/other. I did also look at JohnF's patch and I do like the simplicity of the redirect action and new ndo_xdp_xmit and how it moves towards a way to tran

[PATCH net-next] netvsc: fix use after free on module removal

2017-04-19 Thread Stephen Hemminger
The NAPI data structure is embedded in the netvsc_device structure and is freed when device is closed. There is still a reference (in NAPI list) to this which causes a crash in netif_napi_del when device is removed. Fix by managing NAPI instances correctly. Signed-off-by: Stephen Hemminger --- No

Re: __sk_buff.data_end

2017-04-19 Thread Johannes Berg
On Wed, 2017-04-19 at 23:31 +0200, Johannes Berg wrote: > Hi Alexei, Daniel, > > I'm looking at adding the __wifi_sk_buff I talked about, and I notice > that it uses CB space to store data_end. Unfortunately, in a lot of > cases, we don't have any CB space to spare in wifi. I guess I can work aro

Re: [PATCH net-next v6 05/11] seccomp: Split put_seccomp_filter() with put_seccomp()

2017-04-19 Thread Mickaël Salaün
On 19/04/2017 00:47, Mickaël Salaün wrote: > > On 19/04/2017 00:23, Kees Cook wrote: >> On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: >>> The semantic is unchanged. This will be useful for the Landlock >>> integration with seccomp (next commit). >>> >>> Signed-off-by: Mickaël Salaün >>

[PATCH net-next] brcmfmac: fix build without CONFIG_BRCMFMAC_PROTO_BCDC

2017-04-19 Thread Arnd Bergmann
With CONFIG_BRCMFMAC_PROTO_BCDC unset, we cannot build the fwsignal.c file: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c: In function 'brcmf_fws_notify_credit_map': drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:1590:31: error: implicit declaration of function 'drvr_t

Re: [PATCH net-next v6 09/11] seccomp: Enhance test_harness with an assert step mechanism

2017-04-19 Thread Mickaël Salaün
On 20/04/2017 00:02, Kees Cook wrote: > On Wed, Apr 19, 2017 at 2:51 PM, Mickaël Salaün wrote: >> >> On 19/04/2017 02:02, Kees Cook wrote: >>> On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: This is useful to return an information about the error without being able to write to

Re: [PATCH net-next v6 04/11] landlock: Add LSM hooks related to filesystem

2017-04-19 Thread Mickaël Salaün
On 19/04/2017 01:40, Kees Cook wrote: > On Tue, Apr 18, 2017 at 4:16 PM, Casey Schaufler > wrote: >> On 4/18/2017 3:44 PM, Mickaël Salaün wrote: >>> On 19/04/2017 00:17, Kees Cook wrote: On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: > +void __init landlock_add_hooks(void)

Re: [PATCH net-next v6 09/11] seccomp: Enhance test_harness with an assert step mechanism

2017-04-19 Thread Kees Cook
On Wed, Apr 19, 2017 at 2:51 PM, Mickaël Salaün wrote: > > On 19/04/2017 02:02, Kees Cook wrote: >> On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: >>> This is useful to return an information about the error without being >>> able to write to TH_LOG_STREAM. >>> >>> Helpers from test_harnes

Re: [PATCH v2 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-04-19 Thread Andrew Lunn
On Wed, Apr 19, 2017 at 09:26:43PM +, david@microchip.com wrote: > Adding support for Microchip LAN9250 Ethernet controller. > > Signed-off-by: David Cai > --- > Changes > V2 > - email format changed > - remove unnecessary text in commit log Much better, thanks. > drivers/net/ether

Re: [PATCH 2/4] net: macb: Add tsu_clk to device tree

2017-04-19 Thread Rob Herring
On Thu, Apr 13, 2017 at 02:38:06PM +0100, Rafal Ozieblo wrote: > Signed-off-by: Rafal Ozieblo > --- > Documentation/devicetree/bindings/net/macb.txt | 1 + > 1 file changed, 1 insertion(+) Acked-by: Rob Herring

Re: [RFC PATCH net] net/mlx5e: Race between mlx5e_update_stats() and getting the stats

2017-04-19 Thread Martin KaFai Lau
On Wed, Apr 19, 2017 at 01:24:38PM -0700, Eric Dumazet wrote: > On Wed, 2017-04-19 at 11:29 -0700, Martin KaFai Lau wrote: > > We have observed a sudden spike in rx/tx_packets and rx/tx_bytes > > reported under /proc/net/dev. It seems there is a race in > > mlx5e_update_stats() and some of the get

Re: [PATCH net-next v6 09/11] seccomp: Enhance test_harness with an assert step mechanism

2017-04-19 Thread Mickaël Salaün
On 19/04/2017 02:02, Kees Cook wrote: > On Tue, Mar 28, 2017 at 4:46 PM, Mickaël Salaün wrote: >> This is useful to return an information about the error without being >> able to write to TH_LOG_STREAM. >> >> Helpers from test_harness.h may be useful outside of the seccomp >> directory. >> >> Sig

Re: [PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-19 Thread Martin KaFai Lau
On Wed, Apr 19, 2017 at 02:19:43PM -0700, David Ahern wrote: > Andrey reported a fault in the IPv6 route code: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN > Modules linked in: > CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.

Re: XDP question: best API for returning/setting egress port?

2017-04-19 Thread Daniel Borkmann
On 04/19/2017 10:02 PM, Andy Gospodarek wrote: On Tue, Apr 18, 2017 at 09:58:56PM +0200, Jesper Dangaard Brouer wrote: As I argued in NetConf presentation[1] (from slide #9) we need a port mapping table (instead of using ifindex'es). Both for supporting other "port" types than net_devices (thi

Re: [PATCH v2] sh_eth: unmap DMA buffers when freeing rings

2017-04-19 Thread David Miller
From: Sergei Shtylyov Date: Wed, 19 Apr 2017 22:09:51 +0300 > On 04/17/2017 11:10 PM, David Miller wrote: > >>> The DMA API debugging (when enabled) causes: >>> >>> WARNING: CPU: 0 PID: 1445 at lib/dma-debug.c:519 >>> add_dma_entry+0xe0/0x12c >>> DMA-API: exceeded 7 overlapping mappings of cache

Re: [PATCH v2 net 2/2] net sched actions: decrement module refcount earlier

2017-04-19 Thread Cong Wang
On Wed, Apr 19, 2017 at 8:03 AM, Wolfgang Bumiller wrote: >> On April 19, 2017 at 1:32 PM Jamal Hadi Salim wrote: >> My suggestion: >> If we move the cookie allocation before init we can save it and >> only when init succeeds do we attach it to the action, otherwise >> we free it on error path. >

__sk_buff.data_end

2017-04-19 Thread Johannes Berg
Hi Alexei, Daniel, I'm looking at adding the __wifi_sk_buff I talked about, and I notice that it uses CB space to store data_end. Unfortunately, in a lot of cases, we don't have any CB space to spare in wifi. Is there any way to generate a series of instructions that instead does the necessary ca

[PATCH v2 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-04-19 Thread David.Cai
Adding support for Microchip LAN9250 Ethernet controller. Signed-off-by: David Cai --- Changes V2 - email format changed - remove unnecessary text in commit log drivers/net/ethernet/smsc/smsc911x.c | 32 +++- drivers/net/ethernet/smsc/smsc911x.h | 3 +++ 2 files

[Patch net-next v4 2/2] net_sched: remove useless NULL to tp->root

2017-04-19 Thread Cong Wang
There is no need to NULL tp->root in ->destroy(), since tp is going to be freed very soon, and existing readers are still safe to read them. For cls_route, we always init its tp->root, so it can't be NULL, we can drop more useless code. Cc: Daniel Borkmann Cc: John Fastabend Cc: Jamal Hadi Sali

[Patch net-next v4 0/2] net_sched: clean up tc filter destroy and delete logic

2017-04-19 Thread Cong Wang
The first patch fixes a potenial race condition, the second one is pure cleanup. Signed-off-by: Cong Wang --- v4: split the patch and update changelog v3: fix a compiler warning v2: rebase Cong Wang (2): net_sched: move the empty tp check from ->destroy() to ->delete() net_sched: remove use

[Patch net-next v4 1/2] net_sched: move the empty tp check from ->destroy() to ->delete()

2017-04-19 Thread Cong Wang
We could have a race condition where in ->classify() path we dereference tp->root and meanwhile a parallel ->destroy() makes it a NULL. Daniel cured this bug in commit d936377414fa ("net, sched: respect rcu grace period on cls destruction"). This happens when ->destroy() is called for deleting a f

[PATCH net] net: ipv6: RTF_PCPU should not be settable from userspace

2017-04-19 Thread David Ahern
Andrey reported a fault in the IPv6 route code: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN Modules linked in: CPU: 1 PID: 4035 Comm: a.out Not tainted 4.11.0-rc7+ #250 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS

Re: [PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Alexander Kochetkov
> 20 апр. 2017 г., в 0:08, Florian Fainelli написал(а): > > This looks fine. If you wanted to go further, you could move the > phy_connect(), phy_disconnect() calls down to the arc_emac_open() > respectively arc_emac_stop() as this would also allow the PHY device to > be fully suspended when the

Re: [Intel-wired-lan] NFS over NAT causes e1000e transmit hangs

2017-04-19 Thread Florian Fainelli
On 04/19/2017 01:52 AM, Neftin, Sasha wrote: > On 4/18/2017 22:05, Florian Fainelli wrote: >> On 04/18/2017 12:03 PM, Eric Dumazet wrote: >>> On Tue, 2017-04-18 at 11:18 -0700, Florian Fainelli wrote: Hi, I am using NFS over a NAT with two e1000e adapters and with eth1 being the

Re: [PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Florian Fainelli
On 04/19/2017 07:29 AM, Alexander Kochetkov wrote: > The patch replace phy_start_aneg() with phy_start(). phy_start() call > phy_start_aneg() as a part of startup sequence and allow recover from > error (PHY_HALTED) state. > > Also added call phy_stop() to arc_emac_remove() to stop PHY state machi

Re: [PATCH v4 04/18] dt-bindings: syscon: Add DT bindings documentation for Allwinner syscon

2017-04-19 Thread Rob Herring
On Wed, Apr 12, 2017 at 01:13:46PM +0200, Corentin Labbe wrote: > This patch adds documentation for Device-Tree bindings for the > syscon present in allwinner devices. > > Signed-off-by: Corentin Labbe > --- > .../devicetree/bindings/misc/allwinner,syscon.txt | 19 > +++ > 1

[PATCH net-next] bpf: add napi_id read access to __sk_buff

2017-04-19 Thread Daniel Borkmann
Add napi_id access to __sk_buff for socket filter program types, tc program types and other bpf_convert_ctx_access() users. Having access to skb->napi_id is useful for per RX queue listener siloing, f.e. in combination with SO_ATTACH_REUSEPORT_EBPF and when busy polling is used, meaning SO_REUSEPOR

[PATCH net-next 1/1] netvsc: Deal with rescinded channels correctly

2017-04-19 Thread kys
From: K. Y. Srinivasan We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path. Signed-off-by: K. Y. Srinivasan --- drivers/net/h

RE: [PATCH 1/1] netvsc: Deal with rescinded channels correctly

2017-04-19 Thread KY Srinivasan
> -Original Message- > From: k...@exchange.microsoft.com [mailto:k...@exchange.microsoft.com] > Sent: Wednesday, April 19, 2017 1:49 PM > To: da...@davemloft.net; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; j

[PATCH 1/1] netvsc: Deal with rescinded channels correctly

2017-04-19 Thread kys
From: K. Y. Srinivasan We will not be able to send packets over a channel that has been rescinded. Make necessary adjustments so we can properly cleanup even when the channel is rescinded. This issue can be trigerred in the NIC hot-remove path. Signed-off-by: K. Y. Srinivasan --- drivers/net/h

Re: [PATCH v3 1/4] dt-bindings: net: Add TI WiLink shared transport binding

2017-04-19 Thread Rob Herring
On Sun, Apr 16, 2017 at 9:09 AM, Adam Ford wrote: > > > On Apr 13, 2017 10:04 AM, "Rob Herring" wrote: > > Add serial slave device binding for the TI WiLink series of Bluetooth/FM/GPS > devices. > > Signed-off-by: Rob Herring > Cc: Mark Rutland > Cc: netdev@vger.kernel.org > Cc: devicet...@vger

RE: [PATCH net-next] i40evf: hide unused variable

2017-04-19 Thread Keller, Jacob E
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Wednesday, April 19, 2017 10:30 AM > To: Kirsher, Jeffrey T > Cc: Arnd Bergmann ; Pujari, Bimmy > ; Duyck, Alexander H > ; Williams, Mitch A > ; Keller, Jacob E ; > Brady, > Alan ; Joe Perches ; Singhai, Anjali > ;

Re: [PATCH v3 3/4] bluetooth: hci_uart: add LL protocol serdev driver support

2017-04-19 Thread Rob Herring
On Mon, Apr 17, 2017 at 3:11 PM, Adam Ford wrote: > On Thu, Apr 13, 2017 at 10:03 AM, Rob Herring wrote: >> Turns out that the LL protocol and the TI-ST are the same thing AFAICT. >> The TI-ST adds firmware loading, GPIO control, and shared access for >> NFC, FM radio, etc. For now, we're only im

Re: [PATCH v4 net-next RFC] net: Generic XDP

2017-04-19 Thread Andy Gospodarek
On Wed, Apr 19, 2017 at 10:44:59AM -0700, John Fastabend wrote: > On 17-04-19 10:17 AM, Alexei Starovoitov wrote: > > On Wed, Apr 19, 2017 at 10:29:03AM -0400, Andy Gospodarek wrote: > >> > >> I ran this on top of a card that uses the bnxt_en driver on a desktop > >> class system with an i7-6700 CP

Re: [RFC PATCH net] net/mlx5e: Race between mlx5e_update_stats() and getting the stats

2017-04-19 Thread Eric Dumazet
On Wed, 2017-04-19 at 11:29 -0700, Martin KaFai Lau wrote: > We have observed a sudden spike in rx/tx_packets and rx/tx_bytes > reported under /proc/net/dev. It seems there is a race in > mlx5e_update_stats() and some of the get-stats functions (the > one that we hit is the mlx5e_get_stats() which

Re: [patch] socket.7: Document SO_INCOMING_CPU

2017-04-19 Thread Eric Dumazet
On Wed, 2017-04-19 at 20:48 +0200, Michael Kerrisk (man-pages) wrote: > Hi Eric, > > [reodering for clarity] > > >> On 02/19/2017 09:55 PM, Michael Kerrisk (man-pages) wrote: > >>> [CC += Eric, so that he might review] > >>> > >>> Hello Francois, > >>> > >>> On 02/18/2017 05:06 AM, Francois Saint

  1   2   3   >