[PATCH net-next 3/5] ixgbe: use return codes from ndo_xdp_xmit that are distinguishable

2017-08-22 Thread Jesper Dangaard Brouer
For XDP_REDIRECT the use of return code -EINVAL is confusing, as it is used in three different cases. (1) When the index or ifindex lookup fails, and in the ixgbe driver (2) when link is down and (3) when XDP have not been enabled. The return code can be picked up by the tracepoint

[PATCH net-next 2/5] xdp: make generic xdp redirect use tracepoint trace_xdp_redirect

2017-08-22 Thread Jesper Dangaard Brouer
If the xdp_do_generic_redirect() call fails, it trigger the trace_xdp_exception tracepoint. It seems better to use the same tracepoint trace_xdp_redirect, as the native xdp_do_redirect{,_map} does. Signed-off-by: Jesper Dangaard Brouer --- include/linux/filter.h |3 ++-

[PATCH net-next 1/5] xdp: remove bpf_warn_invalid_xdp_redirect

2017-08-22 Thread Jesper Dangaard Brouer
Given there is a tracepoint that can track the error code of xdp_do_redirect calls, the WARN_ONCE in bpf_warn_invalid_xdp_redirect doesn't seem relevant any longer. Simply remove the function. Signed-off-by: Jesper Dangaard Brouer --- net/core/filter.c |8 1

[PATCH net-next 0/5] xdp: more work on xdp tracepoints

2017-08-22 Thread Jesper Dangaard Brouer
More work on streamlining the tracepoints for XDP. I've created a simple xdp_monitor application that uses this tracepoint, and prints statistics. Available at github: https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_monitor_kern.c

[patch net 1/2] net: sched: fix use after free when tcf_chain_destroy is called multiple times

2017-08-22 Thread Jiri Pirko
From: Jiri Pirko The goto_chain termination action takes a reference of a chain. In that case, there is an issue when block_put is called tcf_chain_destroy directly. The follo-up call of tcf_chain_put by goto_chain action free works with memory that is already freed. This was

[patch net 2/2] net: sched: don't do tcf_chain_flush from tcf_chain_destroy

2017-08-22 Thread Jiri Pirko
From: Jiri Pirko tcf_chain_flush needs to be called with RTNL. However, on free_tcf-> tcf_action_goto_chain_fini-> tcf_chain_put-> tcf_chain_destroy-> tcf_chain_flush callpath, it is called without RTNL. This issue was notified by following warning: [ 155.599052]

Re: [PATCH 2/2] net: smsc911x: Quiten netif during suspend

2017-08-22 Thread Andrew Lunn
On Tue, Aug 22, 2017 at 08:37:26PM +0200, Geert Uytterhoeven wrote: Hi Geert quieten. Has an E in the middle. Otherwise this patch looks reasonable. Andrew

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread Michael Chan
On Tue, Aug 22, 2017 at 11:30 AM, Duyck, Alexander H wrote: > On Tue, 2017-08-22 at 11:17 -0700, John Fastabend wrote: >> On 08/22/2017 11:02 AM, Michael Chan wrote: >> > On Mon, Aug 21, 2017 at 12:25 PM, Jesper Dangaard Brouer >> > wrote: >> > >

[PATCH net-next] liquidio: change manner of detecting whether or not NIC firmware is loaded

2017-08-22 Thread Felix Manlunas
In the NIC firmware, the 1-bit flag indicating "firmware is loaded" moved from SLI_SCRATCH_1 to SLI_SCRATCH_2 (these are Octeon general-purpose scratch registers). Make the PF driver conform to this change. Remove code that sets the "firmware is loaded" flag because it's now the firmware's job

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian Fainelli wrote: > On 08/22/2017 11:11 AM, Corentin Labbe wrote: > > On Tue, Aug 22, 2017 at 09:40:24AM -0700, Florian Fainelli wrote: > >> On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: > >>> On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn

[PATCH net-next] net: sched: use kvmalloc() for class hash tables

2017-08-22 Thread Eric Dumazet
From: Eric Dumazet High order GFP_KERNEL allocations can stress the host badly. Use modern kvmalloc_array()/kvfree() instead of custom allocations. Signed-off-by: Eric Dumazet --- net/sched/sch_api.c | 22 -- 1 file changed, 4

Re: Crash due to fbca164776e438 - "net: stmmac: Use the right logging function in stmmac_mdio_register"

2017-08-22 Thread Priit Laes
On Tue, Aug 22, 2017 at 12:01:32PM -0700, Florian Fainelli wrote: > On 08/22/2017 11:47 AM, Priit Laes wrote: > > Hi! > > > > I'm running into following crash during boot on Cubietruck A20, with the > > patch > > fbca164776e438 > > (net: stmmac: Use the right logging function in

