[PATCH bpf] libbpf: count present CPUs, not theoretically possible

2019-09-27 Thread Andrii Nakryiko
This patch switches libbpf_num_possible_cpus() from using possible CPU set to present CPU set. This fixes issues with incorrect auto-sizing of PERF_EVENT_ARRAY map on HOTPLUG-enabled systems. On HOTPLUG enabled systems, /sys/devices/system/cpu/possible is going to be a set of any representable (i.

Re: [RFC 12/20] RDMA/irdma: Implement device supported verb APIs

2019-09-27 Thread Leon Romanovsky
On Fri, Sep 27, 2019 at 02:28:41PM +, Saleem, Shiraz wrote: > > Subject: Re: [RFC 12/20] RDMA/irdma: Implement device supported verb APIs > > > > On Thu, Sep 26, 2019 at 07:49:52PM +, Saleem, Shiraz wrote: > > > > Subject: Re: [RFC 12/20] RDMA/irdma: Implement device supported verb > > > >

Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated

2019-09-27 Thread Leon Romanovsky
On Fri, Sep 27, 2019 at 04:17:15PM -0400, Doug Ledford wrote: > On Thu, 2019-09-26 at 21:55 +0200, gre...@linuxfoundation.org wrote: > > On Thu, Sep 26, 2019 at 07:49:44PM +, Saleem, Shiraz wrote: > > > > Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > > > > > > > On Thu, Sep

Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions

2019-09-27 Thread Leon Romanovsky
On Fri, Sep 27, 2019 at 08:23:46PM +0200, gre...@linuxfoundation.org wrote: > On Fri, Sep 27, 2019 at 02:28:20PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions > > > > > > On Thu, Sep 26, 2019 at 07:49:33PM +, Saleem, Shiraz wrote:

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

2019-09-27 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 --- ip/ipneigh.c

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

2019-09-27 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 0/2] support for bridge fdb and neigh get

2019-09-27 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

Re: [PATCH V2] net: dsa: microchip: Always set regmap stride to 1

2019-09-27 Thread Marek Vasut
On 9/26/19 3:52 PM, George McCollister wrote: > On Wed, Sep 25, 2019 at 5:08 PM Marek Vasut wrote: >> >> The regmap stride is set to 1 for regmap describing 8bit registers already. >> However, for 16/32/64bit registers, the stride is 2/4/8 respectively. This >> is not correct, as the switch protoco

Re: [PATCH bpf-next v11 2/4] bpf: added new helper bpf_get_ns_current_pid_tgid

2019-09-27 Thread Carlos Antonio Neira Bustos
On Fri, Sep 27, 2019 at 10:24:46AM -0700, Andrii Nakryiko wrote: > On Fri, Sep 27, 2019 at 9:59 AM Yonghong Song wrote: > > > > > > > > On 9/27/19 9:15 AM, Andrii Nakryiko wrote: > > > On Thu, Sep 26, 2019 at 1:15 AM Carlos Neira > > > wrote: > > >> > > >> New bpf helper bpf_get_ns_current_pid_t

