Re: [PATCH v4 net-next 00/10] net/ncsi: Add debugging functionality

2017-05-03 Thread Gavin Shan
On Wed, May 03, 2017 at 01:25:18AM -0400, David Miller wrote: > >Sorry, the net-next tree is closed right now as we are in the merge >window. > >Please resubmit this when the net-next tree opens back up. > >Thank you. > Sorry that I didn't catch the merge window. Thanks for the tip. I'll resubmit

Re: [PATCH v4 net-next 00/10] net/ncsi: Add debugging functionality

2017-05-03 Thread Gavin Shan
On Wed, May 03, 2017 at 02:58:02PM +0200, Andrew Lunn wrote: >On Wed, May 03, 2017 at 02:44:31PM +1000, Gavin Shan wrote: >> This series supports NCSI debugging infrastructure by adding several >> ethtool commands and one debugfs file. It was inspired by the reported >> issues: No available

Re: [PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-03 Thread Gavin Shan
On Wed, May 03, 2017 at 08:16:43PM -0400, David Miller wrote: >From: Gavin Shan >Date: Thu, 4 May 2017 10:05:34 +1000 >> On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote: >>>From: Andrew Lunn >>>Date: Wed, 3 May 2017 14:47:22 +0200 >>>

Re: Maximum MPLS labels on Linux network stack

2017-05-03 Thread Joe Stringer
On 3 May 2017 at 14:29, Алексей Болдырев wrote: > As I understand it, it's enough to just set the variable in the source > #define FLOW_MAX_MPLS_LABELS 3 > on > #define FLOW_MAX_MPLS_LABELS 7 > Or is there somehow still pitfalls? You'll probably need to update

Fw: [Bug 195647] New: Slab corruption with network packet poison data

2017-05-03 Thread Stephen Hemminger
Begin forwarded message: Date: Wed, 03 May 2017 13:37:39 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 195647] New: Slab corruption with network packet poison data https://bugzilla.kernel.org/show_bug.cgi?id=195647 Bug ID: 195647

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread Cong Wang
On Wed, May 3, 2017 at 11:22 AM, David Ahern wrote: > On 5/3/17 11:02 AM, Cong Wang wrote: >> A quick glance shows we need to simply check local->rt6i_idev >> since we do the same check for sprt right above. > > As I recall, rt6i_idev is set for all routes except null_entry and

[PATCH] rtlwifi: fix spelling mistake: "Pairwiase" -> "Pairwise"

2017-05-03 Thread Colin King
From: Colin Ian King trivial fixes to spelling mistakes in RT_TRACE messages. Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 2 +-

[PATCH net-next 13/15] netvsc: convert open count from atomic to refcount

2017-05-03 Thread Stephen Hemminger
Refcount provides wraparond protection. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc.c | 3 ++- drivers/net/hyperv/rndis_filter.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 10/15] netvsc: replace modulus with mask for alignment

2017-05-03 Thread Stephen Hemminger
Since packet alignment (pkt_align) is always a power of 2, it is safe to replace expensive divide with shift. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c

[PATCH net-next 03/15] netvsc: make sure napi enabled before vmbus_open

2017-05-03 Thread Stephen Hemminger
This fixes a race where vmbus callback for new packet arriving could occur before NAPI is initialized. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 8 +--- drivers/net/hyperv/rndis_filter.c | 2 +- 2 files changed, 6 insertions(+), 4

[PATCH net-next 00/15] netvsc: misc patches

2017-05-03 Thread Stephen Hemminger
Mostly these are performance related. There is also one bug fix for incorrect handling of NAPI on device removal Stephen Hemminger (15): vmbus: simplify hv_ringbuffer_read vmbus: fix unnecessary signal events as result of NAPI netvsc: make sure napi enabled before vmbus_open netvsc: don't

[PATCH net-next 02/15] vmbus: fix unnecessary signal events as result of NAPI

2017-05-03 Thread Stephen Hemminger
With NAPI, the ring buffer is processed in incremental steps so the read index needs to be updated after each section. But this can lead to lots of bogus vmbus signal events which hurts performance. This patch rearranges the host incoming signalling logic to be more complete and eliminate

[PATCH net-next 06/15] netvsc: prefetch the first incoming ring element