Re: [PATCH net-next 2/2] selftests/net: Add a test to validate behavior of rx timestamps

2017-08-22 Thread Willem de Bruijn
> +static struct socket_type socket_types[] = { > + { "ip", SOCK_DGRAM, IPPROTO_IP }, > + { "udp",SOCK_DGRAM, IPPROTO_UDP }, I think the intent is to have a SOCK_RAW case.

Re: Crash due to fbca164776e438 - "net: stmmac: Use the right logging function in stmmac_mdio_register"

2017-08-22 Thread Florian Fainelli
On 08/22/2017 11:47 AM, Priit Laes wrote: > Hi! > > I'm running into following crash during boot on Cubietruck A20, with the patch > fbca164776e438 > (net: stmmac: Use the right logging function in stmmac_mdio_register) applied: > > [snip] > sun7i-dwmac 1c5.ethernet: PTP uses main clock >

Re: [PATCH net-next 1/2] tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg

2017-08-22 Thread Willem de Bruijn
On Tue, Aug 22, 2017 at 1:27 PM, Mike Maloney wrote: > From: Mike Maloney > > When SOF_TIMESTAMPING_RX_SOFTWARE is enabled for tcp sockets, return the > timestamp corresponding to the highest sequence number data returned. > > Previously the

Crash due to fbca164776e438 - "net: stmmac: Use the right logging function in stmmac_mdio_register"

2017-08-22 Thread Priit Laes
Hi! I'm running into following crash during boot on Cubietruck A20, with the patch fbca164776e438 (net: stmmac: Use the right logging function in stmmac_mdio_register) applied: [snip] sun7i-dwmac 1c5.ethernet: PTP uses main clock sun7i-dwmac 1c5.ethernet: no reset control found

Re: [PATCH 0/2] net: Fix crashes due to activity during suspend

2017-08-22 Thread Florian Fainelli
On 08/22/2017 11:37 AM, Geert Uytterhoeven wrote: > Hi all, > > If an Ethernet device is used while the device is suspended, the system may > crash. > > E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is > driven by a PM controlled clock. If the Ethernet registers are

Re: [PATCH] once: switch to new jump label API

2017-08-22 Thread Hannes Frederic Sowa
Eric Biggers writes: > From: Eric Biggers > > Switch the DO_ONCE() macro from the deprecated jump label API to the new > one. The new one is more readable, and for DO_ONCE() it also makes the > generated code more icache-friendly: now the one-time

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 11:28:28AM -0700, Eric Dumazet wrote: > On Tue, 2017-08-22 at 11:01 -0700, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Tue, 22 Aug 2017 20:55:56 +0300 > > > > > Which reminds me that skb_linearize in net core seems to be > > >

[PATCH 1/2] net: phy: Freeze PHY polling before suspending devices

2017-08-22 Thread Geert Uytterhoeven
During system resume, the PHY state machine may be run from the workqueue while the Ethernet device (and its PHY) are still suspended, which may lead to a system crash. E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is driven by a PM controlled clock. If the Ethernet

[PATCH 2/2] net: smsc911x: Quiten netif during suspend

2017-08-22 Thread Geert Uytterhoeven
If the network interface is kept running during suspend, the net core may call net_device_ops.ndo_start_xmit() while the Ethernet device is still suspended, which may lead to a system crash. E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is driven by a PM controlled clock.

Re: [PATCH net-next v2 00/10] net: mvpp2: MAC/GoP configuration

2017-08-22 Thread Antoine Tenart
Hi Andrew, On Tue, Aug 22, 2017 at 08:07:57PM +0200, Andrew Lunn wrote: > On Tue, Aug 22, 2017 at 07:08:20PM +0200, Antoine Tenart wrote: > > > > This is based on net-next (e2a7c34fb285). > > > > I removed the GoP interrupt and PHY optional parts in this v2 to ease > > the review process as the

[PATCH 0/2] net: Fix crashes due to activity during suspend

2017-08-22 Thread Geert Uytterhoeven
Hi all, If an Ethernet device is used while the device is suspended, the system may crash. E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is driven by a PM controlled clock. If the Ethernet registers are accessed while the clock is not running, the system will

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Florian Fainelli
On 08/22/2017 11:11 AM, Corentin Labbe wrote: > On Tue, Aug 22, 2017 at 09:40:24AM -0700, Florian Fainelli wrote: >> On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: >>> On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn wrote: > All muxes are mostly always represented the same way

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread Duyck, Alexander H
On Tue, 2017-08-22 at 11:17 -0700, John Fastabend wrote: > On 08/22/2017 11:02 AM, Michael Chan wrote: > > On Mon, Aug 21, 2017 at 12:25 PM, Jesper Dangaard Brouer > > wrote: > > > > > > I'be been playing with the latest XDP_REDIRECT feature, that was > > > accepted in

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Eric Dumazet
On Tue, 2017-08-22 at 11:01 -0700, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Tue, 22 Aug 2017 20:55:56 +0300 > > > Which reminds me that skb_linearize in net core seems to be > > fundamentally racy - I suspect that if skb is cloned, and someone is > > trying to

Re: [PATCH net] net: dsa: skb_put_padto() already frees nskb

2017-08-22 Thread David Miller
From: Florian Fainelli Date: Mon, 21 Aug 2017 12:41:31 -0700 > skb_put_padto() already frees the passed sk_buff reference upon error, > so calling kfree_skb() on it again is not necessary. > > Detected by CoverityScan, CID#1416687 ("USE_AFTER_FREE") > > Fixes:

Re: [PATCH net-next 3/4] bpf/verifier: when pruning a branch, ignore its write marks

2017-08-22 Thread Alexei Starovoitov
On 8/22/17 11:03 AM, Edward Cree wrote: On 22/08/17 16:50, Edward Cree wrote: On 22/08/17 16:24, Alexei Starovoitov wrote: Do you have a test case for this by any chance? I think something like if (cond) r0=0; if (cond) r0=0; return r0; might tickle the bug, but

Re: [PATCH net-next v3 2/2] tcp: Remove the unused parameter for tcp_try_fastopen.

2017-08-22 Thread Eric Dumazet
On Mon, 2017-08-21 at 23:33 -0700, Tonghao Zhang wrote: > Signed-off-by: Tonghao Zhang > --- > include/net/tcp.h | 3 +-- > net/ipv4/tcp_fastopen.c | 6 ++ > net/ipv4/tcp_input.c| 2 +- > 3 files changed, 4 insertions(+), 7 deletions(-) Acked-by: Eric

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread John Fastabend
On 08/22/2017 11:02 AM, Michael Chan wrote: > On Mon, Aug 21, 2017 at 12:25 PM, Jesper Dangaard Brouer > wrote: >> >> I'be been playing with the latest XDP_REDIRECT feature, that was >> accepted in net-next (for ixgbe), see merge commit[1]. >> [1]

Re: [PATCH net-next v3 1/2] tcp: Get a proper dst before checking it.

2017-08-22 Thread Eric Dumazet
On Mon, 2017-08-21 at 23:33 -0700, Tonghao Zhang wrote: > tcp_peer_is_proven needs a proper route to make the > determination, but dst always is NULL. This bug may > be there at the beginning of git tree. This does not > look serious enough to deserve backports to stable > versions. > >

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Corentin Labbe
On Tue, Aug 22, 2017 at 09:40:24AM -0700, Florian Fainelli wrote: > On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: > > On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn wrote: > >>> All muxes are mostly always represented the same way afaik, or do you > >>> want to simply introduce a new

[PATCH] net: amd: constify zorro_device_id

2017-08-22 Thread Arvind Yadav
zorro_device_id are not supposed to change at runtime. All functions working with zorro_device_id provided by work with const zorro_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/ethernet/amd/a2065.c | 2 +-

Re: [PATCH V2 net-next 0/2] liquidio: VF driver will notify NIC firmware of MTU change

2017-08-22 Thread David Miller
From: Felix Manlunas Date: Mon, 21 Aug 2017 12:35:27 -0700 > From: Veerasenareddy Burru > > Make VF driver notify NIC firmware of MTU change. Firmware needs this > information for MTU propagation and enforcement. > > The first patch

Re: [PATCH net-next v2 00/10] net: mvpp2: MAC/GoP configuration

2017-08-22 Thread Andrew Lunn
On Tue, Aug 22, 2017 at 07:08:20PM +0200, Antoine Tenart wrote: > Hi all, > > This is based on net-next (e2a7c34fb285). > > I removed the GoP interrupt and PHY optional parts in this v2 to ease > the review process as the MAC/GoP initialization seemed to start less > discussions :) Hi Antoine