Re: [PATCH V2 net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-27 Thread Jakub Kicinski
On Tue, 24 Sep 2019 12:48:26 -0400, Pooja Trivedi wrote: > On Mon, Sep 23, 2019 at 8:28 PM Jakub Kicinski wrote: > > On Sat, 21 Sep 2019 23:19:20 -0400, Pooja Trivedi wrote: > > > On Wed, Sep 18, 2019 at 5:45 PM Jakub Kicinski wrote: > > > > On Wed, 18 Sep 2019 17:37:44 -0400, Pooja Trivedi wro

Re: DSA driver kernel extension for dsa mv88e6190 switch

2019-09-27 Thread Zoran Stojsavljevic
Hello Andrew, > You should not need any kernel patches for switch side RGMII > delays. rgmii-id in the DT for the switch CPU port should be enough. > Some of the vf610-zii platforms use it. It should, but it does NOT work. IT is clearly stated in port.c, in f-n: static int mv88e6xxx_port_set_rgmi

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

2019-09-27 Thread Martin KaFai Lau
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 may cause use-after-free. The fix is to move reuseport_detach_sock() t

RE: [net-next v3 0/7] new PTP ioctl fixes

2019-09-27 Thread Keller, Jacob E
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Friday, September 27, 2019 11:30 AM > To: Keller, Jacob E > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org; Kirsher, > Jeffrey T > > Subject: Re: [net-next v3 0/7] new PTP ioctl fixes > > > Bug

Re: [PATCH bpf] bpf: Fix a race in reuseport_array_free()

2019-09-27 Thread Martin Lau
On Fri, Sep 27, 2019 at 01:47:32PM -0700, Eric Dumazet wrote: > > > On 9/27/19 11:17 AM, Martin Lau wrote: > > On Fri, Sep 27, 2019 at 10:24:49AM -0700, Eric Dumazet wrote: > >> > >> > >> On 9/27/19 9:52 AM, Martin KaFai Lau wrote: > >>> In reuseport_array_free(), the rcu_read_lock() cannot ensur

Re: [PATCH bpf] bpf: Fix a race in reuseport_array_free()

2019-09-27 Thread Eric Dumazet
On 9/27/19 11:17 AM, Martin Lau wrote: > On Fri, Sep 27, 2019 at 10:24:49AM -0700, Eric Dumazet wrote: >> >> >> On 9/27/19 9:52 AM, Martin KaFai Lau wrote: >>> In reuseport_array_free(), the rcu_read_lock() cannot ensure sk is still >>> valid. It is because bpf_sk_reuseport_detach() can be call

Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated

2019-09-27 Thread Doug Ledford
On Fri, 2019-09-27 at 14:28 +, Saleem, Shiraz wrote: > > Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > > > On Thu, Sep 26, 2019 at 07:49:44PM +, Saleem, Shiraz wrote: > > > > Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > > > > > > > On Thu, Sep 26,

Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated

2019-09-27 Thread Doug Ledford
On Thu, 2019-09-26 at 21:55 +0200, gre...@linuxfoundation.org wrote: > On Thu, Sep 26, 2019 at 07:49:44PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > > > > > On Thu, Sep 26, 2019 at 09:45:19AM -0700, Jeff Kirsher wrote: > > > > From: Shiraz

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

2019-09-27 Thread Eric Dumazet
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: Eric Dumazet >> Reported-by: syzbot > > Fixes: tag? -stable? >

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

2019-09-27 Thread David Miller
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: Eric Dumazet > Reported-by: syzbot Fixes: tag? -stable?

Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state

2019-09-27 Thread David Miller
From: Eric Dumazet Date: Thu, 26 Sep 2019 15:42:51 -0700 > Yuchung Cheng and Marek Majkowski independently reported a weird > behavior of TCP_USER_TIMEOUT option when used at connect() time. > > When the TCP_USER_TIMEOUT is reached, tcp_write_timeout() > believes the flow should live, and the fo

Re: [PATCH v2 net] sk_buff: drop all skb extensions on free and skb scrubbing

2019-09-27 Thread David Miller
From: Florian Westphal Date: Thu, 26 Sep 2019 20:37:05 +0200 > Now that we have a 3rd extension, add a new helper that drops the > extension space and use it when we need to scrub an sk_buff. > > At this time, scrubbing clears secpath and bridge netfilter data, but > retains the tc skb extension

Re: [PATCH net] tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth

2019-09-27 Thread David Miller
From: "Kevin(Yudong) Yang" Date: Thu, 26 Sep 2019 10:30:05 -0400 > There was a bug in the previous logic that attempted to ensure gain cycling > gets inflight above BDP even for small BDPs. This code correctly raised and > lowered target inflight values during the gain cycle. And this code > corr

Re: [PATCH net 0/3] mlxsw: Various fixes

2019-09-27 Thread David Miller
From: Ido Schimmel Date: Thu, 26 Sep 2019 14:43:37 +0300 > From: Ido Schimmel > > This patchset includes two small fixes for the mlxsw driver and one > patch which clarifies recently introduced devlink-trap documentation. > > Patch #1 clears the port's VLAN filters during port initialization.

Re: [net-next v3 0/7] new PTP ioctl fixes

2019-09-27 Thread David Miller
Bug fixes should target 'net' not 'net-next'

Re: [net-next v2 1/2] ptp: correctly disable flags on old ioctls

2019-09-27 Thread David Miller
From: Jacob Keller Date: Wed, 25 Sep 2019 19:28:19 -0700 > Commit 415606588c61 ("PTP: introduce new versions of IOCTLs", > 2019-09-13) introduced new versions of the PTP ioctls which actually > validate that the flags are acceptable values. > > As part of this, it cleared the flags value using a

Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions

2019-09-27 Thread gre...@linuxfoundation.org
On Fri, Sep 27, 2019 at 02:28:20PM +, Saleem, Shiraz wrote: > > Subject: Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions > > > > On Thu, Sep 26, 2019 at 07:49:33PM +, Saleem, Shiraz wrote: > > > > Subject: Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility > > > > defi

Re: [PATCH] lib: dimlib: fix help text typos

2019-09-27 Thread David Miller
From: Randy Dunlap Date: Wed, 25 Sep 2019 17:20:42 -0700 > From: Randy Dunlap > > Fix help text typos for DIMLIB. > > Fixes: 4f75da3666c0 ("linux/dim: Move implementation to .c files") > Signed-off-by: Randy Dunlap Applied.

Re: [PATCH V2] net: dsa: microchip: Always set regmap stride to 1

2019-09-27 Thread David Miller
From: Marek Vasut Date: Thu, 26 Sep 2019 00:08:42 +0200 > The regmap stride is set to 1 for regmap describing 8bit registers already. > However, for 16/32/64bit registers, the stride is 2/4/8 respectively. This > is not correct, as the switch protocol supports unaligned register reads > and write

Re: [PATCH bpf] bpf: Fix a race in reuseport_array_free()

2019-09-27 Thread Martin Lau
On Fri, Sep 27, 2019 at 10:24:49AM -0700, Eric Dumazet wrote: > > > On 9/27/19 9:52 AM, Martin KaFai Lau wrote: > > In reuseport_array_free(), the rcu_read_lock() cannot ensure sk is still > > valid. It is because bpf_sk_reuseport_detach() can be called from > > __sk_destruct() which is invoked

Re: [PATCH 0/5] Netfilter fixes for net

2019-09-27 Thread David Miller
From: Pablo Neira Ayuso Date: Wed, 25 Sep 2019 22:29:58 +0200 > The following patchset contains Netfilter fixes for net: > > 1) Add NFT_CHAIN_POLICY_UNSET to replace hardcoded -1 to >specify that the chain policy is unset. The chain policy >field is actually defined as an 8-bit unsigned

