[PATCH net-next] bridge: ebtables: Avoid resetting limit rule state

2017-11-24 Thread Linus Lüssing
So far any changes with ebtables will reset the state of limit rules, leading to spikes in traffic. This is especially noticeable if changes are done frequently, for instance via a daemon. This patch fixes this by bailing out from (re)setting if the limit rule was initialized before. When sending

Re: [PATCH] uapi: add SPDX identifier to vm_sockets_diag.h

2017-11-24 Thread Stefan Hajnoczi
On Fri, Nov 24, 2017 at 8:08 PM, Stephen Hemminger wrote: > New file seems to have missed the SPDX license scan and update. > > Signed-off-by: Stephen Hemminger > --- > include/uapi/linux/vm_sockets_diag.h | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi

Re: [RFC net-next 0/6] xdp: make stack perform remove and tests

2017-11-24 Thread Jakub Kicinski
On Fri, 24 Nov 2017 00:02:32 -0800, Jakub Kicinski wrote: > >>Something I'm still battling with, and would appreciate help of > >>wiser people is that occasionally during the test something makes > >>the refcount of init_net drop to 0 :S I tried to create a simple > >>reproducer, but seems like ju

Re: [RFC net-next 3/6] net: xdp: make the stack take care of the tear down

2017-11-24 Thread Jakub Kicinski
On Sat, 25 Nov 2017 00:24:50 +0100, Daniel Borkmann wrote: > > +static void dev_xdp_uninstall(struct net_device *dev) > > +{ > > + struct netdev_bpf xdp; > > + bpf_op_t ndo_bpf; > > Can you add a comment here stating that generic XDP does not > need to be handled since we drop the prog from

Re: [RFC net-next 3/6] net: xdp: make the stack take care of the tear down

2017-11-24 Thread Daniel Borkmann
On 11/24/2017 03:36 AM, Jakub Kicinski wrote: > Since day one of XDP drivers had to remember to free the program > on the remove path. This leads to code duplication and is error > prone. Make the stack query the installed programs on unregister > and if something is installed, remove the program

Re: [PATCH net] net: dsa: fix 'increment on 0' warning

2017-11-24 Thread Florian Fainelli
On 11/24/2017 08:36 AM, Vivien Didelot wrote: > Setting the refcount to 0 when allocating a tree to match the number of > switch devices it holds may cause an 'increment on 0; use-after-free', > if CONFIG_REFCOUNT_FULL is enabled. > > To fix this, do not decrement the refcount of a newly allocat

Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

2017-11-24 Thread Nishanth Devarajan
On Fri, Nov 24, 2017 at 11:25:28AM -0800, Stephen Hemminger wrote: > On Sat, 18 Nov 2017 02:13:38 +0530 > Nishanth Devarajan wrote: > > > This patch adapts the tc command line interface to allow bandwidth limits > > to be specified as a percentage of the interface's capacity. > > > > Adding this

[PATCH iproute2] SPDX license identifiers

2017-11-24 Thread Stephen Hemminger
For all files in iproute2 which do not already have an obvious license identification, mark them with GPL-2. If any of the original authors want a more permissive license than that, please let ms know. Signed-off-by: Stephen Hemminger --- Makefile | 1 + bridge/Makef

Re: [PATCH 1/3] net: core: export dev_alloc_name_ns

2017-11-24 Thread David Miller
From: Rasmus Villemoes Date: Tue, 21 Nov 2017 01:34:37 +0100 > dev_alloc_name_ns and dev_get_valid_name now do exactly the same > thing. Let's expose this functionality as dev_alloc_name_ns > (obviously, a core function like this won't return an invalid > name...). > > Signed-off-by: Rasmus Vill

