Re: Issue with load across multiple connections

2017-04-09 Thread Ulrich Speidel
Dear Eric, My apologies for taking so long to get back to you - I had to wait for some experiments to finish until I could grab hold of two machines that weren't busy and had a more or less direct connection. On the server (a Super Micro): root@serverQ:/home/lei/Desktop/servers-20160311# cat

Re: [kernel-hardening] [PATCH net-next v6 07/11] landlock: Add ptrace restrictions

2017-04-09 Thread Djalal Harouni
On Wed, Mar 29, 2017 at 1:46 AM, Mickaël Salaün wrote: > A landlocked process has less privileges than a non-landlocked process > and must then be subject to additional restrictions when manipulating > processes. To be allowed to use ptrace(2) and related syscalls on a > target process, a landlock

[PATCH] ipv6: Fix idev->addr_list corruption

2017-04-09 Thread Rabin Vincent
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: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 23

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

2017-04-09 Thread Johannes Berg
> perhaps I misunderstand something, but nla_parse suggests attribute > type can not be 0: [...] Yes, some - very few - families still insist on using attribute 0, perhaps parsing by hand or so. Like you say though, the entire infrastructure makes that hard and undesirable, so I don't really see

Re: [PATCH v2 1/2] bpf: remove struct bpf_prog_type_list

2017-04-09 Thread Johannes Berg
> > If you just don't want to list things multiple times how about: > > > > linux/bpf_verifiers.h: > > BPF_VERIFIER(BPF_PROG_TYPE_SOCKET_FILTER, sk_filter_prog_ops) > > BPF_VERIFIER(BPF_PROG_TYPE_SCHED_CLS, tc_cls_prog_ops) > >  ... > > > > Then in bpf.h: > > > > #define BPF_VERIFIER(TYPE_VAL,

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

2017-04-09 Thread Myungho Jung
Kernel panic is caused by trying to dereference null pointer. Check if the pointer is null before freeing space. Signed-off-by: Myungho Jung --- drivers/net/wireless/intersil/p54/txrx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intersil/p54/

Re: [PATCH v2 1/2] bpf: remove struct bpf_prog_type_list

2017-04-09 Thread Alexei Starovoitov
On Sun, Apr 09, 2017 at 06:22:36PM -0700, David Miller wrote: > From: Johannes Berg > Date: Fri, 7 Apr 2017 21:00:07 +0200 > > > 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 ty

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

2017-04-09 Thread Alexei Starovoitov
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

[PATCH v2 02/12] ftgmac100: Move ftgmac100_hard_start_xmit() around

2017-04-09 Thread Benjamin Herrenschmidt
Move it below ftgmac100_xmit() and the rest of the tx path No code change. Signed-off-by: Benjamin Herrenschmidt --- v2. - Fix patch splitting mistake --- drivers/net/ethernet/faraday/ftgmac100.c | 58 1 file changed, 29 insertions(+), 29 deletions(-) diff --g

[PATCH v2 10/12] ftgmac100: Don't clear tx desc fields unnecessarily

2017-04-09 Thread Benjamin Herrenschmidt
Those are non-cachable stores, let's avoid those we don't need. Remove the helper, it's not particularly helpful and since it uses "priv" I can't move it to the header file. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 17 ++--- 1 file changed,

[PATCH v2 03/12] ftgmac100: Merge ftgmac100_xmit() into ftgmac100_hard_start_xmit()

2017-04-09 Thread Benjamin Herrenschmidt
This will make subsequent rework of the tx path simpler Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 58 ++-- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/ne

[PATCH v2 04/12] ftgmac100: Factor tx packet dropping path

2017-04-09 Thread Benjamin Herrenschmidt
Use a simple goto to a drop path at the tail of the function, it will be used in a few more cases soon Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/far

RE: IMX6 FEC connection drops occasionally with 'MDIO read timeout'

2017-04-09 Thread Andy Duan
From: Tim Harvey Sent: Friday, April 07, 2017 10:47 PM >To: netdev >Cc: Fabio Estevam ; Lucas Stach >; Andy Duan ; Koen >Vandeputte >Subject: IMX6 FEC connection drops occasionally with 'MDIO read timeout' > >Greetings, > >I've had a couple of users report that they are getting occasional link d

Re: [PATCH net-next] net: dsa: mt7530: Include gpio/consumer.h for GPIO functions

