[PATCH net-next] net: sched: Add the invalid handle check in qdisc_class_find

2017-08-18 Thread gfree . wind
From: Gao Feng Add the invalid handle "0" check to avoid unnecessary search, because the qdisc uses the skb->priority as the handle value to look up, and it is "0" usually. Signed-off-by: Gao Feng --- include/net/sch_generic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/

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

2017-08-18 Thread Dan Carpenter
"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 diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index d2f2bdf71ffa..b8cb1b3c9bfb 100644

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

2017-08-18 Thread Yi Yang
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. v2->v3 - Change OVS_KEY_ATTR_NSH to nested key to handle length-fixed attributes and length-variable attri

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

2017-08-18 Thread John Fastabend
On 08/17/2017 03:28 PM, Alexei Starovoitov wrote: > On 8/17/17 11:58 AM, John Fastabend wrote: +/* reserve BPF programs early so can abort easily on failures */ +if (map_flags & BPF_SOCKMAP_STRPARSER) { >>> why have two 'flags' arguments and new helper just for this? >>> can norma

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

2017-08-18 Thread John Fastabend
On 08/18/2017 12:27 AM, Dan Carpenter wrote: > "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 > > diff --git a/kernel/bpf/syscall.c b/ke

Re: [PATCH iproute2 json v2 00/27] ip: add -json support to 'ip link show'

2017-08-18 Thread Julien Fortin
Ack, thanks Stephen. On Thu, Aug 17, 2017 at 6:04 PM, Stephen Hemminger wrote: > On Thu, 17 Aug 2017 10:35:47 -0700 > Julien Fortin wrote: > >> From: Julien Fortin >> >> This patch series adds json support to 'ip [-details] link show [dev DEV]' >> Each patch describes the json schema it adds an

Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier

2017-08-18 Thread Daniel Borkmann
On 08/18/2017 03:14 AM, Martin KaFai Lau wrote: In check_map_func_compatibility(), a 'break' has been accidentally removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS cases. This patch adds it back. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Cc: John Fast

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

2017-08-18 Thread Jiri Pirko
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: f93e1cdcf42c ("net/sched: fix filter flushing") Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 2 +- 1 fil

[PATCH net-next 6/7] s390/qeth: unify code to build header elements

2017-08-18 Thread Julian Wiedmann
After plenty of refactoring, use hd_len as single indication that the skb needs a dedicated header element. This preserves existing behaviour for TSO, as 'hdr' always points to skb->data. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 29 +++-- 1

[PATCH net-next 7/7] s390/qeth: use skb_cow_head() for L2 OSA xmit

2017-08-18 Thread Julian Wiedmann
Taking a full copy via skb_realloc_headroom() on every xmit is overkill and wastes CPU time; all we actually need is to push on the qeth_hdr. So rework the L2 OSA TX path to avoid the copy. Minor complications arise because struct qeth_hdr must not cross a page boundary. So add a new helper qeth_pu

[PATCH net-next 5/7] s390/qeth: pass full IQD header length to fill_buffer()

2017-08-18 Thread Julian Wiedmann
This is a prerequisite for unifying the code to build header elements. The TSO header has a different size, so we can no longer rely on implicitly adding the size of a normal qeth_hdr. No functional change. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 3 +-- drivers/s3

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

2017-08-18 Thread Julian Wiedmann
Hi Dave, 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(). Thanks, Julian Julian Wiedmann (7): s390/qeth: split L2 xmit paths s390/qeth: pass full data length to l2_fill_header() s390/qet

[PATCH net-next 4/7] s390/qeth: pass TSO data offset to fill_buffer()

2017-08-18 Thread Julian Wiedmann
For TSO we need to skip the skb's qeth/IP/TCP headers when mapping it into buffer elements. Instead of (mis)using skb_pull(), pass a corresponding offset to fill_buffer() like we already do for IQDs. No actual change in the resulting TSO buffers. Signed-off-by: Julian Wiedmann --- drivers/s390/

[PATCH net-next 2/7] s390/qeth: pass full data length to l2_fill_header()

2017-08-18 Thread Julian Wiedmann
For IQD we already need to fix up the qeth_hdr's length field, and future changes will require more flexibility for OSA as well. The device-specific path knows best what header length it requires, so just pass it from there. While at it, remove the unused qeth_card parameter. No functional change.

[PATCH net-next 1/7] s390/qeth: split L2 xmit paths

2017-08-18 Thread Julian Wiedmann
l2_hard_start_xmit() actually doesn't contain much shared code, and having device-specific paths makes isolated changes a lot easier. So split it into three routines for IQD, OSN and OSD/OSM/OSX. No functional change. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l2_main.c | 225

[PATCH net-next 3/7] s390/qeth: pass TSO header length to fill_buffer()

2017-08-18 Thread Julian Wiedmann
The TSO code already calculates the length of its header element, no need to duplicate this in the low-level code again. Use this opportunity to make hd_len unsigned, and for TSO match its calculation to what tso_fill_header() does. No functional change. Signed-off-by: Julian Wiedmann --- driv

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

2017-08-18 Thread Daniel Borkmann
On 08/18/2017 09:27 AM, Dan Carpenter wrote: "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 Acked-by: Daniel Borkmann

Re: [PATCHv2 net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-18 Thread Pablo Neira Ayuso
On Fri, Aug 18, 2017 at 11:01:36AM +0800, Xin Long wrote: > As we know in some target's checkentry it may dereference par.entryinfo > to check entry stuff inside. But when sched action calls xt_check_target, > par.entryinfo is set with NULL. It would cause kernel panic when calling > some targets.

[PATCH 3/6] dpaa_eth: enable Rx hashing control

2017-08-18 Thread Madalin Bucur
Allow ethtool control of the Rx flow hashing. By default RSS is enabled, this allows to turn it off by bypassing the FMan Keygen block and sending all traffic on the default Rx frame queue. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 113

[PATCH 5/6] Documentation: networking: add RSS information

2017-08-18 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- Documentation/networking/dpaa.txt | 68 ++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/dpaa.txt b/Documentation/networking/dpaa.txt index 76e016d..f88194f 100644 --- a/Documentation/n

[PATCH 4/6] dpaa_eth: add NETIF_F_RXHASH

2017-08-18 Thread Madalin Bucur
Set the skb hash when then FMan Keygen hash result is available. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 19 --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 1 + drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 9 ++

[PATCH 0/6] Add RSS to DPAA 1.x Ethernet driver

2017-08-18 Thread Madalin Bucur
This patch set introduces Receive Side Scaling for the DPAA Ethernet driver. Documentation is updated with details related to the new feature and limitations that apply. Added also a small fix. Iordache Florinel-R70177 (1): fsl/fman: enable FMan Keygen Madalin Bucur (5): dpaa_eth: use multipl

[PATCH 6/6] dpaa_eth: check allocation result

2017-08-18 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index ef30038..ff7f153 100644 --- a/drivers/net/ethernet/freescal

[PATCH 1/6] fsl/fman: enable FMan Keygen

2017-08-18 Thread Madalin Bucur
From: Iordache Florinel-R70177 Add support for the FMan Keygen with a hardcoded scheme to spread incoming traffic on a FQ range based on source and destination IPs and ports. Signed-off-by: Iordache Florinel Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/Makefile |

[PATCH 2/6] dpaa_eth: use multiple Rx frame queues

2017-08-18 Thread Madalin Bucur
Add a block of 128 Rx frame queues per port. The FMan hardware will send traffic on one of these queues based on the FMan port Parse Classify Distribute setup. The hash computed by the FMan Keygen block will select the Rx FQ. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/d

[PATCH v2 0/5] ARM: dts: rcar-gen2: Convert to new CPG/MSSR bindings

2017-08-18 Thread Geert Uytterhoeven
: - renesas-devel-20170818-v4.13-rc5. Known issues: - The CPG/MSSR driver is initialized later than the old clk-rcar-gen2 driver, causing changes of initialization order for other drivers. Currently the PHY subsystem does not support probe deferral +irq: no irq domain found for

Re: Something hitting my total number of connections to the server

2017-08-18 Thread Akshat Kakkar
On Thu, Aug 17, 2017 at 5:06 PM, Eric Dumazet wrote: > On Thu, 2017-08-17 at 14:35 +0530, Akshat Kakkar wrote: > >> I upgraded to 4.4 but still experiencing same issue. >> Please help. > > Still too old kernel, shoot again ;) > > Sorry but that's the maximum I can try as of now as its the LT ver

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

2017-08-18 Thread David Laight
From: Phil Sutter > Sent: 17 August 2017 18:09 > To: Stephen Hemminger > Cc: netdev@vger.kernel.org > Subject: [iproute PATCH v2 1/7] ipntable: Make sure filter.name is > NULL-terminated > > Signed-off-by: Phil Sutter > --- > ip/ipntable.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(

RE: [iproute PATCH v2 2/3] iproute_lwtunnel: Argument to strerror must be positive

2017-08-18 Thread David Laight
From: Phil Sutter > Sent: 17 August 2017 18:10 > Signed-off-by: Phil Sutter > --- > ip/iproute_lwtunnel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c > index 398ab5e077ed8..1a3dc4d4c0ed9 100644 > --- a/ip/iproute_lwtunnel

Re: [PATCH v2 0/6] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-18 Thread Corentin Labbe
On Thu, Aug 17, 2017 at 09:51:43AM +0200, Corentin Labbe wrote: > Hello > > 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 integrated one. >

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

2017-08-18 Thread David Laight
From: Phil Sutter > Sent: 17 August 2017 18:10 > The later check for 'k[0] != 0' requires a non-empty filter name, > otherwise NULL pointer dereference in 'q' might happen. > > Signed-off-by: Phil Sutter > --- > tc/tc_filter.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tc/tc_fi

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

2017-08-18 Thread David Laight
From: Phil Sutter > Sent: 17 August 2017 18:10 > This prevents word-splitting and therefore leads to more accurate error > message in case 'grep -c' prints something other than a number. > > Signed-off-by: Phil Sutter > --- > ip/ifcfg | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH] net: stmmac: socfgpa: Ensure emac bit set in sys manager for MII/GMII/SGMII.

2017-08-18 Thread Sergei Shtylyov
Hello! On 8/18/2017 9:55 AM, Stephan Gatzka wrote: When using MII/GMII/SGMII in the Altera SoC, the phy needs to be wired through the FPGA. To ensure correct behavior, the appropriate bit in the System Manager FPGA Interface Group register needs to be set. Signed-off-by: Stephan Gatzka ---

[PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Vadim Lomovtsev
While running nfs/connectathon tests kernel NULL-pointer exception has been observed due to races in svcsock.c. Race is appear when kernel accepts connection by kernel_accept (which creates new socket) and start queuing ingress packets to new socket. This happanes in ksoftirq context which concurr

Re: [iproute PATCH v2 1/7] devlink: No need for this self-assignment

2017-08-18 Thread Phil Sutter
On Thu, Aug 17, 2017 at 09:48:50PM +0200, Jiri Pirko wrote: > Thu, Aug 17, 2017 at 07:09:25PM CEST, p...@nwl.cc wrote: > >dl_argv_handle_both() will either assign to handle_bit or error out in > >which case the variable is not used by the caller. > > I'm pretty sure that I did this to silence the

[PATCH net-next] tcp: export drops counter to /proc/net/tcp{,6}

2017-08-18 Thread Stéphan Gorget
Those counters are exported for raw and udp but not for tcp, though they are incremented. An example where it is useful is chasing listen overflow. Listen overflow are counted as a global counter in LINUX_MIB_LISTENOVERFLOWS accessible in /proc/net/netstat but there is no way to find related drops

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Jeff Layton
On Fri, 2017-08-18 at 06:00 -0400, Vadim Lomovtsev wrote: > While running nfs/connectathon tests kernel NULL-pointer exception > has been observed due to races in svcsock.c. > > Race is appear when kernel accepts connection by kernel_accept > (which creates new socket) and start queuing ingress pa

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

2017-08-18 Thread Phil Sutter
Hi David, 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: netdev@vger.kernel.org > > Subject: [iproute PATCH v2 1/7] ipntable: Make sure filter.name is > > NULL-terminated > > > > Signed-off-by: Ph

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Vadim Lomovtsev
Hi Jeff, On Fri, Aug 18, 2017 at 06:27:32AM -0400, Jeff Layton wrote: > On Fri, 2017-08-18 at 06:00 -0400, Vadim Lomovtsev wrote: > > While running nfs/connectathon tests kernel NULL-pointer exception > > has been observed due to races in svcsock.c. > > > > Race is appear when kernel accepts conn

[PATCH] nfp: fix infinite loop on umapping cleanup

2017-08-18 Thread Colin King
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. Detected by CoverityScan, CID#1357309 ("Infinite loop") Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC

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 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 filter name, > > otherwise NULL pointer dereference in 'q' might happen. > > > > Signed-off-by: Phil Sutter > > --- > > tc/tc_

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Jeff Layton
On Fri, 2017-08-18 at 07:08 -0400, Vadim Lomovtsev wrote: > Hi Jeff, > > On Fri, Aug 18, 2017 at 06:27:32AM -0400, Jeff Layton wrote: > > On Fri, 2017-08-18 at 06:00 -0400, Vadim Lomovtsev wrote: > > > While running nfs/connectathon tests kernel NULL-pointer exception > > > has been observed due t

Re: [iproute PATCH v2 2/3] iproute_lwtunnel: Argument to strerror must be positive

2017-08-18 Thread Phil Sutter
On Fri, Aug 18, 2017 at 09:21:34AM +, David Laight wrote: > From: Phil Sutter > > Sent: 17 August 2017 18:10 > > Signed-off-by: Phil Sutter > > --- > > ip/iproute_lwtunnel.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtu

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

2017-08-18 Thread Phil Sutter
On Fri, Aug 18, 2017 at 09:32:52AM +, David Laight wrote: > From: Phil Sutter > > Sent: 17 August 2017 18:10 > > This prevents word-splitting and therefore leads to more accurate error > > message in case 'grep -c' prints something other than a number. > > > > Signed-off-by: Phil Sutter > > -

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

2017-08-18 Thread Chris Mi
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 ("net/sched: use newly added classid identity helpers") Signed-off-by: Chris Mi Acked-by: Jiri

[PATCH net-next 3/3] net: hns3: Fixes the static check warning due to missing unsupp L3 proto check

2017-08-18 Thread Salil Mehta
This patch fixes the static check warning due to missing handling leg of unsupported L3 protocol type in the hns3_get_l4_protocol() function. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Reported-by: Dan Carpenter Signed-off-by: Salil Mehta --- drivers/ne

[PATCH net-next 2/3] net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings()

2017-08-18 Thread Salil Mehta
This patch fixes the static check error warning in hns3_get_link_ksettings() function by re-arranging the code. Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 Driver") Reported-by: Dan Carpenter Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 85

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

2017-08-18 Thread Salil Mehta
This patch-set fixes various bugs reported by community. Salil Mehta (3): net: hns3: Fixes the missing u64_stats_fetch_begin_irq in 64-bit stats fetch net: hns3: Fixes the static checker error warning in hns3_get_link_ksettings() net: hns3: Fixes the static check warning due to missi

[PATCH net-next 1/3] net: hns3: Fixes the missing u64_stats_fetch_begin_irq in 64-bit stats fetch

2017-08-18 Thread Salil Mehta
This patch fixes the missing u64_stats_fetch_begin_irq() while trying to atomically do 64-bit RX/TX fetch. We did not get any error during test as our SoC is 64-bit so all of these seq/lock operations results in NOOP. As such, this seq lock supports has been added for the sake of completion if thi

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Vadim Lomovtsev
On Fri, Aug 18, 2017 at 07:16:45AM -0400, Jeff Layton wrote: > On Fri, 2017-08-18 at 07:08 -0400, Vadim Lomovtsev wrote: > > Hi Jeff, > > > > On Fri, Aug 18, 2017 at 06:27:32AM -0400, Jeff Layton wrote: > > > On Fri, 2017-08-18 at 06:00 -0400, Vadim Lomovtsev wrote: > > > > While running nfs/conne

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

2017-08-18 Thread Arnd Bergmann
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: net/ipv6/route.c: In function 'inet6_rtm_getroute': net/ipv6/route.c:3659:2: error: 'dst' may b

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

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 netdevice and of a port in hardware . 2. Initializes the supported MTU range for the netdevice. Signed-off-by: lipeng Signed-off-by: Salil Mehta --- .../net/ethernet/hisilicon/hn

Re: [iproute PATCH v2 1/7] ipaddress: Make buffer for filter.flushb static

2017-08-18 Thread Phil Sutter
On Thu, Aug 17, 2017 at 07:09:25PM +0200, Phil Sutter wrote: > The buffer is accessed outside of the function defining it, so make it > static. > > Signed-off-by: Phil Sutter Self-NACK: Access to flushb should be sane since all accessors are called from ipaddr_flush(). Looking at the covscan out

Re: Something hitting my total number of connections to the server

2017-08-18 Thread Eric Dumazet
On Fri, 2017-08-18 at 14:44 +0530, Akshat Kakkar wrote: > On Thu, Aug 17, 2017 at 5:06 PM, Eric Dumazet wrote: > > On Thu, 2017-08-17 at 14:35 +0530, Akshat Kakkar wrote: > > > >> I upgraded to 4.4 but still experiencing same issue. > >> Please help. > > > > Still too old kernel, shoot again ;) >

Re: [PATCH net-next] tcp: export drops counter to /proc/net/tcp{,6}

2017-08-18 Thread Eric Dumazet
On Fri, 2017-08-18 at 03:21 -0700, Stéphan Gorget wrote: > Those counters are exported for raw and udp but not for tcp, though they > are incremented. > > An example where it is useful is chasing listen overflow. Listen overflow > are counted as a global counter in LINUX_MIB_LISTENOVERFLOWS access

[PATCH net-next] net: check type when freeing metadata dst

2017-08-18 Thread David Lamparter
There is a new metadata dst type field added in "net: store port/representator id in metadata_dst", but metadata_dst_free() wasn't updated to check it before freeing the METADATA_IP_TUNNEL specific dst cache entry. This is not currently causing problems since it's far enough back in the struct to

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

2017-08-18 Thread Corentin Labbe
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| 112 +++-- 1 file changed, 105 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/

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

2017-08-18 Thread Corentin Labbe
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 one. This patch adds a new way to find if the PHY is internal, via the phy-is-integrated pr

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

2017-08-18 Thread Corentin Labbe
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 --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH v3 1/4] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-08-18 Thread Corentin Labbe
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 28 +++- 1 file changed, 23 insertio

