Re: [PATCH net V2] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Jason Wang
On 2019/5/8 下午12:16, Michael S. Tsirkin wrote: On Tue, May 07, 2019 at 12:03:36AM -0400, Jason Wang wrote: When a queue(tfile) is detached through __tun_detach(), we move the last enabled tfile to the position where detached one sit but don't NULL out last position. We expect to synchronize th

Re: [PATCH net V2] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Michael S. Tsirkin
On Tue, May 07, 2019 at 12:03:36AM -0400, Jason Wang wrote: > When a queue(tfile) is detached through __tun_detach(), we move the > last enabled tfile to the position where detached one sit but don't > NULL out last position. We expect to synchronize the datapath through > tun->numqueues. Unfortuna

[PATCH net] ipv4: Fix raw socket lookup for local traffic

2019-05-07 Thread David Ahern
From: David Ahern inet_iif should be used for the raw socket lookup. inet_iif considers rt_iif which handles the case of local traffic. As it stands, ping to a local address with the '-I ' option fails ever since ping was changed to use SO_BINDTODEVICE instead of cmsg + IP_PKTINFO. IPv6 works f

Re: [PATCH net] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Jason Wang
On 2019/5/7 下午10:47, Eric Dumazet wrote: On 5/6/19 11:54 PM, Jason Wang wrote: On 2019/5/7 上午11:41, Eric Dumazet wrote: If you remove the test on (!numqueues), the following might crash with a divide by zero... Indeed, let me post V2. You probably want to fix tun_ebpf_select_queue() a

Re: [PATCH net V2] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Jason Wang
On 2019/5/7 下午10:41, Cong Wang wrote: On Mon, May 6, 2019 at 11:19 PM Jason Wang wrote: On 2019/5/7 下午12:54, Cong Wang wrote: On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote: diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e9ca1c0..32a0b23 100644 --- a/drivers/net/tun.c +++ b/dri

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-05-07 Thread Hangbin Liu
On Tue, May 07, 2019 at 10:35:59AM +0200, Miroslav Lichvar wrote: > On Mon, May 06, 2019 at 07:01:23AM -0700, Richard Cochran wrote: > > On Thu, Apr 25, 2019 at 09:40:06PM +0800, Hangbin Liu wrote: > > > Would you please help have a look at it and see which way we should use? > > > Drop SIOCSHWTSTA

Re: [net-next v2 11/11] i40e: Introduce recovery mode support

2019-05-07 Thread Jakub Kicinski
On Tue, 7 May 2019 18:51:02 +, Michael, Alice wrote: > > -Original Message- > > From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > > Sent: Saturday, May 4, 2019 4:35 AM > > To: Kirsher, Jeffrey T ; Michael, Alice > > > > Cc: da...@davemloft.net; netdev@vger.kernel.org; nhor..

Re: [PATCH net-next] net: phy: improve pause mode reporting in phy_print_status

2019-05-07 Thread David Miller
From: Heiner Kallweit Date: Sun, 5 May 2019 19:03:51 +0200 > So far we report symmetric pause only, and we don't consider the local > pause capabilities. Let's properly consider local and remote > capabilities, and report also asymmetric pause. > > Signed-off-by: Heiner Kallweit It looks like

Re: [PATCH net-next] net/sched: remove block pointer from common offload structure

2019-05-07 Thread David Miller
From: Jakub Kicinski Date: Mon, 6 May 2019 17:24:21 -0700 > From: Pieter Jansen van Vuuren > > Based on feedback from Jiri avoid carrying a pointer to the tcf_block > structure in the tc_cls_common_offload structure. Instead store > a flag in driver private data which indicates if offloads app

Re: [PATCH net] vrf: sit mtu should not be updated when vrf netdev is the link

2019-05-07 Thread David Miller
From: Stephen Suryaputra Date: Mon, 6 May 2019 15:00:01 -0400 > VRF netdev mtu isn't typically set and have an mtu of 65536. When the > link of a tunnel is set, the tunnel mtu is changed from 1480 to the link > mtu minus tunnel header. In the case of VRF netdev is the link, then the > tunnel mtu

