Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Pablo Neira Ayuso
On Mon, Apr 10, 2017 at 09:35:27AM -0600, David Ahern wrote: > On 4/10/17 9:30 AM, Johannes Berg wrote: > > On Mon, 2017-04-10 at 09:26 -0600, David Ahern wrote: > >> On 4/8/17 2:24 PM, Johannes Berg wrote: > >>> @@ -2300,14 +2332,35 @@ void netlink_ack(struct sk_buff *in_skb, > >>> struct nlmsghdr

[PATCH net-next v4 3/5] netlink: allow sending extended ACK with cookie on success

2017-04-10 Thread Johannes Berg
From: Johannes Berg Now that we have extended error reporting and a new message format for netlink ACK messages, also extend this to be able to return arbitrary cookie data on success. This will allow, for example, nl80211 to not send an extra message for cookies identifying newly created object

[PATCH net-next v4 4/5] netlink: pass extended ACK struct to parsing functions

2017-04-10 Thread Johannes Berg
From: Johannes Berg Pass the new extended ACK reporting struct to all of the generic netlink parsing functions. For now, pass NULL in almost all callers (except for some in the core.) Signed-off-by: Johannes Berg --- crypto/crypto_user.c | 2 +- drivers/block/drbd

[PATCH net-next v4 2/5] genetlink: pass extended ACK report down

2017-04-10 Thread Johannes Berg
From: Johannes Berg Pass the extended ACK reporting struct down from generic netlink to the families, using the existing struct genl_info for simplicity. Also add support to set the extended ACK information from generic netlink users. Signed-off-by: Johannes Berg --- include/net/genetlink.h |

[PATCH net-next v4 5/5] netlink: pass extended ACK struct where available

2017-04-10 Thread Johannes Berg
From: Johannes Berg This is an add-on to the previous patch that passes the extended ACK structure where it's already available by existing genl_info or extack function arguments. This was done with this spatch (with some manual adjustment of indentation): @@ expression A, B, C, D, E; identifie

[PATCH net-next v4 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
From: Johannes Berg Add the base infrastructure and UAPI for netlink extended ACK reporting. All "manual" calls to netlink_ack() pass NULL for now and thus don't get extended ACK reporting. Big thanks goes to Pablo Neira Ayuso for not only bringing up the whole topic at netconf (again) but also

[PATCH net-next v4 0/5] netlink extended ACK reporting

2017-04-10 Thread Johannes Berg
Changes since v3: * Add NLM_F_CAPPED and NLM_F_ACK_TLVS flags, to allow entirely stateless parsing of the ACK messages by looking at the new flags. Need to check NLM_F_ACK_TLVS first, since capping can be done in kernels before this patchset without setting the flag. * Remove "missing

Re: [PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()

2017-04-10 Thread Jiri Pirko
Mon, Apr 10, 2017 at 03:11:06PM CEST, weiyj...@gmail.com wrote: >From: Wei Yongjun > >Fix the retrn value check which testing the wrong variable ^ typo Otherwise, Acked-by: Jiri Pirko >in devlink_dpipe_header_put(). > >Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dp

Re: [PATCH net-next v2] bindings: net: stmmac: add missing note about LPI interrupt

2017-04-10 Thread Giuseppe CAVALLARO
Hi Niklas On 4/10/2017 9:43 AM, Niklas Cassel wrote: From: Niklas Cassel The hardware has a LPI interrupt. There is already code in the stmmac driver to parse and handle the interrupt. However, this information was missing from the DT binding. i wonder if we could improve the comments in thi

[PATCH 4/4] xfrm: branchless addr4_match() on 64-bit

2017-04-10 Thread Steffen Klassert
From: Alexey Dobriyan Current addr4_match() code has special test for /0 prefixes because of standard required undefined behaviour. However, it is possible to omit it on 64-bit because shifting can be done within a 64-bit register and then truncated to the expected value (which is 0 mask). Impli

[PATCH 2/4] xfrm: use "unsigned int" in __xfrm6_pref_hash()

2017-04-10 Thread Steffen Klassert
From: Alexey Dobriyan x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations. Space savings: add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58 (-58) function old new delta xfrm_hash_resize

[PATCH 3/4] xfrm: use "unsigned int" in addr_match()

2017-04-10 Thread Steffen Klassert
From: Alexey Dobriyan x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations and extending to size_t. Space savings: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) function old new delta

pull request (net-next): ipsec-next 2017-04-11

2017-04-10 Thread Steffen Klassert
1) Remove unused field from struct xfrm_mgr. 2) Code size optimizations for the xfrm prefix hash and address match. 3) Branch optimization for addr4_match. All patches from Alexey Dobriyan. Please pull or let me know if there are problems. Thanks! The following changes since commit add641e