Re: [PATCH] net: ethernet: make ptp_clock_info const

2017-08-22 Thread David Miller
From: Bhumika Goyal Date: Mon, 21 Aug 2017 22:36:50 +0530 > Make these const as they are only used in a copy operation. > Done using Coccinelle. ... > Signed-off-by: Bhumika Goyal Applied.

Re: [PATCH] ptp: make ptp_clock_info const

2017-08-22 Thread David Miller
From: Bhumika Goyal Date: Mon, 21 Aug 2017 23:01:12 +0530 > Make these const as they are only used in a copy operation. > Done using Coccinelle. ... > Signed-off-by: Bhumika Goyal Applied.

Re: [PATCH net v3] ipv6: add rcu grace period before freeing fib6_node

2017-08-22 Thread David Miller
From: Wei Wang Date: Mon, 21 Aug 2017 09:47:10 -0700 > From: Wei Wang > > We currently keep rt->rt6i_node pointing to the fib6_node for the route. > And some functions make use of this pointer to dereference the fib6_node > from rt structure, e.g.

Re: [PATCH net-next 3/4] bpf/verifier: when pruning a branch, ignore its write marks

2017-08-22 Thread Edward Cree
On 22/08/17 16:50, Edward Cree wrote: > On 22/08/17 16:24, Alexei Starovoitov wrote: >> Do you have a test case for this by any chance? > I think something like > if (cond) > r0=0; > if (cond) > r0=0; > return r0; > might tickle the bug, but I'm not sure. It turns out