Re: [PATCH net v2] net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N

2019-09-27 Thread David Miller
From: Paul Blakey Date: Wed, 25 Sep 2019 18:02:35 +0300 > This a new feature, it is preferred that it defaults to N. > We will probe the feature support from userspace before actually using it. > > Fixes: 95a7233c452a ('net: openvswitch: Set OvS recirc_id from tc chain > index') > Signed-off-by

Re: [PATCH net] vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled

2019-09-27 Thread David Miller
From: David Ahern Date: Wed, 25 Sep 2019 07:53:19 -0700 > From: David Ahern > > A user reported that vrf create fails when IPv6 is disabled at boot using > 'ipv6.disable=1': >https://bugzilla.kernel.org/show_bug.cgi?id=204903 > > The failure is adding fib rules at create time. Add RTNL_FAM

RE: [RFC 01/20] ice: Initialize and register multi-function device to provide RDMA

2019-09-27 Thread Ertman, David M
> -Original Message- > From: gre...@linuxfoundation.org [mailto:gre...@linuxfoundation.org] > Sent: Thursday, September 26, 2019 10:13 PM > To: Nguyen, Anthony L > Cc: Kirsher, Jeffrey T ; j...@mellanox.com; > netdev@vger.kernel.org; linux-r...@vger.kernel.org; dledf...@redhat.com; > Ertma

Re: [PATCH bpf-next v11 2/4] bpf: added new helper bpf_get_ns_current_pid_tgid

2019-09-27 Thread Andrii Nakryiko
On Fri, Sep 27, 2019 at 9:59 AM Yonghong Song wrote: > > > > On 9/27/19 9:15 AM, Andrii Nakryiko wrote: > > On Thu, Sep 26, 2019 at 1:15 AM Carlos Neira wrote: > >> > >> New bpf helper bpf_get_ns_current_pid_tgid, > >> This helper will return pid and tgid from current task > >> which namespace ma

Re: [PATCH bpf] bpf: Fix a race in reuseport_array_free()

