Re: [PATCH bpf-next] selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel

2019-04-11 Thread Alan Maguire
On Thu, 11 Apr 2019, Song Liu wrote: > On Thu, Apr 11, 2019 at 4:08 PM Stanislav Fomichev wrote: > > > > It was removed in commit 166b5a7f2ca3 ("selftests_bpf: extend > > test_tc_tunnel for UDP encap") without any explanation. > > > > Otherwise I see: > > progs/test_tc_tunnel.c:160:17: warning: t

Re: [PATCH bpf-next] selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 4:08 PM Stanislav Fomichev wrote: > > It was removed in commit 166b5a7f2ca3 ("selftests_bpf: extend > test_tc_tunnel for UDP encap") without any explanation. > > Otherwise I see: > progs/test_tc_tunnel.c:160:17: warning: taking address of packed member 'ip' > of class or s

Re: Tun congestion/BQL

2019-04-11 Thread David Woodhouse
On Fri, 2019-04-12 at 12:26 +0800, Jason Wang wrote: > Yes, you can refer: > > 1) Qemu hw/virtio/vhost.c or hw/net/vhost_net.c > > 2) dpdk drivers/net/virtio/virtio_user/vhost_kernel_tap.c > > DPDK code seems more compact. > > Basically, the setup of TUN/TAP should be the same, then userspace n

Re: [PATCH net] dctcp: more accurate tracking of packets delivery

2019-04-11 Thread David Miller
From: Eric Dumazet Date: Thu, 11 Apr 2019 05:55:23 -0700 > After commit e21db6f69a95 ("tcp: track total bytes delivered with ECN CE > marks") > core TCP stack does a very good job tracking ECN signals. > > The "sender's best estimate of CE information" Yuchung mentioned in his > patch is indeed

Re: [crypto 2/4] crypto/chelsio/chtls: hardware connect API

2019-04-11 Thread kbuild test robot
Hi Atul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on crypto/master] url: https://github.com/0day-ci/linux/commits/Atul-Gupta/Inline-TLS-client-and-v6-support/20190412-034407 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git

Re: Tun congestion/BQL

2019-04-11 Thread Jason Wang
On 2019/4/11 下午5:25, David Woodhouse wrote: On Thu, 2019-04-11 at 15:22 +0800, Jason Wang wrote: If you care about userspace performance, you may want to try vhost + TAP instead. I admit the API is not user friendly which needs to be improved but then there will be no syscall overhead on packe

Re: Tun congestion/BQL

2019-04-11 Thread Jason Wang
On 2019/4/11 下午5:16, David Woodhouse wrote: On Thu, 2019-04-11 at 17:04 +0800, Jason Wang wrote: Btw, forget to mention, I modify your patch to use netif_stop/wake_subqueue() instead. Hm... --- /usr/src/debug/kernel-5.0.fc29/linux-5.0.5- 200.fc29.x86_64/drivers/net/tun.c2019-03-03 23:21:29.

[PATCH net-next 4/4] nfp: split out common control message handling code

2019-04-11 Thread Jakub Kicinski
BPF's control message handler seems like a good base to built on for request-reply control messages. Split it out to allow for reuse. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/bpf/

[PATCH net-next 2/4] nfp: add a mutex lock for the vNIC ctrl BAR

2019-04-11 Thread Jakub Kicinski
Soon we will try to write to the vNIC mailbox without RTNL held. Add a new mutex to protect access to specific parts of the PCI control BAR. Move the mailbox size checking to the mailbox lock() helper, where it can be more effective (happen prior to potential overwrite of other data). Signed-off-

[PATCH net-next 1/4] nfp: opportunistically poll for reconfig result

2019-04-11 Thread Jakub Kicinski
From: Dirk van der Merwe If the reconfig was a quick update, we could have results available from firmware within 200us. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski --- .../ethernet/netronome/nfp/nfp_net_common.c | 25 --- 1 file changed, 21 insertions(+)

[PATCH net-next 3/4] nfp: move vNIC reset before netdev init

2019-04-11 Thread Jakub Kicinski
During probe we clear vNIC configuration in case the device wasn't closed cleanly by previous driver. Move that code before netdev init, so netdev init can already try to apply its config parameters. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netrono

[PATCH net-next 0/4] nfp: update to control structures

2019-04-11 Thread Jakub Kicinski
Hi! This series prepares NFP control structures for crypto offloads. So far we mostly dealt with configuration requests under rtnl lock. This will no longer be the case with crypto. Additionally we will try to reuse the BPF control message format, so we move common code out of BPF. Dirk van der

[PATCH v2 bpf-next 2/2] bpftool: Improve handling of ENOSPC on reuseport_array map dumps

2019-04-11 Thread Benjamin Poirier
avoids outputting a series of value: No space left on device The value itself is not wrong but bpf_fd_reuseport_array_lookup_elem() can only return it if the map was created with value_size = 8. There's nothing bpftool can do about it. Instead of repeating this error for every key