Re: [PATCH V4 net-next] net: hns3: Add support to change MTU in HNS3 hardware

2017-08-22 Thread David Miller
From: Salil Mehta Date: Mon, 21 Aug 2017 17:05:24 +0100 > This patch adds the following support to the HNS3 driver: > 1. Support to change the Maximum Transmission Unit of a >port in the HNS NIC hardware. > 2. Initializes the supported MTU range for the netdevice. >

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread Michael Chan
On Mon, Aug 21, 2017 at 12:25 PM, Jesper Dangaard Brouer wrote: > > I'be been playing with the latest XDP_REDIRECT feature, that was > accepted in net-next (for ixgbe), see merge commit[1]. > [1] https://git.kernel.org/davem/net-next/c/6093ec2dc31 > Just catching on

RE: [PATCH net] net: dsa: skb_put_padto() already frees nskb

2017-08-22 Thread Woojung.Huh
> > Because skb_put_padto() frees skb when it fails, below lines in > e71cb9e00922 > > ("net: dsa: ksz: fix skb freeing") will be an issue to. > > > > if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) { > > + if (skb_put_padto(skb, skb->len + padlen)) > > +

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread David Miller
From: "Michael S. Tsirkin" Date: Tue, 22 Aug 2017 20:55:56 +0300 > Which reminds me that skb_linearize in net core seems to be > fundamentally racy - I suspect that if skb is cloned, and someone is > trying to use the shared frags while another thread calls skb_linearize, > we

Re: [PATCH v12 0/8] Replace PCI pool by DMA pool API

2017-08-22 Thread Doug Ledford
ool > API directly and get rid of the old API. > > This set of patches, replaces the old API by the dma pool API > and remove the defines. > > Changes in v12: > - Rebased series onto next-20170822 Hi Romain, I've applied the three that are in my purview to my for-next branch (

Re: [PATCH V8 net-next 00/22] Huawei HiNIC Ethernet Driver

2017-08-22 Thread David Miller
From: Aviad Krawczyk Date: Mon, 21 Aug 2017 23:55:46 +0800 > The patch-set contains the support of the HiNIC Ethernet driver for > hinic family of PCIE Network Interface Cards. Series applied, thanks.

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 10:50:41AM +0800, Jason Wang wrote: > > Perhaps the descriptor pool should also be > > revised to allow out of order completions. Then there is no need to > > copy zerocopy packets whenever they may experience delay. > > Yes, but as replied in the referenced thread,

Re: Something hitting my total number of connections to the server

2017-08-22 Thread Eric Dumazet
On Tue, 2017-08-22 at 10:46 -0700, David Ahern wrote: > On 8/22/17 10:44 AM, Eric Dumazet wrote: > > Willem wrote this doc in 2013, before we finally went back to 1000. > > > > We should update this doc. > > > And these too: > > $ egrep -r netdev_max_backlog Documentation/networking/ >

Re: Something hitting my total number of connections to the server

2017-08-22 Thread David Ahern
On 8/22/17 10:44 AM, Eric Dumazet wrote: > Willem wrote this doc in 2013, before we finally went back to 1000. > > We should update this doc. And these too: $ egrep -r netdev_max_backlog Documentation/networking/ Documentation/networking//cxgb.txt: sysctl -w

Re: Something hitting my total number of connections to the server

2017-08-22 Thread Eric Dumazet
On Tue, 2017-08-22 at 09:43 -0700, David Ahern wrote: > On 8/22/17 6:02 AM, Eric Dumazet wrote: > >> > >> net.core.netdev_max_backlog=1 > > This is an insane backlog. > > > > https://www.kernel.org/doc/Documentation/networking/scaling.txt > > "== Suggested Configuration > > Flow limit is

Re: [PATCH net-next v4] openvswitch: enable NSH support

2017-08-22 Thread Ben Pfaff
On Tue, Aug 22, 2017 at 08:32:49AM +, Jan Scheurich wrote: > > > Or why else does OVS user space code take so great pain to model > > > possible misalignment and provide/use safe access functions? > > > > I don't know how the ovs user space deals with packet allocation. In > > the kernel, the

Re: [PATCH] net: ethernet: stmmac: dwmac-rk: Add rv1108 gmac support

2017-08-22 Thread David Miller
From: David Wu Date: Mon, 21 Aug 2017 18:12:55 +0800 > It only supports rmii interface. Add constants and callback functions > for the dwmac on rv1108 socs. As can be seen, the base structure is > the same, only registers and the bits in them moved slightly. > >

[PATCH v2 2/6] dpaa_eth: use multiple Rx frame queues

2017-08-22 Thread Madalin Bucur
Add a block of 128 Rx frame queues per port. The FMan hardware will send traffic on one of these queues based on the FMan port Parse Classify Distribute setup. The hash computed by the FMan Keygen block will select the Rx FQ. Signed-off-by: Madalin Bucur ---

[PATCH v2 3/6] dpaa_eth: enable Rx hashing control

2017-08-22 Thread Madalin Bucur
Allow ethtool control of the Rx flow hashing. By default RSS is enabled, this allows to turn it off by bypassing the FMan Keygen block and sending all traffic on the default Rx frame queue. Signed-off-by: Madalin Bucur ---

[PATCH v2 4/6] dpaa_eth: add NETIF_F_RXHASH

2017-08-22 Thread Madalin Bucur
Set the skb hash when then FMan Keygen hash result is available. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 23 +++--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 1 +

[PATCH v2 0/6] Add RSS to DPAA 1.x Ethernet driver

2017-08-22 Thread Madalin Bucur
This patch set introduces Receive Side Scaling for the DPAA Ethernet driver. Documentation is updated with details related to the new feature and limitations that apply. Added also a small fix. Change from v1: removed a C++ style comment Iordache Florinel-R70177 (1): fsl/fman: enable FMan

[PATCH v2 1/6] fsl/fman: enable FMan Keygen

2017-08-22 Thread Madalin Bucur
From: Iordache Florinel-R70177 Add support for the FMan Keygen with a hardcoded scheme to spread incoming traffic on a FQ range based on source and destination IPs and ports. Signed-off-by: Iordache Florinel Signed-off-by: Madalin Bucur

[PATCH v2 6/6] dpaa_eth: check allocation result

2017-08-22 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 73ca8d7..4225806 100644 ---

[PATCH v2 5/6] Documentation: networking: add RSS information

2017-08-22 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- Documentation/networking/dpaa.txt | 68 ++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/dpaa.txt b/Documentation/networking/dpaa.txt index 76e016d..f88194f

Re: [PATCH net] ethernet: xircom: small clean up in setup_xirc2ps_cs()

2017-08-22 Thread David Miller
From: Dan Carpenter Date: Mon, 21 Aug 2017 12:47:30 +0300 > The get_options() function takes the whole ARRAY_SIZE(). It doesn't > matter here because we don't use more than 7 elements. > > Signed-off-by: Dan Carpenter Applied, thanks.

Re: [PATCH v2 net] udp: on peeking bad csum, drop packets even if not at head

2017-08-22 Thread Willem de Bruijn
On Tue, Aug 22, 2017 at 12:47 PM, Paolo Abeni wrote: > On Tue, 2017-08-22 at 09:39 -0700, Eric Dumazet wrote: >> From: Eric Dumazet >> >> When peeking, if a bad csum is discovered, the skb is unlinked from >> the queue with __sk_queue_drop_skb and the peek

Re: pull request (net): ipsec 2017-08-21

2017-08-22 Thread David Miller
From: Steffen Klassert Date: Mon, 21 Aug 2017 08:07:59 +0200 > 1) Fix memleaks when ESP takes an error path. > > 2) Fix null pointer dereference when creating a sub policy >that matches the same outer flow as main policy does. >From Koichiro Den. > > 3)