2019-09-27 Thread Eric Dumazet
On 9/27/19 9:52 AM, Martin KaFai Lau wrote: > In reuseport_array_free(), the rcu_read_lock() cannot ensure sk is still > valid. It is because bpf_sk_reuseport_detach() can be called from > __sk_destruct() which is invoked through call_rcu(..., __sk_destruct). We could question why reuseport_de

Re: [PATCH bpf-next v11 2/4] bpf: added new helper bpf_get_ns_current_pid_tgid

2019-09-27 Thread Yonghong Song
On 9/27/19 9:15 AM, Andrii Nakryiko wrote: > On Thu, Sep 26, 2019 at 1:15 AM Carlos Neira wrote: >> >> New bpf helper bpf_get_ns_current_pid_tgid, >> This helper will return pid and tgid from current task >> which namespace matches dev_t and inode number provided, >> this will allows us to instr

[PATCH bpf] bpf: Fix a race in reuseport_array_free()

2019-09-27 Thread Martin KaFai Lau
In reuseport_array_free(), the rcu_read_lock() cannot ensure sk is still valid. It is because bpf_sk_reuseport_detach() can be called from __sk_destruct() which is invoked through call_rcu(..., __sk_destruct). This patch takes the reuseport_lock in reuseport_array_free() which is not the fast pat

Re: [PATCH] net: dsa: rtl8366: Check VLAN ID and not ports

2019-09-27 Thread Florian Fainelli
On 9/27/19 9:39 AM, Linus Walleij wrote: > There has been some confusion between the port number and > the VLAN ID in this driver. What we need to check for > validity is the VLAN ID, nothing else. > > The current confusion came from assigning a few default > VLANs for default routing and we need

[PATCH] net: dsa: rtl8366: Check VLAN ID and not ports

2019-09-27 Thread Linus Walleij
There has been some confusion between the port number and the VLAN ID in this driver. What we need to check for validity is the VLAN ID, nothing else. The current confusion came from assigning a few default VLANs for default routing and we need to rewrite that properly. Instead of checking if the

Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state

2019-09-27 Thread Yuchung Cheng
On Thu, Sep 26, 2019 at 3:42 PM Eric Dumazet wrote: > > Yuchung Cheng and Marek Majkowski independently reported a weird > behavior of TCP_USER_TIMEOUT option when used at connect() time. > > When the TCP_USER_TIMEOUT is reached, tcp_write_timeout() > believes the flow should live, and the followi

Re: [net-next v3 7/7] renesas: reject unsupported external timestamp flags

2019-09-27 Thread Sergei Shtylyov
On 09/26/2019 09:11 PM, Jacob Keller wrote: > Fix the renesas PTP support to explicitly reject any future flags that > get added to the external timestamp request ioctl. > > In order to maintain currently functioning code, this patch accepts all > three current flags. This is because the PTP_RISI

Re: [PATCH bpf-next v11 2/4] bpf: added new helper bpf_get_ns_current_pid_tgid

2019-09-27 Thread Andrii Nakryiko
On Thu, Sep 26, 2019 at 1:15 AM Carlos Neira wrote: > > New bpf helper bpf_get_ns_current_pid_tgid, > This helper will return pid and tgid from current task > which namespace matches dev_t and inode number provided, > this will allows us to instrument a process inside a container. > > Signed-off-b

[PATCH ipsec-next v3 5/6] esp4: split esp_output_udp_encap and introduce esp_output_encap

2019-09-27 Thread Sabrina Dubroca
Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca --- net/ipv4/esp4.c | 57 - 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index c5d826642229..033c61d27148 100

[PATCH ipsec-next v3 6/6] xfrm: add espintcp (RFC 8229)

2019-09-27 Thread Sabrina Dubroca
TCP encapsulation of IKE and IPsec messages (RFC 8229) is implemented as a TCP ULP, overriding in particular the sendmsg and recvmsg operations. A Stream Parser is used to extract messages out of the TCP stream using the first 2 bytes as length marker. Received IKE messages are put on "ike_queue",

[PATCH ipsec-next v3 4/6] esp4: prepare esp_input_done2 for non-UDP encapsulation

2019-09-27 Thread Sabrina Dubroca
For espintcp encapsulation, we will need to get the source port from the TCP header instead of UDP. Introduce a variable to hold the port. Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca --- net/ipv4/esp4.c | 16 ++-- 1 file changed, 14 insertio

