Re: [PATCH v3 4/4] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-18 Thread Chen-Yu Tsai
On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe wrote: > This patch add documentation about the MDIO switch used on sun8i-h3-emac > for integrated PHY. > > Signed-off-by: Corentin Labbe > --- > .../devicetree/bindings/net/dwmac-sun8i.txt

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

2017-08-18 Thread Salil Mehta
This patch adds the following support to the HNS3 driver: 1. Support to change the Maximum Transmission Unit of a of a port in the HNS NIC hardware . 2. Initializes the supported MTU range for the netdevice. Signed-off-by: lipeng Signed-off-by: Salil Mehta

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

2017-08-18 Thread Eric Garver
On Fri, Aug 18, 2017 at 03:24:31PM +0800, Yi Yang wrote: > v3->v4 > - Add new NSH match field ttl > - Update NSH header to the latest format >which will be final format and won't change >per its author's confirmation. > - Fix comments for v3. Hi Yi, Only a few comments below since Jiri

[RFC PATCH] can: m_can: Support higher speed CAN-FD bitrates

2017-08-18 Thread Franklin S Cooper Jr
During test transmitting using CAN-FD at high bitrates (4 Mbps) only resulted in errors. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode automatically. It appears this

[PATCH net] tun: handle register_netdevice() failures properly

2017-08-18 Thread Eric Dumazet
From: Eric Dumazet syzkaller reported a double free [1], caused by the fact that tun driver was not updated properly when priv_destructor was added. When/if register_netdevice() fails, priv_destructor() must have been called already. [1] BUG: KASAN: double-free or

Re: [iproute PATCH v2 1/7] ipntable: Make sure filter.name is NULL-terminated

2017-08-18 Thread Phil Sutter
On Fri, Aug 18, 2017 at 04:32:47PM +, David Laight wrote: > From: Phil Sutter > > Sent: 18 August 2017 11:52 > > On Fri, Aug 18, 2017 at 09:19:16AM +, David Laight wrote: > > > From: Phil Sutter > > > > Sent: 17 August 2017 18:09 > > > > To: Stephen Hemminger > > > > Cc:

RE: [PATCH net-next] net: hns3: Add support to change MTU in hardware & netdev

2017-08-18 Thread Salil Mehta
Hi Andrew, > > -Original Message- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Friday, August 18, 2017 5:02 PM > > To: Salil Mehta > > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); lipeng (Y); > > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > >

Re: [PATCH net] bpf, doc: improve sysctl knob description

2017-08-18 Thread David Miller
From: Daniel Borkmann Date: Fri, 18 Aug 2017 17:11:06 +0200 > Current context speaking of tcpdump filters is out of date these > days, so lets improve the sysctl description for the BPF knobs > a bit. > > Signed-off-by: Daniel Borkmann Applied,

[PATCH net-next 0/2] bpf: Allow selecting numa node during map creation

2017-08-18 Thread Martin KaFai Lau
This series allows user to pick the numa node during map creation. The first patch has the details Martin KaFai Lau (2): bpf: Allow selecting numa node during map creation bpf: Allow numa selection in INNER_LRU_HASH_PREALLOC test of map_perf_test include/linux/bpf.h

[PATCH net-next 1/2] bpf: Allow selecting numa node during map creation

2017-08-18 Thread Martin KaFai Lau
The current map creation API does not allow to provide the numa-node preference. The memory usually comes from where the map-creation-process is running. The performance is not ideal if the bpf_prog is known to always run in a numa node different from the map-creation-process. One of the use

[PATCH net-next 2/2] bpf: Allow numa selection in INNER_LRU_HASH_PREALLOC test of map_perf_test

2017-08-18 Thread Martin KaFai Lau
This patch makes the needed changes to allow each process of the INNER_LRU_HASH_PREALLOC test to provide its numa node id when creating the lru map. Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov ---

[PATCH net v3] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Matthew Dawson
Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove headers from UDP packets before queueing"), when udp packets are being peeked the requested extra offset is always 0 as there is no need to skip the udp header. However, when the offset is 0 and the next skb is of length 0, it

Re: [PATCH RESEND 0/2] enable hires timer to timeout datagram socket