[PATCH net-next 2/2] selftests/net: Add a test to validate behavior of rx timestamps

2017-08-22 Thread Mike Maloney
From: Mike Maloney Validate the behavior of the combination of various timestamp socket options, and ensure consistency across ip, udp, and tcp. Signed-off-by: Mike Maloney --- .../selftests/networking/timestamping/.gitignore | 1 +

[PATCH net-next 1/2] tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg

2017-08-22 Thread Mike Maloney
From: Mike Maloney When SOF_TIMESTAMPING_RX_SOFTWARE is enabled for tcp sockets, return the timestamp corresponding to the highest sequence number data returned. Previously the skb->tstamp is overwritten when a TCP packet is placed in the out of order queue. While the

[PATCH net-next 0/2] tcp: Add software rx timestamp for TCP.

2017-08-22 Thread Mike Maloney
From: Mike Maloney Add software rx timestamps for TCP, and a test to ensure consistency of behavior between IP, UDP, and TCP implementations. Mike Maloney (2): tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg selftests/net: Add a test to validate behavior of rx

Re: [PATCH RFC net] fsl/man: Inherit parent device and of_node

2017-08-22 Thread David Miller
From: Florian Fainelli Date: Fri, 18 Aug 2017 17:12:55 -0700 > @@ -623,6 +623,8 @@ static struct platform_device *dpaa_eth_add_device(int > fman_id, > goto no_mem; > } > > + pdev->dev.of_node = node; > + pdev->dev.parent = priv->dev; >