[PATCH ipsec-next v3 3/6] xfrm: add route lookup to xfrm4_rcv_encap

2019-09-27 Thread Sabrina Dubroca
At this point, with TCP encapsulation, the dst may be gone, but xfrm_input needs one. Signed-off-by: Sabrina Dubroca --- net/ipv4/xfrm4_protocol.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/ipv4/xfrm4_protocol.c b/net/ipv4/xfrm4_protocol.c index 8a4285712808..ea595c8549c7 1

[PATCH ipsec-next v3 1/6] net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram

2019-09-27 Thread Sabrina Dubroca
This will be used by ESP over TCP to handle the queue of IKE messages. Signed-off-by: Sabrina Dubroca --- v2: document the new argument to __skb_try_recv_datagram include/linux/skbuff.h | 11 --- net/core/datagram.c| 27 +-- net/ipv4/udp.c | 3 ++- n

[PATCH ipsec-next v3 0/6] ipsec: add TCP encapsulation support (RFC 8229)

2019-09-27 Thread Sabrina Dubroca
This patchset introduces support for TCP encapsulation of IKE and ESP messages, as defined by RFC 8229 [0]. It is an evolution of what Herbert Xu proposed in January 2018 [1] that addresses the main criticism against it, by not interfering with the TCP implementation at all. The networking stack no

[PATCH ipsec-next v3 2/6] xfrm: introduce xfrm_trans_queue_net

2019-09-27 Thread Sabrina Dubroca
This will be used by TCP encapsulation to write packets to the encap socket without holding the user socket's lock. Without this reinjection, we're already holding the lock of the user socket, and then try to lock the encap socket as well when we enqueue the encrypted packet. While at it, add a BU

RE: [RFC 12/20] RDMA/irdma: Implement device supported verb APIs

2019-09-27 Thread Saleem, Shiraz
> Subject: Re: [RFC 12/20] RDMA/irdma: Implement device supported verb APIs > > On Thu, Sep 26, 2019 at 07:49:52PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RFC 12/20] RDMA/irdma: Implement device supported verb > > > APIs > > > > > > On Thu, Sep 26, 2019 at 09:45:11AM -0700, Jeff Kirsher w

RE: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions

2019-09-27 Thread Saleem, Shiraz
> Subject: Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility definitions > > On Thu, Sep 26, 2019 at 07:49:33PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RFC 15/20] RDMA/irdma: Add miscellaneous utility > > > definitions > > > > > > On Thu, Sep 26, 2019 at 09:45:14AM -0700, Jeff Kirsher

RE: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated

2019-09-27 Thread Saleem, Shiraz
> Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > On Thu, Sep 26, 2019 at 07:49:44PM +, Saleem, Shiraz wrote: > > > Subject: Re: [RFC 20/20] RDMA/i40iw: Mark i40iw as deprecated > > > > > > On Thu, Sep 26, 2019 at 09:45:19AM -0700, Jeff Kirsher wrote: > > > > From: Shiraz Sal

Re: pull-request: bpf 2019-09-27

2019-09-27 Thread David Miller
From: Daniel Borkmann Date: Fri, 27 Sep 2019 15:15:08 +0200 > The following pull-request contains BPF updates for your *net* tree. Pulled, thanks Daniel.

Re: [PATCH net] devlink: Fix error handling in param and info_get dumpit cb

2019-09-27 Thread Vasundhara Volam
On Fri, Sep 27, 2019 at 6:01 PM Andrew Lunn wrote: > > On Fri, Sep 27, 2019 at 10:28:36AM +0530, Vasundhara Volam wrote: > > On Thu, Sep 26, 2019 at 5:57 PM Andrew Lunn wrote: > > > > > > On Thu, Sep 26, 2019 at 03:05:54PM +0530, Vasundhara Volam wrote: > > > > If any of the param or info_get op

Re: [PATCH] vhost: introduce mdev based hardware backend

2019-09-27 Thread Jason Wang
On 2019/9/27 下午8:46, Michael S. Tsirkin wrote: On Fri, Sep 27, 2019 at 08:17:47PM +0800, Jason Wang wrote: On 2019/9/27 下午5:41, Michael S. Tsirkin wrote: On Fri, Sep 27, 2019 at 11:27:12AM +0800, Jason Wang wrote: On 2019/9/26 下午9:14, Tiwei Bie wrote: On Thu, Sep 26, 2019 at 04:35:18AM -040

Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state