2017-08-18 Thread Richard Cochran
On Fri, Aug 18, 2017 at 06:44:08PM +, Vallish Vaidyeshwara wrote: > There has been a behavior change in 4.9 kernel with refactoring of Kernel > timer wheel in 4.8. We have a use case wherein our datagram socket > application is sensitive to socket timeout including long timeouts. > > One of

[PATCH 1/2] netfilter/xt_hashlimit: new feature/algorithm for xt_hashlimit

2017-08-18 Thread Vishwanath Pai
This patch adds a new feature to hashlimit that allows matching on the current packet/byte rate without rate limiting. This can be enabled with a new flag --hashlimit-rate-match. The match returns true if the current rate of packets is above/below the user specified value. The main difference

Re: [iproute PATCH v2 4/7] lib/inet_proto: Make sure destination buffers are NULL-terminated

2017-08-18 Thread Phil Sutter
On Fri, Aug 18, 2017 at 09:37:33AM -0700, Stephen Hemminger wrote: > On Thu, 17 Aug 2017 19:09:29 +0200 > Phil Sutter wrote: > > > Signed-off-by: Phil Sutter > > --- > > lib/inet_proto.c | 9 ++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff

Re: [patch net] net: sched: fix p_filter_chain check in tcf_chain_flush

2017-08-18 Thread David Miller
From: Jiri Pirko Date: Fri, 18 Aug 2017 10:10:43 +0200 > From: Jiri Pirko > > The dereference before check is wrong and leads to an oops when > p_filter_chain is NULL. The check needs to be done on the pointer to > prevent NULL dereference. > > Fixes:

Re: [PATCH v2 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-18 Thread Eric Dumazet
On Fri, 2017-08-18 at 10:15 -0700, Cong Wang wrote: > #include linux/refcount.h explicitly? Sure, I will send a v3, thanks.

Re: pull request: bluetooth-next 2017-08-18

2017-08-18 Thread David Miller
From: Johan Hedberg Date: Fri, 18 Aug 2017 19:16:23 +0300 > Here's one more bluetooth-next pull request for the 4.14 kernel: > > - Multiple fixes for Broadcom controllers > - Fixes to the bluecard HCI driver > - New USB ID for Realtek RTL8723BE controller > - Fix

[PATCH RESEND 1/2] net: enable high resolution timer mode to timeout datagram sockets

2017-08-18 Thread Vallish Vaidyeshwara
Enable high resolution timer mode to time SO_RCVTIMEO value used with setsockopt(2) on AF_UNIX and AF_INET datagram sockets. By default, SO_RCVTIMEO uses low resolution timer which is good for most of socket use cases. Background: Kernel timer wheel was refactored in 4.8 to avoid drawbacks with

Re: [net-next PATCH] ipv6: fix false-postive maybe-uninitialized warning

2017-08-18 Thread Arnd Bergmann
On Fri, Aug 18, 2017 at 7:49 PM, David Miller wrote: > From: Arnd Bergmann > Date: Fri, 18 Aug 2017 13:34:22 +0200 >> >> This kind of warning involving an unlock between variable initialization >> and use is relatively frequent for false-positives. I should

[PATCH net-next] liquidio: fix Smatch error

2017-08-18 Thread Felix Manlunas
From: Intiyaz Basha Fix Smatch error by not dereferencing iq pointer if it's NULL. See http://marc.info/?l=kernel-janitors=150296723301129=2 Also, remove unnecessary parentheses. Fixes: d314ac222829 ("liquidio: moved liquidio_napi_poll to lio_core.c") Reported-by:

[PATCH v5 1/4] can: dev: Add support for limiting configured bitrate

2017-08-18 Thread Franklin S Cooper Jr
Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to discover these limitations at runtime. Therefore, add support

[PATCH v5 3/4] dt-bindings: can: m_can: Document new can transceiver binding

2017-08-18 Thread Franklin S Cooper Jr
Add information regarding can-transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring --- Remove

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

2017-08-18 Thread Chen-Yu Tsai
On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe wrote: > The current way to find if the phy is internal is to compare DT phy-mode > and emac_variant/internal_phy. > But it will negate a possible future SoC where an external PHY use the > same phy mode than the internal

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

2017-08-18 Thread Chen-Yu Tsai
On Fri, Aug 18, 2017 at 8:21 PM, Corentin Labbe wrote: > In case of a MDIO switch, the registered MDIO node should be > the parent of the PHY. Otherwise of_phy_connect will fail. > > Signed-off-by: Corentin Labbe > --- >

Re: [PATCH net-next 0/2] liquidio: initialization fixes for embedded firmware

2017-08-18 Thread David Miller
From: Felix Manlunas Date: Thu, 17 Aug 2017 23:10:37 -0700 > From: Rick Farrington > > Fix problems when using an adapter w/embedded f/w (param "fw_type=none"). > > 1. Add support for PF FLR when exiting. > 2. Skip some initialization

Re: [PATCH v2 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-18 Thread Cong Wang
On Wed, Aug 16, 2017 at 4:19 PM, Eric Dumazet wrote: > From: Eric Dumazet > > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter

Re: [patch net-next] net/sched: Fix the logic error to decide the ingress qdisc

2017-08-18 Thread David Miller
From: Chris Mi Date: Fri, 18 Aug 2017 07:24:20 -0400 > The offending commit used a newly added helper function. > But the logic is wrong. Without this fix, the affected NICs > can't do HW offload. Error -EOPNOTSUPP will be returned directly. > > Fixes: a2e8da9378cc

Re: [PATCH] nfp: fix infinite loop on umapping cleanup

2017-08-18 Thread David Miller
From: Colin King Date: Fri, 18 Aug 2017 12:11:50 +0100 > From: Colin Ian King > > The while loop that performs the dma page unmapping never decrements > index counter f and hence loops forever. Fix this with a pre-decrement > on f. > >

Re: [net-next PATCH] ipv6: fix false-postive maybe-uninitialized warning

2017-08-18 Thread David Miller
From: Arnd Bergmann Date: Fri, 18 Aug 2017 13:34:22 +0200 > Adding a lock around one of the assignments prevents gcc from > tracking the state of the local 'fibmatch' variable, so it can no > longer prove that 'dst' is always initialized, leading to a bogus > warning: > >

[PATCH v3 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-18 Thread Eric Dumazet
From: Eric Dumazet refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Eric Dumazet

RE: [iproute PATCH v2 2/2] ifcfg: Quote left-hand side of [ ] expression

2017-08-18 Thread David Laight
From: Phil Sutter > Sent: 18 August 2017 12:24 ... > > > -if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then > > > +if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then > > > > You could drag all these scripts into the 1990's by using $(...) > > instead of `...`. > > That's a

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Matthew Dawson
On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: > > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > > headers from UDP packets before queueing"), when udp packets are being > > peeked the requested

Re: [patch net] net: sched: fix p_filter_chain check in tcf_chain_flush

2017-08-18 Thread Cong Wang
On Fri, Aug 18, 2017 at 1:10 AM, Jiri Pirko wrote: > From: Jiri Pirko > > The dereference before check is wrong and leads to an oops when > p_filter_chain is NULL. The check needs to be done on the pointer to > prevent NULL dereference. > > Fixes:

Re: [PATCH net-next] bpf: fix a return in sockmap_get_from_fd()

2017-08-18 Thread David Miller
From: Dan Carpenter Date: Fri, 18 Aug 2017 10:27:02 +0300 > "map" is a valid pointer. We wanted to return "err" instead. Also > let's return a zero literal at the end. > > Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") > Signed-off-by: Dan Carpenter

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
>> > + if (flags & MSG_PEEK && *off >= 0) { >> > + peek_at_off = true; >> > + _off = *off; >> > + } >> >> I think that unlikely() will fit the above condition > Sounds good. Doesn't the compiler implicitly mark branches as unlikely if they do not have an else clause?

Re: Does the kernel have a function to parse a text IPv6 address?

2017-08-18 Thread Cong Wang
On Fri, Aug 18, 2017 at 11:32 AM, David Howells wrote: > Does the kernel have a function to parse a text IPv6 address of the form > "x:y:..::z" and put it into a struct sockaddr_in6? > in6_pton() in net/core/utils.c.

[PATCH v5 2/4] dt-bindings: can: can-transceiver: Document new binding

2017-08-18 Thread Franklin S Cooper Jr
Add documentation to describe usage of the new can-transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring --- Version 5 changes: Remove @ symbol

[PATCH net-next 04/10] net: constify net_ns_type_operations

2017-08-18 Thread Stephen Hemminger
This can be const. Signed-off-by: Stephen Hemminger --- include/linux/netdevice.h | 2 +- net/core/net-sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index

[PATCH net-next 03/10] net: make net_class ro_after_init

2017-08-18 Thread Stephen Hemminger
The net_class in sysfs is only modified on init. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 40937ee63f14..99061b0a1ebd 100644 ---

[PATCH net-next 06/10] net: drop unused attribute argument from sysfs queue funcs

2017-08-18 Thread Stephen Hemminger
The show and store functions don't need/use the attribute. Signed-off-by: Stephen Hemminger --- include/linux/netdevice.h | 5 ++--- net/core/net-sysfs.c | 37 +++-- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git

[PATCH net-next 08/10] net: make queue attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
The XPS queue attributes can be ro_after_init. Also use __ATTR_RX macros to simplify initialization. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git

[PATCH net-next 09/10] net: mark receive queue attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 808fbb837f25..ca82c4a72350 100644 --- a/net/core/net-sysfs.c +++

[PATCH net-next 10/10] net: style cleanups

2017-08-18 Thread Stephen Hemminger
Make code closer to current style. Mostly whitespace changes. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 68 +++- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/net/core/net-sysfs.c

[PATCH net-next 02/10] net: constify netdev_class_file

2017-08-18 Thread Stephen Hemminger
These functions are wrapper arount class_create_file which can take a const attribute. Signed-off-by: Stephen Hemminger --- include/linux/netdevice.h | 8 net/core/net-sysfs.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH net-next 05/10] net: make net sysfs attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
The attributes of net devices are immutable. Ideally, attribute groups would contain const attributes but there are too many places that do modifications of list during startup (in other code) to allow that. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 4

[PATCH net-next 07/10] net: make BQL sysfs attributes ro_after_init

2017-08-18 Thread Stephen Hemminger
Also fix macro to not have ; at end. Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 48714c8024f3..a4af5e2ff398 100644

[PATCH net-next 00/10] sysfs related cleanups

2017-08-18 Thread Stephen Hemminger
Network sysfs infrastructure changes. Mostly related to using ro_after_init to make function tables immutable. Stephen Hemminger (10): net: don't decrement kobj reference count on init failure net: constify netdev_class_file net: make net_class ro_after_init net: constify

[PATCH net-next 01/10] net: don't decrement kobj reference count on init failure

2017-08-18 Thread Stephen Hemminger
If kobject_init_and_add failed, then the failure path would decrement the reference count of the queue kobject whose reference count was already zero. Fixes: 114cf5802165 ("bql: Byte queue limits") Signed-off-by: Stephen Hemminger --- net/core/net-sysfs.c | 22

Re: [iproute PATCH v2 4/5] tc/tc_filter: Make sure filter name is not empty

2017-08-18 Thread Phil Sutter
On Fri, Aug 18, 2017 at 04:34:44PM +, David Laight wrote: > From: Phil Sutter > > Sent: 18 August 2017 12:16 > > On Fri, Aug 18, 2017 at 09:30:35AM +, David Laight wrote: > > > From: Phil Sutter > > > > Sent: 17 August 2017 18:10 > > > > The later check for 'k[0] != 0' requires a non-empty

[PATCH 2/2] netfilter/libxt_hashlimit: new feature/algorithm for xt_hashlimit

2017-08-18 Thread Vishwanath Pai
This patch adds a new feature to hashlimit that allows matching on the current packet/byte rate without rate limiting. This can be enabled with a new flag --hashlimit-rate-match. The match returns true if the current rate of packets is above/below the user specified value. The main difference

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
On Fri, Aug 18, 2017 at 1:42 PM, Paolo Abeni wrote: > On Fri, 2017-08-18 at 12:39 -0400, Matthew Dawson wrote: >> On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: >> > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: >> > > diff --git a/net/unix/af_unix.c

Re: [PATCH] netxen: fix incorrect loop counter decrement

2017-08-18 Thread David Miller
From: Colin King Date: Fri, 18 Aug 2017 14:12:06 +0100 > From: Colin Ian King > > The loop counter k is currently being decremented from zero which > is incorrect. Fix this by incrementing k instead > > Detected by CoverityScan, CID#401847

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

2017-08-18 Thread Felix Manlunas
From: Veerasenareddy Burru Make VF driver notify NIC firmware of MTU change. Firmware needs this information for MTU propagation and enforcement. The first patch in this series moves a macro definition to a proper place to prevent a build error in the second

[PATCH net-next 2/2] liquidio: make VF driver notify NIC firmware of MTU change

2017-08-18 Thread Felix Manlunas
Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 1/2] liquidio: move macro definition to a proper place

2017-08-18 Thread Felix Manlunas
The macro LIO_CMD_WAIT_TM is not specific to the PF driver; it can be used by the VF driver too, so move its definition from a PF-specific header file to one that's common to PF and VF. Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas

[PATCH RESEND 2/2] selftests/net: add test to verify datagram socket timeout

2017-08-18 Thread Vallish Vaidyeshwara
AF_UNIX and AF_INET datagram sockets use high resolution timer to time SO_RCVTIMEO value used with setsockopt(2). This test checks for the accuracy of kernel notifying these sockets timeout to application. Test program has code to check AF_UNIX socket, however the kernel function used to timeout

[PATCH RESEND 0/2] enable hires timer to timeout datagram socket

2017-08-18 Thread Vallish Vaidyeshwara
Hello Dave, Resending the patch series to include netdev mailing list with a cover letter. I am submitting 2 patch series to enable hires timer to timeout datagram sockets (AF_UNIX & AF_INET domain) and test code to test timeout accuracy on these sockets. There has been a behavior change in 4.9

Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter to memcpy()

2017-08-18 Thread Lance Richardson
> From: "Phil Sutter" > To: "Stephen Hemminger" > Cc: netdev@vger.kernel.org > Sent: Tuesday, August 15, 2017 12:42:55 PM > Subject: Re: [iproute PATCH 21/51] lib/libnetlink: Don't pass NULL parameter > to memcpy() > > On Tue, Aug 15, 2017 at 08:15:55AM

[PATCH v5 4/4] can: m_can: Add call to of_can_transceiver

2017-08-18 Thread Franklin S Cooper Jr
Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: Franklin S Cooper Jr --- drivers/net/can/m_can/m_can.c | 2 ++ 1 file

[PATCH v5 0/4] can: Support transceiver based bit rate limit

2017-08-18 Thread Franklin S Cooper Jr
Add a new generic binding that CAN drivers can be used to specify the max bit rate supported by a transceiver. This is useful since in some instances since the maximum speeds may be limited by the transceiver used. However, transceivers may not provide a means to determine this limitation at

Re: [iproute PATCH v2 4/7] lib/inet_proto: Make sure destination buffers are NULL-terminated

2017-08-18 Thread Stephen Hemminger
On Thu, 17 Aug 2017 19:09:29 +0200 Phil Sutter wrote: > Signed-off-by: Phil Sutter > --- > lib/inet_proto.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/inet_proto.c b/lib/inet_proto.c > index ceda082b12a2e..87ed4769fc3da

Re: [PATCH net-next 0/7] s390/net: more updates for 4.14

2017-08-18 Thread David Miller
From: Julian Wiedmann Date: Fri, 18 Aug 2017 10:19:03 +0200 > please apply another batch of qeth patches for net-next. > This reworks the xmit path for L2 OSAs to use skb_cow_head() instead of > skb_realloc_headroom(). Series applied, thanks Julian.

Re: [PATCH net-next 0/3] Misc. Bug fixes for HNS3 Ethernet Driver

2017-08-18 Thread David Miller
From: Salil Mehta Date: Fri, 18 Aug 2017 12:31:36 +0100 > This patch-set fixes various bugs reported by community. Series applied.

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Paolo Abeni
On Fri, 2017-08-18 at 12:39 -0400, Matthew Dawson wrote: > On Friday, August 18, 2017 10:05:18 AM EDT Paolo Abeni wrote: > > On Thu, 2017-08-17 at 22:11 -0400, Matthew Dawson wrote: > > > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c > > > index 7b52a380d710..be8982b4f8c0 100644 > > > ---

Re: [PATCH net v2] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread Willem de Bruijn
On Thu, Aug 17, 2017 at 10:11 PM, Matthew Dawson wrote: > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > headers from UDP packets before queueing"), when udp packets are being > peeked the requested extra offset is always 0 as there is no need to

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 12:35 AM, John Fastabend wrote: From an API perspective having all socks in a sockmap inherit the same BPF programs is useful when working with cgroups. It keeps things consistent and is pretty effective for applying policy to cgroup sockets. agree. it's all clear, see modified

Does the kernel have a function to parse a text IPv6 address?

2017-08-18 Thread David Howells
Does the kernel have a function to parse a text IPv6 address of the form "x:y:..::z" and put it into a struct sockaddr_in6? David

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-18 Thread Martin KaFai Lau
On Fri, Aug 18, 2017 at 07:50:03AM -0700, Tom Herbert wrote: > > We had been using the auto_flowlabels=1 (i.e. essentially enable flowlabel) > > mainly because we want to take the benefit of dst_negative_advice() when > > tcp_write_timeout() happens. > > > > During our test, our system handles

[PATCH net-next 12/12] nfp: don't reuse pointers in ring dumping

2017-08-18 Thread Jakub Kicinski
We were reusing skb pointer when reading page frag, since ring entries contain a union of a skb and frag pointer. This can be confusing to people reading the code. Refactor the code to read frag pointer directly. Signed-off-by: Jakub Kicinski Reviewed-by: Simon

[PATCH net-next 09/12] nfp: add pointer to vNIC config memory to nfp_port structure

2017-08-18 Thread Jakub Kicinski
Simplify the statistics handling code by keeping pointer to vNIC's config memory in nfp_port. Note that this is referring to the representor side of vNICs, vNIC side has the pointer in nfp_net. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman

[PATCH net-next 08/12] nfp: report MAC statistics in ethtool

2017-08-18 Thread Jakub Kicinski
Add reporting of MAC statistics in ethtool. MAC statistics are read out from the MAC IP and accumulated by application FW, therefore their presence depends on the application FW. Add missing defines and string names for the statistics and dump them in ethtool -S. Signed-off-by: Jakub Kicinski

[PATCH net-next 06/12] nfp: split software and hardware vNIC statistics

2017-08-18 Thread Jakub Kicinski
In preparation for reporting vNIC HW stats on representors split handling of the SW and HW stats in ethtool -S. Representors don't have SW stats (since vNIC is assigned to the VM). Remove the questionable defines which assume nn variable exists in the scope. Signed-off-by: Jakub Kicinski

[PATCH net-next 02/12] nfp: provide ethtool_drvinfo on representors

2017-08-18 Thread Jakub Kicinski
Extend representors' ethtool ops to show basic info like firmware version, driver version, and driver name. While at it don't set drvinfo.n_stats and drvinfo.regdump_len, core will invoke appropriate handlers to get those. A helper is added to turn a netdev into nfp_app for convenience.

[PATCH net-next 05/12] nfp: add helper for printing ethtool strings

2017-08-18 Thread Jakub Kicinski
Add a helper for printing ethtool strings and advancing the pointer correctly. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 65 +++--- 1 file changed,

[PATCH net-next 10/12] nfp: add ethtool statistics for representors

2017-08-18 Thread Jakub Kicinski
Representors may be associated with both VFs or more importantly with physical ports. Allow vNIC and MAC statistics to be read with ethtool -S on representors. In case of vNICs we reuse the vNIC statistic helper, we just need to swap RX and TX to give statistics the "switch perspective."

[PATCH net-next 11/12] nfp: fix copy paste in names and messages regarding vNICs

2017-08-18 Thread Jakub Kicinski
Data and control vNICs currently use the same area name and error message. This could lead to confusion. Make sure the error message says "ctrl" in case of control and the data area is called "nfp.bar0". Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman

[PATCH net-next 04/12] nfp: don't report standard netdev statistics in ethtool

2017-08-18 Thread Jakub Kicinski
We have been recently called out as a bad example for reporting standard netdev statistics as part of ethtool. Fix that :) Removing standard statistics allows us to simplify the structure holding definitions since we no longer have to mux different types of statistics. Signed-off-by: Jakub