[PATCH v2 bpf-next 1/2] bpftool: Use print_entry_error() in case of ENOENT when dumping

2019-04-11 Thread Benjamin Poirier
Commit bf598a8f0f77 ("bpftool: Improve handling of ENOENT on map dumps") used print_entry_plain() in case of ENOENT because that function provided the desired formatting. However, that commit actually introduces dead code. Per-cpu maps are zero-filled. When reading them, it's all or nothing. There

Re: [PATCH] arm64: do_csum: implement accelerated scalar version

2019-04-11 Thread Zhangshaokun
Hi maintainers and Ard, Any update on it? Thanks, Shaokun On 2019/2/19 7:08, Ard Biesheuvel wrote: > It turns out that the IP checksumming code is still exercised often, > even though one might expect that modern NICs with checksum offload > have no use for it. However, as Lingyan points out, th

Re: [PATCH] net: socket: Always initialize family field at move_addr_to_kernel().

2019-04-11 Thread Tetsuo Handa
Paul Moore wrote: > > + /* > > +* Nothing more to do if valid length is too short to check > > +* address->sa_family. > > +*/ > > + if (addrlen < offsetofend(struct sockaddr, sa_family)) > > + goto out; > > SELinux already checks the address length

Re: [PATCH v5 bpf-next 1/3] bpf: add bpf_descendant_of helper

2019-04-11 Thread Javier Honduvilla Coto
On Thu, Apr 11, 2019 at 11:55:58PM +0200, Daniel Borkmann wrote: > On 04/10/2019 10:36 PM, Javier Honduvilla Coto wrote: > > This patch adds the bpf_descendant_of helper which accepts a PID and > > returns 1 if the PID of the process currently being executed is a > > descendant of it or if it's its

Re: pull-request: bpf-next 2019-04-12

2019-04-11 Thread David Miller
From: Daniel Borkmann Date: Fri, 12 Apr 2019 01:25:46 +0200 > The following pull-request contains BPF updates for your *net-next* tree. > > The main changes are: > > 1) Improve BPF verifier scalability for large programs through two >optimizations: i) remove verifier states that are not use

pull-request: bpf-next 2019-04-12

2019-04-11 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Improve BPF verifier scalability for large programs through two optimizations: i) remove verifier states that are not useful in pruning, ii) stop walking parentage chain once first

[PATCH] net: dsa: fixed-link interface is reporting SPEED_UNKNOWN

2019-04-11 Thread Vladimir Oltean
With Heiner's recent patch "b6163f194c69 net: phy: improve genphy_read_status", the phydev->speed is now initialized by default to SPEED_UNKNOWN even for fixed PHYs. This is not necessarily bad, since it is not correct to call genphy_config_init() and genphy_read_status() for a fixed PHY. This dat

Re: [PATCH bpf-next] bpf: explicitly prohibit ctx_{in,out} in non-skb BPF_PROG_TEST_RUN

2019-04-11 Thread Daniel Borkmann
On 04/12/2019 12:47 AM, Stanislav Fomichev wrote: > This should allow us later to extend BPF_PROG_TEST_RUN for non-skb case > and be sure that nobody is erroneously setting ctx_{in,out}. > > Fixes: b0b9395d865e ("bpf: support input __sk_buff context in > BPF_PROG_TEST_RUN") > Reported-by: Daniel

[PATCH bpf-next] selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel

2019-04-11 Thread Stanislav Fomichev
It was removed in commit 166b5a7f2ca3 ("selftests_bpf: extend test_tc_tunnel for UDP encap") without any explanation. Otherwise I see: progs/test_tc_tunnel.c:160:17: warning: taking address of packed member 'ip' of class or structure 'v4hdr' may result in an unaligned pointer value [-Waddr

[PATCH bpf-next] bpf: explicitly prohibit ctx_{in,out} in non-skb BPF_PROG_TEST_RUN

2019-04-11 Thread Stanislav Fomichev
This should allow us later to extend BPF_PROG_TEST_RUN for non-skb case and be sure that nobody is erroneously setting ctx_{in,out}. Fixes: b0b9395d865e ("bpf: support input __sk_buff context in BPF_PROG_TEST_RUN") Reported-by: Daniel Borkmann Signed-off-by: Stanislav Fomichev --- net/bpf/test

Re: [PATCH] net: socket: Always initialize family field at move_addr_to_kernel().

2019-04-11 Thread Paul Moore
On Thu, Apr 11, 2019 at 7:32 AM Tetsuo Handa wrote: > On 2019/04/04 13:49, David Miller wrote: > > From: Tetsuo Handa > > Date: Wed, 3 Apr 2019 06:07:40 +0900 > > > >> On 2019/04/03 5:23, David Miller wrote: > >>> Please fix RDS and other protocols to examine the length properly > >>> instead. >

Re: [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type

2019-04-11 Thread Sheena Mira-ato
Sorry about this. I resubmitted it, then a day later got the emails informing me that the patch was added to the 4.19-stable and 5.0-stable trees. Thanks Sheena On Thu, 2019-04-11 at 14:15 -0700, David Miller wrote: > From: Sheena Mira-ato > Date: Wed, 10 Apr 2019 08:36:35 +1200 > > > > > The

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

2019-04-11 Thread Stanislav Fomichev
On Thu, Apr 11, 2019 at 3:23 PM Daniel Borkmann wrote: > > Hey Stanislav, > > On 04/09/2019 08:49 PM, 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

Re: iproute2: Issue with link type link/generic for NETROM links

2019-04-11 Thread Stephen Hemminger
On Thu, 4 Apr 2019 12:21:54 +0200 Ralf Baechle wrote: > For a NETROM "ip link show dev nr0" will show > > 4: nr0: mtu 236 qdisc noqueue state UNKNOWN mode DEFAULT > group default qlen 1000 > link/generic 88:98:6a:a4:84:40:0a brd 00:00:00:00:00:00:00 > > But rather link/netrom is expected

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

2019-04-11 Thread Daniel Borkmann
Hey Stanislav, On 04/09/2019 08:49 PM, 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 sk

Re: [PATCH v5 5/5] sctp: Pass sk_buff_head explicitly to sctp_ulpq_tail_event().

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 03:02:07PM -0700, David Miller wrote: > > Now the SKB list implementation assumption can be removed. > > And now that we know that the list head is always non-NULL > we can remove the code blocks dealing with that as well. > > Signed-off-by: David S. Miller Acked-by: Ma

Re: [PATCH v5 4/5] sctp: Make sctp_enqueue_event tak an skb list.

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 03:02:04PM -0700, David Miller wrote: > > Pass this, instead of an event. Then everything trickles down and we > always have events a non-empty list. > > Then we needs a list creating stub to place into .enqueue_event for > sctp_stream_interleave_1. > > Signed-off-by: D

Re: [PATCH v5 2/5] sctp: Always pass skbs on a list to sctp_ulpq_tail_event().

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 03:01:57PM -0700, David Miller wrote: > > This way we can simplify the logic and remove assumptions > about the implementation of skb lists. > > Signed-off-by: David S. Miller Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/ulpqueue.c | 16 ++-- > 1 fil

Re: [PATCH v5 3/5] sctp: Use helper for sctp_ulpq_tail_event() when hooked up to ->enqueue_event

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 03:02:01PM -0700, David Miller wrote: > > This way we can make sure events sent this way to > sctp_ulpq_tail_event() are on a list as well. Now all such code paths > are fully covered. > > Signed-off-by: David S. Miller Acked-by: Marcelo Ricardo Leitner > --- > net/s

Re: [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 03:01:53PM -0700, David Miller wrote: > > Inside the loop, we always start with event non-NULL. > > Signed-off-by: David S. Miller Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/ulpqueue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/n

[PATCH v5 5/5] sctp: Pass sk_buff_head explicitly to sctp_ulpq_tail_event().

2019-04-11 Thread David Miller
Now the SKB list implementation assumption can be removed. And now that we know that the list head is always non-NULL we can remove the code blocks dealing with that as well. Signed-off-by: David S. Miller --- include/net/sctp/ulpqueue.h | 2 +- net/sctp/stream_interleave.c | 2 +- net/sct

[PATCH v5 0/5] SCTP: Event skb list overhaul.

2019-04-11 Thread David Miller
[ A repost to get the SCTP folks on the CC: list, sorry ] This patch series eliminates the explicit reference to the skb list implementation via skb->prev dereferences. The approach used is to pass a non-empty skb list around instead of an event skb object which may or may not be on a list. I'

[PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().

2019-04-11 Thread David Miller
Inside the loop, we always start with event non-NULL. Signed-off-by: David S. Miller --- net/sctp/ulpqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 5dde92101743..0fecc1fb4ab7 100644 --- a/net/sctp/ulpqueue.c +++ b/net

[PATCH v5 3/5] sctp: Use helper for sctp_ulpq_tail_event() when hooked up to ->enqueue_event

2019-04-11 Thread David Miller
This way we can make sure events sent this way to sctp_ulpq_tail_event() are on a list as well. Now all such code paths are fully covered. Signed-off-by: David S. Miller --- net/sctp/stream_interleave.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/net/sctp/s

[PATCH v5 4/5] sctp: Make sctp_enqueue_event tak an skb list.

2019-04-11 Thread David Miller
Pass this, instead of an event. Then everything trickles down and we always have events a non-empty list. Then we needs a list creating stub to place into .enqueue_event for sctp_stream_interleave_1. Signed-off-by: David S. Miller --- net/sctp/stream_interleave.c | 49 ++

[PATCH v5 2/5] sctp: Always pass skbs on a list to sctp_ulpq_tail_event().

2019-04-11 Thread David Miller
This way we can simplify the logic and remove assumptions about the implementation of skb lists. Signed-off-by: David S. Miller --- net/sctp/ulpqueue.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 0fecc1fb

Re: [PATCH v5 0/5] SCTP: Event skb list overhaul.

2019-04-11 Thread David Miller
From: Marcelo Ricardo Leitner Date: Thu, 11 Apr 2019 18:54:13 -0300 > On Thu, Apr 11, 2019 at 02:39:35PM -0700, David Miller wrote: >> From: David Miller >> Date: Wed, 10 Apr 2019 14:19:22 -0700 (PDT) >> >> > This patch series eliminates the explicit reference to the skb list >> > implementatio

Re: [PATCH v5 bpf-next 1/3] bpf: add bpf_descendant_of helper

2019-04-11 Thread Daniel Borkmann
On 04/10/2019 10:36 PM, Javier Honduvilla Coto wrote: > This patch adds the bpf_descendant_of helper which accepts a PID and > returns 1 if the PID of the process currently being executed is a > descendant of it or if it's itself. Returns 0 otherwise. > > This is very useful in tracing programs wh

[PATCH net-next] net: sched: flower: fix filter net reference counting

2019-04-11 Thread Vlad Buslov
Fix net reference counting in fl_change() and remove redundant call to tcf_exts_get_net() from __fl_delete(). __fl_put() already tries to get net before releasing exts and deallocating a filter, so this code caused flower classifier to obtain net twice per filter that is being deleted. Implementat

Re: [PATCH v5 0/5] SCTP: Event skb list overhaul.

2019-04-11 Thread Marcelo Ricardo Leitner
On Thu, Apr 11, 2019 at 02:39:35PM -0700, David Miller wrote: > From: David Miller > Date: Wed, 10 Apr 2019 14:19:22 -0700 (PDT) > > > This patch series eliminates the explicit reference to the skb list > > implementation via skb->prev dereferences. > ... > > Can I get some ACKs etc. before I t

Re: [PATCH/RFC v2 bpf-next 11/19] libbpf: new global variable "libbpf_test_mode"

2019-04-11 Thread Jiong Wang
> On 11 Apr 2019, at 15:32, Jiong Wang wrote: > > >> On 11 Apr 2019, at 04:19, Jakub Kicinski >> wrote: >> >> On Wed, 10 Apr 2019 20:50:25 +0100, Jiong Wang wrote: >>> Enable BPF_F_TEST_RND_HI32 for all existing bpf selftests or other >>> independent tests could involve quite a few changes

Re: [PATCH bpf-next] tools: add smp_* barrier variants to include infrastructure

2019-04-11 Thread Alexei Starovoitov
On Tue, Apr 9, 2019 at 2:44 AM Daniel Borkmann wrote: > > Add the definition for smp_rmb(), smp_wmb(), and smp_mb() to the > tools include infrastructure: this patch adds the implementation > for x86-64 and arm64, and have it fall back as currently is for > other archs which do not have it impleme

Re: [PATCH v5 0/5] SCTP: Event skb list overhaul.

2019-04-11 Thread David Miller
From: David Miller Date: Wed, 10 Apr 2019 14:19:22 -0700 (PDT) > This patch series eliminates the explicit reference to the skb list > implementation via skb->prev dereferences. ... Can I get some ACKs etc. before I toss this into net-next? It's the same as the v4, just respun to current net-n

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

2019-04-11 Thread Daniel Borkmann
On 04/11/2019 11:18 PM, Willem de Bruijn wrote: [...] >>> diff --git a/net/core/filter.c b/net/core/filter.c >>> index 22eb2ed..a1654ef62 100644 >>> --- a/net/core/filter.c >>> +++ b/net/core/filter.c >>> @@ -2969,11 +2969,14 @@ static u32 bpf_skb_net_base_len(const struct >>> sk_buff *skb) >>> #

Re: [PATCH net-next 00/10] ipv6: Refactor nexthop selection helpers during a fib lookup

2019-04-11 Thread David Miller
From: David Ahern Date: Tue, 9 Apr 2019 14:41:09 -0700 > From: David Ahern > > IPv6 has a fib6_nh embedded within each fib6_info and a separate > fib6_info for each path in a multipath route. A side effect is that > a fib6_info is passed all the way down the stack when selecting a path > on a

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

2019-04-11 Thread Willem de Bruijn
On Thu, Apr 11, 2019 at 5:09 PM Daniel Borkmann wrote: > > On 04/09/2019 04:06 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

Re: [PATCH net] selftests: fib_tests: Fix 'Command line is not complete' errors

2019-04-11 Thread David Miller
From: David Ahern Date: Tue, 9 Apr 2019 14:23:10 -0700 > From: David Ahern > > A couple of tests are verifying a route has been removed. The helper > expects the prefix as the first part of the expected output. When > checking that a route has been deleted the prefix is empty leading > to an i

Re: [PATCH] ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type

2019-04-11 Thread David Miller
From: Sheena Mira-ato Date: Wed, 10 Apr 2019 08:36:35 +1200 > The device type for ip6 tunnels is set to > ARPHRD_TUNNEL6. However, the ip4ip6_err function > is expecting the device type of the tunnel to be > ARPHRD_TUNNEL. Since the device types do not > match, the function exits and the ICMP er

Re: [pull request][net 00/10] Mellanox, mlx5 fixes 2019-04-09

2019-04-11 Thread David Miller
From: Saeed Mahameed Date: Tue, 9 Apr 2019 12:36:26 -0700 > I've cc'ed some of the checksum fixes to Eric Dumazet and i would like to get > his feedback before you pull. Ok, I'll wait for that.

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

2019-04-11 Thread Daniel Borkmann
On 04/09/2019 04:06 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. For L3 en

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

2019-04-11 Thread Daniel Borkmann
On 04/09/2019 04:34 PM, Willem de Bruijn wrote: > On Tue, Apr 9, 2019 at 10:08 AM 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 >> encaps

Re: [PATCH v2 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-11 Thread kbuild test robot
Hi Tom, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/exthdrs-Create-exthdrs_options-c/20190412-024542 reproduce: # apt-get install sparse make ARCH=x86_64 allmodco

Re: [RFC net-next 1/1] tdc.py: Introduce required plugins

2019-04-11 Thread Lucas Bates
On Wed, Apr 10, 2019 at 10:33 AM Nicolas Dichtel wrote: > > Le 09/04/2019 à 23:44, Lucas Bates a écrit : > > Some of the testcases (for example, all of the fw tests) in tdc > > require activating the nsplugin. This RFC introduces a feature which > > tags one such test with the keyword "requires".

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

2019-04-11 Thread David Miller
From: Andy Duan Date: Tue, 9 Apr 2019 03:40:56 + > 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: Fuga

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

2019-04-11 Thread Daniel Borkmann
On 04/11/2019 10:23 PM, Daniel Borkmann wrote: > On 04/11/2019 09:54 AM, Magnus Karlsson wrote: >> On Wed, Apr 10, 2019 at 9:08 PM Y Song wrote: >>> On Wed, Apr 10, 2019 at 12:21 AM Magnus Karlsson >>> wrote: The use of smp_rmb() and smp_wmb() creates a Linux header dependency on b

Re: [PATCH v2 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-11 Thread kbuild test robot
Hi Tom, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/exthdrs-Create-exthdrs_options-c/20190412-024542 config: i386-randconfig-l3-04110213 (attached as .config) compiler: gcc-5 (Debian 5

Re: [PATCH bpf-next] bpftool: Exit early when it's not possible to dump a REUSEPORT_SOCKARRAY map

2019-04-11 Thread Jakub Kicinski
On Thu, 11 Apr 2019 17:27:00 +0900, Benjamin Poirier wrote: > avoids outputting a series of > value: > No space left on device > > The value itself is not wrong but bpf_fd_reuseport_array_lookup_elem() can > only return it if the map was created with value_size = 8. There's nothing > b

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

2019-04-11 Thread Daniel Borkmann
On 04/11/2019 09:54 AM, Magnus Karlsson wrote: > On Wed, Apr 10, 2019 at 9:08 PM Y Song wrote: >> On Wed, Apr 10, 2019 at 12:21 AM Magnus Karlsson >> wrote: >>> >>> The use of smp_rmb() and smp_wmb() creates a Linux header dependency >>> on barrier.h that is uneccessary in most parts. This patch

Re: [PATCH v2 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-11 Thread kbuild test robot
Hi Tom, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/exthdrs-Create-exthdrs_options-c/20190412-024542 config: i386-randconfig-x017-201914 (attached as .config) compiler: gcc-7 (Debian 7

Re: [PATCH v2 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-11 Thread kbuild test robot
Hi Tom, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/exthdrs-Create-exthdrs_options-c/20190412-024542 config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc

Re: [PATCH bpf] bpftool: Fix errno variable usage

2019-04-11 Thread Daniel Borkmann
On 04/11/2019 10:03 AM, Benjamin Poirier wrote: > The test meant to use the saved value of errno. Given the current code, it > makes no practical difference however. > > Fixes: bf598a8f0f77 ("bpftool: Improve handling of ENOENT on map dumps") > Signed-off-by: Benjamin Poirier Applied, thanks!

Re: [PATCH bpf-next] bpf: fix missing bpf_check_uarg_tail_zero in BPF_PROG_TEST_RUN

2019-04-11 Thread Daniel Borkmann
On 04/11/2019 06:12 PM, Stanislav Fomichev wrote: > Commit b0b9395d865e ("bpf: support input __sk_buff context in > BPF_PROG_TEST_RUN") started using bpf_check_uarg_tail_zero in > BPF_PROG_TEST_RUN. However, bpf_check_uarg_tail_zero is not defined > for !CONFIG_BPF_SYSCALL: > > net/bpf/test_run.c:

Re: [PATCH v2 net-next] selftests: Add debugging options to pmtu.sh

2019-04-11 Thread Stefano Brivio
On Thu, 11 Apr 2019 11:51:50 -0700 David Ahern wrote: > From: David Ahern > > pmtu.sh script runs a number of tests and dumps a summary of pass/fail. > If a test fails, it is near impossible to debug why. For example: > > TEST: ipv6: PMTU exceptions [FAIL] > > There

[PATCH v2 net-next] selftests: Add debugging options to pmtu.sh

2019-04-11 Thread David Ahern
From: David Ahern pmtu.sh script runs a number of tests and dumps a summary of pass/fail. If a test fails, it is near impossible to debug why. For example: TEST: ipv6: PMTU exceptions [FAIL] There are a lot of commands run behind the scenes for this test. Which one is

Re: [PATCH net-next] net: sched: flower: use correct ht function to prevent duplicates

2019-04-11 Thread David Miller
From: Jakub Kicinski Date: Thu, 11 Apr 2019 10:14:15 -0700 > On Thu, 11 Apr 2019 19:12:20 +0300, Vlad Buslov wrote: >> Implementation of function rhashtable_insert_fast() check if its internal >> helper function __rhashtable_insert_fast() returns non-NULL pointer and >> seemingly return -EEXIST i

Re: [PATCH net-next] netns: read NETNSA_NSID as s32 attribute in rtnl_net_getid()

2019-04-11 Thread David Miller
From: Guillaume Nault Date: Thu, 11 Apr 2019 16:45:57 +0200 > NETNSA_NSID is signed. Use nla_get_s32() to avoid confusion. > > Signed-off-by: Guillaume Nault Applied.

Re: [PATCH v3 0/2] Fix thunderx MTU with XDP

2019-04-11 Thread David Miller
From: Matteo Croce Date: Thu, 11 Apr 2019 12:26:31 +0200 > 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. > > v3: Fix a copy-paste from two functions, tested on proper hard

Re: [PATCH net 0/5] net/smc: fixes 2019-04-11

2019-04-11 Thread David Miller
From: Ursula Braun Date: Thu, 11 Apr 2019 11:17:29 +0200 > here are some fixes in different areas of the smc code for the net > tree. Series applied, thank you.

Re: [PATCH v5 bpf-next 0/3] bpf: add bpf_descendant_of helper

2019-04-11 Thread Song Liu
On Wed, Apr 10, 2019 at 1:38 PM Javier Honduvilla Coto wrote: > > Hi all, > > This patch adds the bpf_descendant_of helper which accepts a PID and > returns 1 if the PID of the process currently being executed is a > descendant of it or if it's itself. Returns 0 otherwise. > > This is very useful

Re: [PATCH bpf] bpftool: Fix errno variable usage

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 4:23 AM Quentin Monnet wrote: > > 2019-04-11 17:03 UTC+0900 ~ Benjamin Poirier > > The test meant to use the saved value of errno. Given the current code, it > > makes no practical difference however. > > > > Fixes: bf598a8f0f77 ("bpftool: Improve handling of ENOENT on map

Re: [PATCH bpf-next 0/5] Bulk optimization for XDP cpumap redirect

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 6:18 AM Jesper Dangaard Brouer wrote: > > On Wed, 10 Apr 2019 16:36:40 -0700 > Song Liu wrote: > > > On Wed, Apr 10, 2019 at 6:00 AM Jesper Dangaard Brouer > > wrote: > > > > > > This patchset utilize a number of different kernel bulk APIs for > > > optimizing > > > the

Re: [PATCH bpf-next 3/5] net: core: introduce build_skb_around

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 8:39 AM Jesper Dangaard Brouer wrote: > > On Wed, 10 Apr 2019 16:34:29 -0700 > Song Liu wrote: > > > > +struct sk_buff *build_skb_around(struct sk_buff *skb, > > > +void *data, unsigned int frag_size) > > > +{ > > > + if (unlikely(!skb

[PATCH v2] ethtool: Add bash-completion script

2019-04-11 Thread Kevin Locke
To aid users constructing a valid ethtool invocation, create a [bash-completion] script to provide [programmable completion] of ethtool arguments. It supports all current command options. The script is named shell-completion/bash/ethtool, similar to [kmod], and installed to `pkg-config --variable

Re: [PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-11 Thread Song Liu
On Thu, Apr 11, 2019 at 4:23 AM Jesper Dangaard Brouer wrote: > > On Wed, 10 Apr 2019 16:24:37 -0700 > Song Liu wrote: > > > > /* Feedback loop via tracepoint */ > > > - trace_xdp_cpumap_kthread(rcpu->map_id, processed, drops, > > > sched); > > > + tra

Re: [oss-drivers] Re: [PATCH/RFC v2 bpf-next 05/19] bpf: split read liveness into REG_LIVE_READ64 and REG_LIVE_READ32

2019-04-11 Thread Jiong Wang
> On 11 Apr 2019, at 17:44, Jakub Kicinski wrote: > > On Thu, 11 Apr 2019 07:13:03 +0100, Jiong Wang wrote: @@ -1150,17 +1150,17 @@ static int mark_reg_read(struct bpf_verifier_env *env, parent->var_off.value, parent->off); retu

Re: [PATCH net-next] net: sched: flower: use correct ht function to prevent duplicates

2019-04-11 Thread Jakub Kicinski
On Thu, 11 Apr 2019 19:12:20 +0300, Vlad Buslov wrote: > Implementation of function rhashtable_insert_fast() check if its internal > helper function __rhashtable_insert_fast() returns non-NULL pointer and > seemingly return -EEXIST in such case. However, since > __rhashtable_insert_fast() is called

Re: [oss-drivers] Re: [PATCH/RFC v2 bpf-next 05/19] bpf: split read liveness into REG_LIVE_READ64 and REG_LIVE_READ32

2019-04-11 Thread Jiong Wang
> On 11 Apr 2019, at 17:44, Jakub Kicinski wrote: > > On Thu, 11 Apr 2019 07:13:03 +0100, Jiong Wang wrote: @@ -1150,17 +1150,17 @@ static int mark_reg_read(struct bpf_verifier_env *env, parent->var_off.value, parent->off); retu

Re: [PATCH net] dctcp: more accurate tracking of packets delivery

2019-04-11 Thread Neal Cardwell
On Thu, Apr 11, 2019 at 8:55 AM Eric Dumazet wrote: > > After commit e21db6f69a95 ("tcp: track total bytes delivered with ECN CE > marks") > core TCP stack does a very good job tracking ECN signals. > > The "sender's best estimate of CE information" Yuchung mentioned in his > patch is indeed the

Re: [PATCH] ethtool: Add bash-completion script

2019-04-11 Thread Kevin Locke
On Thu, 2019-04-11 at 09:14 -0700, Jesse Brandeburg wrote: > On Sun, 7 Apr 2019 20:19:37 -0600 Kevin Locke wrote: >> To aid users constructing a valid ethtool invocation, create a >> [bash-completion] script to provide [programmable completion] of ethtool >> arguments. It supports all current com

Re: [PATCH] net: socket: Always initialize family field at move_addr_to_kernel().

2019-04-11 Thread Casey Schaufler
On 4/11/2019 4:31 AM, Tetsuo Handa wrote: On 2019/04/04 13:49, David Miller wrote: From: Tetsuo Handa Date: Wed, 3 Apr 2019 06:07:40 +0900 On 2019/04/03 5:23, David Miller wrote: Please fix RDS and other protocols to examine the length properly instead. Do you prefer adding branches only fo

Re: [oss-drivers] Re: [PATCH/RFC v2 bpf-next 05/19] bpf: split read liveness into REG_LIVE_READ64 and REG_LIVE_READ32

2019-04-11 Thread Jakub Kicinski
On Thu, 11 Apr 2019 07:13:03 +0100, Jiong Wang wrote: > >> @@ -1150,17 +1150,17 @@ static int mark_reg_read(struct bpf_verifier_env > >> *env, > >>parent->var_off.value, parent->off); > >>return -EFAULT; > >>} > >> - if (parent->

Re: [PATCH] ethtool: Add bash-completion script

2019-04-11 Thread Jesse Brandeburg
On Sun, 7 Apr 2019 20:19:37 -0600 Kevin Locke wrote: > To aid users constructing a valid ethtool invocation, create a > [bash-completion] script to provide [programmable completion] of ethtool > arguments. It supports all current command options. > > The script is placed in shell-completion/bas

Re: [PATCH net-next] netns: read NETNSA_NSID as s32 attribute in rtnl_net_getid()

2019-04-11 Thread Nicolas Dichtel
Le 11/04/2019 à 16:45, Guillaume Nault a écrit : > NETNSA_NSID is signed. Use nla_get_s32() to avoid confusion. > > Signed-off-by: Guillaume Nault Acked-by: Nicolas Dichtel

[PATCH net-next] net: sched: flower: use correct ht function to prevent duplicates

2019-04-11 Thread Vlad Buslov
Implementation of function rhashtable_insert_fast() check if its internal helper function __rhashtable_insert_fast() returns non-NULL pointer and seemingly return -EEXIST in such case. However, since __rhashtable_insert_fast() is called with NULL key pointer, it never actually checks for duplicates

[PATCH bpf-next] bpf: fix missing bpf_check_uarg_tail_zero in BPF_PROG_TEST_RUN

2019-04-11 Thread Stanislav Fomichev
Commit b0b9395d865e ("bpf: support input __sk_buff context in BPF_PROG_TEST_RUN") started using bpf_check_uarg_tail_zero in BPF_PROG_TEST_RUN. However, bpf_check_uarg_tail_zero is not defined for !CONFIG_BPF_SYSCALL: net/bpf/test_run.c: In function ‘bpf_ctx_init’: net/bpf/test_run.c:142:9: error:

Re: [PATCH bpf-next 3/5] net: core: introduce build_skb_around

2019-04-11 Thread Jesper Dangaard Brouer
On Wed, 10 Apr 2019 16:34:29 -0700 Song Liu wrote: > > +struct sk_buff *build_skb_around(struct sk_buff *skb, > > +void *data, unsigned int frag_size) > > +{ > > + if (unlikely(!skb)) > > + return NULL; > > + > > + skb = __build_skb_around

Re: [PATCH bpf-next] tools/bpftool: show btf id in program information

2019-04-11 Thread Yonghong Song
cc Andrii On 4/11/19 12:51 AM, Daniel Borkmann wrote: > On 04/10/2019 05:39 PM, Jakub Kicinski wrote: >> On Wed, 10 Apr 2019 13:56:42 +0900, Prashant Bhole wrote: >>> Let's add a way to know whether a program has btf context. >>> Patch adds 'btf_id' in the output of program listing. >>> When btf_

[PATCH net-next] netns: read NETNSA_NSID as s32 attribute in rtnl_net_getid()

2019-04-11 Thread Guillaume Nault
NETNSA_NSID is signed. Use nla_get_s32() to avoid confusion. Signed-off-by: Guillaume Nault --- net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 7e6dcc625701..ebb5b6d21a13 100644 --- a/net/core/

Re: [PATCH/RFC v2 bpf-next 11/19] libbpf: new global variable "libbpf_test_mode"

2019-04-11 Thread Jiong Wang
> On 11 Apr 2019, at 04:19, Jakub Kicinski wrote: > > On Wed, 10 Apr 2019 20:50:25 +0100, Jiong Wang wrote: >> Enable BPF_F_TEST_RND_HI32 for all existing bpf selftests or other >> independent tests could involve quite a few changes to make sure all bpf >> prog load places has BPF_F_TEST_RND_HI

Re: [PATCH net] dctcp: more accurate tracking of packets delivery

2019-04-11 Thread Soheil Hassas Yeganeh
On Thu, Apr 11, 2019 at 8:55 AM Eric Dumazet wrote: > > After commit e21db6f69a95 ("tcp: track total bytes delivered with ECN CE > marks") > core TCP stack does a very good job tracking ECN signals. > > The "sender's best estimate of CE information" Yuchung mentioned in his > patch is indeed the

Re: [PATCH bpf-next 0/5] Bulk optimization for XDP cpumap redirect

2019-04-11 Thread Jesper Dangaard Brouer
On Wed, 10 Apr 2019 16:36:40 -0700 Song Liu wrote: > On Wed, Apr 10, 2019 at 6:00 AM Jesper Dangaard Brouer > wrote: > > > > This patchset utilize a number of different kernel bulk APIs for optimizing > > the performance for the XDP cpumap redirect feature. > > Could you please share some num

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

2019-04-11 Thread Jesper Dangaard Brouer
On Thu, 11 Apr 2019 12:26:33 +0200 Matteo Croce wrote: > 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: 05c773

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

2019-04-11 Thread Jesper Dangaard Brouer
On Thu, 11 Apr 2019 12:26:32 +0200 Matteo Croce wrote: > 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

[PATCH net] dctcp: more accurate tracking of packets delivery

2019-04-11 Thread Eric Dumazet
After commit e21db6f69a95 ("tcp: track total bytes delivered with ECN CE marks") core TCP stack does a very good job tracking ECN signals. The "sender's best estimate of CE information" Yuchung mentioned in his patch is indeed the best we can do. DCTCP can use tp->delivered_ce and tp->delivered t

Re: [PATCH] net: socket: Always initialize family field at move_addr_to_kernel().

2019-04-11 Thread Tetsuo Handa
On 2019/04/04 13:49, David Miller wrote: > From: Tetsuo Handa > Date: Wed, 3 Apr 2019 06:07:40 +0900 > >> On 2019/04/03 5:23, David Miller wrote: >>> Please fix RDS and other protocols to examine the length properly >>> instead. >> >> Do you prefer adding branches only for allow reading the famil

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

2019-04-11 Thread Vlad Buslov
On Thu 11 Apr 2019 at 14:13, Ido Schimmel wrote: > On Fri, Apr 05, 2019 at 08:56:26PM +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 mo

Re: [PATCH bpf-next 1/5] bpf: cpumap use ptr_ring_consume_batched

2019-04-11 Thread Jesper Dangaard Brouer
On Wed, 10 Apr 2019 16:24:37 -0700 Song Liu wrote: > > /* Feedback loop via tracepoint */ > > - trace_xdp_cpumap_kthread(rcpu->map_id, processed, drops, > > sched); > > + trace_xdp_cpumap_kthread(rcpu->map_id, n, drops, sched); > > btw: can we do th

  1   2   >