Re: [PATCH][next] taprio: add null check on sched_nest to avoid potential null pointer dereference

2019-05-07 Thread David Miller
From: Colin King Date: Sun, 5 May 2019 22:50:19 +0100 > From: Colin Ian King > > The call to nla_nest_start_noflag can return a null pointer and currently > this is not being checked and this can lead to a null pointer dereference > when the null pointer sched_nest is passed to function nla_ne

Re: [PATCH net-next 0/2] net_sched: sch_fq: enable in-kernel pacing for QUIC servers

2019-05-07 Thread David Miller
From: Eric Dumazet Date: Sat, 4 May 2019 16:48:52 -0700 > Willem added GSO support to UDP stack, greatly improving performance > of QUIC servers. > > We also want to enable in-kernel pacing, which is possible thanks to EDT > model, since each sendmsg() can provide a timestamp for the skbs. > >

RE: [net-next v2 11/11] i40e: Introduce recovery mode support

2019-05-07 Thread Michael, Alice
> -Original Message- > From: Jakub Kicinski [mailto:jakub.kicin...@netronome.com] > Sent: Saturday, May 4, 2019 4:35 AM > To: Kirsher, Jeffrey T ; Michael, Alice > > Cc: da...@davemloft.net; netdev@vger.kernel.org; nhor...@redhat.com; > sassm...@redhat.com; Marczak, Piotr ; Buchholz, >

Re: [RFC bpf-next 0/7] busy poll support for AF_XDP sockets

2019-05-07 Thread Alexei Starovoitov
On Tue, May 07, 2019 at 01:51:45PM +0200, Magnus Karlsson wrote: > On Mon, May 6, 2019 at 6:33 PM Alexei Starovoitov > wrote: > > > > On Thu, May 02, 2019 at 10:39:16AM +0200, Magnus Karlsson wrote: > > > This RFC proposes to add busy-poll support to AF_XDP sockets. With > > > busy-poll, the drive

Re: [PATCH v3 0/5] net: dsa: lantiq: Add bridge offloading

2019-05-07 Thread David Miller
From: Hauke Mehrtens Date: Mon, 6 May 2019 00:25:05 +0200 > This adds bridge offloading for the Intel / Lantiq GSWIP 2.1 switch. > > Changes since: > v2: > - Added Fixes tag to patch 1 > - Fixed typo > - added GSWIP_TABLE_MAC_BRIDGE_STATIC and made use of it > - used GSWIP_TABLE_MAC_BRIDGE

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-07 Thread Jakub Kicinski
On Tue, 7 May 2019 13:27:15 +0100, Edward Cree wrote: > On 06/05/2019 13:41, Jamal Hadi Salim wrote: > > On 2019-05-04 2:27 a.m., Jakub Kicinski wrote: > >> On Fri, 3 May 2019 16:06:55 +0100, Edward Cree wrote: > >>> Introduce a new offload command TC_CLSFLOWER_STATS_BYINDEX, similar to > >>>  

Re: [PATCH bpf-next 4/6] bpf: make BPF_LOG_* flags available in UAPI header

2019-05-07 Thread Quentin Monnet
2019-05-04 23:19 UTC-0700 ~ Alexei Starovoitov > On Mon, Apr 29, 2019 at 10:52:25AM +0100, Quentin Monnet wrote: >> The kernel verifier combines several flags to select what kind of logs >> to print to the log buffer provided by users. >> >> In order to make it easier to provide the relevant flags

[PATCH bpf] nfp: bpf: fix static check error through tightening shift amount adjustment

2019-05-07 Thread Jiong Wang
NFP shift instruction has something special. If shift direction is left then shift amount of 1 to 31 is specified as 32 minus the amount to shift. But no need to do this for indirect shift which has shift amount be 0. Even after we do this subtraction, shift amount 0 will be turned into 32 which w

Re: pull-request: bpf-next 2019-05-06