[PATCH 1/4] xfrm: remove unused struct xfrm_mgr::id

2017-04-10 Thread Steffen Klassert
From: Alexey Dobriyan Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 1 - net/key/af_key.c | 1 - net/xfrm/xfrm_user.c | 1 - 3 files changed, 3 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 14d82bf..6e03a1a 100644 --- a

Re: [PATCH net-next] net: stmmac: set total length of the packet to be transmitted in TDES3

2017-04-10 Thread Giuseppe CAVALLARO
Hi Niklas patch looks ok for me, Alex any feedback? peppe On 4/10/2017 8:33 PM, Niklas Cassel wrote: From: Niklas Cassel Field FL/TPL in register TDES3 is not correctly set on GMAC4. TX appears to be functional on GMAC 4.10a even if this field is not set, however, to avoid relying on undefin

6f58284e66: BUG: kernel hang in boot stage

2017-04-10 Thread kernel test robot
8284e66 Merge remote-tracking branch 'net-next/master' f8c97bdb49 Add linux-next specific files for 20170410 +-++++---+ | | 7fd97bca68 |

Re: [PATCH v2] cfg80211: Fix array-bounds warning in fragment copy

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 14:36 -0700, Matthias Kaehlcke wrote: > Ping, any feedback on this patch? You didn't cc linux-wireless, so it fell through the cracks ... I'll try to remember it when I merge later. johannes

Re: [PATCH] ibmveth: Support to enable LSO/CSO for Trunk VEA.

2017-04-10 Thread Sivakumar Krishnasamy
Re-sending as my earlier response had some HTML subparts. Let me give some background before I answer your queries. In IBM PowerVM environment, ibmveth driver supports largesend and checksum offload today, but only for virtual ethernet adapters (VEA) which are not configured in "Trunk mode".

Re: [PATCH iproute2 net-next 1/2] iproute: Add support for ttl-propagation attribute