2017-04-09 Thread David Miller
From: Florian Fainelli Date: Sat, 8 Apr 2017 08:52:02 -0700 > Fixes build errors seen with CONFIG_GPIOLIB disabled and warnings enabled: ... > Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 > switch") > Signed-off-by: Florian Fainelli Applied, thanks Florian.

Re: [PATCH net] tcp: clear saved_syn in tcp_disconnect()

2017-04-09 Thread David Miller
From: Eric Dumazet Date: Sat, 08 Apr 2017 08:07:33 -0700 > From: Eric Dumazet > > In the (very unlikely) case a passive socket becomes a listener, > we do not want to duplicate its saved SYN headers. > > This would lead to double frees, use after free, and please hackers and > various fuzzers

Re: [PATCH net-next] bpf: fix comment typo

2017-04-09 Thread David Miller
From: Alexander Alemayhu Date: Sat, 8 Apr 2017 22:08:10 +0200 > o s/bpf_bpf_get_socket_cookie/bpf_get_socket_cookie > > Signed-off-by: Alexander Alemayhu Applied.

Re: [PATCH v2 1/2] bpf: remove struct bpf_prog_type_list

2017-04-09 Thread David Miller
From: Johannes Berg Date: Fri, 7 Apr 2017 21:00:07 +0200 > 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 ea

[PATCH v2 11/12] ftgmac100: Add support for fragmented tx

2017-04-09 Thread Benjamin Herrenschmidt
Add NETIF_F_SG and create multiple TX ring entries for skb fragments. On reclaim, the skb is only freed on the segment marked as "last". Signed-off-by: Benjamin Herrenschmidt -- v2. - Remove skb headlen size adjustments now that we use eth_skb_pad(). --- drivers/net/ethernet/faraday/ftgm

[PATCH v2 07/12] ftgmac100: Cleanup tx queue handling

2017-04-09 Thread Benjamin Herrenschmidt
We have a private lock which isn't terribly useful, and we maintain a "tx_pending" counter for information that's already available via a trivial arithmetic operation. Then we unconditionaly wake the queue even when not stopped. Finally our code in tx isn't really safe vs. a concurrent reclaim. The

[PATCH v2 06/12] ftgmac100: Store tx skbs in a separate array

2017-04-09 Thread Benjamin Herrenschmidt
Rather than in the descriptor. The descriptor is mapped non-cachable and rather slow to access. Since to do that we need to keep track of the tx "pointer" we also have no use of all the accesors to manipulate it, just open code it, it's as clear and will help when adding fragmented sends. Signed-

[PATCH v2 08/12] ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own()

2017-04-09 Thread Benjamin Herrenschmidt
We'll use variants of this accessor without barriers when building series of descriptors for fragmented sends Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/farad

[PATCH v2 12/12] ftgmac100: Remove tx descriptor accessors

2017-04-09 Thread Benjamin Herrenschmidt
Directly access the fields when needed. The accessors add clutter not clarity and in some cases cause unnecessary read-modify-write type access on the slow (uncached) descriptor memory. Signed-off-by: Benjamin Herrenschmidt --- v2. - Adjust for changes in previous patches --- drivers/net/ethern

[PATCH v2 09/12] ftgmac100: Split tx packet freeing from ftgmac100_tx_complete_packet()

2017-04-09 Thread Benjamin Herrenschmidt
This moves the packet freeing to a separate function which is also used by ftgmac100_free_buffers() and will be used more in the error path of fragmented sends. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 38 ++-- 1 file change

[PATCH v2 05/12] ftgmac100: Pad small frames properly

2017-04-09 Thread Benjamin Herrenschmidt
Rather than just transmitting garbage past the end of the small packet. Signed-off-by: Benjamin Herrenschmidt -- v2. Use eth_skb_pad (wrapper around skb_put_padto) --- drivers/net/ethernet/faraday/ftgmac100.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 01/12] ftgmac100: Add a tx timeout handler

2017-04-09 Thread Benjamin Herrenschmidt
We have a reset task to reset our chip, use it. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 9f18e5e

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

2017-04-09 Thread Benjamin Herrenschmidt
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 with a bunch of cleanups. Version 2 fixes a patch splitting mistake and uses eth

Re: pull-request: wireless-drivers-next 2017-04-07

2017-04-09 Thread David Miller
From: Kalle Valo Date: Fri, 07 Apr 2017 17:36:39 +0300 > here's a pull request for net-next, more info in the signed tag below. > Please let me know if there are any problems. Pulled, thanks Kalle.

