Re: [PATCH net] cxgb4: fix out-of-bounds MSI-X info array access

2019-09-30 Thread kbuild test robot
Hi Vishal, I love your patch! Perhaps something to improve: [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/Vishal-Kulkarni/cxgb4-fix-out-of-bounds-MSI-X-info-array-access/20191001-134119 config: sparc64-allmodconfig (attached as .config) compiler: sparc

Re: [PATCH RFC 3/5] net: Add a netdev software feature set that defaults to off.

2019-09-30 Thread Steffen Klassert
On Mon, Sep 30, 2019 at 11:26:55AM -0400, Willem de Bruijn wrote: > On Mon, Sep 30, 2019 at 2:24 AM Steffen Klassert > wrote: > > > > On Mon, Sep 23, 2019 at 08:38:56AM -0400, Willem de Bruijn wrote: > > > > > > The UDP GRO benchmarks were largely positive, but not a strict win if > > > I read Pao

[PATCH net] cxgb4: fix out-of-bounds MSI-X info array access

2019-09-30 Thread Vishal Kulkarni
When fetching free MSI-X vectors for ULDs, check for the error code before accessing MSI-X info array. Otherwise, an out-of-bounds access is attempted, which results in kernel panic. Fixes: 94cdb8bb993a ("cxgb4: Add support for dynamic allocation of resources for ULD") Signed-off-by: Shahjada Abul

Re: [PATCH net] net: dsa: sja1105: Fix sleeping while atomic in .port_hwtstamp_set

2019-09-30 Thread Vladimir Oltean
Hi David, On Tue, 1 Oct 2019 at 03:20, David Miller wrote: > > From: Vladimir Oltean > Date: Sun, 29 Sep 2019 01:07:45 +0300 > > > Currently this stack trace can be seen with CONFIG_DEBUG_ATOMIC_SLEEP=y: > ... > > Enabling RX timestamping will logically disturb the fastpath (processing > > of m

[PATCH iproute2 net-next v3 0/2] support for bridge fdb and neigh get

2019-09-30 Thread Roopa Prabhu
From: Roopa Prabhu This series adds iproute2 support to lookup a bridge fdb and neigh entry. example: $bridge fdb get 02:02:00:00:00:03 dev test-dummy0 vlan 1002 02:02:00:00:00:03 dev test-dummy0 vlan 1002 master bridge $ip neigh get 10.0.2.4 dev test-dummy0 10.0.2.4 dev test-dummy0 lladdr de:ad

[PATCH iproute2 net-next v3 1/2] bridge: fdb get support

2019-09-30 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds support to lookup a bridge fdb entry using recently added support in the kernel using RTM_GETNEIGH (and AF_BRIDGE family). example: $bridge fdb get 02:02:00:00:00:03 dev test-dummy0 vlan 1002 02:02:00:00:00:03 dev test-dummy0 vlan 1002 master bridge Signed-off

[PATCH iproute2 net-next v3 2/2] ipneigh: neigh get support

2019-09-30 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds support to lookup a neigh entry using recently added support in the kernel using RTM_GETNEIGH example: $ip neigh get 10.0.2.4 dev test-dummy0 10.0.2.4 dev test-dummy0 lladdr de:ad:be:ef:13:37 PERMANENT Signed-off-by: Roopa Prabhu Tested-by: Ivan Vecera ---

Re: [PATCH iproute2 net-next v2 2/2] ipneigh: neigh get support

2019-09-30 Thread Roopa Prabhu
On Mon, Sep 30, 2019 at 9:42 AM David Ahern wrote: > > On 9/28/19 2:22 PM, Roopa Prabhu wrote: > > + > > + req.ndm.ndm_family = dst.family; > > + if (addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen) < > > 0) > > + return -1; > > + > > + if (d) { > > +

[PATCH net v2] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread David Ahern
From: David Ahern Rajendra reported a kernel panic when a link was taken down: [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290 [ 6870.570501] Call Trace: [ 6870.573238] [] ? ipv6_ifa_notify+0x26/0x40

[PATCH v3 net-next 5/5] ionic: add lif_quiesce to wait for queue activity to stop

2019-09-30 Thread Shannon Nelson
Even though we've already turned off the queue activity with the ionic_qcq_disable(), we need to wait for any device queues that are processing packets to drain down before we try to flush our packets and tear down the queues. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic

[PATCH v3 net-next 4/5] ionic: implement ethtool set-fec

2019-09-30 Thread Shannon Nelson
Wire up the --set-fec and --show-fec features in the ethtool callbacks and pull the related code out of set_link_ksettings. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 94 +-- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/dr

[PATCH v3 net-next 3/5] ionic: report users coalesce request

2019-09-30 Thread Shannon Nelson
The user's request for an interrupt coalescing value gets translated into a hardware value to be used with the NIC, and was getting reported back based on the hw value, which, due to hw tic resolution, could be reported as a different number than what the user originally asked for. This code now t

[PATCH v3 net-next 2/5] ionic: use wait_on_bit_lock() rather than open code

2019-09-30 Thread Shannon Nelson
Replace the open-coded ionic_wait_for_bit() with the kernel's wait_on_bit_lock(). Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 12 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +++-- drivers/net/ethernet/pensando/ionic/ionic_lif

[PATCH v3 net-next 0/5] ionic: driver updates

2019-09-30 Thread Shannon Nelson
These patches are a few updates to clean up some code issues and add an ethtool feature. v3: drop the Fixes tags as they really aren't fixing bugs simplify ionic_lif_quiesce() as no return is necessary v2: add cover letter edit a couple of patch descriptions for clarity and add Fixe

[PATCH v3 net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread Shannon Nelson
There is no need for a goto in this bit of code. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c b/drivers/net/ethernet/pensando

Re: [PATCH net] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread Eric Dumazet
On 9/30/19 7:23 PM, David Ahern wrote: > On 9/30/19 8:01 PM, Eric Dumazet wrote: >> >> >> Do we need to keep the test on IF_READY done later in this function ? >> >> If IF_READY can disappear only under RTNL, we might clean this. >> >> (unless addrconf_dad_work() releases rtnl and reacquires it

Re: [PATCH net] ptp_qoriq: Don't write system time into PHC at boot

2019-09-30 Thread Richard Cochran
On Sun, Sep 29, 2019 at 01:22:28AM +0300, Vladimir Oltean wrote: > But I couldn't find a justification to just move the spin_lock_init a > few lines above, because I don't see why the ptp_qoriq_settime call > should be done at all at probe time. Writing a CLOCK_REALTIME value into > a timer that is

Re: [PATCH net] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread David Ahern
On 9/30/19 8:01 PM, Eric Dumazet wrote: > > > On 9/30/19 6:37 PM, David Ahern wrote: >> From: David Ahern >> >> Rajendra reported a kernel panic when a link was taken down: >> >> [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at >> 00a8 >> [ 6870.271856] IP: []

Re: [PATCH net] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread Eric Dumazet
On 9/30/19 6:37 PM, David Ahern wrote: > From: David Ahern > > Rajendra reported a kernel panic when a link was taken down: > > [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at > 00a8 > [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290 > > > > [ 6870.5

Re: [PATCH v2 net-next 0/5] ionic: driver updates

2019-09-30 Thread Shannon Nelson
On 9/30/19 4:48 PM, David Miller wrote: From: Shannon Nelson Date: Mon, 30 Sep 2019 14:49:15 -0700 These patches are a few updates to clean up some code issues and add an ethtool feature. v2: add cover letter edit a couple of patch descriptions for clarity and add Fixes tags I agree

Re: [PATCH v2 net] net: sched: taprio: Fix potential integer overflow in taprio_set_picos_per_byte

2019-09-30 Thread David Miller
From: Vladimir Oltean Date: Sun, 29 Sep 2019 02:01:39 +0300 > The speed divisor is used in a context expecting an s64, but it is > evaluated using 32-bit arithmetic. > > To avoid that happening, instead of multiplying by 1,000,000 in the > first place, simplify the fraction and do a standard 32

[PATCH net] ipv6: Handle race in addrconf_dad_work

2019-09-30 Thread David Ahern
From: David Ahern Rajendra reported a kernel panic when a link was taken down: [ 6870.263084] BUG: unable to handle kernel NULL pointer dereference at 00a8 [ 6870.271856] IP: [] __ipv6_ifa_notify+0x154/0x290 [ 6870.570501] Call Trace: [ 6870.573238] [] ? ipv6_ifa_notify+0x26/0x40

Re: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF

2019-09-30 Thread Alexei Starovoitov
On Mon, Sep 30, 2019 at 11:31:29AM -0700, Kees Cook wrote: > On Sat, Sep 28, 2019 at 07:37:27PM -0400, Steven Rostedt wrote: > > On Wed, 28 Aug 2019 21:07:24 -0700 > > Alexei Starovoitov wrote: > > > > > > > > This won’t make me much more comfortable, since CAP_BPF lets it do an > > > > ever-gro

Re: [PATCH net] net: dsa: sja1105: Prevent leaking memory

2019-09-30 Thread David Miller
From: Vladimir Oltean Date: Sun, 29 Sep 2019 01:43:39 +0300 > From: Navid Emamdoost > > In sja1105_static_config_upload, in two cases memory is leaked: when > static_config_buf_prepare_for_upload fails and when sja1105_inhibit_tx > fails. In both cases config_buf should be released. > > Fixes:

Re: [PATCH net] ptp_qoriq: Don't write system time into PHC at boot

2019-09-30 Thread David Miller
From: Vladimir Oltean Date: Sun, 29 Sep 2019 01:22:28 +0300 > Because ptp_qoriq_settime is being called prior to spin_lock_init, the > following stack trace can be seen at driver probe time: > > [2.269117] the code is fine but needs lockdep annotation. > [2.274569] turning off the lockin

Re: [PATCH net] net: dsa: sja1105: Ensure PTP time for rxtstamp reconstruction is not in the past

2019-09-30 Thread David Miller
From: Vladimir Oltean Date: Sun, 29 Sep 2019 01:08:17 +0300 > Sometimes the PTP synchronization on the switch 'jumps': ... > Background: the switch only offers partial RX timestamps (24 bits) and > it is up to the driver to read the PTP clock to fill those timestamps up > to 64 bits. But the PTP

Re: [PATCH net] net: dsa: sja1105: Fix sleeping while atomic in .port_hwtstamp_set

2019-09-30 Thread David Miller
From: Vladimir Oltean Date: Sun, 29 Sep 2019 01:07:45 +0300 > Currently this stack trace can be seen with CONFIG_DEBUG_ATOMIC_SLEEP=y: ... > Enabling RX timestamping will logically disturb the fastpath (processing > of meta frames). Replace bool hwts_rx_en with a bit that is checked > atomically

Re: pull-request: ieee802154 for net 2019-09-28

2019-09-30 Thread David Miller
From: Stefan Schmidt Date: Sat, 28 Sep 2019 09:57:37 +0200 > An update from ieee802154 for your *net* tree. > > Three driver fixes. Navid Emamdoost fixed a memory leak on an error > path in the ca8210 driver, Johan Hovold fixed a use-after-free found > by syzbot in the atusb driver and Christoph

Re: [PATCH net] net: Unpublish sk from sk_reuseport_cb before call_rcu

2019-09-30 Thread David Miller
From: Martin KaFai Lau Date: Fri, 27 Sep 2019 16:00:31 -0700 > The "reuse->sock[]" array is shared by multiple sockets. The going away > sk must unpublish itself from "reuse->sock[]" before making call_rcu() > call. However, this unpublish-action is currently done after a grace > period and it

Re: BUG: sk_backlog.len can overestimate

2019-09-30 Thread Eric Dumazet
On 9/30/19 4:58 PM, John Ousterhout wrote: > As of 4.16.10, it appears to me that sk->sk_backlog_len does not > provide an accurate estimate of backlog length; this reduces the > usefulness of the "limit" argument to sk_add_backlog. > > The problem is that, under heavy load, sk->sk_backlog_len

BUG: sk_backlog.len can overestimate

2019-09-30 Thread John Ousterhout
As of 4.16.10, it appears to me that sk->sk_backlog_len does not provide an accurate estimate of backlog length; this reduces the usefulness of the "limit" argument to sk_add_backlog. The problem is that, under heavy load, sk->sk_backlog_len can grow arbitrarily large, even though the actual amoun

Re: [PATCH 2/2] udp: only do GSO if # of segs > 1

2019-09-30 Thread Alexander Duyck
On Mon, Sep 30, 2019 at 3:13 PM Josh Hunt wrote: > > Prior to this change an application sending <= 1MSS worth of data and > enabling UDP GSO would fail if the system had SW GSO enabled, but the > same send would succeed if HW GSO offload is enabled. In addition to this > inconsistency the error i

Re: [PATCH 1/2] udp: fix gso_segs calculations

2019-09-30 Thread Alexander Duyck
On Mon, Sep 30, 2019 at 3:15 PM Josh Hunt wrote: > > Commit dfec0ee22c0a ("udp: Record gso_segs when supporting UDP segmentation > offload") > added gso_segs calculation, but incorrectly got sizeof() the pointer and > not the underlying data type. It also does not account for v6 UDP GSO segs. > >

Re: [PATCH v2 net-next 0/5] ionic: driver updates

2019-09-30 Thread David Miller
From: Shannon Nelson Date: Mon, 30 Sep 2019 14:49:15 -0700 > These patches are a few updates to clean up some code > issues and add an ethtool feature. > > v2: add cover letter > edit a couple of patch descriptions for clarity and add Fixes tags I agree with Jakub that Fixes: tags for clean

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 16:30:02 -0700, Andrii Nakryiko wrote: > On Mon, Sep 30, 2019 at 4:18 PM Jakub Kicinski wrote: > > On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: > > > On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > > > > > > > > On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryik

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Song Liu
> On Sep 30, 2019, at 4:36 PM, Jakub Kicinski > wrote: > > On Mon, 30 Sep 2019 23:25:33 +, Song Liu wrote: >>> On Sep 30, 2019, at 4:18 PM, Jakub Kicinski >>> wrote: >>> >>> On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrot

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Song Liu
> On Sep 30, 2019, at 4:27 PM, Andrii Nakryiko > wrote: > > On Mon, Sep 30, 2019 at 4:23 PM Song Liu wrote: >> >> >> >>> On Sep 30, 2019, at 3:58 PM, Andrii Nakryiko >>> wrote: >>> >>> On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: On Mon, Sep 30, 2019 at 1:43 PM Andrii Na

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 23:25:33 +, Song Liu wrote: > > On Sep 30, 2019, at 4:18 PM, Jakub Kicinski > > wrote: > > > > On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: > >> On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > >>> > >>> On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko

Re: [PATCH v2 net-next 5/5] ionic: add lif_quiesce to wait for queue activity to stop

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 14:49:20 -0700, Shannon Nelson wrote: > Even though we've already turned off the queue activity with > the ionic_qcq_disable(), we need to wait for any device queues > that are processing packets to drain down before we try to > flush our packets and tear down the queues. > > S

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Andrii Nakryiko
On Mon, Sep 30, 2019 at 4:18 PM Jakub Kicinski wrote: > > On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: > > On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > > > > > > On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: > > > > > > > > Make bpf_helpers.h and bpf_endian.h official

Re: [PATCH v2 net-next 2/5] ionic: use wait_on_bit_lock() rather than open code

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 14:49:17 -0700, Shannon Nelson wrote: > Replace the open-coded ionic_wait_for_bit() with the > kernel's wait_on_bit_lock(). > > Fixes: beead698b1736 ("ionic: Add the basic NDO callbacks for netdev support") Again, slightly strange to see the Fixes tag for code clean up targete

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Andrii Nakryiko
On Mon, Sep 30, 2019 at 4:23 PM Song Liu wrote: > > > > > On Sep 30, 2019, at 3:58 PM, Andrii Nakryiko > > wrote: > > > > On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > >> > >> On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: > >>> > >>> Make bpf_helpers.h and bpf_endian.h official pa

Re: [PATCH v2 net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 14:49:16 -0700, Shannon Nelson wrote: > There is no need for a goto in this bit of code. > > Fixes: fbfb8031533c9 ("ionic: Add hardware init and device commands") IMHO the fixes tag is disputable here, since this doesn't even generate a warning. > Signed-off-by: Shannon Nelso

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Song Liu
> On Sep 30, 2019, at 4:18 PM, Jakub Kicinski > wrote: > > On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: >> On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: >>> >>> On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: Make bpf_helpers.h and bpf_endian.h official

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Song Liu
> On Sep 30, 2019, at 3:58 PM, Andrii Nakryiko > wrote: > > On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: >> >> On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: >>> >>> Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they >>> are installed along the other libbp

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Jakub Kicinski
On Mon, 30 Sep 2019 15:58:35 -0700, Andrii Nakryiko wrote: > On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > > > > On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: > > > > > > Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they > > > are installed along the other li

Re: [PATCH net-next] net/rds: Use DMA memory pool allocation for rds_header

2019-09-30 Thread santosh . shilimkar
On 9/30/19 2:08 AM, Ka-Cheong Poon wrote: Currently, RDS calls ib_dma_alloc_coherent() to allocate a large piece of contiguous DMA coherent memory to store struct rds_header for sending/receiving packets. The memory allocated is then partitioned into struct rds_header. This is not necessary and

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Andrii Nakryiko
On Mon, Sep 30, 2019 at 3:55 PM Song Liu wrote: > > On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: > > > > Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they > > are installed along the other libbpf headers. > > > > Signed-off-by: Andrii Nakryiko > > Can we merge/re

Re: [PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Song Liu
On Mon, Sep 30, 2019 at 1:43 PM Andrii Nakryiko wrote: > > Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they > are installed along the other libbpf headers. > > Signed-off-by: Andrii Nakryiko Can we merge/rearrange 2/6 and 3/6, so they is a git-rename instead of many +++ a

Re: [PATCH bpf-next 1/6] selftests/bpf: undo GCC-specific bpf_helpers.h changes

2019-09-30 Thread Song Liu
On Mon, Sep 30, 2019 at 1:42 PM Andrii Nakryiko wrote: > > Having GCC provide its own bpf-helper.h is not the right approach and is > going to be changed. Undo bpf_helpers.h change before moving > bpf_helpers.h into libbpf. > > Signed-off-by: Andrii Nakryiko Acked-by: Song Liu

[PATCH net] tcp: adjust rto_base in retransmits_timed_out()

2019-09-30 Thread Eric Dumazet
The cited commit exposed an old retransmits_timed_out() bug which assumed it could call tcp_model_timeout() with TCP_RTO_MIN as rto_base for all states. But flows in SYN_SENT or SYN_RECV state uses a different RTO base (1 sec instead of 200 ms, unless BPF choses another value) This caused a reduc

Re: [PATCH bpf v5] libbpf: handle symbol versioning properly for libbpf.a

2019-09-30 Thread Alexei Starovoitov
On 9/30/19 2:02 PM, Yonghong Song wrote: > Fixes: 10d30e301732 ("libbpf: add flags to umem config") > Cc: Kevin Laatz > Cc: Arnaldo Carvalho de Melo > Cc: Andrii Nakryiko > Acked-by: Andrii Nakryiko > Signed-off-by: Yonghong Song > --- > tools/lib/bpf/Makefile | 27 ++

Re: [PATCH bpf-next] libbpf: dump current version to v0.0.6

2019-09-30 Thread Andrii Nakryiko
On 9/30/19 3:22 PM, Song Liu wrote: > > >> On Sep 30, 2019, at 3:16 PM, Andrii Nakryiko wrote: >> >> New release cycle started, let's bump to v0.0.6 proactively. > > nit: Typo "dump" in subject. Doh... because even trivial patches can be screwed up :) Thanks! Sent v2. > > Acked-by: Song Liu

[PATCH v2 bpf-next] libbpf: bump current version to v0.0.6

2019-09-30 Thread Andrii Nakryiko
New release cycle started, let's bump to v0.0.6 proactively. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.map | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index d04c7cb623ed..8d10ca03d78d 100644 --- a/to

Re: [PATCH bpf-next] libbpf: dump current version to v0.0.6

2019-09-30 Thread Song Liu
> On Sep 30, 2019, at 3:16 PM, Andrii Nakryiko wrote: > > New release cycle started, let's bump to v0.0.6 proactively. nit: Typo "dump" in subject. Acked-by: Song Liu > > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libbpf.map | 3 +++ > 1 file changed, 3 insertions(+) > > diff

[PATCH bpf-next] libbpf: dump current version to v0.0.6

2019-09-30 Thread Andrii Nakryiko
New release cycle started, let's bump to v0.0.6 proactively. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.map | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index d04c7cb623ed..8d10ca03d78d 100644 --- a/tools/lib/bpf/libbpf.m

[PATCH 1/2] udp: fix gso_segs calculations

2019-09-30 Thread Josh Hunt
Commit dfec0ee22c0a ("udp: Record gso_segs when supporting UDP segmentation offload") added gso_segs calculation, but incorrectly got sizeof() the pointer and not the underlying data type. It also does not account for v6 UDP GSO segs. Fixes: dfec0ee22c0a ("udp: Record gso_segs when supporting UDP

[PATCH 2/2] udp: only do GSO if # of segs > 1

2019-09-30 Thread Josh Hunt
Prior to this change an application sending <= 1MSS worth of data and enabling UDP GSO would fail if the system had SW GSO enabled, but the same send would succeed if HW GSO offload is enabled. In addition to this inconsistency the error in the SW GSO case does not get back to the application if se

[PATCH net-next 2/5] ionic: use wait_on_bit_lock() rather than open code

2019-09-30 Thread Shannon Nelson
Replace the open-coded ionic_wait_for_bit() with the kernel's wait_on_bit_lock(). Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 12 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 5 +++-- drivers/net/ethernet/pensando/ionic/ionic_lif

[PATCH v2 net-next 4/5] ionic: implement ethtool set-fec

2019-09-30 Thread Shannon Nelson
Wire up the --set-fec and --show-fec features in the ethtool callbacks and pull the related code out of set_link_ksettings. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 94 +-- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/dr

[PATCH v2 net-next 0/5] ionic: driver updates

2019-09-30 Thread Shannon Nelson
These patches are a few updates to clean up some code issues and add an ethtool feature. v2: add cover letter edit a couple of patch descriptions for clarity and add Fixes tags Shannon Nelson (5): ionic: simplify returns in devlink info ionic: use wait_on_bit_lock() rather than open code

[PATCH v2 net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread Shannon Nelson
There is no need for a goto in this bit of code. Fixes: fbfb8031533c9 ("ionic: Add hardware init and device commands") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/et

[PATCH v2 net-next 3/5] ionic: report users coalesce request

2019-09-30 Thread Shannon Nelson
The user's request for an interrupt coalescing value gets translated into a hardware value to be used with the NIC, and was getting reported back based on the hw value, which, due to hw tic resolution, could be reported as a different number than what the user originally asked for. This code now t

[PATCH v2 net-next 2/5] ionic: use wait_on_bit_lock() rather than open code

2019-09-30 Thread Shannon Nelson
Replace the open-coded ionic_wait_for_bit() with the kernel's wait_on_bit_lock(). Fixes: beead698b1736 ("ionic: Add the basic NDO callbacks for netdev support") Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 12 drivers/net/ethernet/pensando/

[PATCH v2 net-next 5/5] ionic: add lif_quiesce to wait for queue activity to stop

2019-09-30 Thread Shannon Nelson
Even though we've already turned off the queue activity with the ionic_qcq_disable(), we need to wait for any device queues that are processing packets to drain down before we try to flush our packets and tear down the queues. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ion

Re: [PATCH net] sch_cbq: validate TCA_CBQ_WRROPT to avoid crash

2019-09-30 Thread David Miller
From: Eric Dumazet Date: Fri, 27 Sep 2019 12:57:45 -0700 > > > On 9/27/19 11:55 AM, David Miller wrote: >> From: Eric Dumazet >> Date: Thu, 26 Sep 2019 18:24:43 -0700 >> >>> syzbot reported a crash in cbq_normalize_quanta() caused >>> by an out of range cl->priority. >> ... >>> Signed-off-by

Re: [PATCH] erspan: remove the incorrect mtu limit for erspan

2019-09-30 Thread David Miller
From: Haishuang Yan Date: Fri, 27 Sep 2019 14:58:20 +0800 > erspan driver calls ether_setup(), after commit 61e84623ace3 > ("net: centralize net_device min/max MTU checking"), the range > of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. > > It causes the dev mtu of the erspan device

Re: [PATCH net] net: dsa: qca8k: Use up to 7 ports for all operations

2019-09-30 Thread David Miller
From: Michal Vokáč Date: Thu, 26 Sep 2019 10:59:17 +0200 > The QCA8K family supports up to 7 ports. So use the existing > QCA8K_NUM_PORTS define to allocate the switch structure and limit all > operations with the switch ports. > > This was not an issue until commit 0394a63acfe2 ("net: dsa: enab

[PATCH net-next 3/5] ionic: report users coalesce request

2019-09-30 Thread Shannon Nelson
The user's request for an interrupt coalescing value gets translated into a hardware value to be used with the NIC, but we should still report back to the user what they requested. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 22 +-- .../net/e

Re: [PATCH bpf-next] bpf, capabilities: introduce CAP_BPF

2019-09-30 Thread Kees Cook
On Sat, Sep 28, 2019 at 07:37:27PM -0400, Steven Rostedt wrote: > On Wed, 28 Aug 2019 21:07:24 -0700 > Alexei Starovoitov wrote: > > > > > > This won’t make me much more comfortable, since CAP_BPF lets it do an > > > ever-growing set of nasty things. I’d much rather one or both of two > > > thi

Re: Strange routing with VRF and 5.2.7+

2019-09-30 Thread Ben Greear
On 9/22/19 12:23 PM, David Ahern wrote: On 9/20/19 9:57 AM, Ben Greear wrote: On 9/10/19 6:08 PM, Ben Greear wrote: On 9/10/19 3:17 PM, Ben Greear wrote: Today we were testing creating 200 virtual station vdevs on ath9k, and using VRF for the routing. Looks like the same issue happens w/out

Re: Regression: Network link not coming up after suspend/resume cycle

2019-09-30 Thread Jan Janssen
On Monday, 30 September 2019 01:26:21 CEST Vladimir Oltean wrote: > Hi Jan, > > On Sun, 29 Sep 2019 at 22:25, Jan Janssen wrote: > > Hi, > > > > I've been noticing lately that my network link sometimes does not go up > > after a suspend resume cycle (roughly 1 or 2 out of 10 times). This also > >

[PATCH 1/1] man: add reference to `ip route add encap ... src`

2019-09-30 Thread Damien Robert
The ability to specify the source adresse for 'encap ip' / 'encap ip6' was added in commit 94a8722f2f78f04c47678cf864ac234a38366709 but the man page was not updated. Also fixes a missing page in ip-route.8.in. Signed-off-by: Damien Robert --- Apologies if this is the wrong way to send patches fo

[PATCH net-next v2] vsock/virtio: add support for MSG_PEEK

2019-09-30 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen Reviewed-by: Stefano Garzarella Tested-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport_common.c | 55 +++

[PATCH bpf-next 6/6] selftests/bpf: add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests

2019-09-30 Thread Andrii Nakryiko
Validate BPF_CORE_READ correctness and handling of up to 9 levels of nestedness using cyclic task->(group_leader->)*->tgid chains. Also add a test of maximum-dpeth BPF_CORE_READ_STR_INTO() macro. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/core_reloc.c | 8 ++- .../self

[PATCH bpf v5] libbpf: handle symbol versioning properly for libbpf.a

2019-09-30 Thread Yonghong Song
bcc uses libbpf repo as a submodule. It brings in libbpf source code and builds everything together to produce shared libraries. With latest libbpf, I got the following errors: /bin/ld: libbcc_bpf.so.0.10.0: version node not found for symbol xsk_umem__create@LIBBPF_0.0.2 /bin/ld: failed to set

Re: [PATCH bpf v3] libbpf: handle symbol versioning properly for libbpf.a

2019-09-30 Thread Alexei Starovoitov
On 9/30/19 9:56 AM, Yonghong Song wrote: > > > On 9/30/19 9:42 AM, Alexei Starovoitov wrote: >> On 9/30/19 9:29 AM, Yonghong Song wrote: >>> +OLD_VERSION(xsk_umem__create_v0_0_2, xsk_umem__create, LIBBPF_0.0.2) >>> +NEW_VERSION(xsk_umem__create_v0_0_4, xsk_umem__create, LIBBPF_0.0.4) >> >> how th

[PATCH] openvswitch: Allow attaching helper in later commit

2019-09-30 Thread Yi-Hung Wei
This patch allows to attach conntrack helper to a confirmed conntrack entry. Currently, we can only attach alg helper to a conntrack entry when it is in the unconfirmed state. This patch enables an use case that we can firstly commit a conntrack entry after it passed some initial conditions. Aft

[PATCH bpf-next 4/6] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO helpers

2019-09-30 Thread Andrii Nakryiko
Add few macros simplifying BCC-like multi-level probe reads, while also emitting CO-RE relocations for each read. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf_helpers.h | 151 +++- 1 file changed, 147 insertions(+), 4 deletions(-) diff --git a/tools/lib/b

[PATCH net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread Shannon Nelson
There is no need for a goto in this bit of code. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_devlink.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_devlink.c b/drivers/net/ethernet/pensando

[PATCH net-next 5/5] ionic: add lif_quiesce to wait for queue activity to stop

2019-09-30 Thread Shannon Nelson
Even though we've already turned off the queue activity with the ionic_qcq_disable(), we need to wait for any device queues that are processing packets to drain down before we try to flush our packets and tear down the queues. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ion

Re: [PATCH v1] net: ag71xx: fix mdio subnode support

2019-09-30 Thread Oleksij Rempel
On Mon, Sep 30, 2019 at 06:25:57PM +0200, Andrew Lunn wrote: > On Mon, Sep 30, 2019 at 04:29:07PM +0200, Oleksij Rempel wrote: > > On Mon, Sep 30, 2019 at 03:42:09PM +0200, Andrew Lunn wrote: > > > On Mon, Sep 30, 2019 at 11:33:10AM +0200, Oleksij Rempel wrote: > > > > The driver was working with f

[PATCH net-next 4/5] ionic: implement ethtool set-fec

2019-09-30 Thread Shannon Nelson
Wire up --set-fec in the ethtool callbacks and pull the related code out of set_link_ksettings. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 94 +-- 1 file changed, 67 insertions(+), 27 deletions(-) diff --git a/drivers/net/ethernet/pensando/

bpf-next is OPEN

2019-09-30 Thread Daniel Borkmann
v5.4-rc1 tag is just out and merge window over, therefore bpf-next back in business. Thanks, Daniel

[PATCH bpf v4] libbpf: handle symbol versioning properly for libbpf.a

2019-09-30 Thread Yonghong Song
bcc uses libbpf repo as a submodule. It brings in libbpf source code and builds everything together to produce shared libraries. With latest libbpf, I got the following errors: /bin/ld: libbcc_bpf.so.0.10.0: version node not found for symbol xsk_umem__create@LIBBPF_0.0.2 /bin/ld: failed to set

Re: [PATCH v1] net: phy: at803x: add ar9331 support

2019-09-30 Thread Heiner Kallweit
On 30.09.2019 11:27, Oleksij Rempel wrote: > Mostly this hardware can work with generic PHY driver, but this change > is needed to provided interrupt handling support. > Tested with dsa ar9331-switch driver. > > Signed-off-by: Oleksij Rempel > --- > drivers/net/phy/at803x.c | 14 ++ >

[PATCH bpf-next 5/6] selftests/bpf: adjust CO-RE reloc tests for new BPF_CORE_READ macro

2019-09-30 Thread Andrii Nakryiko
Given introduction of variadic BPF_CORE_READ with slightly different syntax and semantics, define CORE_READ, which is a thin wrapper around low-level bpf_core_read() macro, which in turn is just a wrapper around bpf_probe_read(). BPF_CORE_READ is higher-level variadic macro supporting multi-pointer

[PATCH bpf-next 0/6] Move bpf_helpers and add BPF_CORE_READ macros

2019-09-30 Thread Andrii Nakryiko
This patch set make bpf_helpers.h and bpf_endian.h part of libbpf itself for consumption by user BPF programs, not just selftests. All the selftests are switched to use libbpf's bpf_helpers/bpf_endian and selftests' ones are removed. As part of this patch set we also add BPF_CORE_READ variadic mac

Re: [patch net-next 1/2] ip: add support for alternative name addition/deletion/list

2019-09-30 Thread Jiri Pirko
Mon, Sep 30, 2019 at 06:27:18PM CEST, step...@networkplumber.org wrote: >On Mon, 30 Sep 2019 11:59:02 +0200 >Jiri Pirko wrote: > >> +open_json_array(PRINT_JSON, "altnames"); >> +for (i = RTA_DATA(proplist); RTA_OK(i, rem); >> + i = RTA_NEXT(i, rem)) { >> +

[PATCH bpf-next 3/6] selftests/bpf: switch test to use libbpf's helpers

2019-09-30 Thread Andrii Nakryiko
Adjust selftest to use bpf_helpers.h and bpf_endian.h from libbpf. Delete bpf_helpers.h/bpf_endian.h, that are still part of selftests. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_endian.h | 72 --- tools/testing/selfte

Re: [PATCH net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread Shannon Nelson
On 9/30/19 1:33 PM, David Miller wrote: You must always submit a patch series with a proper "[PATCH net-next 0/5]" header posting, explaining what the series is doing at a high level, how it is doing it, and why it is doing it this way. Please resubmit this series properly. Thank you. Yep, so

Re: [PATCH v2 net] net: sched: taprio: Fix potential integer overflow in taprio_set_picos_per_byte

2019-09-30 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > The speed divisor is used in a context expecting an s64, but it is > evaluated using 32-bit arithmetic. > > To avoid that happening, instead of multiplying by 1,000,000 in the > first place, simplify the fraction and do a standard 32 bit division > instead. > > Fixes: f0

Re: [PATCH] tools: bpf: Use !building_out_of_srctree to determine srctree

2019-09-30 Thread Daniel Borkmann
On Mon, Sep 30, 2019 at 08:16:55AM -0600, Shuah Khan wrote: > On 9/30/19 2:58 AM, Daniel Borkmann wrote: > > On Thu, Sep 26, 2019 at 07:13:44PM -0600, Shuah Khan wrote: > > > make TARGETS=bpf kselftest fails with: > > > > > > Makefile:127: tools/build/Makefile.include: No such file or directory >

[PATCH net-next v3] r8152: Use guard clause and fix comment typos

2019-09-30 Thread Prashant Malani
Use a guard clause in tx_bottom() to reduce the indentation of the do-while loop. Also, fix a couple of spelling and grammatical mistakes in the r8152_csum_workaround() function comment. Change-Id: I460befde150ad92248fd85b0f189ec2df2ab8431 Signed-off-by: Prashant Malani Reviewed-by: Grant Grundl

Re: libbpf distro packaging

2019-09-30 Thread Julia Kartseva
Thank you Jiri, that's great news. Adding Marco D'Itri. Marco, I wonder if you are OK with the rationale for libbpf packaging from GH mirror? Can we proceed with switching Debian package as well just like we discussed offline at ASG? The bug report for Fedora: [1] Thank you [1] https://bugzilla.r

Re: [PATCH net-next 1/5] ionic: simplify returns in devlink info

2019-09-30 Thread David Miller
You must always submit a patch series with a proper "[PATCH net-next 0/5]" header posting, explaining what the series is doing at a high level, how it is doing it, and why it is doing it this way. Please resubmit this series properly. Thank you.

[PATCH bpf-next 2/6] libbpf: move bpf_helpers.h, bpf_endian.h into libbpf

2019-09-30 Thread Andrii Nakryiko
Make bpf_helpers.h and bpf_endian.h official part of libbpf. Ensure they are installed along the other libbpf headers. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/Makefile | 4 +- tools/lib/bpf/bpf_endian.h | 72 + tools/lib/bpf/bpf_helpers.h | 527 +

Re: [PATCH] ipvs: no need to update skb route entry for local destination packets.

2019-09-30 Thread Julian Anastasov
Hello, On Mon, 30 Sep 2019, zhang kai wrote: > In the end of function __ip_vs_get_out_rt/__ip_vs_get_out_rt_v6,the > 'local' variable is always zero. > > Signed-off-by: zhang kai Looks good to me, thanks! Acked-by: Julian Anastasov Simon, this is for -next kernels.

[PATCH bpf-next 1/6] selftests/bpf: undo GCC-specific bpf_helpers.h changes

2019-09-30 Thread Andrii Nakryiko
Having GCC provide its own bpf-helper.h is not the right approach and is going to be changed. Undo bpf_helpers.h change before moving bpf_helpers.h into libbpf. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/bpf_helpers.h | 8 1 file changed, 8 deletions(-) diff --git a

Re: [patch net-next 2/3] net: introduce per-netns netdevice notifiers

2019-09-30 Thread Jiri Pirko
Mon, Sep 30, 2019 at 05:33:43PM CEST, and...@lunn.ch wrote: >On Mon, Sep 30, 2019 at 04:23:49PM +0200, Jiri Pirko wrote: >> Mon, Sep 30, 2019 at 03:38:24PM CEST, and...@lunn.ch wrote: >> >> static int call_netdevice_notifiers_info(unsigned long val, >> >>struct

  1   2   >