2017-05-03 Thread Stephen Hemminger
In interrupt handler, prefetch the first incoming ring element so that it is in cache by the time NAPI poll gets to it. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 08/15] netvsc: allow overriding send/recv buffer size

2017-05-03 Thread Stephen Hemminger
The default value of send and receive buffer area for host DMA is much larger than it needs to be. Experimentation shows that a much smaller buffer still keeps same performance; change from 16M buffer to 4M receive and 1M send. Make the size a module parameter so that it can be adjusted as needed

[PATCH net-next 09/15] netvsc: optimize netvsc_send_pkt

2017-05-03 Thread Stephen Hemminger
Hand optimize netvsc_send_pkt by adding likely/unlikely. Also don't print pointer in warning message, instead dump info. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff

[PATCH net-next 04/15] netvsc: don't reacquire rtnl on device removal

2017-05-03 Thread Stephen Hemminger
Since rtnl_lock is already held in netvsc_remove, it is easier to just call unregister_netdevice which expects RTNL. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH net-next 05/15] netvsc: optimize avail percent calculation

2017-05-03 Thread Stephen Hemminger
Only need to look at write space (not read space) when computing percent available. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c

[PATCH net-next 01/15] vmbus: simplify hv_ringbuffer_read

2017-05-03 Thread Stephen Hemminger
With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified. Signed-off-by: Stephen Hemminger --- drivers/hv/ring_buffer.c | 122 +++ 1 file changed, 18 insertions(+), 104

[PATCH net-next 07/15] netvsc: convert ring_size to unsigned

2017-05-03 Thread Stephen Hemminger
The ring size module parameter is unsigned not integer. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 5 ++--- drivers/net/hyperv/netvsc.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 8 3 files changed, 7 insertions(+), 8 deletions(-)

[PATCH net-next 11/15] netvsc: reduce unnecessary memset

2017-05-03 Thread Stephen Hemminger
Only part of the headroom maybe used on typical packet. Avoid doing memset of whole area. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c

[PATCH 15/15] netvsc: use vzalloc_node for receive completion data

2017-05-03 Thread Stephen Hemminger
Put the receive completion ring on the NUMA node of the CPU assigned to the channel. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 3 +++ drivers/net/hyperv/netvsc.c | 30 +++--- drivers/net/hyperv/rndis_filter.c

[PATCH net-next 12/15] netvsc: size receive completion ring based on receive area

2017-05-03 Thread Stephen Hemminger
Now that receive area is parameterized, also need to adjust the size of the ring for receive completions based on receive area. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 4 +--- drivers/net/hyperv/netvsc.c | 22 ++

[PATCH net] netvsc: make sure napi enabled before vmbus_open

2017-05-03 Thread Stephen Hemminger
This fixes a race where vmbus callback for new packet arriving could occur before NAPI is initialized. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 8 +--- drivers/net/hyperv/rndis_filter.c | 2 +- 2 files changed, 6 insertions(+), 4