2019-09-27 Thread Eric Dumazet
On Fri, Sep 27, 2019 at 5:40 AM Marek Majkowski wrote: > > On 9/27/19 10:25 AM, Jonathan Maxwell wrote: > > Acked-by: Jon Maxwell > > > > Thanks for fixing that Eric. > > > > The patch seems to do the job. > > Tested-by: Marek Majkowski > > Here's a selftest: > Here is the packetdrill test : `

pull-request: bpf 2019-09-27

2019-09-27 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix libbpf's BTF dumper to not skip anonymous enum definitions, from Andrii. 2) Fix BTF verifier issues when handling the BTF of vmlinux, from Alexei. 3) Fix nested calls into bpf_event_outp

Re: [PATCH net] devlink: Fix error handling in param and info_get dumpit cb

2019-09-27 Thread Jiri Pirko
Fri, Sep 27, 2019 at 02:31:29PM CEST, and...@lunn.ch wrote: >On Fri, Sep 27, 2019 at 10:28:36AM +0530, Vasundhara Volam wrote: >> On Thu, Sep 26, 2019 at 5:57 PM Andrew Lunn wrote: >> > >> > On Thu, Sep 26, 2019 at 03:05:54PM +0530, Vasundhara Volam wrote: >> > > If any of the param or info_get op

Re: [PATCH bpf] libbpf: add macro __BUILD_STATIC_LIBBPF__ to guard .symver

2019-09-27 Thread Daniel Borkmann
On Thu, Sep 26, 2019 at 04:02:04PM -0700, Yonghong Song wrote: > 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 f

Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state

2019-09-27 Thread Marek Majkowski
On 9/27/19 10:25 AM, Jonathan Maxwell wrote: > Acked-by: Jon Maxwell > > Thanks for fixing that Eric. > The patch seems to do the job. Tested-by: Marek Majkowski Here's a selftest: ---8<--- From: Marek Majkowski Date: Fri, 27 Sep 2019 13:37:52 +0200 Subject: [PATCH] selftests/net: TCP_USER_T

Re: [PATCH net] devlink: Fix error handling in param and info_get dumpit cb

2019-09-27 Thread Andrew Lunn
On Fri, Sep 27, 2019 at 10:28:36AM +0530, Vasundhara Volam wrote: > On Thu, Sep 26, 2019 at 5:57 PM Andrew Lunn wrote: > > > > On Thu, Sep 26, 2019 at 03:05:54PM +0530, Vasundhara Volam wrote: > > > If any of the param or info_get op returns error, dumpit cb is > > > skipping to dump remaining par

Re: Fwd: [PATCH] bonding/802.3ad: fix slave initialization states race

2019-09-27 Thread Aleksei Zakharov
чт, 26 сент. 2019 г. в 23:01, Jay Vosburgh : > > Aleksei Zakharov wrote: > > >чт, 26 сент. 2019 г. в 07:38, Jay Vosburgh : > >> > >> Aleksei Zakharov wrote: > >> > >> >ср, 25 сент. 2019 г. в 03:31, Jay Vosburgh : > >> >> > >> >> Алексей Захаров wrote: > >> >> [...] > >> >> >Right after reboot one

Re: [PATCH net v3 0/3] Fix Qdisc destroy issues caused by adding fine-grained locking to filter API

2019-09-27 Thread David Miller
From: Vlad Buslov Date: Tue, 24 Sep 2019 18:51:15 +0300 > TC filter API unlocking introduced several new fine-grained locks. The > change caused sleeping-while-atomic BUGs in several Qdiscs that call cls > APIs which need to obtain new mutex while holding sch tree spinlock. This > series fixes af

Re: [PATCH net] net/rds: Check laddr_check before calling it

2019-09-27 Thread David Miller
From: Ka-Cheong Poon Date: Tue, 24 Sep 2019 08:51:16 -0700 > In rds_bind(), laddr_check is called without checking if it is NULL or > not. And rs_transport should be reset if rds_add_bound() fails. > > Fixes: c5c1a030a7db ("net/rds: An rds_sock is added too early to the hash > table") > Report

Re: [PATCH net 0/3] tcp: provide correct skb->priority