Re: [PATCH net-next] net: check type when freeing metadata dst

2017-08-18 Thread Sergei Shtylyov
Hello! On 08/18/2017 03:16 PM, David Lamparter wrote: There is a new metadata dst type field added in "net: store port/representator id in metadata_dst", but metadata_dst_free() wasn't updated to check it before freeing the METADATA_IP_TUNNEL specific dst cache entry. This is not currently cau

[PATCH v3 0/4] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-18 Thread Corentin Labbe
Hello 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 integrated one. This patchs series adds a new way to find if the PHY is integrated, via the p

Re: [PATCH 2/2] xdp: adjust xdp redirect tracepoint to include return error code

2017-08-18 Thread Jesper Dangaard Brouer
On Thu, 17 Aug 2017 12:43:18 -0700 John Fastabend wrote: > >>> @@ -2532,12 +2535,14 @@ int xdp_do_redirect(struct net_device *dev, > >>> struct xdp_buff *xdp, > >>> ri->map = NULL; > >>> if (unlikely(!fwd)) { > >>> bpf_warn_invalid_xdp_redirect(index); > > I think we should drop

[PATCH net-next] net: check type when freeing metadata dst

2017-08-18 Thread David Lamparter
Commit 3fcece12bc1b ("net: store port/representator id in metadata_dst") added a new type field to metadata_dst, but metadata_dst_free() wasn't updated to check it before freeing the METADATA_IP_TUNNEL specific dst cache entry. This is not currently causing problems since it's far enough back in t

Re: [PATCH 2/2] xdp: adjust xdp redirect tracepoint to include return error code

2017-08-18 Thread Daniel Borkmann
On 08/18/2017 02:29 PM, Jesper Dangaard Brouer wrote: On Thu, 17 Aug 2017 12:43:18 -0700 John Fastabend wrote: @@ -2532,12 +2535,14 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp, ri->map = NULL; if (unlikely(!fwd)) { bpf_warn_invalid_xdp_r

[PATCH net] ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt()

2017-08-18 Thread Stefano Brivio
A packet length of exactly IPV6_MAXPLEN is allowed, we should refuse parsing options only if the size is 64KiB or more. While at it, remove one extra variable and one assignment which were also introduced by the commit that introduced the size check. Checking the sum 'offset + len' and only later

Re: Something hitting my total number of connections to the server

2017-08-18 Thread Akshat Kakkar
On Fri, Aug 18, 2017 at 5:36 PM, Eric Dumazet wrote: > On Fri, 2017-08-18 at 14:44 +0530, Akshat Kakkar wrote: >> On Thu, Aug 17, 2017 at 5:06 PM, Eric Dumazet wrote: >> > On Thu, 2017-08-17 at 14:35 +0530, Akshat Kakkar wrote: >> > >> >> I upgraded to 4.4 but still experiencing same issue. >> >>

Re: [PATCH net-next] tcp: export drops counter to /proc/net/tcp{,6}

2017-08-18 Thread Stéphan Gorget
On 8/18/17 1:14 PM, Eric Dumazet wrote: > On Fri, 2017-08-18 at 03:21 -0700, Stéphan Gorget wrote: >> Those counters are exported for raw and udp but not for tcp, though they >> are incremented. >> >> An example where it is useful is chasing listen overflow. Listen overflow >> are counted as a glob

[PATCHv3 iproute2 net-next] gre: add support for ERSPAN tunnel

2017-08-18 Thread William Tu
The patch adds ERSPAN type II tunnel support. The implementation is based on the draft at https://tools.ietf.org/html/draft-foschiano-erspan-01 One of the purposes is for Linux box to be able to receive ERSPAN monitoring traffic sent from the Cisco switch, by creating a ERSPAN tunnel device. In a

Re: Something hitting my total number of connections to the server

2017-08-18 Thread Eric Dumazet
On Fri, 2017-08-18 at 18:14 +0530, Akshat Kakkar wrote: > On Fri, Aug 18, 2017 at 5:36 PM, Eric Dumazet wrote: > > On Fri, 2017-08-18 at 14:44 +0530, Akshat Kakkar wrote: > >> On Thu, Aug 17, 2017 at 5:06 PM, Eric Dumazet > >> wrote: > >> > On Thu, 2017-08-17 at 14:35 +0530, Akshat Kakkar wrote:

Re: [PATCH net-next v1 05/14] amd-xgbe: Add additional debugfs support

2017-08-18 Thread Tom Lendacky
On 8/18/2017 12:02 AM, David Miller wrote: From: Andrew Lunn Date: Fri, 18 Aug 2017 02:30:57 +0200 On Thu, Aug 17, 2017 at 07:02:50PM -0500, Tom Lendacky wrote: Add additional debugfs support for reading / writing registers of any attached external phy devices as well as the SFP eeprom data.

[PATCH] netxen: fix incorrect loop counter decrement

2017-08-18 Thread Colin King
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 ("Infinite loop") Fixes: 83f18a557c6d ("netxen_nic: fw dump support") Signed-off-by: Colin Ian King --- drivers/net/ethe

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

2017-08-18 Thread Eric Dumazet
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. > > We always know, the answer is that whenever register_netdev() fails we > never need to perform any cleanup which i

[PATCHv3 net-next] gre: introduce native tunnel support for ERSPAN

2017-08-18 Thread William Tu
The patch adds ERSPAN type II tunnel support. The implementation is based on the draft at [1]. One of the purposes is for Linux box to be able to receive ERSPAN monitoring traffic sent from the Cisco switch, by creating a ERSPAN tunnel device. In addition, the patch also adds ERSPAN TX, so traffi

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

2017-08-18 Thread Jiri Benc
On Fri, 18 Aug 2017 15:24:31 +0800, Yi Yang wrote: > +struct nsh_md2_tlv { > + __be16 md_class; > + u8 type; > + u8 length; > + /* Followed by variable-length data. */ > +}; What was wrong with the u8[] field that was present at the end of the struct in the previous version of the

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

2017-08-18 Thread Jiri Benc
On Fri, 18 Aug 2017 15:26:01 +0200, Jiri Benc wrote: > Out of time for today, will continue the review next week. Again, feel > free to send a new version meanwhile or wait for the rest of the > review, whatever works better for you. One more thing: before you send a new version, be sure and doubl

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

2017-08-18 Thread Andrew Lunn
On Fri, Aug 18, 2017 at 12:35:58PM +0100, Salil Mehta wrote: > This patch adds the following support to the HNS3 driver: > 1. Support to change the Maximum Transmission Unit of a >netdevice and of a port in hardware . > 2. Initializes the supported MTU range for the netdevice. > > Signed-off-b

[PATCH] mlx5: ensure 0 is returned when vport is zero

2017-08-18 Thread Colin King
From: Colin Ian King Currently, if vport is zero then then an uninialized return status in err is returned. Since the only return status at the end of the function esw_add_uc_addr is zero for the current set of return paths we may as well just return 0 rather than err to fix this issue. Detecte

[PATCH net-next v2 01/13] amd-xgbe: Set the MDIO mode for 10000Base-T configuration

2017-08-18 Thread Tom Lendacky
Currently the MDIO mode is set to none for the 1Base-T, which is incorrect. The MDIO mode should for this configuration should be clause 45. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

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

2017-08-18 Thread Tom Lendacky
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 issue to related to module removal when the devices are up - Fix ethtool statistics related to

[PATCH net-next v2 02/13] amd-xgbe: Set the MII control width for the MAC interface

2017-08-18 Thread Tom Lendacky
When running in SGMII mode at speeds below 1000Mbps, the auto-negotition control register must set the MII control width for the MAC interface to be 8-bits wide. By default the width is 4-bits. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-common.h |1 + drivers/net/eth

[PATCH net-next v2 03/13] amd-xgbe: Be sure driver shuts down cleanly on module removal

2017-08-18 Thread Tom Lendacky
Sometimes when the driver is being unloaded while the devices are still up the driver can issue errors. This is based on timing and the double invocation of some routines. The phy_exit() call needs to be run after the network device has been closed and unregistered from the system. Also, the phy_

[PATCH net-next v2 04/13] amd-xgbe: Update TSO packet statistics accuracy

2017-08-18 Thread Tom Lendacky
When transmitting a TSO packet, the driver only increments the TSO packet statistic by one rather than the number of total packets that were sent. Update the driver to record the total number of packets that resulted from TSO transmit. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgb

[PATCH net-next v2 05/13] amd-xgbe: Add support to handle device renaming

2017-08-18 Thread Tom Lendacky
Many of the names used by the driver are based upon the name of the device found during device probe. Move the formatting of the names into the device open function so that any renaming that occurs before the device is brought up will be accounted for. This also means moving the creation of some

[PATCH net-next v2 06/13] amd-xgbe: Add additional dynamic debug messages

2017-08-18 Thread Tom Lendacky
Add some additional dynamic debug message to the driver. The new messages will provide additional information about the PCS window calculation. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next v2 10/13] net: ethtool: Add macro to clear a link mode setting

2017-08-18 Thread Tom Lendacky
There are currently macros to set and test an ETHTOOL_LINK_MODE_ setting, but not to clear one. Add a macro to clear an ETHTOOL_LINK_MODE_ setting. Signed-off-by: Tom Lendacky --- include/linux/ethtool.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/ethtool.h b

[PATCH net-next v2 08/13] amd-xgbe: Add hardware features debug output

2017-08-18 Thread Tom Lendacky
Use the dynamic debug support to output information about the hardware features reported by the device. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 78 +- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/drivers/net/ether

[PATCH net-next v2 09/13] amd-xgbe: Add per queue Tx and Rx statistics

2017-08-18 Thread Tom Lendacky
Add per queue Tx and Rx packet and byte counts. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 26 +- drivers/net/ethernet/amd/xgbe/xgbe.h |5 +

[PATCH net-next v2 07/13] amd-xgbe: Optimize DMA channel interrupt enablement

2017-08-18 Thread Tom Lendacky
Currently whenever the driver needs to enable or disable interrupts for a DMA channel it reads the interrupt enable register (IER), updates the value and then writes the new value back to the IER. Since the hardware does not change the IER, software can track this value and elimiate the need to rea

[PATCH net-next v2 12/13] amd-xgbe: Add support for VXLAN offload capabilities

2017-08-18 Thread Tom Lendacky
The hardware has the capability to perform checksum offload support (both Tx and Rx) and TSO support for VXLAN packets. Add the support required to enable this. The hardware can only support a single VXLAN port for offload. If more than one VXLAN port is added then the offload capabilities have to

[PATCH net-next v2 11/13] amd-xgbe: Convert to using the new link mode settings

2017-08-18 Thread Tom Lendacky
Convert from using the old u32 supported, advertising, etc. link settings to the new link mode settings that support bit positions / settings greater than 32 bits. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 56 ++-- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

[PATCH net-next v2 13/13] amd-xgbe: Add additional ethtool statistics

2017-08-18 Thread Tom Lendacky
Add some additional statistics for tracking VXLAN packets and checksum errors. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c |8 +++- drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c |4 drivers/net/ethernet/amd/xgbe/xgbe.h |5 + 3 file

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

2017-08-18 Thread Paolo Abeni
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 extra offset is always 0 as there is no need to skip > the udp header. How

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

2017-08-18 Thread Edward Cree
On 18/08/17 04:21, Alexei Starovoitov wrote: > On 8/15/17 12:34 PM, Edward Cree wrote: >> State of a register doesn't matter if it wasn't read in reaching an exit; >> a write screens off all reads downstream of it from all explored_states >> upstream of it. >> This allows us to prune many more br

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

2017-08-18 Thread Jakub Kicinski
On Fri, 18 Aug 2017 12:11:50 +0100, Colin King wrote: > 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. > > Detected by CoverityScan, CID#1357309 ("Infinite loop") > >

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

2017-08-18 Thread Tom Herbert
> 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 quite well with changing flowlabel. > The only exception we have hit is the

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 2:31 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); lipeng (Y); > dan.carpen...@oracle.com; mehta.salil@gmail.com; > netdev@vger.kernel.org; linux-ker...@vg

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

2017-08-18 Thread Andrew Lunn
> > > + /* MTU range: 68 - 9706 */ > > > + netdev->min_mtu = ETH_MIN_MTU; > > > > http://elixir.free- > > electrons.com/linux/latest/source/net/ethernet/eth.c#L361 > Supported range of Min and Max MTU should be at the discretion > of the driver. Therefore, initialization looks fine to me. > > I c

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

2017-08-18 Thread Daniel Borkmann
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 --- [ Given Michael's arch list update went to net, here's the follow-up for improving the description as mentioned. ] Docume

[PATCH] mlx5: ensure 0 is returned when vport is zero

2017-08-18 Thread Colin King
From: Colin Ian King Currently, if vport is zero then then an uninialized return status in err is returned. Since the only return status at the end of the function esw_add_uc_addr is zero for the current set of return paths we may as well just return 0 rather than err to fix this issue. Detecte

  1   2   3   >