[PATCH net-next 07/12] nfp: store pointer to MAC statistics in nfp_port

2017-08-18 Thread Jakub Kicinski
Store pointer to device memory containing MAC statistics in nfp_port. This simplifies representor code and will be used to dump those statistics in ethtool as well. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman ---

Re: [PATCH net] tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP

2017-08-18 Thread David Miller
From: Neal Cardwell Date: Wed, 16 Aug 2017 17:53:36 -0400 > In some situations tcp_send_loss_probe() can realize that it's unable > to send a loss probe (TLP), and falls back to calling tcp_rearm_rto() > to schedule an RTO timer. In such cases, sometimes tcp_rearm_rto() >

RE: [PATCH] vsock: only load vmci transport on VMware hypervisor by default

2017-08-18 Thread Dexuan Cui
> From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > CID is not really used by us, because we only support guest<->host > communication, > > and don't support guest<->guest communication. The Hyper-V host > references > > every VM by VmID (which is invisible to the VM), and a VM can only talk

Re: [PATCH net-next] macvlan: add offload features for encapsulation

2017-08-18 Thread David Miller
From: Dimitris Michailidis Date: Wed, 16 Aug 2017 14:34:46 -0700 > Currently macvlan devices do not set their hw_enc_features making > encapsulated Tx packets resort to SW fallbacks. Add encapsulation GSO > offloads to ->features as is done for the other GSOs and set >