2019-09-27 Thread David Miller
From: Eric Dumazet Date: Tue, 24 Sep 2019 08:01:13 -0700 > SO_PRIORITY socket option requests TCP egress packets > to contain a user provided value. > > TCP manages to send most packets with the requested values, > notably for TCP_ESTABLISHED state, but fails to do so for > few packets. > > The

RE: Fwd: [PATCH] bonding/802.3ad: fix slave initialization states race

2019-09-27 Thread zhangsha (A)
> -Original Message- > From: Aleksei Zakharov [mailto:zaha...@selectel.ru] > Sent: 2019年9月25日 19:02 > To: Jay Vosburgh > Cc: netdev@vger.kernel.org; zhangsha (A) > Subject: Re: Fwd: [PATCH] bonding/802.3ad: fix slave initialization states > race > > ср, 25 сент. 2019 г. в 03:31, Jay V

Re: [PATCH net] net: dsa: qca8k: Fix port enable for CPU port

2019-09-27 Thread David Miller
From: Andrew Lunn Date: Wed, 25 Sep 2019 02:47:07 +0200 > The CPU port does not have a PHY connected to it. So calling > phy_support_asym_pause() results in an Opps. As with other DSA > drivers, add a guard that the port is a user port. > > Reported-by: Michal Vokáč > Fixes: 0394a63acfe2 ("net:

Re: [PATCH net] sch_netem: fix rcu splat in netem_enqueue()

2019-09-27 Thread David Miller
From: Eric Dumazet Date: Tue, 24 Sep 2019 13:11:26 -0700 > qdisc_root() use from netem_enqueue() triggers a lockdep warning. > > __dev_queue_xmit() uses rcu_read_lock_bh() which is > not equivalent to rcu_read_lock() + local_bh_disable_bh as far > as lockdep is concerned. ... > Signed-off-by: E

Re: [PATCH net] kcm: disable preemption in kcm_parse_func_strparser()

2019-09-27 Thread David Miller
From: Eric Dumazet Date: Tue, 24 Sep 2019 12:29:34 -0700 > After commit a2c11b034142 ("kcm: use BPF_PROG_RUN") > syzbot easily triggers the warning in cant_sleep(). > > As explained in commit 6cab5e90ab2b ("bpf: run bpf programs > with preemption disabled") we need to disable preemption before >

Re: [PATCH net] tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state

2019-09-27 Thread Jonathan Maxwell
Acked-by: Jon Maxwell Thanks for fixing that Eric. On Fri, Sep 27, 2019 at 8:42 AM Eric Dumazet wrote: > > Yuchung Cheng and Marek Majkowski independently reported a weird > behavior of TCP_USER_TIMEOUT option when used at connect() time. > > When the TCP_USER_TIMEOUT is reached, tcp_write_tim

Re: [PATCH net] net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 14:05:54 +0300 > The "gmac->phy_mode" variable is an enum and in this context GCC will > treat it as an unsigned int so the error handling will never be > triggered. > > Fixes: b1c17215d718 ("stmmac: add ipq806x glue layer") > Signed-off-by: Dan Carpent

Re: [PATCH net] net: nixge: Fix a signedness bug in nixge_probe()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 14:05:24 +0300 > The "priv->phy_mode" is an enum and in this context GCC will treat it > as an unsigned int so it can never be less than zero. > > Fixes: 492caffa8a1a ("net: ethernet: nixge: Add support for National > Instruments XGE netdev") > Signed-

Re: [PATCH] lib: dimlib: fix help text typos

2019-09-27 Thread Uwe Kleine-König
On 9/26/19 2:20 AM, Randy Dunlap wrote: > From: Randy Dunlap > > Fix help text typos for DIMLIB. > > Fixes: 4f75da3666c0 ("linux/dim: Move implementation to .c files") > Signed-off-by: Randy Dunlap > Cc: Uwe Kleine-König Acked-by: Uwe Kleine-König Thanks for picking that up and improve my p

Re: [PATCH net] net: axienet: fix a signedness bug in probe

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:59:11 +0300 > The "lp->phy_mode" is an enum but in this context GCC treats it as an > unsigned int so the error handling is never triggered. > > Fixes: ee06b1728b95 ("net: axienet: add support for standard phy-mode > binding") > Signed-off-by: Dan C

Re: [PATCH net] net: stmmac: dwmac-meson8b: Fix signedness bug in probe

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:58:22 +0300 > The "dwmac->phy_mode" is an enum and in this context GCC treats it as > an unsigned int so the error handling is never triggered. > > Fixes: 566e82516253 ("net: stmmac: add a glue driver for the Amlogic Meson 8b > / GXBB DWMAC") > Sign

Re: [PATCH net] net: socionext: Fix a signedness bug in ave_probe()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:57:50 +0300 > The "phy_mode" variable is an enum and in this context GCC treats it as > an unsigned int so the error handling is never triggered. > > Fixes: 4c270b55a5af ("net: ethernet: socionext: add AVE ethernet driver") > Signed-off-by: Dan Carpe

[PATCH v2 0/2] net: phy: mscc-miim: Adjustments for mscc_miim_probe()

2019-09-27 Thread Markus Elfring
From: Markus Elfring Date: Fri, 27 Sep 2019 09:48:09 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use devm_platform_ioremap_resource() Move the setting of mii_bus structure members drivers/net/phy/mdio-mscc-miim.c | 19 +++--

Re: [question] About triggering a region snapshot through the devlink cmd

2019-09-27 Thread Jiri Pirko
Fri, Sep 27, 2019 at 09:40:47AM CEST, linyunsh...@huawei.com wrote: >Hi, Jiri & Alex > >It seems that a region' snapshot is only created through the >driver when some error is detected, for example: >mlx4_crdump_collect_fw_health() -> devlink_region_snapshot_create() > >We want to trigger a

Re: [PATCH net] enetc: Fix a signedness bug in enetc_of_get_phy()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:57:14 +0300 > The "priv->if_mode" is type phy_interface_t which is an enum. In this > context GCC will treat the enum as an unsigned int so this error > handling is never triggered. > > Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC et

Re: [PATCH net] net: netsec: Fix signedness bug in netsec_probe()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:56:38 +0300 > The "priv->phy_interface" variable is an enum and in this context GCC > will treat it as an unsigned int so the error handling is never > triggered. > > Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") > Signed-off-by

Re: [PATCH net] net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:55:32 +0300 > The "priv->phy_mode" variable is an enum and in this context GCC will > treat it as unsigned to the error handling will never trigger. > > Fixes: 57c5bc9ad7d7 ("net: hisilicon: add hix5hd2 mac driver") > Signed-off-by: Dan Carpenter A

Re: [PATCH net] cxgb4: Signedness bug in init_one()

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:54:59 +0300 > The "chip" variable is an enum, and it's treated as unsigned int by GCC > in this context so the error handling isn't triggered. > > Fixes: e8d452923ae6 ("cxgb4: clean up init_one") > Signed-off-by: Dan Carpenter Applied.

Re: [PATCH net] net: aquantia: Fix aq_vec_isr_legacy() return value

2019-09-27 Thread David Miller
From: Dan Carpenter Date: Wed, 25 Sep 2019 13:54:30 +0300 > The irqreturn_t type is an enum or an unsigned int in GCC. That > creates to problems because it can't detect if the > self->aq_hw_ops->hw_irq_read() call fails and at the end the function > always returns IRQ_HANDLED. > > drivers/net/

Re: [PATCH v2] dimlib: make DIMLIB a hidden symbol

2019-09-27 Thread David Miller
From: Uwe Kleine-König Date: Tue, 24 Sep 2019 18:02:59 +0200 > According to Tal Gilboa the only benefit from DIM comes from a driver > that uses it. So it doesn't make sense to make this symbol user visible, > instead all drivers that use it should select it (as is already the case > AFAICT). >

[question] About triggering a region snapshot through the devlink cmd

2019-09-27 Thread Yunsheng Lin
Hi, Jiri & Alex It seems that a region' snapshot is only created through the driver when some error is detected, for example: mlx4_crdump_collect_fw_health() -> devlink_region_snapshot_create() We want to trigger a region' snapshot creation through devlink cmd, maybe by adding the "devlin

Re: Are BPF tail calls only supposed to work with pinned maps?

2019-09-27 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On Thu, Sep 26, 2019 at 03:12:30PM +0200, Toke Høiland-Jørgensen wrote: >> Daniel Borkmann writes: >> > On Thu, Sep 26, 2019 at 01:23:38PM +0200, Toke Høiland-Jørgensen wrote: >> > [...] >> >> While working on a prototype of the XDP chain call feature, I ran into >> >>