Re: [PATCH v3 iproute] ip: Add support for netdev events to monitor

2017-04-09 Thread David Miller
From: David Ahern Date: Sat, 8 Apr 2017 22:54:07 -0400 > On 4/8/17 10:33 PM, David Miller wrote: >> From: David Ahern >> Date: Sat, 8 Apr 2017 18:24:06 -0400 >> >>> per comments on the email thread about reducing notifications, the >>> kernel patch for this should be reverted (and hence this ip

Re: [PATCH net-next 1/7] ibmvnic: Add is_up flag to avoid transmits when driver is down

2017-04-09 Thread David Miller
From: Nathan Fontenot Date: Sun, 09 Apr 2017 00:11:32 -0400 > From: Thomas Falcon > > There are brief windows when handling events such as failover where we > could attempt to transmit packets between receiving the transport event > notification and handling the reset in the workqueue. > > Thi

Re: [net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-08

2017-04-09 Thread David Miller
From: Jeff Kirsher Date: Sat, 8 Apr 2017 02:55:41 -0700 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff.

[PATCH v2 net-next RFC] Generic XDP

2017-04-09 Thread David Miller
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 merge. I believe this is critical for two reasons: 1) Accessibility. More

Re: [PATCH net-next RFC] Generic XDP

2017-04-09 Thread David Miller
From: Johannes Berg Date: Sun, 09 Apr 2017 09:04:07 +0200 > On Sun, 2017-04-09 at 08:25 +0200, Johannes Berg wrote: >> That would also let you use rcu_assign_pointer() which seems like the >> right thing to do here, along with marking the xdp_prog pointer as >> __rcu? That'd also let you use rcu_

Re: [PATCH net-next RFC] Generic XDP

2017-04-09 Thread David Miller
From: Andy Gospodarek Date: Sun, 9 Apr 2017 01:17:26 -0400 > I should be able to run this on Monday and see how the performance > compares to the driver/native XDP case on some bnxt_en-based hardware. Thanks in advance for testing Andy.

Re: [PATCH net-next RFC] Generic XDP

2017-04-09 Thread David Miller
From: Andrew Lunn Date: Sun, 9 Apr 2017 15:46:55 +0200 >> +switch (act) { >> +case XDP_PASS: >> +case XDP_TX: >> +break; >> + >> +default: >> +bpf_warn_invalid_xdp_action(act); > > Hi David > > You might want to put a /* fall through */ comment here, just

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

2017-04-09 Thread David Ahern
On 4/8/17 2:40 PM, Jiri Pirko wrote: > Sat, Apr 08, 2017 at 08:37:01PM CEST, johan...@sipsolutions.net wrote: >> On Sat, 2017-04-08 at 20:34 +0200, Jiri Pirko wrote: >>> nla_total_size(sizeof(u32)); + if (extack && + (extack->missing_attr || extack- >

Re: [PATCH net-next 0/1 v2] skbuff: Extend gso_type to unsigned int.

2017-04-09 Thread Alexey Dobriyan
> struct skb_shared_info { > + unsigned short _unused; > unsigned char nr_frags; This makes _all_ fields to be accessed with offset, but if you move padding down, at least ->nr_frags will enjoy clean and simple [R64] addressing. On allyesconfig-ish kernel: before: +542 = 72

Re: [PATCH] net: rfkill: gpio: Add OBDA8723 ACPI HID

2017-04-09 Thread Larry Finger
On 04/09/2017 07:11 AM, Marcel Holtmann wrote: Hi Hans, The OBDA8723 ACPI HID is used on quite a few Bay Trail based tablets for bluetooth rfkill functionality. Tested-by: russianneuroman...@ya.ru Signed-off-by: Hans de Goede --- net/rfkill/rfkill-gpio.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH 06/22] staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c

2017-04-09 Thread Larry Finger
On 04/09/2017 10:28 AM, Bastien Nocera wrote: On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: Smatch lists the following: CHECK drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 rtw_cfg80211_ibss_indicate_connect() error: we previ

Re: [PATCH 00/22] staging: rtl87232bs: Fix errors and warnings detected by Smatch

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > A number of routines have indenting, off by one, and possible usage > while null warnings or errors listed by Smatch. This set of patches > fix all but one of these, and it is in code that will be removed in a > subsequent patch. > > Signed-

Re: [PATCH 20/22] staging rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > } else { > -   for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++) > +   for (pstat->aid = 1; pstat->aid < NUM_STA; pstat->aid++) > if (pstapriv->sta_aid[pstat->aid - 1] == NULL) >

Re: [PATCH 16/22] staging: rtl8723bs: Fix some indenting problems and a potential data overrun

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > +   if (cam_id >= 0 && cam_id < 32) Isn't there a constant we could use instead of hard-coding this?

Re: [PATCH 13/22] staging: rtl8723bs: Fix indenting mistake in core/rtw_ap.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > Fixing this requires changing the indentatikon of a long for loop. Typo here.

Re: [PATCH 06/22] staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > Smatch lists the following: > >   CHECK   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 > rtw_cfg80211_ibss_indicate_connect() error: we previously assumed > 'scanned' could be null

Re: [PATCH net-next RFC] Generic XDP

2017-04-09 Thread Andrew Lunn
> + switch (act) { > + case XDP_PASS: > + case XDP_TX: > + break; > + > + default: > + bpf_warn_invalid_xdp_action(act); Hi David You might want to put a /* fall through */ comment here, just to prevent newbies from submitting patches moving the default cla

[PATCH net 1/1] net: tcp: Increase TCPABORTONLINGER when send RST by linger2 in keepalive timer

2017-04-09 Thread gfree . wind
From: Gao Feng It should increase TCPABORTONLINGER counter when send RST caused by linger2 in keepalive timer. Signed-off-by: Gao Feng --- net/ipv4/tcp_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index b2ab411..5c01f21 100644 --- a/

Re: [PATCH] net: rfkill: gpio: Add OBDA8723 ACPI HID

2017-04-09 Thread Marcel Holtmann
Hi Hans, >>> The OBDA8723 ACPI HID is used on quite a few Bay Trail based tablets >>> for bluetooth rfkill functionality. >>> >>> Tested-by: russianneuroman...@ya.ru >>> Signed-off-by: Hans de Goede >>> --- >>> net/rfkill/rfkill-gpio.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --gi

Re: [PATCH] net: netfilter: Replace explicit NULL comparisons

2017-04-09 Thread Liping Zhang
2017-04-09 16:26 GMT+08:00 Jan Engelhardt : > > On Sunday 2017-04-09 05:42, Arushi Singhal wrote: >>On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso wrote: >> On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote: >> > On Saturday 2017-04-08 19:21, Arushi Singhal wrote: >>

Re: [PATCH] net: rfkill: gpio: Add OBDA8723 ACPI HID

2017-04-09 Thread Hans de Goede
Hi, On 09-04-17 10:01, Marcel Holtmann wrote: Hi Hans, The OBDA8723 ACPI HID is used on quite a few Bay Trail based tablets for bluetooth rfkill functionality. Tested-by: russianneuroman...@ya.ru Signed-off-by: Hans de Goede --- net/rfkill/rfkill-gpio.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] net: netfilter: Replace explicit NULL comparisons

2017-04-09 Thread Jan Engelhardt
On Sunday 2017-04-09 05:42, Arushi Singhal wrote: >On Sun, Apr 9, 2017 at 1:44 AM, Pablo Neira Ayuso wrote: > On Sat, Apr 08, 2017 at 08:21:56PM +0200, Jan Engelhardt wrote: > > On Saturday 2017-04-08 19:21, Arushi Singhal wrote: > > > > >Replace explicit NULL comparison with

Re: [PATCH] net: rfkill: gpio: Add OBDA8723 ACPI HID

2017-04-09 Thread Marcel Holtmann
Hi Hans, > The OBDA8723 ACPI HID is used on quite a few Bay Trail based tablets > for bluetooth rfkill functionality. > > Tested-by: russianneuroman...@ya.ru > Signed-off-by: Hans de Goede > --- > net/rfkill/rfkill-gpio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/rfkill/rfkil

Re: [PATCH net-next RFC] Generic XDP

2017-04-09 Thread Johannes Berg
On Sun, 2017-04-09 at 08:25 +0200, Johannes Berg wrote: > That would also let you use rcu_assign_pointer() which seems like the > right thing to do here, along with marking the xdp_prog pointer as > __rcu? That'd also let you use rcu_dereference() instead of > READ_ONCE() which seems like the bette