Re: [PATCH net] ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt()

2017-08-22 Thread David Miller
From: Stefano Brivio Date: Fri, 18 Aug 2017 14:40:53 +0200 > A packet length of exactly IPV6_MAXPLEN is allowed, we should > refuse parsing options only if the size is 64KiB or more. > > While at it, remove one extra variable and one assignment which > were also introduced

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Willem de Bruijn
>> > > /* Don't wait up for transmitted skbs to be freed. */ >> > > if (!use_napi) { >> > > + if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) { >> > > + struct ubuf_info *uarg; >> > > + uarg =

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread John Fastabend
On 08/22/2017 10:09 AM, Alexei Starovoitov wrote: > On Tue, Aug 22, 2017 at 08:37:10AM +0200, Jesper Dangaard Brouer wrote: >> >> >>> Once tx-ing netdev added to devmap we can enable xdp on it automatically? >> >> I think you are referring to Gotcha-2 here: > > oops. yes :) > >> >> Second

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Willem de Bruijn
>> > An issue of the referenced patch is that sndbuf could be smaller than low >> > watermark. > We cannot determine the low watermark properly because of not only sndbuf size > issue but also the fact that the upper vhost-net cannot directly see how much > descriptor is currently available at the

[PATCH net-next v2 04/10] net: mvpp2: initialize the GMAC when using a port

2017-08-22 Thread Antoine Tenart
This adds a routine to initialize the GMAC at the port level when using a port. This wasn't done until this commit, and the mvpp2 driver was relying on the bootloader/firmware initialization. This doesn't mean everything is configured in the mvpp2 driver now, but it helps reducing the gap.

[PATCH net-next v2 07/10] net: mvpp2: initialize the GoP

2017-08-22 Thread Antoine Tenart
The patch adds GoP (group of ports) initialization functions. The mvpp2 driver was relying on the firmware/bootloader initialization; this patch moves this setup to the mvpp2 driver. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas ---

[PATCH net-next v2 03/10] net: mvpp2: move the mii configuration in the ndo_open path

2017-08-22 Thread Antoine Tenart
This moves the mii configuration in the ndo_open path, to allow handling different mii configurations later and to switch between these configurations at runtime. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas ---

[PATCH net-next v2 01/10] net: mvpp2: unify register definitions coding style

2017-08-22 Thread Antoine Tenart
Cosmetic patch to use the same formatting rules on all register definitions. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas --- drivers/net/ethernet/marvell/mvpp2.c | 88 ++-- 1 file changed, 44

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-22 Thread Alexei Starovoitov
On Tue, Aug 22, 2017 at 08:37:10AM +0200, Jesper Dangaard Brouer wrote: > > > > Once tx-ing netdev added to devmap we can enable xdp on it automatically? > > I think you are referring to Gotcha-2 here: oops. yes :) > > Second gotcha(2): you cannot TX out a device, unless it also have a >

[PATCH net-next v2 02/10] net: mvpp2: fix the synchronization module bypass macro name

2017-08-22 Thread Antoine Tenart
The macro defining the bit to toggle to bypass or not the synchronization module is wrongly named. Writing 1 will disable bypass. This patch s/MVPP22_CTRL4_SYNC_BYPASS/MVPP22_CTRL4_SYNC_BYPASS_DIS/. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas

[PATCH net-next v2 06/10] net: mvpp2: set maximum packet size for 10G ports