2019-05-07 Thread David Miller
From: Daniel Borkmann Date: Mon, 6 May 2019 17:18:22 +0200 > The following pull-request contains BPF updates for your *net-next* tree. > > The main changes are: > > 1) Two AF_XDP libbpf fixes for socket teardown; first one an invalid >munmap and the other one an invalid skmap cleanup, both

Re: pull-request: bpf 2019-05-06

2019-05-07 Thread David Miller
From: Daniel Borkmann Date: Mon, 6 May 2019 12:23:41 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Two x32 JIT fixes: one which has buggy signed comparisons in 64 >bit conditional jumps and another one for 64 bit negation, bot

Re: [PATCH v4 00/10] of_net: Add NVMEM support to of_get_mac_address

2019-05-07 Thread Rob Herring
On Sun, May 5, 2019 at 11:47 PM David Miller wrote: > > From: Petr Štetiar > Date: Fri, 3 May 2019 16:27:05 +0200 > > > this patch series is a continuation of my previous attempt[1], where I've > > tried to wire MTD layer into of_get_mac_address, so it would be possible to > > load MAC addresses

Fw: [Bug 203533] New: VxLAN: Cannot create multiple vxlan devices for a given VNI and different source addresses.

2019-05-07 Thread Stephen Hemminger
This is a valid request, not sure if just changing the check is enough because it also matters where packets match endpoints. Begin forwarded message: Date: Mon, 06 May 2019 21:18:30 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 203533] New: VxLAN:

Re: [PATCH net] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Eric Dumazet
On 5/6/19 11:54 PM, Jason Wang wrote: > > On 2019/5/7 上午11:41, Eric Dumazet wrote: >> >>>   >> If you remove the test on (!numqueues), >> the following might crash with a divide by zero... > > > Indeed, let me post V2. You probably want to fix tun_ebpf_select_queue() as well.

Re: kTLS broken somewhere between 4.18 and 5.0

2019-05-07 Thread John Fastabend
Andre Tomt wrote: > On 14.04.2019 22:40, John Fastabend wrote: > > On 4/13/19 6:56 PM, Andre Tomt wrote: > >> On 13.04.2019 17:34, Steinar H. Gunderson wrote: > >>> Hi, > >>> > >>> I've been using kTLS for a while, with my video reflector Cubemap > >>> (https://git.sesse.net/?p=cubemap). After I up

Re: [PATCH net V2] tuntap: synchronize through tfiles array instead of tun->numqueues

2019-05-07 Thread Cong Wang
On Mon, May 6, 2019 at 11:19 PM Jason Wang wrote: > > > On 2019/5/7 下午12:54, Cong Wang wrote: > > On Mon, May 6, 2019 at 9:03 PM Jason Wang wrote: > >> diff --git a/drivers/net/tun.c b/drivers/net/tun.c > >> index e9ca1c0..32a0b23 100644 > >> --- a/drivers/net/tun.c > >> +++ b/drivers/net/tun.c >

Re: [PATCH bpf-next v2 04/16] xsk: Extend channels to support combined XSK/non-XSK traffic