2017-04-10 Thread David Ahern
On 4/10/17 8:36 AM, Robert Shearman wrote: > @@ -1184,6 +1192,20 @@ static int iproute_modify(int cmd, unsigned int flags, > int argc, char **argv) > > if (rta->rta_len > RTA_LENGTH(0)) > addraw_l(&req.n, 1024, RTA_DATA(rta), > RTA_PAYLOAD(rta

Re: Page allocator order-0 optimizations merged

2017-04-10 Thread zhong jiang
On 2017/4/10 23:10, Mel Gorman wrote: > On Mon, Apr 10, 2017 at 10:31:48PM +0800, zhong jiang wrote: >> Hi, Mel >> >> The patch I had test on arm64. I find the great degradation. I test it >> by micro-bench. >> The patrly data is as following. and it is stable. That stands for the >> a

[PATCH 02/10] ftgmac100: Use device "compatible" property, not machine.

2017-04-10 Thread Benjamin Herrenschmidt
We test for aspeed chips to handle a couple of special cases, but we do that by checking the machine type which isn't right. Instead check the actual device compatible property. This also updates the dtsi files for the aspeed SoC to match. Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot

Re: [PATCH 00/10] ftgmac100: Rework batch 4 - Misc

2017-04-10 Thread Benjamin Herrenschmidt
On Tue, 2017-04-11 at 11:04 +1000, Benjamin Herrenschmidt wrote: > This is the fourth batch of updates to the ftgmac100 driver. > > This is a bunch of misc cleanups and fixes, such as properly > disabling HW checksum generation on AST2400 where it's known > to be broken and some chip init updates.

[PATCH 10/10] ftgmac100: Set default ring sizes to 128 entries

2017-04-10 Thread Benjamin Herrenschmidt
I haven't seen any improvement above that size on the machines I've tested with. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethe

[PATCH 09/10] ftgmac100: Make ring sizes configurable via ethtool

2017-04-10 Thread Benjamin Herrenschmidt
We set an arbitrary max at 1024 since we pre-allocate the actual descriptor arrays and skb arrays to the full size to keep the code a bit simpler and avoid allocation failures in the reset task. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 204

[PATCH 08/10] ftgmac100: Add more register inits in ftgmac100_init_hw()

2017-04-10 Thread Benjamin Herrenschmidt
Clear stale interrupts on entry, configure FIFO sizes, set FIFO thresholds, configure interrupt mitigation. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/net/etherne

[PATCH 05/10] ftgmac100: Rename ftgmac100_set_mac to ftgmac100_write_mac_addr

2017-04-10 Thread Benjamin Herrenschmidt
To avoid confusion with the ndo callback and generally be clearer about the purpose of that function Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100

[PATCH 04/10] ftgmac100: Set netdev->hw_features

2017-04-10 Thread Benjamin Herrenschmidt
So features can be turned on/off via ethtool Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 3c

[PATCH 07/10] ftgmac100: Open code remaining register writes

2017-04-10 Thread Benjamin Herrenschmidt
The helpers just take space but don't provide much value. Simple one line comments are more explanatory. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 53 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/drive

[PATCH 06/10] ftgmac100: Rename ftgmac100_setup_mac to ftgmac100_initial_mac

2017-04-10 Thread Benjamin Herrenschmidt
To remove more confusion. This function is about obtaining the initial MAC address at driver probe time. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac1

[PATCH 03/10] ftgmac100: Disable HW checksum generation on AST2400, enable on others

2017-04-10 Thread Benjamin Herrenschmidt
We found out that HW checksum generation only works from AST2500 onward. This disables it on AST2400 and removes the "no-hw-checksum" properties in the device-trees. The problem we had wasn't related to NC-SI. Also rework the logic testing for that property so it can be used to disable HW checksum

[PATCH 01/10] ftgmac100: Upgrade to NETIF_F_HW_CSUM

2017-04-10 Thread Benjamin Herrenschmidt
The documentation describes NETIF_F_IP_CSUM as deprecated so let's switch to NETIF_F_HW_CSUM and use the helper to handle unhandled protocols. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --g

[PATCH 00/10] ftgmac100: Rework batch 4 - Misc

2017-04-10 Thread Benjamin Herrenschmidt
This is the fourth batch of updates to the ftgmac100 driver. This is a bunch of misc cleanups and fixes, such as properly disabling HW checksum generation on AST2400 where it's known to be broken and some chip init updates. This also adds the ability to turn HW checksum on/off and configure the r

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

2017-04-10 Thread David Miller
From: Michael Chan Date: Mon, 10 Apr 2017 14:47:04 -0700 > On Mon, Apr 10, 2017 at 2:30 PM, Andy Gospodarek wrote: >> On Mon, Apr 10, 2017 at 03:28:54PM -0400, David Miller wrote: >>> From: Andy Gospodarek >>> Date: Mon, 10 Apr 2017 14:39:35 -0400 >>> >>> > As promised, I did some testing today

Re: [PATCH] net: phy: micrel: KSZ9031: fix crash when statistic requested

2017-04-10 Thread Florian Fainelli
On 04/10/2017 04:33 PM, Grygorii Strashko wrote: > Now the command: > ethtool --phy-statistics eth0 > will cause system crash with meassage "Unable to handle kernel NULL pointer > dereference at virtual address 0010" from: > > (kszphy_get_stats) from [] (ethtool_get_phy_stats+0xd8/0x210

[PATCH] net: phy: micrel: KSZ9031: fix crash when statistic requested

2017-04-10 Thread Grygorii Strashko
Now the command: ethtool --phy-statistics eth0 will cause system crash with meassage "Unable to handle kernel NULL pointer dereference at virtual address 0010" from: (kszphy_get_stats) from [] (ethtool_get_phy_stats+0xd8/0x210) (ethtool_get_phy_stats) from [] (dev_ethtool+0x5b8/0x228

Re: net/ipv6: use-after-free in ipv6_sock_ac_close

2017-04-10 Thread Cong Wang
On Mon, Apr 10, 2017 at 7:28 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). > > Unfortunately it's not reproducible. > > ==

Re: net/ipv4: use-after-free in ip_check_mc_rcu

2017-04-10 Thread Cong Wang
On Mon, Apr 10, 2017 at 7:33 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). > > Unfortunately it's not reproducible. > > BUG: KASAN: use-after-free in ip_check_mc_

[PATCH] p54: Prevent from dereferencing null pointer when releasing SKB

2017-04-10 Thread Myungho Jung
Added NULL check to make __dev_kfree_skb_irq consistent with kfree family of functions. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289 Signed-off-by: Myungho Jung --- net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 7869ae3..2

Re: WARN_ON running XDP on virtio net device

2017-04-10 Thread David Ahern
On 4/10/17 3:37 PM, Michael S. Tsirkin wrote: > On Mon, Apr 10, 2017 at 03:21:53PM -0600, David Ahern wrote: >> I'm hitting a WARN_ON running XDP with virtio net: > I just sent a pull request. Would appreciate reports on whether > it helps. > it does.

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

2017-04-10 Thread Michael Chan
On Mon, Apr 10, 2017 at 2:30 PM, Andy Gospodarek wrote: > On Mon, Apr 10, 2017 at 03:28:54PM -0400, David Miller wrote: >> From: Andy Gospodarek >> Date: Mon, 10 Apr 2017 14:39:35 -0400 >> >> > As promised, I did some testing today with bnxt_en's implementation >> > of XDP and this one. >> >> Tha

[RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-10 Thread Florian Fainelli
A MDIO bus driver can set phy_mask to indicate which PHYs should be probed and which should not. Right now, of_mdiobus_register() always sets mdio->phy_mask to ~0 which means: don't probe anything yourself, and let the Device Tree scanning do it based on the availability of child nodes. When MDIO

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

2017-04-10 Thread Andy Gospodarek
On Mon, Apr 10, 2017 at 10:12:42PM +0200, Daniel Borkmann wrote: > On 04/10/2017 08:39 PM, Andy Gospodarek wrote: > [...] > > I ran this on a desktop-class system I have (i7-6700 CPU @ 3.40GHz) > > and used pktgen_sample03_burst_single_flow.sh from another system to > > throw ~6.5Mpps as a single U

Re: [PATCH] p54: add null pointer check before releasing socket buffer

2017-04-10 Thread Eric Dumazet
On Mon, Apr 10, 2017 at 2:22 PM, Christian Lamparter wrote: > Well, the patch could be as simple as this: > --- > diff --git a/net/core/dev.c b/net/core/dev.c > index 7869ae3837ca..44f7d5a1c67c 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -2450,6 +2450,9 @@ void __dev_kfree_skb_irq(s

Re: WARN_ON running XDP on virtio net device

2017-04-10 Thread Michael S. Tsirkin
On Mon, Apr 10, 2017 at 03:21:53PM -0600, David Ahern wrote: > I'm hitting a WARN_ON running XDP with virtio net: I just sent a pull request. Would appreciate reports on whether it helps. > [ 177.185570] [ cut here ] > [ 177.187250] WARNING: CPU: 0 PID: 880 at > /home/ds

[PULL] vhost: cleanups and fixes

2017-04-10 Thread Michael S. Tsirkin
These changes were as in linux-next as e1c287efcd4cf688564ed1112d032b5dac29b159 - I tweaked the commit log slightly. Too many people were complaining of warnings and errors in virtio so I decided revert is the safest path forward right now. The following changes since commit a71c9a1c779f2499fb2a

Re: [PATCH v2] cfg80211: Fix array-bounds warning in fragment copy

2017-04-10 Thread Matthias Kaehlcke
El Mon, Mar 27, 2017 at 12:58:22PM -0700 Matthias Kaehlcke ha dit: > __ieee80211_amsdu_copy_frag intentionally initializes a pointer to > array[-1] to increment it later to valid values. clang rightfully > generates an array-bounds warning on the initialization statement. > > Initialize the point

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

2017-04-10 Thread Andy Gospodarek
On Mon, Apr 10, 2017 at 03:34:56PM -0400, David Miller wrote: > From: Andy Gospodarek > Date: Mon, 10 Apr 2017 14:39:35 -0400 > > > I also noted that... > > > > xdp1 not parsing the protocol correctly. All traffic was showing up as > > protocol '0' instead of '17' in the output. > > > > xdp

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

2017-04-10 Thread Andy Gospodarek
On Mon, Apr 10, 2017 at 03:28:54PM -0400, David Miller wrote: > From: Andy Gospodarek > Date: Mon, 10 Apr 2017 14:39:35 -0400 > > > As promised, I did some testing today with bnxt_en's implementation > > of XDP and this one. > > Thanks a lot Andy, obviously the patch needs some more work. > > I

Darlehen angebot 3 %

2017-04-10 Thread Frau SCHMIDT
Sehr geehrte Damen und Herren, Haben Sie Interesse über einer finanziellen Darlehen zu 3%? kontaktieren Sie mich für mehr Details und Bedingungen. ich kann all jenen helfen, wer ein Darlehen benötigen. Ich kann Ihnen biete ein darlehen in hohe von 10.000.000 EUR Meine mail: info@rschmidt.onli

Re: [PATCH] mm, page_alloc: re-enable softirq use of per-cpu page allocator

2017-04-10 Thread Andrew Morton
On Mon, 10 Apr 2017 16:08:21 +0100 Mel Gorman wrote: > IRQ context were excluded from using the Per-Cpu-Pages (PCP) lists caching > of order-0 pages in commit 374ad05ab64d ("mm, page_alloc: only use per-cpu > allocator for irq-safe requests"). > > This unfortunately also included excluded SoftI

Re: WARN_ON running XDP on virtio net device

2017-04-10 Thread Michael S. Tsirkin
On Mon, Apr 10, 2017 at 03:21:53PM -0600, David Ahern wrote: > I'm hitting a WARN_ON running XDP with virtio net: > > [ 177.185570] [ cut here ] > [ 177.187250] WARNING: CPU: 0 PID: 880 at > /home/dsa/kernel.git/drivers/pci/msi.c:1251 pci_irq_vector+0x92/0x123 > [ 177.19

WARN_ON running XDP on virtio net device

2017-04-10 Thread David Ahern
I'm hitting a WARN_ON running XDP with virtio net: [ 177.185570] [ cut here ] [ 177.187250] WARNING: CPU: 0 PID: 880 at /home/dsa/kernel.git/drivers/pci/msi.c:1251 pci_irq_vector+0x92/0x123 [ 177.190932] Modules linked in: 8021q garp mrp stp llc vrf [ 177.193473] CPU: 0

Re: [PATCH] p54: add null pointer check before releasing socket buffer

2017-04-10 Thread Christian Lamparter
On Monday, April 10, 2017 1:54:14 PM CEST Myungho Jung wrote: > On Mon, Apr 10, 2017 at 02:12:54PM +0200, Christian Lamparter wrote: > > On Sunday, April 9, 2017 10:23:20 PM CEST Myungho Jung wrote: > > > Kernel panic is caused by trying to dereference null pointer. Check if > > > the pointer is nu

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

2017-04-10 Thread Daniel Borkmann
On 04/09/2017 10:35 PM, David Miller wrote: [...] diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index cc07c3b..f8ff49c 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1892,6 +1892,7 @@ struct net_device { struct lock_class_key *qdisc_tx_bu

Re: net: use-after-free in __ns_get_path

2017-04-10 Thread Cong Wang
On Mon, Apr 10, 2017 at 7:37 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). > > Unfortunately it's not reproducible. > > ==

Re: [PATCH] p54: add null pointer check before releasing socket buffer

2017-04-10 Thread Myungho Jung
On Mon, Apr 10, 2017 at 02:12:54PM +0200, Christian Lamparter wrote: > (Added linux-wireless, since this is a wireless driver) > > On Sunday, April 9, 2017 10:23:20 PM CEST Myungho Jung wrote: > > Kernel panic is caused by trying to dereference null pointer. Check if > > the pointer is null before

Re: [PATCH] mm, page_alloc: re-enable softirq use of per-cpu page allocator

2017-04-10 Thread Jesper Dangaard Brouer
I will appreciate review of this patch. My micro-benchmarking show we basically return to same page alloc+free cost as before 374ad05ab64d ("mm, page_alloc: only use per-cpu allocator for irq-safe requests"). Which sort of invalidates this attempt of optimizing the page allocator. But Mel's micro-

Distinguishing between forwarded/bridged packets and locally generated packets

2017-04-10 Thread Anthony Lineham
Hi, I'm trying to find a way to distinguish between a packet that is being forwarded/bridged and one that was locally generated by the host itself. I need to know this for a particular application at tx in an ethernet device driver. Forwarded/bridged packets are processed when received, but I

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

2017-04-10 Thread Daniel Borkmann
On 04/10/2017 08:39 PM, Andy Gospodarek wrote: [...] I ran this on a desktop-class system I have (i7-6700 CPU @ 3.40GHz) and used pktgen_sample03_burst_single_flow.sh from another system to throw ~6.5Mpps as a single UDP stream towards the system running XDP. I just commented out the ndo_xdp op

Re: [PATCH net v3 0/2] bridge: Fix kernel oops during bridge creation

2017-04-10 Thread Stephen Hemminger
On Mon, 10 Apr 2017 14:59:26 +0300 ido...@idosch.org wrote: > From: Ido Schimmel > > First patch adds a missing ndo_uninit() in the bridge driver, which is a > prerequisite for the second patch that actually fixes the oops. > > Please consider both patches for 4.4.y, 4.9.y and 4.10.y > > Ido S

Re: [PATCH v2 00/12] ftgmac100: Rework batch 3 - TX path

2017-04-10 Thread David Miller
From: Benjamin Herrenschmidt Date: Mon, 10 Apr 2017 11:15:14 +1000 > This is version 2 of the third batch of updates to > the ftgmac100 driver. > > This one tackles the TX path of the driver. This provides the > bulk of the performance improvements by adding support for > fragmented sends along

Re: [PATCH 0/6] mvmdio updates

2017-04-10 Thread Marcin Wojtas
Hi Russel, 2017-04-10 17:27 GMT+02:00 Russell King - ARM Linux : > This series of patches update mvmdio for Armada 8k CP110. A number of > issues were found: > > 1. The driver fails to disable an interrupt when something goes wrong >in the probe function. > > 2. The interrupt is specified in

Re: [PATCH 5/6] dt-bindings: allow up to three clocks for orion-mdio

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:25PM +0100, Russell King wrote: > Armada 8040 needs three clocks to be enabled for MDIO accesses to work. > Update the binding to allow the extra clocks to be specified. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn Andrew

[PATCH nf-next] ipset: remove unused function __ip_set_get_netlink

2017-04-10 Thread Aaron Conole
There are no in-tree callers. Signed-off-by: Aaron Conole --- net/netfilter/ipset/ip_set_core.c | 8 1 file changed, 8 deletions(-) diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index c296f9b..68ba531 100644 --- a/net/netfilter/ipset/ip_set_core.c

[PATCH nf-next] ipvs: remove unused function ip_vs_set_state_timeout

2017-04-10 Thread Aaron Conole
There are no in-tree callers of this function and it isn't exported. Signed-off-by: Aaron Conole --- include/net/ip_vs.h | 2 -- net/netfilter/ipvs/ip_vs_proto.c | 22 -- 2 files changed, 24 deletions(-) diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h in

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

2017-04-10 Thread Daniel Borkmann
On 04/10/2017 04:18 AM, Alexei Starovoitov wrote: [...] + xdp.data_end = xdp.data + hlen; + xdp.data_hard_start = xdp.data - skb_headroom(skb); + orig_data = xdp.data; + act = bpf_prog_run_xdp(xdp_prog, &xdp); + + off = xdp.data - orig_data; + if (off) +

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

2017-04-10 Thread David Miller
From: Andy Gospodarek Date: Mon, 10 Apr 2017 14:39:35 -0400 > I also noted that... > > xdp1 not parsing the protocol correctly. All traffic was showing up as > protocol '0' instead of '17' in the output. > > xdp2 was not actually sending the frames back out when using this patch. > > I'll

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

2017-04-10 Thread David Miller
From: Alexei Starovoitov Date: Sun, 9 Apr 2017 19:18:09 -0700 > On Sun, Apr 09, 2017 at 01:35:28PM -0700, David Miller wrote: >> +if (skb_linearize(skb)) >> +goto do_drop; > > do we need to force disable gro ? I think we do. > Otherwise if we linearize skb_is_gso packet it will

Re: [PATCH 6/6] net: mvmdio: allow up to three clocks to be specified for orion-mdio

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:31PM +0100, Russell King wrote: > Allow up to three clocks to be specified and enabled for the orion-mdio > interface, which are required for this interface to be accessible on > Armada 8k platforms. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn And

Re: Horrid balance-rr bonding udp throughput

2017-04-10 Thread Eric Dumazet
On Mon, 2017-04-10 at 14:50 -0400, Jarod Wilson wrote: > On 2017-04-08 7:33 PM, Jarod Wilson wrote: > > I'm digging into some bug reports covering performance issues with > > balance-rr, and discovered something even worse than the reporter. My > > test setup has a pair of NICs, one e1000e, one e

Re: [PATCH 4/6] net: mvmdio: disable interrupt if resource size is too small

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:20PM +0100, Russell King wrote: > Disable the MDIO interrupt, falling back to polled mode, if the resource > size does not allow us to access the interrupt registers. All current > DT bindings use a size of 0x84, which allows access, but verifying it is > good practic

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

2017-04-10 Thread David Miller
From: Andy Gospodarek Date: Mon, 10 Apr 2017 14:39:35 -0400 > As promised, I did some testing today with bnxt_en's implementation > of XDP and this one. Thanks a lot Andy, obviously the patch needs some more work. I noticed GRO stuff in your profile, and Alexei mentioned this earlier today. We

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

2017-04-10 Thread Stephen Hemminger
On Sun, 09 Apr 2017 13:35:28 -0700 (PDT) David Miller wrote: > This provides a generic non-optimized XDP implementation when the > device driver does not provide an optimized one. > > It is arguable that perhaps I should have required something like > this as part of the initial XDP feature merg

Re: [PATCH 3/6] dt-bindings: correct marvell orion MDIO binding document

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:15PM +0100, Russell King wrote: > Correct the Marvell Orion MDIO binding document to properly reflect the > cases where an interrupt is present. Augment the examples to show this. > > Signed-off-by: Russell King Reviewed-by: Andrew Lunn Andrew

Re: [PATCH 2/6] net: mvmdio: fix interrupt disable in remove path

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:09PM +0100, Russell King wrote: > The pre-existing write to disable interrupts on the remove path happens > whether we have an interrupt or not. While this may seem to be a good > idea, this driver is re-used in many different implementations, some > where the binding

Re: [PATCH 1/6] net: mvmdio: disable interrupts in driver failure path

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 04:28:04PM +0100, Russell King wrote: > When the mvmdio driver has an interrupt, it enables the "done" interrupt > after requesting its interrupt handler. However, probe failure results > in the interrupt being left enabled. Disable it on the failure path. > > Signed-off-

Re: af_packet: use after free in prb_retire_rx_blk_timer_expired

2017-04-10 Thread Dave Jones
On Mon, Apr 10, 2017 at 07:03:30PM +, alexander.le...@verizon.com wrote: > Hi all, > > I seem to be hitting this use-after-free on a -next kernel using trinity: > > [ 531.036054] BUG: KASAN: use-after-free in prb_retire_rx_blk_timer_expired > (net/packet/af_packet.c:688)

af_packet: use after free in prb_retire_rx_blk_timer_expired

2017-04-10 Thread alexander . levin
Hi all, I seem to be hitting this use-after-free on a -next kernel using trinity: [ 531.036054] BUG: KASAN: use-after-free in prb_retire_rx_blk_timer_expired (net/packet/af_packet.c:688) [ 531.036961] Read of size 8 at addr 88038c1fb0e8

Re: Horrid balance-rr bonding udp throughput

2017-04-10 Thread Ben Greear
On 04/10/2017 11:50 AM, Jarod Wilson wrote: On 2017-04-08 7:33 PM, Jarod Wilson wrote: I'm digging into some bug reports covering performance issues with balance-rr, and discovered something even worse than the reporter. My test setup has a pair of NICs, one e1000e, one e1000 (but dual e1000e s

Re: Horrid balance-rr bonding udp throughput

2017-04-10 Thread Jarod Wilson
On 2017-04-08 7:33 PM, Jarod Wilson wrote: I'm digging into some bug reports covering performance issues with balance-rr, and discovered something even worse than the reporter. My test setup has a pair of NICs, one e1000e, one e1000 (but dual e1000e seems the same). When I do a test run in LNST

[PATCH net] xfrm: calculate L4 checksums also for GSO case before encrypting packets

2017-04-10 Thread Ansis Atteka
Otherwise, if L4 checksum calculation is done after encryption, then all ESP packets end up being corrupted at the location where pre-encryption L4 checksum field resides. One of the ways to reproduce this bug is to have a VM with virtio_net driver (UFO set to ON in the guest VM); and then encapsu

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

2017-04-10 Thread Andy Gospodarek
On Sun, Apr 09, 2017 at 01:35:28PM -0700, David Miller wrote: > > This provides a generic non-optimized XDP implementation when the > device driver does not provide an optimized one. > > It is arguable that perhaps I should have required something like > this as part of the initial XDP feature me

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 17:40 +0200, Johannes Berg wrote: > > Another thought: if we add a new flag that indicates "message has > been capped", which we introduce in this same patch, then we can > disentangle this more easily, right? > > Adding a new flag for "TLVs present" won't really help, but i

[PATCH net-next] net: stmmac: set total length of the packet to be transmitted in TDES3

2017-04-10 Thread Niklas Cassel
From: Niklas Cassel Field FL/TPL in register TDES3 is not correctly set on GMAC4. TX appears to be functional on GMAC 4.10a even if this field is not set, however, to avoid relying on undefined behavior, set the length in TDES3. The field has a different meaning depending on if the TSE bit in TD

RFC: Checksum offload and XDP

2017-04-10 Thread Tom Herbert
Not having checksum offload in XDP is going to get more painful once we start seeing a lot programs doing packet modifications. One nice thing we do for ILA router is pre-compute the checksum delta necessary to maintain checksum neutral property in the packet. So that after doing ILA routing in XDP

Re: [PATCH rfc 0/6] Automatic affinity settings for nvme over rdma

2017-04-10 Thread Steve Wise
On 4/2/2017 8:41 AM, Sagi Grimberg wrote: This patch set is aiming to automatically find the optimal queue <-> irq multi-queue assignments in storage ULPs (demonstrated on nvme-rdma) based on the underlying rdma device irq affinity settings. First two patches modify mlx5 core driver to use gener

Re: net/ipv4: use-after-free in ip_queue_xmit

2017-04-10 Thread Andrey Konovalov
On Mon, Apr 10, 2017 at 7:42 PM, Cong Wang wrote: > On Mon, Apr 10, 2017 at 7:40 AM, Andrey Konovalov > wrote: >> Hi, >> >> I've got the following error report while fuzzing the kernel with syzkaller. >> >> On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). >> >> Unfortunately it's n

Re: net/ipv4: use-after-free in ip_queue_xmit

2017-04-10 Thread Cong Wang
On Mon, Apr 10, 2017 at 7:40 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 39da7c509acff13fc8cb12ec1bb20337c988ed36 (4.11-rc6). > > Unfortunately it's not reproducible. > > BUG: KASAN: use-after-free in ip_select_tt

[PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc.

2017-04-10 Thread Simon Horman
From: Varsha Rao Replace kzalloc with kcalloc. As kcalloc is preferred for allocating an array instead of kzalloc. This patch fixes the checkpatch issue. Signed-off-by: Varsha Rao --- net/netfilter/ipvs/ip_vs_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ne

[PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension

2017-04-10 Thread Simon Horman
From: Florian Westphal Check for the NAT status bits, they are set once conntrack needs NAT in source or reply direction, this is slightly faster than nfct_nat() as that has to check the extension area. Signed-off-by: Florian Westphal --- net/netfilter/ipvs/ip_vs_ftp.c | 2 +- 1 file changed

[PATCH 3/3] ipvs: remove unused variable

2017-04-10 Thread Simon Horman
From: Arushi Singhal This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signe

[GIT 0/3] Second Round of IPVS Updates for v4.12

2017-04-10 Thread Simon Horman
Hi Pablo, please consider these clean-ups and enhancements to IPVS for v4.12. * Removal unused variable * Use kzalloc where appropriate * More efficient detection of presence of NAT extension The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8: Merge branch 'qed-IOV-c

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

2017-04-10 Thread Willem de Bruijn
>> static int netif_receive_skb_internal(struct sk_buff *skb) >> { >> int ret; >> @@ -4258,6 +4336,21 @@ static int netif_receive_skb_internal(struct sk_buff >> *skb) >> >> rcu_read_lock(); >> >> + if (static_key_false(&generic_xdp_needed)) { >> + struct bpf_prog *xdp

Re: [PATCH] ipv6: Fix idev->addr_list corruption

2017-04-10 Thread David Ahern
On 4/10/17 12:36 AM, Rabin Vincent wrote: > From: Rabin Vincent > > addrconf_ifdown() removes elements from the idev->addr_list without > holding the idev->lock. > > If this happens while the loop in __ipv6_dev_get_saddr() is handling the > same element, that function ends up in an infinite loop

Re: [PATCH net-next v3 2/2] bpf: remove struct bpf_map_type_list

2017-04-10 Thread Daniel Borkmann
On 04/10/2017 02:44 PM, Johannes Berg wrote: From: Johannes Berg There's no need to have struct bpf_map_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have a

Re: [PATCH net-next v3 1/2] bpf: remove struct bpf_prog_type_list

2017-04-10 Thread Daniel Borkmann
On 04/10/2017 02:44 PM, Johannes Berg wrote: From: Johannes Berg There's no need to have struct bpf_prog_type_list since it just contains a list_head, the type, and the ops pointer. Since the types are densely packed and not actually dynamically registered, it's much easier and smaller to have

[PATCH net-next] cxgb4: save tid while creating server filter

2017-04-10 Thread Ganesh Goudar
Save the filter tid while creating the server filter, which is used later to retrieve the corresponding filter instance while handling the filter reply. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 1 file changed, 4 insertions(+) diff --git a/driver

Re: [PATCH net-next 1/8] rtnetlink: Do not generate notifications for MTU events

2017-04-10 Thread David Ahern
On 4/10/17 9:39 AM, Vlad Yasevich wrote: > OK, so this will work for the events that are generated as a result of device > state change > (like mtu, address, and others). > > However, the original event data may be needed for other events that may be > of use to userspace like NETDEV_NOTIFY_PEERS

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 09:35 -0600, David Ahern wrote: > > Do you have any better ideas? > > NETLINK_F_CAP_ACK and NETLINK_F_EXT_ACK should be incompatible -- if > one is set the other can not be set. CAP_ACK means abbreviate the > response and EXT_ACK means give me more data. So you mean if I wa

Re: [PATCH net-next 1/8] rtnetlink: Do not generate notifications for MTU events

2017-04-10 Thread Vlad Yasevich
On 04/08/2017 02:18 PM, Roopa Prabhu wrote: > On 4/8/17, 11:13 AM, David Ahern wrote: >> On 4/8/17 2:06 PM, Roopa Prabhu wrote: >>> On 4/7/17, 2:25 PM, David Ahern wrote: Changing MTU on a link currently causes 3 messages to be sent to userspace: [LINK]11: dummy1: mtu 1490 qdisc noq

  1   2   >