[PATCH bpf 2/2] libbpf: remove dependency on barrier.h in xsk.h

2019-04-08 Thread Magnus Karlsson
The use of smp_rmb() and smp_wmb() creates a Linux header dependency on barrier.h that is uneccessary in most parts. This patch implements the two small defines that are needed from barrier.h. As a bonus, the new implementations are faster than the default ones as they default to sfence and lfence

[PATCH bpf 1/2] libbpf: remove likely/unlikely in xsk.h

2019-04-08 Thread Magnus Karlsson
This patch removes the use of likely and unlikely in xsk.h since they create a dependency on Linux headers as reported by several users. There have also been reports that the use of these decreases performance as the compiler puts the code on two different cache lines instead of on a single one. Al

[PATCH bpf 0/2] libbpf: remove two dependencies on Linux kernel headers and improve performance as a bonus

2019-04-08 Thread Magnus Karlsson
This patch set removes two dependencies on Linux kernel headers from the XDP socket code in libbpf. A number of people have pointed out that these two dependencies make it hard to build the XDP socket part of libbpf without any kernel header dependencies. The two removed dependecies are: * Remove

UDP GRO do not restore ervery UDP Packet

2019-04-08 Thread Sean Tong
I find that I do not restore every UDP paket from recvmsg when I programming with UDP_GRO in kernel version 5.0 I can get gso_size, but I do not know the last UDP packet size in aggregate datagram. For example, recvmsg returns a packet size 50 of and gso_size of 24, so the UDP packets is restor

Re: [PATCH bpf-next v2 1/3] bpf: support input __sk_buff context in BPF_PROG_TEST_RUN

2019-04-08 Thread Martin Lau
On Mon, Apr 08, 2019 at 09:04:30AM -0700, Stanislav Fomichev wrote: > Add new set of arguments to bpf_attr for BPF_PROG_TEST_RUN: > * ctx_in/ctx_size_in - input context > * ctx_out/ctx_size_out - output context > > The intended use case is to pass some meta data to the test runs that > operate on

Re: random crashes, kdump and so on

2019-04-08 Thread Reindl Harald
Am 09.04.19 um 05:41 schrieb Cong Wang: > On Mon, Apr 8, 2019 at 7:22 PM Reindl Harald wrote: >> after two weeks and 27 Mio. accepted connections 5.0.4 crashed too >> >> "vmcore-dmesg" piped through "sort | uniq" is reduced to 399 lines >> containing just rate-limited "-j LOG" iptables events a

[PATCH ghak90 V6 09/10] audit: add support for containerid to network namespaces

2019-04-08 Thread Richard Guy Briggs
Audit events could happen in a network namespace outside of a task context due to packets received from the net that trigger an auditing rule prior to being associated with a running task. The network namespace could be in use by multiple containers by association to the tasks in that network name

[PATCH net,stable 1/1] net: fec: manage ahb clock in runtime pm

2019-04-08 Thread Andy Duan
Some SOC like i.MX6SX clock have some limits: - ahb clock should be disabled before ipg. - ahb and ipg clocks are required for MAC MII bus. So, move the ahb clock to runtime management together with ipg clock. Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 30

Re: random crashes, kdump and so on