Re: [PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-03 Thread David Miller
From: Gavin Shan Date: Thu, 4 May 2017 10:05:34 +1000 > On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote: >>From: Andrew Lunn >>Date: Wed, 3 May 2017 14:47:22 +0200 >> >>> On Wed, May 03, 2017 at 02:44:37PM +1000, Gavin Shan wrote:

Re: [PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-03 Thread Andrew Lunn
On Thu, May 04, 2017 at 10:05:34AM +1000, Gavin Shan wrote: > On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote: > >From: Andrew Lunn > >Date: Wed, 3 May 2017 14:47:22 +0200 > > > >> On Wed, May 03, 2017 at 02:44:37PM +1000, Gavin Shan wrote: > >>> This adds ethtool

Re: [PATCH net] net: ipv6: Do not duplicate DAD on link up

2017-05-03 Thread Cong Wang
On Wed, May 3, 2017 at 2:29 PM, David Ahern wrote: > On 5/3/17 3:22 PM, Cong Wang wrote: >>> Andrey's reproducer program runs in a very tight loop, calling >>> 'unshare -n' and then spawning 2 sets of 14 threads running random ioctl >>> calls. The relevant networking sequence:

[RFC] iproute: Add support for extended ack to rtnl_talk

2017-05-03 Thread Stephen Hemminger
Add support for extended ack error reporting via libmnl. This is a better alternative to use existing library and not copy/paste code from the kernel. Also make arguments const where possible. Add a new function rtnl_talk_extack that takes a callback as an input arg. If a netlink response

Re: [PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-03 Thread Gavin Shan
On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote: >From: Andrew Lunn >Date: Wed, 3 May 2017 14:47:22 +0200 > >> On Wed, May 03, 2017 at 02:44:37PM +1000, Gavin Shan wrote: >>> This adds ethtool command (ETHTOOL_GNCSISTATS) to retrieve the >>> NCSI hardware statistics.

Re: [PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-03 Thread Andrew Lunn
> +void ncsi_ethtool_register_dev(struct net_device *dev) > +{ > + struct ethtool_ops *ops; > + > + ops = (struct ethtool_ops *)(dev->ethtool_ops); Why do you need the cast here? Ah, is it because net_device has: const struct ethtool_ops *ethtool_ops; i.e. you are casting off

Re: [PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-03 Thread Gavin Shan
On Thu, May 04, 2017 at 02:34:52AM +0200, Andrew Lunn wrote: >On Thu, May 04, 2017 at 10:05:34AM +1000, Gavin Shan wrote: >> On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote: >> >From: Andrew Lunn >> >Date: Wed, 3 May 2017 14:47:22 +0200 >> > >> >> On Wed, May 03, 2017

Re: [4.9.13] use after free in ipv4_mtu

2017-05-03 Thread Daniel J Blueman
On 6 March 2017 at 21:45, Eric Dumazet wrote: > On Mon, 2017-03-06 at 14:33 +0800, Daniel J Blueman wrote: >> On 2 March 2017 at 21:28, Eric Dumazet wrote: >> > On Thu, 2017-03-02 at 05:08 -0800, Eric Dumazet wrote: >> > >> >> Thanks for the report

Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2017-05-03 Thread Luis R. Rodriguez
On Wed, May 03, 2017 at 09:02:20PM +0200, Arend Van Spriel wrote: > On 3-1-2017 18:59, Luis R. Rodriguez wrote: > > On Mon, Dec 26, 2016 at 05:35:59PM +0100, Pavel Machek wrote: > >> > >> Right question is "should we solve it without user-space help"? > >> > >> Answer is no, too. Way too complex.

new warning at net/wireless/util.c:1236

2017-05-03 Thread Linus Torvalds
So my Dell XPS 13 seems to have grown a new warning as of the networking merge yesterday. Things still work, but when it starts warning, it generates a *lot* of noise (I got 36 of these within about ten minutes). I have no idea what triggered it, because when I rebooted (not because of this

Re: [PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-03 Thread Alexei Starovoitov
On 5/3/17 10:35 AM, David Miller wrote: From: Alexei Starovoitov Date: Wed, 3 May 2017 09:54:42 -0700 /usr/include/asm/types.h -> asm-generic/int-ll64.h as far as I can see that should be the same on most archs. Why doesn't it work for sparc? You can't assume anything about the

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread Cong Wang
On Wed, May 3, 2017 at 7:43 PM, David Ahern wrote: > On 5/3/17 5:35 PM, Cong Wang wrote: >> Ah, we need: >> >> @@ -4024,7 +4027,7 @@ static struct pernet_operations ip6_route_net_late_ops >> = { >> >> static struct notifier_block ip6_route_dev_notifier = { >>

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 9:55 PM, Cong Wang wrote: > Why not add a printk and play with my patch to see the difference? I have other things to do. If you believe your patch fixes the problem, send it and let Andrey verify.

Re: Maximum MPLS labels on Linux network stack

2017-05-03 Thread David Ahern
On 5/3/17 2:21 PM, Joe Stringer wrote: >> • 8192 MPLS labels >> >> Especially interested in the figure 8192 MPLS Labels. The 8k labels has to be 8k individual routes with a single label (or a few labels in the stack for the route). In that case you can set net.mpls.platforms_labels to 10001 and

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 5:35 PM, Cong Wang wrote: > Ah, we need: > > @@ -4024,7 +4027,7 @@ static struct pernet_operations ip6_route_net_late_ops > = { > > static struct notifier_block ip6_route_dev_notifier = { > .notifier_call = ip6_route_dev_notify, > - .priority = 0, > + .priority =

RE: FEC on i.MX 7 transmit queue timeout

2017-05-03 Thread Andy Duan
From: Stefan Agner Sent: Thursday, May 04, 2017 9:22 AM >To: Andy Duan >Cc: fugang.d...@freescale.com; feste...@gmail.com; >netdev@vger.kernel.org; netdev-ow...@vger.kernel.org >Subject: Re: FEC on i.MX 7 transmit queue timeout > >Hi Andy, > >On 2017-04-20

Re: FEC on i.MX 7 transmit queue timeout

2017-05-03 Thread Stefan Agner
Hi Andy, On 2017-04-20 19:48, Andy Duan wrote: > On 2017年04月20日 07:15, Stefan Agner wrote: >> I tested again with imx6sx-fec compatible string. I could reproduce it >> on a Colibri with i.MX 7Dual. But not always: It really depends whether >> queue 2 is counting up or not. Just after boot, I

Re: [PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-03 Thread Gavin Shan
On Thu, May 04, 2017 at 02:49:33AM +0200, Andrew Lunn wrote: >> +void ncsi_ethtool_register_dev(struct net_device *dev) >> +{ >> +struct ethtool_ops *ops; >> + >> +ops = (struct ethtool_ops *)(dev->ethtool_ops); > >Why do you need the cast here? > >Ah, is it because net_device has: > >

Miss it//Re: [PATCH v3] iov_iter: don't revert iov buffer if csum error

2017-05-03 Thread Ding Tianhong
Miss it, it is already in the kernel tree, sorry for the noisy. On 2017/5/3 15:02, Ding Tianhong wrote: > The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve > ->msg_iter on error) will revert the iov buffer if copy to iter > failed, but it didn't copy any datagram if the

Re: [net-next PATCH 1/4] samples/bpf: adjust rlimit RLIMIT_MEMLOCK for traceex2, tracex3 and tracex4

2017-05-03 Thread Jesper Dangaard Brouer
On Tue, 2 May 2017 17:53:16 -0700 Alexei Starovoitov wrote: > On Tue, May 02, 2017 at 02:31:50PM +0200, Jesper Dangaard Brouer wrote: > > Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf > > samples > > as these are using more and larger maps

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-03 Thread Giuseppe CAVALLARO
Hello Thomas this was initially set by using the hw->link.port; both the core_init and adjust callback should invoke the hook and tuning the PS bit according to the speed and mode. So maybe the ->set_ps is superfluous and you could reuse the existent hook let me know Regards peppe On

Re:

2017-05-03 Thread H.A
With profound love in my heart, I Kindly Oblige your interest to very important proposal.. It is Truly Divine and require your utmost attention.. S hlubokou láskou v mém srdci, Laskave jsem prinutit svuj zájem k návrhu .. Je velmi duležité, skutecne Divine a vyžadují vaši nejvyšší

[PATCH] brcmfmac: btcoex: replace init_timer with setup_timer

2017-05-03 Thread Xie Qirong
Signed-off-by: Xie Qirong --- setup_timer.cocci suggested the following improvement: drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384. Patch was compile checked with: x86_64_defconfig +

Re: ipsec doesn't route TCP with 4.11 kernel

2017-05-03 Thread Steffen Klassert
On Fri, Apr 28, 2017 at 09:46:42AM -0700, Eric Dumazet wrote: > On Fri, 2017-04-28 at 09:13 +0200, Steffen Klassert wrote: > > encap type espinudp sport 4500 dport 4500 addr 0.0.0.0 > > > > Ok, this is espinudp. This information was important. > > > This is not a GRO issue as I thought,

[PATCH 1/1] net: usb: qmi_wwan: add Telit ME910 support

2017-05-03 Thread Daniele Palmas
This patch adds support for Telit ME910 PID 0x1100. Signed-off-by: Daniele Palmas --- 0x1100 composition is: tty + qdss + tty + rmnet Following lsusb output: Bus 003 Device 018: ID 1bc7:1100 Telit Wireless Solutions Device Descriptor: bLength18

RE: [PATCH] Fix for new version of realtek r8153

2017-05-03 Thread Hayes Wang
jake Briggs [mailto:nexus...@gmail.com] > Sent: Wednesday, May 03, 2017 7:21 AM [...] > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index 07f788c49d57..2a55459fdfac 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -4277,6 +4277,7 @@ static void

Re: [PATCH 0/9] net: thunderx: Adds XDP support

2017-05-03 Thread Sunil Kovvuri
On Wed, May 3, 2017 at 1:17 AM, David Miller wrote: > From: sunil.kovv...@gmail.com > Date: Tue, 2 May 2017 18:36:49 +0530 > >> From: Sunil Goutham >> >> This patch series adds support for XDP to ThunderX NIC driver >> which is used on CN88xx, CN81xx

[PATCH net] tg3: don't clear stats while tg3_close

2017-05-03 Thread YueHaibing
Now tg3 NIC's stats will be cleared after ifdown/ifup. bond_get_stats traverse its salves to get statistics,cumulative the increment.If a tg3 NIC is added to bonding as a slave,ifdown/ifup will cause bonding's stats become tremendous value (ex.1638.3 PiB) because of negative increment. Fixes:

Re: [PATCH net-next v2] net: ipv6: make sure multicast packets are not forwarded beyond the different scopes

2017-05-03 Thread Donatas Abraitis
Looks like there is this test already: if (IPV6_ADDR_MC_SCOPE(_hdr(skb)->daddr) <= IPV6_ADDR_SCOPE_NODELOCAL && !(dev->flags & IFF_LOOPBACK)) { kfree_skb(skb); return 0; } On

Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer

2017-05-03 Thread Arend van Spriel
On 5/3/2017 9:35 AM, Xie Qirong wrote: Signed-off-by: Xie Qirong --- setup_timer.cocci suggested the following improvement: drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384. Move the text above

[PATCH RESEND 4.4-only] netlink: Allow direct reclaim for fallback allocation

2017-05-03 Thread Ross Lagerwall
The backport of d35c99ff77ec ("netlink: do not enter direct reclaim from netlink_dump()") to the 4.4 branch (first in 4.4.32) mistakenly removed direct claim from the initial large allocation _and_ the fallback allocation which means that allocations can spuriously fail. Fix the issue by adding

Re: [PATCH v3] iov_iter: don't revert iov buffer if csum error

2017-05-03 Thread Al Viro
On Wed, May 03, 2017 at 03:02:32PM +0800, Ding Tianhong wrote: > The patch 327868212381 (make skb_copy_datagram_msg() et.al. preserve > ->msg_iter on error) will revert the iov buffer if copy to iter > failed, but it didn't copy any datagram if the skb_checksum_complete > error, so no need to

Re: ipsec doesn't route TCP with 4.11 kernel

2017-05-03 Thread Steffen Klassert
On Sat, Apr 29, 2017 at 08:39:34PM -0400, Don Bowman wrote: > On 28 April 2017 at 03:13, Steffen Klassert > wrote: > > On Thu, Apr 27, 2017 at 06:13:38PM -0400, Don Bowman wrote: > >> On 27 April 2017 at 04:42, Steffen Klassert > >>

[iproute PATCH] man: ip.8: Document -brief flag

2017-05-03 Thread Phil Sutter
Brief output is especially useful for new users, so at least mention it's existence in ip man page. Signed-off-by: Phil Sutter --- man/man8/ip.8 | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/man/man8/ip.8 b/man/man8/ip.8 index

[PATCH 14/16] netfilter: x_tables: unlock on error in xt_find_table_lock()

2017-05-03 Thread Pablo Neira Ayuso
From: Dan Carpenter According to my static checker we should unlock here before the return. That seems reasonable to me as well. Fixes" b9e69e127397 ("netfilter: xtables: don't hook tables by default") Signed-off-by: Dan Carpenter Acked-by:

[PATCH 15/16] netfilter: update MAINTAINERS file

2017-05-03 Thread Pablo Neira Ayuso
Several updates on the MAINTAINERS section for Netfilter: 1) Add Florian Westphal, he's been part of the coreteam since October 2012. He's been dedicating tireless efforts to improve the Netfilter codebase, fix bugs and push ongoing new developments ever since. 2) Add

[PATCH 13/16] ipvs: explicitly forbid ipv6 service/dest creation if ipv6 mod is disabled

2017-05-03 Thread Pablo Neira Ayuso
From: Paolo Abeni When creating a new ipvs service, ipv6 addresses are always accepted if CONFIG_IP_VS_IPV6 is enabled. On dest creation the address family is not explicitly checked. This allows the user-space to configure ipvs services even if the system is booted with

[PATCH 09/16] netfilter: xt_socket: Fix broken IPv6 handling

2017-05-03 Thread Pablo Neira Ayuso
From: Peter Tirsek Commit 834184b1f3a4 ("netfilter: defrag: only register defrag functionality if needed") used the outdated XT_SOCKET_HAVE_IPV6 macro which was removed earlier in commit 8db4c5be88f6 ("netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c"). With

[PATCH 05/16] netfilter: ctnetlink: drop the incorrect cthelper module request

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang First, when creating a new ct, we will invoke request_module to try to load the related inkernel cthelper. So there's no need to call the request_module again when updating the ct helpinfo. Second, ctnetlink_change_helper may be called with rcu_read_lock

[PATCH 00/16] Netfilter/IPVS/OVS fixes for net

2017-05-03 Thread Pablo Neira Ayuso
Hi David, The following patchset contains a rather large batch of Netfilter, IPVS and OVS fixes for your net tree. This includes fixes for ctnetlink, the userspace conntrack helper infrastructure, conntrack OVS support, ebtables DNAT target, several leaks in error path among other. More

[PATCH 07/16] netfilter: ctnetlink: make it safer when updating ct->status

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang After converting to use rcu for conntrack hash, one CPU may update the ct->status via ctnetlink, while another CPU may process the packets and update the ct->status. So the non-atomic operation "ct->status |= status;" via ctnetlink becomes unsafe, and

[PATCH 06/16] netfilter: ctnetlink: fix deadlock due to acquire _expect_lock twice

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang Currently, ctnetlink_change_conntrack is always protected by _expect_lock, but this will cause a deadlock when deleting the helper from a conntrack, as the _expect_lock will be acquired again by nf_ct_remove_expectations: CPU0

[PATCH 03/16] netfilter: nf_ct_helper: permit cthelpers with different names via nfnetlink

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang cthelpers added via nfnetlink may have the same tuple, i.e. except for the l3proto and l4proto, other fields are all zero. So even with the different names, we will also fail to add them: # nfct helper add ssdp inet udp # nfct helper add tftp inet udp

[PATCH 16/16] netfilter: nf_tables: check if same extensions are set when adding elements

2017-05-03 Thread Pablo Neira Ayuso
If no NLM_F_EXCL is set and the element already exists in the set, make sure that both elements have the same extensions. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_api.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 12/16] netfilter: Wrong icmp6 checksum for ICMPV6_TIME_EXCEED in reverse SNATv6 path

2017-05-03 Thread Pablo Neira Ayuso
From: Dave Johnson When recalculating the outer ICMPv6 checksum for a reverse path NATv6 such as ICMPV6_TIME_EXCEED nf_nat_icmpv6_reply_translation() was accessing data beyond the headlen of the skb for non-linear skb. This resulted in incorrect ICMPv6 checksum as

[PATCH 11/16] netfilter: nft_dynset: continue to next expr if _OP_ADD succeeded

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang Currently, after adding the following nft rules: # nft add set x target1 { type ipv4_addr \; flags timeout \;} # nft add rule x y set add ip daddr timeout 1d @target1 counter the counters will always be zero despite of the elements are added to the

Re: [PATCH 1/1] net: usb: qmi_wwan: add Telit ME910 support

2017-05-03 Thread Bjørn Mork
Daniele Palmas writes: > This patch adds support for Telit ME910 PID 0x1100. > > Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork David, please add this to your stable queue as well. Thanks Bjørn

Re: [PATCH 3/4] net: macb: Add hardware PTP support

2017-05-03 Thread Richard Cochran
On Tue, May 02, 2017 at 01:57:15PM +, Rafal Ozieblo wrote: > > What is the point of this wrapper function anyhow? Please remove it. > gem_ptp_gettime() is assigned in ptp_clock_info and it has to have > ptp_clock_info pointer as first parameter. gem_tsu_get_time() is used in > the source

Eine Spende von 1 Million Britische Pfund zu Ihnen in gutem Glauben

2017-05-03 Thread Mr Neil Trotter

[PATCH 04/16] netfilter: nft_set_bitmap: free dummy elements when destroy the set

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang We forget to free dummy elements when deleting the set. So when I was running nft-test.py, I saw many kmemleak warnings: kmemleak: 1344 new suspected memory leaks ... # cat /sys/kernel/debug/kmemleak unreferenced object 0x8800631345c8 (size 32):

[PATCH 10/16] bridge: ebtables: fix reception of frames DNAT-ed to bridge device/port

2017-05-03 Thread Pablo Neira Ayuso
From: Linus Lüssing When trying to redirect bridged frames to the bridge device itself or a bridge port (brouting) via the dnat target then this currently fails: The ethernet destination of the frame is dnat'ed to the MAC address of the bridge device or port just fine.

[PATCH 02/16] openvswitch: Delete conntrack entry clashing with an expectation.

2017-05-03 Thread Pablo Neira Ayuso
From: Jarno Rajahalme Conntrack helpers do not check for a potentially clashing conntrack entry when creating a new expectation. Also, nf_conntrack_in() will check expectations (via init_conntrack()) only if a conntrack entry can not be found. The expectation for a packet which

[PATCH 08/16] netfilter: ctnetlink: acquire ct->lock before operating nf_ct_seqadj

2017-05-03 Thread Pablo Neira Ayuso
From: Liping Zhang We should acquire the ct->lock before accessing or modifying the nf_ct_seqadj, as another CPU may modify the nf_ct_seqadj at the same time during its packet proccessing. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso

[PATCH 01/16] netfilter: xt_CT: fix refcnt leak on error path

2017-05-03 Thread Pablo Neira Ayuso
From: Gao Feng There are two cases which causes refcnt leak. 1. When nf_ct_timeout_ext_add failed in xt_ct_set_timeout, it should free the timeout refcnt. Now goto the err_put_timeout error handler instead of going ahead. 2. When the time policy is not found, we should call

[patch iproute2 v2 2/2] devlink: Add support for pipeline debug (dpipe)

2017-05-03 Thread Jiri Pirko
From: Arkadi Sharshevsky Add support for pipeline debug (dpipe). The headers are used both the gain visibillity into the headers supported by the hardware, and to build the headers/field database which is used by other commands. Examples: First we can see the headers

[patch iproute2 v2 0/2] devlink: Add support for pipeline

2017-05-03 Thread Jiri Pirko
From: Jiri Pirko Arkadi says: Add support for pipeline debug (dpipe). As a preparation step the netlink attribute validation was changed before adding new dpipe attributes. --- v1->v2 - Change netlink attribute validation. - Fix commit message typos Arkadi Sharshevsky (2):

Re: [PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-05-03 Thread Xin Long
On Wed, May 3, 2017 at 2:37 PM, Gao Feng wrote: >> From: Xin Long [mailto:lucien@gmail.com] >> Sent: Wednesday, May 3, 2017 1:38 PM >> On Wed, May 3, 2017 at 10:07 AM, Gao Feng >> wrote: >> >> From: netdev-ow...@vger.kernel.org >> >>

[patch iproute2 v2 1/2] devlink: Change netlink attribute validation

2017-05-03 Thread Jiri Pirko
From: Arkadi Sharshevsky Currently the netlink attribute resolving is done by a sequence of if's. Change the attribute resolving to table lookup. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko --- devlink/devlink.c |

[PATCH] brcmfmac: btcoex: replace init_timer with setup_timer

2017-05-03 Thread Xie Qirong
setup_timer.cocci suggested the following improvement: drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384. Signed-off-by: Xie Qirong --- Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y

[PATCH] test_bpf: Use ULL suffix for 64-bit constants

2017-05-03 Thread Geert Uytterhoeven
On 32-bit: lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type

Re: [PATCH] test_bpf: Use ULL suffix for 64-bit constants

2017-05-03 Thread Daniel Borkmann
On 05/03/2017 01:31 PM, Geert Uytterhoeven wrote: On 32-bit: lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type lib/test_bpf.c:4773: warning: integer constant

sock_create_kern() and (lack of) get_net()

2017-05-03 Thread David Laight
sock_create_kern() passes 'kern=1' to __sock_create(). sock_create() passes 'kern=0' and uses current->nsproxy->ns_net. The 'kern' parameter is passed to security_socket_create() and security_socket_post_create() - I think this is just checking whether the call is allowed. The 'kern' parameter

RE: [PATCH net-next] net/esp4: Fix invalid esph pointer crash

2017-05-03 Thread Ilan Tayari
> -Original Message- > From: Steffen Klassert [mailto:steffen.klass...@secunet.com] > > On Sun, Apr 30, 2017 at 04:34:38PM +0300, il...@mellanox.com wrote: > > From: Ilan Tayari > > > > Both esp_output and esp_xmit take a pointer to the ESP header > > and place it

Re: [net-next PATCH 0/4] Improve bpf ELF-loader under samples/bpf

2017-05-03 Thread Daniel Borkmann
On 05/03/2017 08:16 AM, Jesper Dangaard Brouer wrote: On Tue, 02 May 2017 23:10:04 +0200 Daniel Borkmann wrote: On 05/02/2017 02:31 PM, Jesper Dangaard Brouer wrote: This series improves and fixes bpf ELF loader and programs under samples/bpf. The bpf_load.c created

Re: net/ipv6: GPF in rt6_device_match

2017-05-03 Thread David Ahern
On 5/3/17 4:02 PM, Cong Wang wrote: > On Wed, May 3, 2017 at 11:22 AM, David Ahern wrote: >> On 5/3/17 11:02 AM, Cong Wang wrote: >>> A quick glance shows we need to simply check local->rt6i_idev >>> since we do the same check for sprt right above. >> >> As I recall, rt6i_idev

[PATCH net-next 14/15] netvsc: optimize receive completions

2017-05-03 Thread Stephen Hemminger
Handle receive completions better: * format message directly in ring rather than in different bookkeeping structure * eliminate atomic operation * get rid of modulus (divide) on ring wrap * avoid potential stall if ring gets full * don't make ring element opaque Signed-off-by: Stephen

Re: new warning at net/wireless/util.c:1236

2017-05-03 Thread Kalle Valo
Linus Torvalds writes: > So my Dell XPS 13 seems to have grown a new warning as of the > networking merge yesterday. > > Things still work, but when it starts warning, it generates a *lot* of > noise (I got 36 of these within about ten minutes). > > I have no idea

[Patch net] ipv6: initialize route null entry in addrconf_init()

2017-05-03 Thread Cong Wang
Andrey reported a crash on init_net.ipv6.ip6_null_entry->rt6i_idev since it is always NULL. This is clearly wrong, we have code to initialize it to loopback_dev, unfortunately the order is still not correct. loopback_dev is registered very early during boot, we lose a chance to re-initialize it

[Patch net] ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf

2017-05-03 Thread Cong Wang
For each netns (except init_net), we initialize its null entry in 3 places: 1) The template itself, as we use kmemdup() 2) Code around dst_init_metrics() in ip6_route_net_init() 3) ip6_route_dev_notify(), which is supposed to initialize it after loopback registers Unfortunately the last one

[net-next] net: remove duplicate add_device_randomness() call

2017-05-03 Thread Zhang Shengju
Since register_netdevice() already call add_device_randomness() and dev_set_mac_address() will call it after mac address change. It's not necessary to call at device UP. Signed-off-by: Zhang Shengju --- net/core/dev.c | 1 - 1 file changed, 1 deletion(-) diff

Re: [PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-03 Thread Stephen Hemminger
On Wed, 3 May 2017 14:44:35 +1000 Gavin Shan wrote: > +void ncsi_ethtool_register_dev(struct net_device *dev) > +{ > + struct ethtool_ops *ops; > + > + ops = (struct ethtool_ops *)(dev->ethtool_ops); > + if (!ops) > + return; > + > +

Re: [PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-03 Thread Stephen Hemminger
On Wed, 3 May 2017 14:44:35 +1000 Gavin Shan wrote: > +static int ethtool_get_ncsi_channels(struct net_device *dev, > + void __user *useraddr) Please don't use an opaque type for this. See how other ethtool operations take a struct.

<    1   2