2017-08-22 Thread Antoine Tenart
From: Stefan Chulski Set maximum packet size for XLG 10G ports. Missing maximum packet size for XLG configuration will cause kernel panic if oversized packet is received by port. Signed-off-by: Stefan Chulski Signed-off-by: Antoine Tenart

[PATCH net-next v2 08/10] Documentation/bindings: net: marvell-pp2: add the system controller

2017-08-22 Thread Antoine Tenart
This patch documents the new marvell,system-controller property used by the Marvell ppv2 network driver. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas --- Documentation/devicetree/bindings/net/marvell-pp2.txt | 1 + 1 file changed,

[PATCH net-next v2 05/10] net: mvpp2: initialize the XLG MAC when using a port

2017-08-22 Thread Antoine Tenart
This adds a routine to initialize the XLG MAC at the port level when using a port and the XAUI/10GKR interface mode. This wasn't done until this commit, and the mvpp2 driver was relying on the bootloader/firmware initialization. This doesn't mean everything is configured in the mvpp2 driver now,

[PATCH net-next v2 09/10] arm64: dts: marvell: add a reference to the sysctrl syscon in the ppv2 node

2017-08-22 Thread Antoine Tenart
The network driver on Marvell SoC (7k/8k) needs to access some registers in the system controller to configure its ports at runtime. This patch adds a phandle reference to the syscon system controller node in the ppv2 node. Signed-off-by: Antoine Tenart

[PATCH net-next v2 10/10] arm64: dts: marvell: mcbin: enable more networking ports

2017-08-22 Thread Antoine Tenart
This patch enables the two GE/SFP ports. They are configured in 10GKR mode by default. To do this the cpm_xdmio is enabled as well, and two phy descriptions are added. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas ---

[PATCH net-next v2 00/10] net: mvpp2: MAC/GoP configuration

2017-08-22 Thread Antoine Tenart
Hi all, This is based on net-next (e2a7c34fb285). I removed the GoP interrupt and PHY optional parts in this v2 to ease the review process as the MAC/GoP initialization seemed to start less discussions :) This series now only aims at making the PPv2 driver less depending on the

Re: [PATCH] net: ftgmac100: Fix oops in probe on failure to find associated PHY

2017-08-22 Thread Benjamin Herrenschmidt
On Tue, 2017-08-22 at 16:06 +0930, Andrew Jeffery wrote: > netif_napi_del() should be paired with netif_napi_add(), however no > such call takes place in ftgmac100_probe(). This triggers a NULL > pointer dereference if e.g. no PHY is found by the MDIO probe: > >[ 2.77] libphy: Fixed

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Maxime Ripard
On Tue, Aug 22, 2017 at 11:39:22PM +0800, Chen-Yu Tsai wrote: > Now can we please decide on something? We're a week and a half from > the 4.13 release. If mdio-mux is wrong, then we could have two mdio > nodes (internal-mdio & external-mdio). I can only emphasize this. I'm afraid that if we don't

Re: [PATCH v2 net] udp: on peeking bad csum, drop packets even if not at head

2017-08-22 Thread Paolo Abeni
On Tue, 2017-08-22 at 09:39 -0700, Eric Dumazet wrote: > From: Eric Dumazet > > When peeking, if a bad csum is discovered, the skb is unlinked from > the queue with __sk_queue_drop_skb and the peek operation restarted. > > __sk_queue_drop_skb only drops packets that match

Re: Something hitting my total number of connections to the server