2019-04-08 Thread Cong Wang
On Mon, Apr 8, 2019 at 7:22 PM Reindl Harald wrote: > > > > Am 25.03.19 um 23:10 schrieb Reindl Harald: > >>> fact is that around 4.19.x the kernel had a ton of issues starting with > >>> conncount broken over months (again: with a simple method get the > >>> stacktrace it would have been easily d

Re: random crashes, kdump and so on

2019-04-08 Thread Reindl Harald
Am 25.03.19 um 23:10 schrieb Reindl Harald: >>> fact is that around 4.19.x the kernel had a ton of issues starting with >>> conncount broken over months (again: with a simple method get the >>> stacktrace it would have been easily discovered), the scheduler issue in >>> 4.19.x eating peoples dat

[PATCH net] net/tls: prevent bad memory access in tls_is_sk_tx_device_offloaded()

2019-04-08 Thread Jakub Kicinski
Unlike '&&' operator, the '&' does not have short-circuit evaluation semantics. IOW both sides of the operator always get evaluated. Fix the wrong operator in tls_is_sk_tx_device_offloaded(), which would lead to out-of-bounds access for for non-full sockets. Fixes: 4799ac81e52a ("tls: Add rx inl

[PATCH 4.19 stable 3/3] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-04-08 Thread Peter Oskolkov
[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.19 stable 1/3] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-08 Thread Peter Oskolkov
[ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] This is a refactoring patch: without changing runtime behavior, it moves rbtree-related code from IPv4-specific files/functions into .h/.c defrag files shared with IPv6 defragmentation code. Signed-off-by: Peter Oskolkov Cc: Eric Dumaz

[PATCH 4.19 stable 2/3] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-04-08 Thread Peter Oskolkov
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.19 stable 0/3] net: ip6 defrag: backport fixes

2019-04-08 Thread Peter Oskolkov
Currently, 4.19 and earlier stable kernels contain a security fix that is not fully IPv6 standard compliant. This patchset backports IPv6 defrag fixes from 5.1rc that restore standard-compliance. Original 5.1 patchet: https://patchwork.ozlabs.org/cover/1029418/ John Masinter (captwiggum), could

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Peter Oskolkov
On Mon, Apr 8, 2019 at 4:15 PM Sasha Levin wrote: > > On Mon, Apr 08, 2019 at 10:13:57AM -0700, Peter Oskolkov wrote: > >On Mon, Apr 8, 2019 at 9:29 AM Captain Wiggum wrote: > >> > >> Thank you Peter! > >> > >> I tried the patch on 4.9.167 & 4.19.32. It's out of sync with upstream. > >> Looks lik

Re: [PATCH net 0/2] bnxt_en: 2 bug fixes.

2019-04-08 Thread David Miller
From: Michael Chan Date: Mon, 8 Apr 2019 17:39:53 -0400 > The first patch prevents possible driver crash if we get a bad RX index > from the hardware. The second patch resets the device when the hardware > reports buffer error to recover from the error. > > Please queue these for -stable also.

Re: [PATCH] ethtool: thunder_bgx: use ethtool.h constants for speed and duplex

2019-04-08 Thread David Miller
From: Michael Zhivich Date: Mon, 8 Apr 2019 15:00:46 -0400 > Use constants provided by ethtool.h for speed and duplex values > instead of raw integer constants to increase code readability. > > thunder_bgx already uses SPEED_UNKNOWN and DUPLEX_UNKNOWN constants, > also provided by ethtool.h. >

Re: [PATCH net-next] net: phy: fix setting autoneg_complete in genphy_update_link

2019-04-08 Thread David Miller
From: Heiner Kallweit Date: Mon, 8 Apr 2019 19:28:28 +0200 > The original patch didn't set phydev->autoneg_complete in one exit path. > Fix this. > > Fixes: 4950c2ba49cc ("net: phy: fix autoneg mismatch case in > genphy_read_status") > Reported-by: Simon Horman > Tested-by: Simon Horman > Sig

Re: [PATCH v2 0/3] ethtool: fix use of SPEED_UNKNOWN constant

2019-04-08 Thread David Miller
From: Michael Zhivich Date: Mon, 8 Apr 2019 10:48:44 -0400 > This patch series addresses 2 related issues: > > 1. ethtool_validate_speed() triggers a "signed-unsigned comparison" > warning due to type difference of SPEED_UNKNOWN constant (int) > and argument to ethtool_validate_speed (__u32). >

Re: [PATCH net-next v2 0/3] mlxsw: Add support for devlink info command

2019-04-08 Thread David Miller
From: Ido Schimmel Date: Mon, 8 Apr 2019 06:59:33 + > Shalom says: > > Expose the following ASIC information via devlink info command: > - Driver name > - Hardware revision > - Firmware PSID > - Running firmware version Series applied.

Re: [PATCH net-next] qmi_wwan: Add quirk for Quectel dynamic config

2019-04-08 Thread David Miller
From: Kristian Evensen Date: Sun, 7 Apr 2019 15:39:09 +0200 > Most, if not all, Quectel devices use dynamic interface numbers, and > users are able to change the USB configuration at will. Matching on for > example interface number is therefore not possible. > > Instead, the QMI device can be i

Re: [PATCH net-next] net: phy: replace genphy_10g_driver with genphy_c45_driver

2019-04-08 Thread David Miller
From: Heiner Kallweit Date: Sun, 7 Apr 2019 13:55:01 +0200 > Recently a number of generic functions for Clause 45 PHY's has been > added. So let's replace the old very limited genphy_10g_driver with a > genphy_c45_driver. This driver isn't limited to 10G, however it's worth > to be noted that Cla

Re: [PATCH net-next] af_unix: preserve position of fd-associated bytes in stream

2019-04-08 Thread David Miller
From: Christopher Monsanto Date: Sat, 6 Apr 2019 12:33:25 -0400 > It is currently impossible for the reader of an AF_UNIX stream socket to > fully reconstruct the data sent in the presence of SCM_RIGHTS, without > reading byte-for-byte. This prevents efficiently proxying or providing a > high-le

Re: [PATCH net 0/2] fix possible use-after-free in erspan_v{4,6}

2019-04-08 Thread David Miller
From: Lorenzo Bianconi Date: Sat, 6 Apr 2019 17:16:51 +0200 > Similar to what I did in commit bb9bd814ebf0, fix possible use-after-free > in erspan_rcv and ip6erspan_rcv extracting tunnel metadata since the > packet can be 'uncloned' running __iptunnel_pull_header Series applied and queued up f

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Sasha Levin
On Mon, Apr 08, 2019 at 10:13:57AM -0700, Peter Oskolkov wrote: On Mon, Apr 8, 2019 at 9:29 AM Captain Wiggum wrote: Thank you Peter! I tried the patch on 4.9.167 & 4.19.32. It's out of sync with upstream. Looks like a little different work needed for each LTS kernel. Is someone is familiar w

Re: [PATCH net] selftests: add a tc matchall test case

2019-04-08 Thread David Miller
From: Lucas Bates Date: Mon, 8 Apr 2019 18:24:08 -0400 > On Sun, Apr 7, 2019 at 10:32 PM David Miller wrote: >> > I'm not sure to understand the goal of this series: >> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=45b3a3762721 >> > >> > But after it, tc selftests a

Re: [PATCH net-next] net: sched: flower: insert filter to ht before offloading it to hw

2019-04-08 Thread Jakub Kicinski
On Fri, 5 Apr 2019 20:56:26 +0300, Vlad Buslov wrote: > John reports: > > Recent refactoring of fl_change aims to use the classifier spinlock to > avoid the need for rtnl lock. In doing so, the fl_hw_replace_filer() > function was moved to before the lock is taken. This can create problems > for

Re: [PATCH net] selftests: add a tc matchall test case

2019-04-08 Thread Lucas Bates
On Sun, Apr 7, 2019 at 10:32 PM David Miller wrote: > > I'm not sure to understand the goal of this series: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=45b3a3762721 > > > > But after it, tc selftests are not intuitive anymore. When naively running > > them > > (.

Re: [PATCH v2 net-next 00/18] ipv4: Enable support for IPv6 gateway with IPv4 routes

2019-04-08 Thread David Miller
From: David Ahern Date: Fri, 5 Apr 2019 16:30:23 -0700 > Last set of three with the end goal of enabling IPv6 gateways with IPv4 > routes. Series applied, thanks David.

Re: [PATCH net] r8169: disable ASPM again

2019-04-08 Thread David Miller
From: Heiner Kallweit Date: Fri, 5 Apr 2019 20:46:46 +0200 > There's a significant number of reports that re-enabling ASPM causes > different issues, ranging from decreased performance to system not > booting at all. This affects only a minority of users, but the number > of affected users is big

Re: [PATCH net-next] net: phy: improve link partner capability detection

2019-04-08 Thread David Miller
From: Heiner Kallweit Date: Fri, 5 Apr 2019 21:23:13 +0200 > genphy_read_status() so far checks phydev->supported, not the actual > PHY capabilities. This can make a difference if the supported speeds > have been limited by of_set_phy_supported() or phy_set_max_speed(). > > It seems that this is

[PATCH net 2/2] bnxt_en: Reset device on RX buffer errors.

2019-04-08 Thread Michael Chan
If the RX completion indicates RX buffers errors, the RX ring will be disabled by firmware and no packets will be received on that ring from that point on. Recover by resetting the device. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan --- drivers/net

[PATCH net 1/2] bnxt_en: Improve RX consumer index validity check.

2019-04-08 Thread Michael Chan
There is logic to check that the RX/TPA consumer index is the expected index to work around a hardware problem. However, the potentially bad consumer index is first used to index into an array to reference an entry. This can potentially crash if the bad consumer index is beyond legal range. Impro

[PATCH net 0/2] bnxt_en: 2 bug fixes.

2019-04-08 Thread Michael Chan
The first patch prevents possible driver crash if we get a bad RX index from the hardware. The second patch resets the device when the hardware reports buffer error to recover from the error. Please queue these for -stable also. Thanks. Michael Chan (2): bnxt_en: Improve RX consumer index val

Re: [pull request][net-next V2 00/15] Mellanox, mlx5 updates 2019-04-02

2019-04-08 Thread David Miller
From: Saeed Mahameed Date: Fri, 5 Apr 2019 14:17:04 -0700 > This series adds misc updates to mlx5 driver. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. > > v1->v2: > remove inline keywords from static functions in c files. Pulle

Re: [PATCH net-next 5/5] Revert: "net: sched: put back q.qlen into a single location"

2019-04-08 Thread Eric Dumazet
On 04/08/2019 09:35 AM, Paolo Abeni wrote: > This revert commit 46b1c18f9deb ("net: sched: put back q.qlen > into a single location"). > After the previous patch nobody accesses directly qlen for a child > qdisc when such qdisc does per CPU stats accounting. > In the control path nobody uses dir

[PATCH net v2 2/2] net: thunderx: don't allow jumbo frames with XDP

2019-04-08 Thread Matteo Croce
The thunderx driver forbids to load an eBPF program if the MTU is too high, but this can be circumvented by loading the eBPF, then raising the MTU. Fix this by limiting the MTU if an eBPF program is already loaded. Fixes: 05c773f52b96e ("net: thunderx: Add basic XDP support") Signed-off-by: Matte

[PATCH net v2 1/2] net: thunderx: raise XDP MTU to 1508

2019-04-08 Thread Matteo Croce
The thunderx driver splits frames bigger than 1530 bytes to multiple pages, making impossible to run an eBPF program on it. This leads to a maximum MTU of 1508 if QinQ is in use. The thunderx driver forbids to load an eBPF program if the MTU is higher than 1500 bytes. Raise the limit to 1508 so it

[PATCH net v2 0/2] Fix thunderx MTU with XDP

2019-04-08 Thread Matteo Croce
The thunderx driver can't use XDP with all MTU values. This patches sets the right MTU values, and add a check to avoid setting a wrong value which will not function. Matteo Croce (2): net: thunderx: raise XDP MTU to 1508 net: thunderx: don't allow jumbo frames with XDP .../net/ethernet/cavi

Re: [PATCH net-next v4 1/6] net: xdp: refactor XDP attach

2019-04-08 Thread Daniel Borkmann
On 04/08/2019 07:05 PM, Toke Høiland-Jørgensen wrote: > From: Björn Töpel > > Generic XDP and driver XDP cannot be enabled at the same time. However, > they don't share any state; let's fix that. Here, dev->xdp_prog, is > used for both driver and generic mode. This removes the need for the > XDP_

Re: cellular modem driver APIs

2019-04-08 Thread Johannes Berg
On Sat, 2019-04-06 at 19:20 +0200, Daniele Palmas wrote: > > the qmi_wwan sysfs qmap feature, being very easy to use, is serving > well for me and customers of the company I work for (mainly directly > with libqmi, not ModemManager), Yeah, I don't doubt this. In fact, we could arguably provide t

Re: cellular modem driver APIs

2019-04-08 Thread Johannes Berg
On Thu, 2019-04-04 at 22:45 -0600, Subash Abhinov Kasiviswanathan wrote: > On 2019-04-04 14:38, Johannes Berg wrote: > > Hi, > > > > > The normal mode of operation of rmnet is using the rmnet netdevices > > > in an embedded device. > > > > Sure. Can you say what driver this would typically live o

Re: [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP

2019-04-08 Thread Paul Thomas
On Mon, Apr 8, 2019 at 1:04 PM David Miller wrote: > > From: Paul Thomas > Date: Mon, 8 Apr 2019 09:20:47 -0400 > > > + if (unlikely(skb_shinfo(skb)->tx_flags & > > SKBTX_HW_TSTAMP) && > > + gem_ptp_do_txstamp(queue, skb, desc) >

[PATCH v4] net: macb driver, check for SKBTX_HW_TSTAMP

2019-04-08 Thread Paul Thomas
Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been enabled for this skb. It does fix the issue where normal socks that aren't expecting a timestamp will not wake up on select, but when a user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work. Signed-off-by: Paul Thomas ---

Re: [PATCH] ethtool: thunder_bgx: use ethtool.h constants for speed and duplex

2019-04-08 Thread Andrew Lunn
On Mon, Apr 08, 2019 at 03:00:46PM -0400, Michael Zhivich wrote: > Use constants provided by ethtool.h for speed and duplex values > instead of raw integer constants to increase code readability. > > thunder_bgx already uses SPEED_UNKNOWN and DUPLEX_UNKNOWN constants, > also provided by ethtool.h.

Re: [PATCH v2 bpf-next 4/4] selftests_bpf: add L2 encap to test_tc_tunnel

2019-04-08 Thread Willem de Bruijn
On Mon, Apr 8, 2019 at 12:59 PM Alan Maguire wrote: > > Update test_tc_tunnel to verify adding inner L2 header > encapsulation (an MPLS label or ethernet header) works. > > Signed-off-by: Alan Maguire > static const int cfg_udp_src = 2; > static const int cfg_udp_dst = ; > +/* MPLSover

Re: [PATCH v2 bpf-next 2/4] bpf: add layer 2 encap support to bpf_skb_adjust_room

2019-04-08 Thread Willem de Bruijn
On Mon, Apr 8, 2019 at 12:59 PM Alan Maguire wrote: > > commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") > introduced support to bpf_skb_adjust_room for GSO-friendly GRE > and UDP encapsulation. > > For GSO to work for skbs, the inner headers (mac and network) need to > be marked.

Re: [PATCH v2 bpf-next 1/4] selftests_bpf: add UDP encap to test_tc_tunnel

2019-04-08 Thread Willem de Bruijn
On Mon, Apr 8, 2019 at 1:01 PM Alan Maguire wrote: > > commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") > introduced support to bpf_skb_adjust_room for GSO-friendly GRE > and UDP encapsulation and later introduced associated test_tc_tunnel > tests. Here those tests are extended to

Re: [PATCH v2 bpf-next 0/4] L2 encap support for bpf_skb_adjust_room

2019-04-08 Thread Willem de Bruijn
On Mon, Apr 8, 2019 at 12:59 PM Alan Maguire wrote: > > Extend bpf_skb_adjust_room growth to mark inner MAC header so that > L2 encapsulation can be used for tc tunnels. > > Patch #1 extends the existing test_tc_tunnel to support UDP > encapsulation; later we want to be able to test MPLS over UDP

[PATCH] ethtool: thunder_bgx: use ethtool.h constants for speed and duplex

2019-04-08 Thread Michael Zhivich
Use constants provided by ethtool.h for speed and duplex values instead of raw integer constants to increase code readability. thunder_bgx already uses SPEED_UNKNOWN and DUPLEX_UNKNOWN constants, also provided by ethtool.h. Signed-off-by: Michael Zhivich --- drivers/net/ethernet/cavium/thunder/

Re: [PATCH net-next] net: phy: switch drivers to use dynamic feature detection

2019-04-08 Thread Heiner Kallweit
On 08.04.2019 20:12, Andrew Lunn wrote: >> Splitting the series and waiting for a Tested-by, as proposed by Richard, >> may be problematic because most PHY drivers don't have a dedicated >> maintainer, and we lack the hardware to test. > > Well, we could split out those we know are likely to get t

Re: [PATCH v2 0/3] ethtool: fix use of SPEED_UNKNOWN constant

2019-04-08 Thread Zhivich, Michael
On 4/8/19, 1:55 PM, "Andrew Lunn" wrote: >On Mon, Apr 08, 2019 at 10:48:44AM -0400, Michael Zhivich wrote: >> This patch series addresses 2 related issues: >> >> 1. ethtool_validate_speed() triggers a "signed-unsigned comparison" >> warning due to type difference of SPEED_UNKNOWN constant (int)

Re: [PATCH net-next v2 3/3] Documentation: networking: devlink-info-versions: Add fw.psid

2019-04-08 Thread Jakub Kicinski
On Mon, 8 Apr 2019 06:59:36 +, Ido Schimmel wrote: > From: Shalom Toledo > > Add firmware parameter id (fw.psid). > > Signed-off-by: Shalom Toledo > Acked-by: Jiri Pirko > Signed-off-by: Ido Schimmel Acked-by: Jakub Kicinski Thanks!

Re: [PATCH net] 6lowpan: Off by one handling ->nexthdr

2019-04-08 Thread Alexander Aring
Hi, On Wed, Apr 03, 2019 at 08:34:16AM +0300, Dan Carpenter wrote: > NEXTHDR_MAX is 255. What happens here is that we take a u8 value > "hdr->nexthdr" from the network and then look it up in > lowpan_nexthdr_nhcs[]. The problem is that if hdr->nexthdr is 0xff then > we read one element beyond th

Re: [PATCH net-next] net: phy: switch drivers to use dynamic feature detection

2019-04-08 Thread Andrew Lunn
> Splitting the series and waiting for a Tested-by, as proposed by Richard, > may be problematic because most PHY drivers don't have a dedicated > maintainer, and we lack the hardware to test. Well, we could split out those we know are likely to get tested. I have a number of boards with Marvell

Re: [PATCH v2 0/3] ethtool: fix use of SPEED_UNKNOWN constant

2019-04-08 Thread Andrew Lunn
On Mon, Apr 08, 2019 at 10:48:44AM -0400, Michael Zhivich wrote: > This patch series addresses 2 related issues: > > 1. ethtool_validate_speed() triggers a "signed-unsigned comparison" > warning due to type difference of SPEED_UNKNOWN constant (int) > and argument to ethtool_validate_speed (__u32)

Re: [PATCH v2 3/3] qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant

2019-04-08 Thread Andrew Lunn
On Mon, Apr 08, 2019 at 10:48:47AM -0400, Michael Zhivich wrote: > qlcnic driver uses u16 to store SPEED_UKNOWN ethtool constant, > which is defined as -1, resulting in value truncation and > thus incorrect test results against SPEED_UNKNOWN. > > For example, the following test will print "False":

Re: [PATCH v2 2/3] broadcom: tg3: fix use of SPEED_UNKNOWN ethtool constant

2019-04-08 Thread Andrew Lunn
On Mon, Apr 08, 2019 at 10:48:46AM -0400, Michael Zhivich wrote: > tg3 driver uses u16 to store SPEED_UKNOWN ethtool constant, > which is defined as -1, resulting in value truncation and > thus incorrect test results against SPEED_UNKNOWN. > > For example, the following test will print "False": >

Re: [PATCH net-next] net: phy: switch drivers to use dynamic feature detection

2019-04-08 Thread Heiner Kallweit
On 08.04.2019 00:13, Andrew Lunn wrote: > On Sun, Apr 07, 2019 at 11:57:13AM +0200, Heiner Kallweit wrote: >> Recently genphy_read_abilities() has been added that dynamically detects >> clause 22 PHY abilities. I *think* this detection should work with all >> supported PHY's, at least for the ones

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-04-08 Thread Yuchung Cheng
On Mon, Apr 8, 2019 at 10:07 AM Eric Dumazet wrote: > > > > On 04/08/2019 09:16 AM, Neal Cardwell wrote: > > On Wed, Apr 3, 2019 at 8:13 PM brakmo wrote: > >> > >> When a packet is dropped when calling queue_xmit in __tcp_transmit_skb > >> and packets_out is 0, it is beneficial to set a small pr

[PATCH net-next] net: phy: fix setting autoneg_complete in genphy_update_link

2019-04-08 Thread Heiner Kallweit
The original patch didn't set phydev->autoneg_complete in one exit path. Fix this. Fixes: 4950c2ba49cc ("net: phy: fix autoneg mismatch case in genphy_read_status") Reported-by: Simon Horman Tested-by: Simon Horman Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 10 -

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Peter Oskolkov
On Mon, Apr 8, 2019 at 9:29 AM Captain Wiggum wrote: > > Thank you Peter! > > I tried the patch on 4.9.167 & 4.19.32. It's out of sync with upstream. > Looks like a little different work needed for each LTS kernel. > Is someone is familiar with it, and is available to patch it? I'll try to backpo

[PATCH net-next V6 2/2] net/sched: cbs: fix port_rate miscalculation

2019-04-08 Thread Leandro Dorileo
The Credit Based Shaper heavily depends on link speed to calculate the scheduling credits, we can't properly calculate the credits if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong port rate that will result into an inconsistent credit distri

[PATCH net-next V6 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-04-08 Thread Leandro Dorileo
The Time Aware Priority Scheduler is heavily dependent to link speed, it relies on it to calculate transmission bytes per cycle, we can't properly calculate the so called budget if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong budget. This p

[PATCH net-next V6 0/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-04-08 Thread Leandro Dorileo
This set fixes miscalculations based on invalid link speed values. Changes in v6: + Avoid locking a spinlock while calling __ethtool_get_link_ksettings() (suggested by: Cong Wang); Changes in v5: + Don't iterate over all the net_device maintained list (suggested by: Florian Fainelli); Chan

Re: [PATCH] MAINTAINERS: ieee802154: update documentation file pattern

2019-04-08 Thread David Miller
From: Stefan Schmidt Date: Mon, 8 Apr 2019 18:08:04 +0200 > When moving the documentation for the ieee802154 subsystem from > plain text to rst the file pattern in the MAINTAINERS file got wrong. > Updating it here to fix scripts using this file. > > Reported-by: Joe Perches > Signed-off-by: S

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-04-08 Thread Eric Dumazet
On 04/08/2019 09:16 AM, Neal Cardwell wrote: > On Wed, Apr 3, 2019 at 8:13 PM brakmo wrote: >> >> When a packet is dropped when calling queue_xmit in __tcp_transmit_skb >> and packets_out is 0, it is beneficial to set a small probe timer. >> Otherwise, the throughput for the flow can suffer be

[PATCH net-next v4 1/6] net: xdp: refactor XDP attach

2019-04-08 Thread Toke Høiland-Jørgensen
From: Björn Töpel Generic XDP and driver XDP cannot be enabled at the same time. However, they don't share any state; let's fix that. Here, dev->xdp_prog, is used for both driver and generic mode. This removes the need for the XDP_QUERY_PROG command to ndo_bpf. Signed-off-by: Björn Töpel Signed

[PATCH net-next v4 4/6] xdp: Always use a devmap for XDP_REDIRECT to a device

2019-04-08 Thread Toke Høiland-Jørgensen
An XDP program can redirect packets between interfaces using either the xdp_redirect() helper or the xdp_redirect_map() helper. Apart from the flexibility of updating maps from userspace, the redirect_map() helper also uses the map structure to batch packets, which results in a significant (around

[PATCH net-next v4 5/6] xdp: Add devmap_idx map type for looking up devices by ifindex

2019-04-08 Thread Toke Høiland-Jørgensen
A common pattern when using xdp_redirect_map() is to create a device map where the lookup key is simply ifindex. Because device maps are arrays, this leaves holes in the map, and the map has to be sized to fit the largest ifindex, regardless of how many devices actually are actually needed in the m

[PATCH net-next v4 6/6] selftests/bpf: Add test for default devmap allocation

2019-04-08 Thread Toke Høiland-Jørgensen
This adds a new selftest checking the allocation and de-allocation of default maps in different network namespaces. It loads the two different kinds of programs that need allocation (programs using tail calls, and programs using redirect), and moves interfaces around between namespaces to make sure

[PATCH net-next v4 3/6] xdp: Refactor devmap code in preparation for subsequent additions

2019-04-08 Thread Toke Høiland-Jørgensen
The subsequent commits introducing default maps and a hash-based ifindex devmap require a bit of refactoring of the devmap code. Perform this first so the subsequent commits become easier to read. Also split out the final freeing and flushing of devmaps into a workqueue, to make it easier to queue

[PATCH net-next v4 0/6] xdp: Use a default map for xdp_redirect helper

2019-04-08 Thread Toke Høiland-Jørgensen
This series changes the xdp_redirect helper to use a hidden default map. The redirect_map() helper also uses the map structure to batch packets, which results in a significant (around 50%) performance boost for the _map variant. However, the xdp_redirect() API is simpler if one just wants to redire

Re: [PATCH 2/6] MIPS: SGI-IP27: remove setup of RTC platform device

2019-04-08 Thread David Miller
From: Thomas Bogendoerfer Date: Mon, 8 Apr 2019 16:20:54 +0200 > RTC platform device will be setup by new IOC3 MFD driver, therefore > remove it from IP27 platform code. > > Signed-off-by: Thomas Bogendoerfer You cannot break the driver like this. Your patch series must be fully bisectable,

[PATCH net-next v4 2/6] net: xdp: remove XDP_QUERY_PROG

2019-04-08 Thread Toke Høiland-Jørgensen
From: Björn Töpel With the previous patch, we no longer need the XDP_QUERY_PROG operation, so remove the handling of that from all drivers. Signed-off-by: Björn Töpel Signed-off-by: Toke Høiland-Jørgensen --- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |4 --- drivers/net/ethernet/

Re: [PATCH v3] net: macb driver, check for SKBTX_HW_TSTAMP

2019-04-08 Thread David Miller
From: Paul Thomas Date: Mon, 8 Apr 2019 09:20:47 -0400 > + if (unlikely(skb_shinfo(skb)->tx_flags & > SKBTX_HW_TSTAMP) && > + gem_ptp_do_txstamp(queue, skb, desc) == > 0) { The second line should start precisely at the first colu

Re: [PATCH net-next] cxgb4: Don't return EAGAIN when TCAM is full.

2019-04-08 Thread David Miller
From: Vishal Kulkarni Date: Mon, 8 Apr 2019 18:03:49 +0530 > During hash filter programming, driver needs to return ENOSPC error > intead of EAGAIN when TCAM is full. > > Signed-off-by: Vishal Kulkarni Applied.

[PATCH v2 bpf-next 3/4] bpf: sync bpf.h to tools/ for BPF_F_ADJ_ROOM_ENCAP_L2

2019-04-08 Thread Alan Maguire
Sync include/uapi/linux/bpf.h with tools/ equivalent to add BPF_F_ADJ_ROOM_ENCAP_L2(len) macro. Signed-off-by: Alan Maguire --- tools/include/uapi/linux/bpf.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 837

Re: [PATCH] net: xilinx: emaclite: add minimal ethtool ops

2019-04-08 Thread David Miller
From: Alexandru Ardelean Date: Mon, 8 Apr 2019 12:01:36 +0300 > This set adds a minimal set of ethtool hooks to the driver, which provide a > decent amount of link information via ethtool. > With this change, running `ethtool ethX` in user-space provides all the > neatly-formatted information abo

Re: [PATCH] net: xilinx: emaclite: add minimal ndo_do_ioctl hook

2019-04-08 Thread David Miller
From: Alexandru Ardelean Date: Mon, 8 Apr 2019 12:01:57 +0300 > This hook only implements a minimal set of ioctl hooks to be able to access > MII regs by using phytool. > When using this simple MAC controller, it's pretty difficult to do > debugging of the PHY chip without checking MII regs. > >

[PATCH v2 bpf-next 4/4] selftests_bpf: add L2 encap to test_tc_tunnel

2019-04-08 Thread Alan Maguire
Update test_tc_tunnel to verify adding inner L2 header encapsulation (an MPLS label or ethernet header) works. Signed-off-by: Alan Maguire --- tools/testing/selftests/bpf/progs/test_tc_tunnel.c | 232 ++--- tools/testing/selftests/bpf/test_tc_tunnel.sh | 121 +++ 2 f

[PATCH v2 bpf-next 2/4] bpf: add layer 2 encap support to bpf_skb_adjust_room

2019-04-08 Thread Alan Maguire
commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") introduced support to bpf_skb_adjust_room for GSO-friendly GRE and UDP encapsulation. For GSO to work for skbs, the inner headers (mac and network) need to be marked. For L3 encapsulation using bpf_skb_adjust_room, the mac and netwo

[PATCH v2 bpf-next 0/4] L2 encap support for bpf_skb_adjust_room

2019-04-08 Thread Alan Maguire
Extend bpf_skb_adjust_room growth to mark inner MAC header so that L2 encapsulation can be used for tc tunnels. Patch #1 extends the existing test_tc_tunnel to support UDP encapsulation; later we want to be able to test MPLS over UDP and MPLS over GRE encapsulation. Patch #2 adds the BPF_F_ADJ_RO

[PATCH v2 bpf-next 1/4] selftests_bpf: add UDP encap to test_tc_tunnel

2019-04-08 Thread Alan Maguire
commit 868d523535c2 ("bpf: add bpf_skb_adjust_room encap flags") introduced support to bpf_skb_adjust_room for GSO-friendly GRE and UDP encapsulation and later introduced associated test_tc_tunnel tests. Here those tests are extended to cover UDP encapsulation also. Signed-off-by: Alan Maguire -

Re: [PATCH net-next] datagram: remove rendundant 'peeked' argument

2019-04-08 Thread David Miller
From: Paolo Abeni Date: Mon, 8 Apr 2019 10:15:59 +0200 > After commit a297569fe00a ("net/udp: do not touch skb->peeked unless > really needed") the 'peeked' argument of __skb_try_recv_datagram() > and friends is always equal to !!'flags & MSG_PEEK'. > > Since such argument is really a boolean i

[PATCH net-next 4/5] net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too

2019-04-08 Thread Paolo Abeni
Since stats updating is always consistent with TCQ_F_CPUSTATS flag, we can disable it at qdisc creation time flipping such bit. In my experiments, if the NOLOCK flag is cleared, per CPU stats accounting does not give any measurable performance gain, but it waste some memory. Let's clear TCQ_F_CPU

[PATCH net-next 5/5] Revert: "net: sched: put back q.qlen into a single location"

2019-04-08 Thread Paolo Abeni
This revert commit 46b1c18f9deb ("net: sched: put back q.qlen into a single location"). After the previous patch nobody accesses directly qlen for a child qdisc when such qdisc does per CPU stats accounting. In the control path nobody uses directly qlen since commit 677f1bc207c ("net: sched: introd

[PATCH net-next 2/5] net: sched: prefer qdisc_is_empty() over direct qlen access

2019-04-08 Thread Paolo Abeni
When checking for root qdisc queue length, do not access directly q.qlen. In the following patches we will move back qlen accounting to per CPU values for NOLOCK qdiscs. Instead, prefer the qdisc_is_empty() helper usage. Signed-off-by: Paolo Abeni --- include/net/sch_generic.h | 2 +- 1 file ch

[PATCH net-next 3/5] net: sched: always do stats accounting according to TCQ_F_CPUSTATS

2019-04-08 Thread Paolo Abeni
The core sched implementation checks independently for NOLOCK flag to acquire/release the root spin lock and for qdisc_is_percpu_stats() to account per CPU values in many places. This change update the last few places checking the TCQ_F_NOLOCK to do per CPU stats accounting according to qdisc_is_p

[PATCH net-next 0/5] net: sched: move back qlen to per CPU accounting

2019-04-08 Thread Paolo Abeni
The commit 46b1c18f9deb ("net: sched: put back q.qlen into a single location") introduced some measurable regression in the contended scenarios for lock qdisc. As Eric suggested we could replace q.qlen access with calls to qdisc_is_empty() in the datapath and revert the above commit. The TC subsys

[PATCH net-next 1/5] net: caif: avoid using qdisc_qlen()

2019-04-08 Thread Paolo Abeni
Such helper does not cope correctly with NOLOCK qdiscs. In the following patches we will move back qlen to per CPU values for such qdiscs, so qdisc_qlen_sum() is not an option, too. Instead, use qlen only for lock qdiscs, and always set flow off for NOLOCK qdiscs with a not empty tx queue. Signed-

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Captain Wiggum
Thank you Peter! I tried the patch on 4.9.167 & 4.19.32. It's out of sync with upstream. Looks like a little different work needed for each LTS kernel. Is someone is familiar with it, and is available to patch it? If not, I'd be happy to do this and propose a patch for at least 4.9, 4.14, 4.19. I

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-04-08 Thread Neal Cardwell
On Wed, Apr 3, 2019 at 8:13 PM brakmo wrote: > > When a packet is dropped when calling queue_xmit in __tcp_transmit_skb > and packets_out is 0, it is beneficial to set a small probe timer. > Otherwise, the throughput for the flow can suffer because it may need to > depend on the probe timer to st

[PATCH] MAINTAINERS: ieee802154: update documentation file pattern

2019-04-08 Thread Stefan Schmidt
When moving the documentation for the ieee802154 subsystem from plain text to rst the file pattern in the MAINTAINERS file got wrong. Updating it here to fix scripts using this file. Reported-by: Joe Perches Signed-off-by: Stefan Schmidt --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH bpf-next v2 3/3] selftests: bpf: add selftest for __sk_buff context in BPF_PROG_TEST_RUN

2019-04-08 Thread Stanislav Fomichev
Simple test that sets cb to {1,2,3,4,5} and priority to 6, runs bpf program that fails if cb is not what we expect and increments cb[i] and priority. When the test finishes, we check that cb is now {2,3,4,5,6} and priority is 7. We also test the sanity checks: * ctx_in is provided, but ctx_size_in

[PATCH bpf-next v2 2/3] libbpf: add support for ctx_{size,}_{in,out} in BPF_PROG_TEST_RUN

2019-04-08 Thread Stanislav Fomichev
Support recently introduced input/output context for test runs. We extend only bpf_prog_test_run_xattr. bpf_prog_test_run is unextendable and left as is. Cc: Martin Lau Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 7 +++ tools/lib/bpf/bpf.c| 5 + to

[PATCH bpf-next v2 1/3] bpf: support input __sk_buff context in BPF_PROG_TEST_RUN

2019-04-08 Thread Stanislav Fomichev
Add new set of arguments to bpf_attr for BPF_PROG_TEST_RUN: * ctx_in/ctx_size_in - input context * ctx_out/ctx_size_out - output context The intended use case is to pass some meta data to the test runs that operate on skb (this has being brought up on recent LPC). For programs that use bpf_prog_t

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Peter Oskolkov
On Mon, Apr 8, 2019 at 8:51 AM Sasha Levin wrote: > > On Mon, Apr 08, 2019 at 08:49:52AM -0600, Captain Wiggum wrote: > >Hi Sasha, > > > >This patch cannot be applied to upstream, the code is significantly > >different. > >Therefore, this un-do patch would not be seen in the upstream git log. > >

Re: [PATCH net] ipv6: un-do: defrag: drop non-last frags smaller than min mtu

2019-04-08 Thread Sasha Levin
On Mon, Apr 08, 2019 at 08:49:52AM -0600, Captain Wiggum wrote: Hi Sasha, This patch cannot be applied to upstream, the code is significantly different. Therefore, this un-do patch would not be seen in the upstream git log. It was solved there by coding a better solution, not by the un-do patch.

  1   2   >