Re: [PATCHv2 net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page

2017-11-24 Thread David Miller
From: Zhu Yanjun Date: Sun, 19 Nov 2017 22:21:08 -0500 > The function pci_unmap_page is obsolete. So it is replaced with > the function dma_unmap_page. > > CC: Srinivas Eeda > CC: Joe Jin > CC: Junxiao Bi > Signed-off-by: Zhu Yanjun > --- > V1->V2: fix direction flag error. Applied, thank y

[PATCH] uapi: add SPDX identifier to vm_sockets_diag.h

2017-11-24 Thread Stephen Hemminger
New file seems to have missed the SPDX license scan and update. Signed-off-by: Stephen Hemminger --- include/uapi/linux/vm_sockets_diag.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/vm_sockets_diag.h b/include/uapi/linux/vm_sockets_diag.h index 14cd7dc5a187..0b4dd54f3

Re: [PATCH net-next 00/12] rxrpc: Fixes and improvements

2017-11-24 Thread David Miller
From: David Howells Date: Fri, 24 Nov 2017 14:37:39 + > Is it too late for this to go to Linus in this merge window? These look predominantly like fixes so I'll pull this in. Thanks.

Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

2017-11-24 Thread Stephen Hemminger
On Sat, 18 Nov 2017 02:13:38 +0530 Nishanth Devarajan wrote: > This patch adapts the tc command line interface to allow bandwidth limits > to be specified as a percentage of the interface's capacity. > > Adding this functionality requires passing the specified device string to > each class/qdisc

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread Eric Dumazet
On Fri, 2017-11-24 at 11:43 -0700, David Ahern wrote: > On 11/24/17 11:32 AM, Eric Dumazet wrote: > > On Fri, 2017-11-24 at 10:14 -0700, David Ahern wrote: > > > On 11/22/17 5:30 PM, Solio Sarabia wrote: > > > > The netdevice gso_max_size is exposed to allow users fine- > > > > control > > > > on >

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread David Ahern
On 11/24/17 11:32 AM, Eric Dumazet wrote: > On Fri, 2017-11-24 at 10:14 -0700, David Ahern wrote: >> On 11/22/17 5:30 PM, Solio Sarabia wrote: >>> The netdevice gso_max_size is exposed to allow users fine-control >>> on >>> systems with multiple NICs with different GSO buffer sizes, and >>> where >

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread Eric Dumazet
On Fri, 2017-11-24 at 10:14 -0700, David Ahern wrote: > On 11/22/17 5:30 PM, Solio Sarabia wrote: > > The netdevice gso_max_size is exposed to allow users fine-control > > on > > systems with multiple NICs with different GSO buffer sizes, and > > where > > the virtual devices like bridge and veth,

Re: [PATCH net] net: qmi_wwan: add support for Cinterion PLS8

2017-11-24 Thread Bjørn Mork
Reinhard Speyerer writes: > before posting this problem report > https://developer.gemalto.com/threads/ipv6dualstack-problems-pls8-e-revision-03017 > in the Gemalto developer forum I tested the qmi_wwan/cdc_ether changes > you suggested above and apart from having two working QMI interfaces > the

Re: sunrpc: infinite unkillable console spam in xs_tcp_setup_socket

2017-11-24 Thread Trond Myklebust
On Mon, 2017-11-20 at 14:02 +0100, Dmitry Vyukov wrote: > Hello, > > The following program triggers infinite stream of the following > output > on console. The program is unkillable and this effectively brings the > machine down: > > > ** 16 printk messages dropped ** [12875.022917] xs_tcp_setup

Re: [PATCH iproute 0/5] ila: additional configuratio support

2017-11-24 Thread Stephen Hemminger
On Wed, 22 Nov 2017 12:05:32 -0800 Tom Herbert wrote: > Add configuration support for checksum neutral-map-auto, identifier > tyoes, and hook type (for LWT). > > Tom Herbert (5): > ila: Fix reporting of ILA locators and locator match > ila: added csum neutral support to ipila > ila: suppor

Re: [PATCH] net-sysfs: export gso_max_size attribute

2017-11-24 Thread David Ahern
On 11/22/17 5:30 PM, Solio Sarabia wrote: > The netdevice gso_max_size is exposed to allow users fine-control on > systems with multiple NICs with different GSO buffer sizes, and where > the virtual devices like bridge and veth, need to be aware of the GSO > size of the underlying devices. > > In

Re: [patch iproute2] tc: move action cookie print out of the stats if

2017-11-24 Thread Stephen Hemminger
On Fri, 24 Nov 2017 09:28:21 +0100 Jiri Pirko wrote: > From: Jiri Pirko > > Cookie print was made dependent on show_stats for no good reason. Fix > this bu pushing cookie print ot of the stats if. > > Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") > Signed-off-by: Jiri Pirko >

[PATCH net] net: dsa: fix 'increment on 0' warning

2017-11-24 Thread Vivien Didelot
Setting the refcount to 0 when allocating a tree to match the number of switch devices it holds may cause an 'increment on 0; use-after-free', if CONFIG_REFCOUNT_FULL is enabled. To fix this, do not decrement the refcount of a newly allocated tree, increment it when an already allocated tree is fo

Re: 8e5bf9759a ("net: dsa: simplify tree reference counting"): WARNING: CPU: 1 PID: 27 at lib/refcount.c:153 refcount_inc

2017-11-24 Thread Vivien Didelot
Hi Fengguang, Fengguang Wu writes: > It looks linus/master and linux-next still has this issue. I sent a fix to net-next before it closes but it hasn't been picked. Now that it's in the net tree, I'm sending an alternative fix right now. Thank for the note! Vivien

[PATCH net-next 00/12] rxrpc: Fixes and improvements

2017-11-24 Thread David Howells
h=rxrpc-fixes Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes-20171124 David --- David Howells (12): rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing rxrpc: Don't set upgrade by default in

[PATCH net-next 01/12] rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing

2017-11-24 Thread David Howells
The caller of rxrpc_accept_call() must release the lock on call->user_mutex returned by that function. Signed-off-by: David Howells --- net/rxrpc/sendmsg.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 7d2595582c09..3

[PATCH net-next 03/12] rxrpc: Provide a different lockdep key for call->user_mutex for kernel calls

2017-11-24 Thread David Howells
Provide a different lockdep key for rxrpc_call::user_mutex when the call is made on a kernel socket, such as by the AFS filesystem. The problem is that lockdep registers a false positive between userspace calling the sendmsg syscall on a user socket where call->user_mutex is held whilst userspace

[PATCH net-next 05/12] rxrpc: Split the call params from the operation params

2017-11-24 Thread David Howells
When rxrpc_sendmsg() parses the control message buffer, it places the parameters extracted into a structure, but lumps together call parameters (such as user call ID) with operation parameters (such as whether to send data, send an abort or accept a call). Split the call parameters out into their

[PATCH net-next 02/12] rxrpc: Don't set upgrade by default in sendmsg()

2017-11-24 Thread David Howells
Don't set upgrade by default when creating a call from sendmsg(). This is a holdover from when I was testing the code. Signed-off-by: David Howells --- net/rxrpc/sendmsg.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c index 3a9

[PATCH net-next 04/12] rxrpc: Delay terminal ACK transmission on a client call

2017-11-24 Thread David Howells
Delay terminal ACK transmission on a client call by deferring it to the connection processor. This allows it to be skipped if we can send the next call instead, the first DATA packet of which will implicitly ack this call. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 17 +++

[PATCH net-next 07/12] rxrpc: Don't transmit DELAY ACKs immediately on proposal

2017-11-24 Thread David Howells
Don't transmit a DELAY ACK immediately on proposal when the Rx window is rotated, but rather defer it to the work function. This means that we have a chance to queue/consume more received packets before we actually send the DELAY ACK, or even cancel it entirely, thereby reducing the number of pack

[PATCH net-next 06/12] rxrpc: Fix call timeouts

2017-11-24 Thread David Howells
Fix the rxrpc call expiration timeouts and make them settable from userspace. By analogy with other rx implementations, there should be three timeouts: (1) "Normal timeout" This is set for all calls and is triggered if we haven't received any packets from the peer in a while. It is m

[PATCH net-next 09/12] rxrpc: Add a timeout for detecting lost ACKs/lost DATA

2017-11-24 Thread David Howells
Add an extra timeout that is set/updated when we send a DATA packet that has the request-ack flag set. This allows us to detect if we don't get an ACK in response to the latest flagged packet. The ACK packet is adjudged to have been lost if it doesn't turn up within 2*RTT of the transmission. If

[PATCH net-next 11/12] rxrpc: Fix service endpoint expiry

2017-11-24 Thread David Howells
RxRPC service endpoints expire like they're supposed to by the following means: (1) Mark dead rxrpc_net structs (with ->live) rather than twiddling the global service conn timeout, otherwise the first rxrpc_net struct to die will cause connections on all others to expire immediately fro

[PATCH net-next 10/12] rxrpc: Add keepalive for a call

2017-11-24 Thread David Howells
We need to transmit a packet every so often to act as a keepalive for the peer (which has a timeout from the last time it received a packet) and also to prevent any intervening firewalls from closing the route. Do this by resetting a timer every time we transmit a packet. If the timer ever expire

[PATCH net-next 12/12] rxrpc: Fix conn expiry timers

2017-11-24 Thread David Howells
Fix the rxrpc connection expiry timers so that connections for closed AF_RXRPC sockets get deleted in a more timely fashion, freeing up the transport UDP port much more quickly. (1) Replace the delayed work items with work items plus timers so that timer_reduce() can be used to shorten them

[PATCH net-next 08/12] rxrpc: Express protocol timeouts in terms of RTT

2017-11-24 Thread David Howells
Express protocol timeouts for data retransmission and deferred ack generation in terms on RTT rather than specified timeouts once we have sufficient RTT samples. For the moment, this requires just one RTT sample to be able to use this for ack deferral and two for data retransmission. The data ret

[PATCH v2] VSOCK: Don't call vsock_stream_has_data in atomic context

2017-11-24 Thread Jorgen Hansen
When using the host personality, VMCI will grab a mutex for any queue pair access. In the detach callback for the vmci vsock transport, we call vsock_stream_has_data while holding a spinlock, and vsock_stream_has_data will access a queue pair. To avoid this, we can simply omit calling vsock_stream

[PATCH] atm: lanai: use setup_timer instead of init_timer

2017-11-24 Thread Colin King
From: Colin Ian King Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Colin Ian King --- drivers/atm/lanai.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 2351dad78f

[PATCH] atm: firestream: use setup_timer instead of init_timer

2017-11-24 Thread Colin King
From: Colin Ian King Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Colin Ian King --- drivers/atm/firestream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c i

Re: [PATCH v2] net: sched: crash on blocks with goto chain action

2017-11-24 Thread Jiri Pirko
Fri, Nov 24, 2017 at 12:27:58PM CET, c...@rkapl.cz wrote: >tcf_block_put_ext has assumed that all filters (and thus their goto >actions) are destroyed in RCU callback and thus can not race with our >list iteration. However, that is not true during netns cleanup (see >tcf_exts_get_net comment). > >P

Re: [RFC 0/9] net: create adaptive software irq moderation library

2017-11-24 Thread Saeed Mahameed
On Fri, Nov 24, 2017 at 4:05 AM, Saeed Mahameed wrote: > On Sun, Nov 5, 2017 at 9:44 PM, Andy Gospodarek wrote: >> From: Andy Gospodarek >> >> This RFC converts the adaptive interrupt moderation library from the >> mlx5_en driver into a library so it can be used by any driver. The last >> patch

Re: [PATCH net] net: qmi_wwan: add support for Cinterion PLS8

2017-11-24 Thread Oliver Graute
On 24/11/17, Reinhard Speyerer wrote: > before posting this problem report > https://developer.gemalto.com/threads/ipv6dualstack-problems-pls8-e-revision-03017 > in the Gemalto developer forum I tested the qmi_wwan/cdc_ether changes > you suggested above and apart from having two working QMI interf

Re: [PATCH net] net: qmi_wwan: add support for Cinterion PLS8

2017-11-24 Thread Oliver Graute
On 23/11/17, Bjørn Mork wrote: > > This is also consistent with the Windows drivers. And being a proper > CDC ECM class function, it should Just Work with the cdc_ether driver. > Except for the "RmNet" part, which I guess is the reason you want to > add this device to qmi_wwan. Which is fine, *i

Re: [RFC 0/9] net: create adaptive software irq moderation library

2017-11-24 Thread Saeed Mahameed
On Sun, Nov 5, 2017 at 9:44 PM, Andy Gospodarek wrote: > From: Andy Gospodarek > > This RFC converts the adaptive interrupt moderation library from the > mlx5_en driver into a library so it can be used by any driver. The last > patch in this set adds support for interrupt moderation in the bnxt_

[PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account

2017-11-24 Thread Aleksey Makarov
From: Sunil Goutham on T81 there are only 4 cores, hence setting max queue count to 4 would leave nothing for XDP_TX. This patch fixes this by doubling max queue count in above scenarios. Signed-off-by: Sunil Goutham Signed-off-by: cjacob Signed-off-by: Aleksey Makarov --- drivers/net/ethern

[PATCH net-next] net: thunderx: Add support for xdp redirect

2017-11-24 Thread Aleksey Makarov
From: Sunil Goutham This patch adds support for XDP_REDIRECT. Flush is not yet supported. Signed-off-by: Sunil Goutham Signed-off-by: cjacob Signed-off-by: Aleksey Makarov --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 110 - drivers/net/ethernet/cavium/thunder/

[PATCH v2] net: sched: crash on blocks with goto chain action

2017-11-24 Thread Roman Kapl
tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback and thus can not race with our list iteration. However, that is not true during netns cleanup (see tcf_exts_get_net comment). Prevent the user after free by holding all chains (except 0, that

[PATCH] net: thunderbolt: Stop using zero to mean no valid DMA mapping

2017-11-24 Thread Mika Westerberg
Commit 86dabda426ac ("net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()") fixed a DMA-API violation where the driver called dma_unmap_page() in tbnet_free_buffers() for a bus address that might already be unmapped. The fix was to zero out the bus address of a frame in tbn

Re: [PATCH v7 3/5] bpf: add a bpf_override_function helper

2017-11-24 Thread Daniel Borkmann
On 11/22/2017 10:23 PM, Josef Bacik wrote: > From: Josef Bacik > > Error injection is sloppy and very ad-hoc. BPF could fill this niche > perfectly with it's kprobe functionality. We could make sure errors are > only triggered in specific call chains that we care about with very > specific situ

Re: [PATCH] dsa: dsa2: fix compile error for !CONFIG_OF

2017-11-24 Thread Arend van Spriel
On 11/24/2017 3:28 AM, Andrew Lunn wrote: On Thu, Nov 23, 2017 at 08:27:48PM +0100, Arend Van Spriel wrote: + Arnd On Thu, Nov 23, 2017 at 8:12 PM, Arend Van Spriel wrote: On Thu, Nov 23, 2017 at 3:04 PM, Andrew Lunn wrote: On Thu, Nov 23, 2017 at 01:00:51PM +0100, Arend van Spriel wrote:

[PATCH] atm: nicstar: use the setup_timer helper

2017-11-24 Thread Colin King
From: Colin Ian King Replace init_timer and two explicit assignments with the setup_timer helper. Signed-off-by: Colin Ian King --- drivers/atm/nicstar.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index a9702836cbae..335

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Kai Heng Feng
> Also the MAC address is different, can you just trigger off of Dell's > MAC address space instead of the address space of the dongle device? A really good idea, never thought of this. Thanks for the hint :) Still, I need to ask Dell folks to get all the answers. Kai-Heng

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Kai Heng Feng
> On 24 Nov 2017, at 4:28 PM, Greg KH wrote: > > The bcdDevice is different between the dock device and the "real" > device, why not use that? Yea, I’ll poke around and see if bcdDevice alone can be a good predicate. > Then there is still a bug. Who as ASMedia is working on this, have they >

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Greg KH
On Fri, Nov 24, 2017 at 11:44:02AM +0800, Kai Heng Feng wrote: > > > > On 23 Nov 2017, at 5:24 PM, Greg KH wrote: > > > > On Thu, Nov 23, 2017 at 04:53:41PM +0800, Kai Heng Feng wrote: > >> > >> What I want to do here is to finding this connection: > >> Realtek r8153 <-> SMSC hub (USD ID: 0424

[patch iproute2] tc: move action cookie print out of the stats if

2017-11-24 Thread Jiri Pirko
From: Jiri Pirko Cookie print was made dependent on show_stats for no good reason. Fix this bu pushing cookie print ot of the stats if. Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") Signed-off-by: Jiri Pirko --- tc/m_action.c | 17 - 1 file changed, 8 insertions

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Greg KH
On Fri, Nov 24, 2017 at 09:28:05AM +0100, Greg KH wrote: > On Fri, Nov 24, 2017 at 11:44:02AM +0800, Kai Heng Feng wrote: > > > > > > > On 23 Nov 2017, at 5:24 PM, Greg KH wrote: > > > > > > On Thu, Nov 23, 2017 at 04:53:41PM +0800, Kai Heng Feng wrote: > > >> > > >> What I want to do here is

Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE

2017-11-24 Thread Peter Zijlstra
On Thu, Nov 23, 2017 at 10:31:29PM -0800, Alexei Starovoitov wrote: > unfortunately 32-bit is more screwed than it seems: > > $ cat align.c > #include > > struct S { > unsigned long long a; > } s; > > struct U { > unsigned long long a; > } u; > > int main() > { > printf("%d, %d\n",

Re: [RFC net-next 4/6] netdevsim: add software driver for testing offloads

2017-11-24 Thread Jiri Pirko
Fri, Nov 24, 2017 at 08:49:17AM CET, jakub.kicin...@netronome.com wrote: >On Thu, Nov 23, 2017 at 11:24 PM, Jiri Pirko wrote: >> Fri, Nov 24, 2017 at 03:36:11AM CET, jakub.kicin...@netronome.com wrote: >>>To be able to run selftests without any hardware required we >>>need a software model. The m

Re: [RFC net-next 0/6] xdp: make stack perform remove and tests

2017-11-24 Thread Jakub Kicinski
On Thu, Nov 23, 2017 at 11:45 PM, Jiri Pirko wrote: > Fri, Nov 24, 2017 at 03:36:07AM CET, jakub.kicin...@netronome.com wrote: >>Hi! >> >>The purpose of this series is to add a software model of BPF offloads >>to make it easier for everyone to test them and make some of the more >>arcane rules and