2017-08-22 Thread David Ahern
On 8/22/17 6:02 AM, Eric Dumazet wrote: >> >> net.core.netdev_max_backlog=1 > This is an insane backlog. > https://www.kernel.org/doc/Documentation/networking/scaling.txt "== Suggested Configuration Flow limit is useful on systems with many concurrent connections, where a single connection

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Florian Fainelli
On 08/22/2017 08:39 AM, Chen-Yu Tsai wrote: > On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn wrote: >>> All muxes are mostly always represented the same way afaik, or do you >>> want to simply introduce a new compatible / property? >> >> + mdio-mux { >> +

Re: [PATCH v3 2/4] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-22 Thread Florian Fainelli
On 08/18/2017 05:21 AM, Corentin Labbe wrote: > The current way to find if the phy is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than the internal one. > > This patch adds a new way

[PATCHv4 net-next] gre: introduce native tunnel support for ERSPAN

2017-08-22 Thread William Tu
The patch adds ERSPAN type II tunnel support. The implementation is based on the draft at [1]. One of the purposes is for Linux box to be able to receive ERSPAN monitoring traffic sent from the Cisco switch, by creating a ERSPAN tunnel device. In addition, the patch also adds ERSPAN TX, so Linux

[PATCH v2 net] udp: on peeking bad csum, drop packets even if not at head

2017-08-22 Thread Eric Dumazet
From: Eric Dumazet When peeking, if a bad csum is discovered, the skb is unlinked from the queue with __sk_queue_drop_skb and the peek operation restarted. __sk_queue_drop_skb only drops packets that match the queue head. This fails if the skb was found after the head,

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread David Miller
You posted this 4 times. :-( I hope I applied the right one. Go check net-next and please send me any necessary fix up patches. Thanks.

Re: [PATCH net-next v4] arm: eBPF JIT compiler

2017-08-22 Thread David Miller
From: Shubham Bansal Date: Tue, 22 Aug 2017 12:02:33 +0530 > The JIT compiler emits ARM 32 bit instructions. Currently, It > supports eBPF only. Classic BPF is supported because of the > conversion by BPF core. ... Applied to net-next, thanks.

Fw: [Bug 196727] New: WARNING: CPU: 11 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0xc5/0x122

2017-08-22 Thread Stephen Hemminger
New Intel driver timeout? Begin forwarded message: Date: Tue, 22 Aug 2017 06:51:58 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 196727] New: WARNING: CPU: 11 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0xc5/0x122

Re: [PATCH net-next 4/4] bpf/verifier: document liveness analysis

2017-08-22 Thread Alexei Starovoitov
On 8/22/17 8:55 AM, Edward Cree wrote: On 22/08/17 16:42, Alexei Starovoitov wrote: On 8/22/17 6:27 AM, Edward Cree wrote: static bool do_propagate_liveness(const struct bpf_verifier_state *state, struct bpf_verifier_state *parent) { @@ -3457,6 +3463,15 @@ static bool

Re: [PATCH net-next 4/4] bpf/verifier: document liveness analysis

2017-08-22 Thread Edward Cree
On 22/08/17 16:42, Alexei Starovoitov wrote: > On 8/22/17 6:27 AM, Edward Cree wrote: >> static bool do_propagate_liveness(const struct bpf_verifier_state *state, >>struct bpf_verifier_state *parent) >> { >> @@ -3457,6 +3463,15 @@ static bool do_propagate_liveness(const

Re: [PATCH net-next 3/4] bpf/verifier: when pruning a branch, ignore its write marks

2017-08-22 Thread Edward Cree
On 22/08/17 16:24, Alexei Starovoitov wrote: > On 8/22/17 6:27 AM, Edward Cree wrote: >> The fact that writes occurred in reaching the continuation state does >> not screen off its reads from us, because we're not really its parent. >> So detect 'not really the parent' in do_propagate_liveness,

Re: [PATCHv3 net-next] gre: introduce native tunnel support for ERSPAN

2017-08-22 Thread William Tu
>> + struct metadata_dst *tun_dst = NULL; >> + const struct iphdr *iph; >> + struct erspanhdr *ershdr; >> + __be32 index; >> + __be32 session_id; >> + int len; > > Please order local variables from longest to shortest line, ie. reverse > christmas tree format. > thanks for

Re: [PATCH net-next 4/4] bpf/verifier: document liveness analysis

2017-08-22 Thread Alexei Starovoitov
On 8/22/17 6:27 AM, Edward Cree wrote: The liveness tracking algorithm is quite subtle; add comments to explain it. Signed-off-by: Edward Cree --- include/linux/bpf_verifier.h | 13 + kernel/bpf/verifier.c| 28 +++- 2 files

[PATCH net-next] udp: remove unreachable ufo branches

2017-08-22 Thread Willem de Bruijn
From: Willem de Bruijn Remove two references to ufo in the udp send path that are no longer reachable now that ufo has been removed. Commit 85f1bd9a7b5a ("udp: consistently apply ufo or fragmentation") is a fix to ufo. It is safe to revert what remains of it. Also, no skb

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-22 Thread Chen-Yu Tsai
On Mon, Aug 21, 2017 at 10:23 PM, Andrew Lunn wrote: >> All muxes are mostly always represented the same way afaik, or do you >> want to simply introduce a new compatible / property? > > + mdio-mux { > + compatible = "allwinner,sun8i-h3-mdio-switch"; > +

Re: [PATCH v4 net-next] arm: eBPF JIT compiler

2017-08-22 Thread Daniel Borkmann
On 08/22/2017 05:08 PM, Daniel Borkmann wrote: On 08/22/2017 08:36 AM, Shubham Bansal wrote: [...] + +static int out_offset = -1; /* initialized on the first pass of build_body() */ Hm, why is this a global var actually? There can be multiple parallel calls to bpf_int_jit_compile(), we don't

<    1   2   3   >