Re: [PATCH] irda: do not leak initialized list.dev to userspace

2017-08-18 Thread David Miller
From: Colin King Date: Thu, 17 Aug 2017 23:14:58 +0100 > From: Colin Ian King > > list.dev has not been initialized and so the copy_to_user is copying > data from the stack back to user space which is a potential > information leak. Fix this

Re: [PATCH net-next 2/2] bpf: inline map in map lookup functions for array and htab

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 4:51 PM, Daniel Borkmann wrote: Avoid two successive functions calls for the map in map lookup, first is the bpf_map_lookup_elem() helper call, and second the callback via map->ops->map_lookup_elem() to get to the map in map implementation. Implementation inlines array and htab flavor

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread David Ahern
On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: > Hello David, > > David Ahern writes: > >> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev >> *idev, >> { >> u32 tb_id; >> struct net *net = dev_net(idev->dev); >> -struct net_device

Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address

2017-08-18 Thread Hannes Frederic Sowa
David Ahern writes: > On 8/18/17 6:05 PM, David Ahern wrote: >> On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: >>> Hello David, >>> >>> David Ahern writes: >>> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,

Re: [PATCH net v3] datagram: When peeking datagrams with offset < 0 don't skip empty skbs

2017-08-18 Thread David Miller
From: Matthew Dawson Date: Fri, 18 Aug 2017 15:04:54 -0400 > Due to commit e6afc8ace6dd5cef5e812f26c72579da8806f5ac ("udp: remove > headers from UDP packets before queueing"), when udp packets are being > peeked the requested extra offset is always 0 as there is no need to

Re: [PATCH v3 net-next] ipv4: convert dst_metrics.refcnt from atomic_t to refcount_t

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Aug 2017 12:08:07 -0700 > From: Eric Dumazet > > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental >

Re: [RFC] about net: Fix inconsistent teardown and release of private netdev state.

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Aug 2017 06:13:49 -0700 > On Thu, 2017-08-17 at 22:21 -0700, David Miller wrote: >> From: Eric Dumazet >> Date: Thu, 17 Aug 2017 15:30:40 -0700 >> >> > So we do not really know if we need to clean up or not. >>

Re: [PATCH net] tipc: fix use-after-free

2017-08-18 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Aug 2017 09:41:54 -0700 > From: Eric Dumazet > > syszkaller reported use-after-free in tipc [1] > > When msg->rep skb is freed, set the pointer to NULL, > so that caller does not free it again. ... > Signed-off-by:

Re: [PATCH 0/2] xdp: adjust xdp redirect tracepoint

2017-08-18 Thread David Miller
From: Jesper Dangaard Brouer Date: Thu, 17 Aug 2017 18:22:27 +0200 > Working on streamlining the tracepoints for XDP. The eBPF programs > and XDP have no flow-control or queueing. Investigating using > tracepoint to provide a feedback on XDP_REDIRECT xmit overflow events.

Re: [PATCH net-next v2 00/13] amd-xgbe: AMD XGBE driver updates 2017-08-17

2017-08-18 Thread David Miller
From: Tom Lendacky Date: Fri, 18 Aug 2017 09:02:09 -0500 > The following updates are included in this driver update series: > > - Set the MDIO mode to clause 45 for the 10GBase-T configuration > - Set the MII control width to 8-bits for speeds less than 1Gbps > - Fix an

[PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Daniel Borkmann
Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we have are for 64 bit archs, but in case of 32

Re: [PATCH net-next 1/2] bpf: improve htab inlining for future 32 bit jits

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 5:21 PM, Daniel Borkmann wrote: On 08/19/2017 02:00 AM, Alexei Starovoitov wrote: On 8/18/17 4:51 PM, Daniel Borkmann wrote: Lets future proof htab lookup inlining, commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to

Re: [PATCH net-next 00/10] sysfs related cleanups

2017-08-18 Thread David Miller
From: Stephen Hemminger Date: Fri, 18 Aug 2017 13:46:18 -0700 > Network sysfs infrastructure changes. Mostly related to using ro_after_init > to make function tables immutable. Series applied, thanks Stephen.

Re: [PATCH net-next v2 1/2] bpf: make htab inlining more robust wrt assumptions

2017-08-18 Thread Alexei Starovoitov
On 8/18/17 6:12 PM, Daniel Borkmann wrote: Commit 9015d2f59535 ("bpf: inline htab_map_lookup_elem()") was making the assumption that a direct call emission to the function __htab_map_lookup_elem() will always work out for JITs. This is currently true since all JITs we have are for 64 bit archs,

[PATCH net-next] liquidio: fix use of pf in pass-through mode in a virtual machine

2017-08-18 Thread Felix Manlunas
From: Rick Farrington Fix problem when PF is used in pass-through mode in a VM (w/embedded f/w). If host error reading PF num from CN23XX_PCIE_SRIOV_FDL reg, try to retrieve PF num from SLI_PKT(0)_INPUT_CONTROL (initialized by f/w). Signed-off-by: Rick Farrington

Re: [net-next PATCH 06/10] bpf: sockmap with sk redirect support

2017-08-18 Thread John Fastabend
[...] (trimmed email leaving proposal - 1 summary) >> >> syscall: >> >> bpf_create_map(BPF_MAP_TYPE_SOCKMAP, ) >> bpf_prog_attach(verdict_prog, map_fd, BPF_SMAP_STREAM_VERDICT, 0); >> bpf_prog_attach(parse_prog, map_fd, BPF_SMAP_STREAM_PARSER, 0); >> bpf_map_update_elem(map_fd, key,

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-18 Thread David Miller
From: Martin KaFai Lau Date: Fri, 18 Aug 2017 13:51:36 -0700 > It seems like that middle box specifically drops TCP_RST if it > does not know anything about this flow. Since the flowlabel of the TCP_RST > (sent in TW state) is always different, it always lands to a different

Re: [PATCH net] ipv6: reset fn->rr_ptr when replacing route

2017-08-18 Thread David Miller
From: Wei Wang Date: Wed, 16 Aug 2017 11:18:09 -0700 > From: Wei Wang > > syzcaller reported the following use-after-free issue in rt6_select(): ... > The root cause of it is that in fib6_add_rt2node(), when it replaces an > existing route with the new

  1   2   3   >