2019-05-07 Thread Maxim Mikityanskiy
On 2019-05-06 17:23, Magnus Karlsson wrote: > On Mon, May 6, 2019 at 3:46 PM Maxim Mikityanskiy > wrote: >> >> On 2019-05-04 20:26, Björn Töpel wrote: >>> On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy >>> wrote: Currently, the drivers that implement AF_XDP zero-copy support (e.g.,

Re: [PATCH net-next RFC] Dump SW SQ context as part of tx reporter

2019-05-07 Thread Aya Levin
On 5/7/2019 3:41 PM, Jiri Pirko wrote: > Mon, Apr 29, 2019 at 04:17:39PM CEST, a...@mellanox.com wrote: >> TX reporter reports an error on two scenarios: >> - TX timeout on a specific tx queue >> - TX completion error on a specific send queue >> Prior to this patch, no dump data was supported by

Re: [PATCH net-next RFC] Dump SW SQ context as part of tx reporter

2019-05-07 Thread Jiri Pirko
Mon, Apr 29, 2019 at 04:17:39PM CEST, a...@mellanox.com wrote: >TX reporter reports an error on two scenarios: >- TX timeout on a specific tx queue >- TX completion error on a specific send queue >Prior to this patch, no dump data was supported by the tx reporter. This >patch adds support for SW da

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-07 Thread Edward Cree
On 06/05/2019 13:41, Jamal Hadi Salim wrote: > On 2019-05-04 2:27 a.m., Jakub Kicinski wrote: >> On Fri, 3 May 2019 16:06:55 +0100, Edward Cree wrote: >>> Introduce a new offload command TC_CLSFLOWER_STATS_BYINDEX, similar to >>>   the existing TC_CLSFLOWER_STATS but specifying an action_index (the

Re: [RFC bpf-next 0/7] busy poll support for AF_XDP sockets

2019-05-07 Thread Magnus Karlsson
On Mon, May 6, 2019 at 6:33 PM Alexei Starovoitov wrote: > > On Thu, May 02, 2019 at 10:39:16AM +0200, Magnus Karlsson wrote: > > This RFC proposes to add busy-poll support to AF_XDP sockets. With > > busy-poll, the driver is executed in process context by calling the > > poll() syscall. The main

Re: [PATCH net-next] net/sched: remove block pointer from common offload structure

2019-05-07 Thread Jiri Pirko
Tue, May 07, 2019 at 02:24:21AM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Based on feedback from Jiri avoid carrying a pointer to the tcf_block >structure in the tc_cls_common_offload structure. Instead store >a flag in driver private data which indicates if offl

RE: [net-next 13/15] ice: Use bitfields where possible

2019-05-07 Thread David Laight
From: Jeff Kirsher > Sent: 05 May 2019 00:49 > The driver was converted to not use bool, but it was > neglected that the bools should have been converted to bit fields > as bit fields in software structures are ok, as long as they > use the correct kinds of unsigned types. This avoids > wasting lot

Re: [PATCH net-next 1/2] net: Take common prefetch code structure into a function

2019-05-07 Thread Jesper Dangaard Brouer
On Mon, 6 May 2019 16:51:57 -0700 Jakub Kicinski wrote: > On Sun, 5 May 2019 13:36:06 +0300, Tariq Toukan wrote: > > Many device drivers use the same prefetch code structure to > > deal with small L1 cacheline size. > > Take this code into a function and call it from the drivers. > > > > Sugges

[PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied

2019-05-07 Thread Hangbin Liu
With commit 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule") we now able to check if a rule already exists. But this only works with iproute2. For other tools like libnl, NetworkManager, it still could add duplicate rules with only NLM_F_CREATE flag, like [localhost ~ ]# ip ru

Re: [PATCH bpf] libbpf: always NULL out pobj in bpf_prog_load_xattr

2019-05-07 Thread Lorenz Bauer
On Thu, 2 May 2019 at 17:03, Martin Lau wrote: > > On Thu, May 02, 2019 at 11:49:32AM -0400, Lorenz Bauer wrote: > > Currently, code like the following segfaults if bpf_prog_load_xattr > > returns an error: > > > > struct bpf_object *obj; > > > > err = bpf_prog_load_xattr(&attr, &obj, &pro

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-05-07 Thread Miroslav Lichvar
On Mon, May 06, 2019 at 07:01:23AM -0700, Richard Cochran wrote: > On Thu, Apr 25, 2019 at 09:40:06PM +0800, Hangbin Liu wrote: > > Would you please help have a look at it and see which way we should use? > > Drop SIOCSHWTSTAMP in container or add a filter on macvlan(maybe only in > > container)? >

Re: [PATCH net] selftests: fib_rule_tests: Fix icmp proto with ipv6

2019-05-07 Thread Hangbin Liu
On Tue, Apr 30, 2019 at 12:00:46PM -0600, David Ahern wrote: > On 4/29/19 8:37 PM, Hangbin Liu wrote: > > An other issue is The IPv4 rule 'from iif' check test failed while IPv6 > > passed. I haven't found out the reason yet. > > > > # ip -netns testns rule add from 192.51.100.3 iif dummy0 table 1