Re: [PATCH 0/2] Bluetooth: Update LE scanning parameters for suspend

2020-05-12 Thread Marcel Holtmann
Hi Abhishek, > This series updates the values used for window and interval when the > system suspends. It also fixes a u8 vs u16 bug when setting up passive > scanning. > > The values chosen for window and interval are 11.25ms and 640ms. I have > tested these on several Chromebooks with different

Re: [PATCH] net: phy: realtek: clear interrupt during init for rtl8211f

2020-05-12 Thread Jisheng Zhang
Hi, On Tue, 12 May 2020 20:43:40 +0200 Heiner Kallweit wrote: > > > On 12.05.2020 12:46, Jisheng Zhang wrote: > > The PHY Register Accessible Interrupt is enabled by default, so > > there's such an interrupt during init. In PHY POLL mode case, the > > INTB/PMEB pin is alway active, it is not go

Re: [PATCH bpf-next 1/3] samples: bpf: refactor kprobe tracing user progs with libbpf

2020-05-12 Thread Daniel T. Lee
On Wed, May 13, 2020 at 10:40 AM Yonghong Song wrote: > > > > On 5/12/20 7:43 AM, Daniel T. Lee wrote: > > Currently, the kprobe BPF program attachment method for bpf_load is > > quite old. The implementation of bpf_load "directly" controls and > > manages(create, delete) the kprobe events of DEBU

[PATCH 15/33] tcp: add tcp_sock_set_keepidle

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 49 ++- net/rds/tcp_listen.c | 5 + net/sunrpc/x

[PATCH 14/33] tcp: add tcp_sock_set_user_timeout

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/ocfs2/cluster/tcp.c | 22 ++ include/linux/tcp.h| 1 + net/ipv4/tcp.c | 8 net/sunrpc/xprtsock.c |

[PATCH 03/33] net: add sock_set_priority

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_PRIORITY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 12 ++-- drivers/nvme/target/tcp.c | 18 -- include/net/sock.h| 1 + net/core/sock.c

remove kernel_setsockopt and kernel_getsockopt

2020-05-12 Thread Christoph Hellwig
Hi Dave, this series removes the kernel_setsockopt and kernel_getsockopt functions, and instead switches their users to small functions that implement setting (or in one case getting) a sockopt directly using a normal kernel function call with type safety and all the other benefits of not having a

[PATCH 19/33] ipv4: add ip_sock_set_freebind

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IP_FREEBIND sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/target/iscsi/iscsi_target_login.c | 13 +++-- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c

[PATCH 08/33] net: add sock_set_rcvbuf

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 7 +- include/net/sock.h | 1 + net/core/sock.c| 59 +- 3 files changed,

[PATCH 09/33] net: add sock_set_reuseport

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 8 net/sunrpc/xprtsock.c | 17 + 3 files changed, 10 insertions(+), 1

[PATCH 17/33] tcp: add tcp_sock_set_keepcnt

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp.h | 2 +- net/rds/tcp_listen.c | 17 +++-- ne

[PATCH 11/33] tcp: tcp_sock_set_nodelay

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_NODELAY sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 drivers

[PATCH 10/33] tcp: add tcp_sock_set_cork

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_CORK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 14 drivers/block

[PATCH 31/33] net: remove kernel_setsockopt

2020-05-12 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 31 --- 2 files changed, 33 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index 6451425e828f5..ece7513326293 100644 --- a/include/linux/net.h

[PATCH 29/33] rxrpc_sock_set_min_security_level

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/afs/rxrpc.c | 6 ++ include/net/af_rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 13 + 3 files changed, 17 insert

[PATCH 18/33] ipv4: add ip_sock_set_tos

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IP_TOS sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 14 +++--- drivers/nvme/target/tcp.c | 10 ++ include/net/ip.h | 2 ++ net/ipv4/ip_sockglue.c| 30

[PATCH 30/33] tipc: call tsk_set_importance from tipc_topsrv_create_listener

2020-05-12 Thread Christoph Hellwig
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can just use the internal helper. The only change needed is to pass a struct sock instead of tipc_sock, which is private to socket.c Signed-off-by: Christoph Hellwig --- net/tipc/socket.c | 18 +- net/tipc/sock

[PATCH 21/33] ipv4: add ip_sock_set_mtu_discover

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IP_MTU_DISCOVER sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 2 ++ net/ipv4/ip_sockglue.c | 22 ++ net/rxrpc/local_object.c | 8 +--- net/rxrpc/output.c

[PATCH 33/33] net: remove kernel_getsockopt

2020-05-12 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 2 -- net/socket.c| 34 -- 2 files changed, 36 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index ece7513326293..e10f378194a59 100644 --- a/include/linux/net

[PATCH 23/33] ipv6: add ip6_sock_set_recverr

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 10 ++ net/rxrpc/local_object.c | 10 ++ 3 files changed, 13 insertions(+

[PATCH 32/33] sctp: add sctp_sock_get_primary_addr

2020-05-12 Thread Christoph Hellwig
Add a helper to directly get the SCTP_PRIMARY_ADDR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 11 +++- include/net/sctp/sctp.h | 1 + net/sctp/socket.c | 57 + 3

[PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-12 Thread Christoph Hellwig
And call it directly from dlm instead of going through kernel_setsockopt. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 13 - include/net/sctp/sctp.h | 3 +++ net/sctp/socket.c | 5 +++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/dlm/

[PATCH 26/33] sctp: lift copying in addrs into sctp_setsockopt

2020-05-12 Thread Christoph Hellwig
Prepare for additional kernel-space callers of sctp_setsockopt_bindx. Signed-off-by: Christoph Hellwig --- net/sctp/socket.c | 71 ++- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 827a9903e

[PATCH 16/33] tcp: add tcp_sock_set_keepintvl

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/linux/tcp.h | 1 + net/ipv4/tcp.c| 12 net/rds/tcp_listen.c | 4 +--- net/sunrpc/xprtsock.c | 3 +-- 4 files chan

[PATCH 22/33] ipv6: add ip6_sock_set_v6only

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IPV6_V6ONLY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h| 3 +++ net/ipv6/ip6_udp_tunnel.c | 5 + net/ipv6/ipv6_sockglue.c | 11 +++ net/sunrpc/svcsock.c | 8 +

[PATCH 28/33] sctp: add sctp_sock_set_nodelay

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 10 ++ include/net/sctp/sctp.h | 1 + net/sctp/socket.c | 8 3 files changed, 11 insertions(+), 8

[PATCH 25/33] ipv6: add ip6_sock_set_recvpktinfo

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 8 net/sunrpc/svcsock.c | 11 +++ 3 files changed, 12 insertion

[PATCH 06/33] net: add sock_set_timestamps

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_TIMESTAMP* sockopts from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h | 1 + net/core/sock.c | 47 +--- net/rxrpc/local_object.c | 8 +-- 3 f

[PATCH 04/33] net: add sock_set_sndtimeo

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel space without going through a fake uaccess. The interface is simplified to only pass the seconds value, as that is the only thing needed at the moment. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 8 ++-- inc

[PATCH 12/33] tcp: add tcp_sock_set_quickack

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space without going through a fake uaccess. Cleanup the callers to avoid pointless wrappers now that this is a simple function call. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_int.h | 7 -- drivers/blo

[PATCH 20/33] ipv4: add ip_sock_set_recverr

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IP_RECVERR sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ip.h | 1 + net/ipv4/ip_sockglue.c | 10 ++ net/rxrpc/local_object.c | 8 +--- 3 files changed, 12 insertions(+), 7

[PATCH 24/33] ipv6: add ip6_sock_set_addr_preferences

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/ipv6.h | 1 + net/ipv6/ipv6_sockglue.c | 127 +-- net/sunrpc/xprtsock.c| 8 ++-

[PATCH 02/33] net: add sock_set_linger

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_LINGER sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 9 + drivers/nvme/target/tcp.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 36 ++

[PATCH 05/33] net: add sock_bindtoindex

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- include/net/sock.h| 1 + net/core/sock.c | 21 +++-- net/ipv4/udp_tunnel.c | 4 +--- net/ipv6/ip6_udp_tun

[PATCH 07/33] net: add sock_set_keepalive

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- fs/dlm/lowcomms.c | 6 +- include/net/sock.h| 1 + net/core/sock.c | 10 ++ net/rds/tcp_listen.c | 6 +- net/sunrpc

[PATCH 13/33] tcp: add tcp_sock_set_syncnt

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/tcp.c | 9 + include/linux/tcp.h | 1 + net/ipv4/tcp.c | 12 3 files changed, 14 insertions(+), 8

[PATCH 01/33] net: add sock_set_reuseaddr

2020-05-12 Thread Christoph Hellwig
Add a helper to directly set the SO_REUSEADDR sockopt from kernel space without going through a fake uaccess. For this the iscsi target now has to formally depend on inet to avoid a mostly theoretical compile failure. For actual operation it already did depend on having ipv4 or ipv6 support. Sig

[PATCH] Fix suspicious RCU usage warning

2020-05-12 Thread madhuparnabhowmik10
From: Madhuparna Bhowmik This patch fixes the following warning: = WARNING: suspicious RCU usage 5.7.0-rc4-next-20200507-syzkaller #0 Not tainted - net/ipv6/ip6mr.c:124 RCU-list traversed in non-reader section!! ipmr_new_table() returns an

Re: [PATCH 1/3] net: add a CMSG_USER_DATA macro

2020-05-12 Thread Christoph Hellwig
On Tue, May 12, 2020 at 11:28:08AM +0300, Sergei Shtylyov wrote: >Perhaps it's time to add missing spaces consistently, not just one that > you added? That is all fixed up in the next patch.

Re: [PATCH V2] ifcvf: move IRQ request/free to status change handlers

2020-05-12 Thread Jason Wang
On 2020/5/13 下午12:42, Zhu, Lingshan wrote: On 5/13/2020 12:12 PM, Jason Wang wrote: On 2020/5/12 下午4:00, Zhu Lingshan wrote: This commit move IRQ request and free operations from probe() to VIRTIO status change handler to comply with VIRTIO spec. VIRTIO spec 1.1, section 2.1.2 Device Requ

Re: [PATCH bpf-next v2 02/17] bpf: Introduce SK_LOOKUP program type with a dedicated attach point

2020-05-12 Thread Martin KaFai Lau
On Mon, May 11, 2020 at 08:52:03PM +0200, Jakub Sitnicki wrote: [ ... ] > +BPF_CALL_3(bpf_sk_lookup_assign, struct bpf_sk_lookup_kern *, ctx, > +struct sock *, sk, u64, flags) The SK_LOOKUP bpf_prog may have already selected the proper reuseport sk. It is possible by looking up sk from so

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Russell King - ARM Linux admin
On Tue, May 12, 2020 at 08:48:22PM -0700, Doug Berger wrote: > On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: > > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > >> This was intended as a fix, but I thought it would be better to keep it > >> as part of this set for cont

Re: [PATCH net 2/2 RESEND] ipmr: Add lockdep expression to ipmr_for_each_table macro

2020-05-12 Thread Madhuparna Bhowmik
On Tue, May 12, 2020 at 09:32:31AM -0700, Jakub Kicinski wrote: > On Tue, 12 May 2020 10:47:05 +0530 Madhuparna Bhowmik wrote: > > > > #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES > > > > -#define ipmr_for_each_table(mrt, net) \ > > > > - list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list, \

Re: net/sonic: Software evolution around the application of coding standards

2020-05-12 Thread Markus Elfring
> When the people who write and review the coding standards are the same > people who write and review the code, the standards devolve (given the > prevailing incentives). A coding style is applied also for Linux software. This coding style supports some alternatives for implementation details. De

Re: [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n

2020-05-12 Thread Steffen Klassert
On Mon, May 11, 2020 at 10:33:42AM +0200, Florian Westphal wrote: > After recent change 'x' is only used when CONFIG_NETFILTER is set: > > net/ipv4/xfrm4_output.c: In function '__xfrm4_output': > net/ipv4/xfrm4_output.c:19:21: warning: unused variable 'x' > [-Wunused-variable] >19 | struct x

Re: [PATCH v2] doc: document danger of applying REJECT to INVALID CTs

2020-05-12 Thread Benjamin Poirier
On 2020-05-12 23:00 +0200, Jan Engelhardt wrote: > Signed-off-by: Jan Engelhardt > --- > > Simplify the trigger case by dropping mentions of P_3. > New -A commands as proposed. > > extensions/libip6t_REJECT.man | 20 > extensions/libipt_REJECT.man | 20

Re: [PATCH V2] ifcvf: move IRQ request/free to status change handlers

2020-05-12 Thread Jason Wang
On 2020/5/12 下午4:00, Zhu Lingshan wrote: This commit move IRQ request and free operations from probe() to VIRTIO status change handler to comply with VIRTIO spec. VIRTIO spec 1.1, section 2.1.2 Device Requirements: Device Status Field The device MUST NOT consume buffers or send any used buffer

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Doug Berger
On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: >> This was intended as a fix, but I thought it would be better to keep it >> as part of this set for context and since net-next is currently open. >> >> The context is trying

Re: [PATCH] ath9k: release allocated buffer if timed out

2020-05-12 Thread Navid Emamdoost
Hi Brian, On Tue, May 12, 2020 at 11:57 AM Brian Norris wrote: > > On Fri, Sep 6, 2019 at 11:59 AM Navid Emamdoost > wrote: > > > > In ath9k_wmi_cmd, the allocated network buffer needs to be released > > if timeout happens. Otherwise memory will be leaked. > > > > Signed-off-by: Navid Emamdoost

Re: [PATCH bpf] bpf: fix bug in mmap() implementation for BPF array map

2020-05-12 Thread Yonghong Song
On 5/12/20 4:59 PM, Andrii Nakryiko wrote: mmap() subsystem allows user-space application to memory-map region with initial page offset. This wasn't taken into account in initial implementation of BPF array memory-mapping. This would result in wrong pages, not taking into account requested pag

Re: [PATCH v2 net-next 2/3] net: dsa: felix: Configure Time-Aware Scheduler via taprio offload

2020-05-12 Thread Florian Fainelli
On 5/12/2020 7:25 PM, Xiaoliang Yang wrote: > Ocelot VSC9959 switch supports time-based egress shaping in hardware > according to IEEE 802.1Qbv. This patch add support for TAS configuration > on egress port of VSC9959 switch. > > Felix driver is an instance of Ocelot family, with a DSA front-en

Re: [PATCH v2 net-next 3/3] net: dsa: felix: add support Credit Based Shaper(CBS) for hardware offload

2020-05-12 Thread Florian Fainelli
On 5/12/2020 7:25 PM, Xiaoliang Yang wrote: > VSC9959 hardware support the Credit Based Shaper(CBS) which part > of the IEEE-802.1Qav. This patch support sch_cbs set for VSC9959. > > Signed-off-by: Xiaoliang Yang Reviewed-by: Florian Fainelli -- Florian

[PATCH v6 bpf-next 0/3] Introduce CAP_BPF

2020-05-12 Thread Alexei Starovoitov
From: Alexei Starovoitov v5->v6: - split allow_ptr_leaks into four flags. - retain bpf_jit_limit under cap_sys_admin. - fixed few other issues spotted by Daniel. v4->v5: Split BPF operations that are allowed under CAP_SYS_ADMIN into combination of CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN and keep so

[PATCH v6 bpf-next 3/3] selftests/bpf: use CAP_BPF and CAP_PERFMON in tests

2020-05-12 Thread Alexei Starovoitov
From: Alexei Starovoitov Make all test_verifier test exercise CAP_BPF and CAP_PERFMON Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 44 +++ tools/testing/selftests/bpf/verifier/calls.c | 16 +++ .../selftests/bpf/verifier/dead_code.c

[PATCH v6 bpf-next 1/3] bpf, capability: Introduce CAP_BPF

2020-05-12 Thread Alexei Starovoitov
From: Alexei Starovoitov Split BPF operations that are allowed under CAP_SYS_ADMIN into combination of CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN. For backward compatibility include them in CAP_SYS_ADMIN as well. The end result provides simple safety model for applications that use BPF: - to load traci

Re: [PATCH v2 net-next 1/3] net: dsa: felix: qos classified based on pcp

2020-05-12 Thread Florian Fainelli
On 5/12/2020 7:25 PM, Xiaoliang Yang wrote: > Set the default QoS Classification based on PCP and DEI of vlan tag, > after that, frames can be Classified to different Qos based on PCP tag. > If there is no vlan tag or vlan ignored, use port default Qos. > > Signed-off-by: Xiaoliang Yang Revie

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
On 2020/5/13 9:59, Andrew Lunn wrote: > On Wed, May 13, 2020 at 09:34:13AM +0800, Yonglong Liu wrote: >> Hi, Andrew: >> Thanks for your reply! >> >> On 2020/5/12 22:00, Andrew Lunn wrote: >>> On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote: I use two devices, both support 100

Re: [PATCH 02/11] dt-bindings: new: add yaml bindings for MediaTek Ethernet MAC

2020-05-12 Thread Rob Herring
On Tue, May 05, 2020 at 04:02:22PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > This adds yaml DT bindings for the MediaTek Ethernet MAC present on the > mt8* family of SoCs. > > Signed-off-by: Bartosz Golaszewski > --- > .../bindings/net/mediatek,eth-mac.yaml| 80

Re: [PATCH 01/11] dt-bindings: add a binding document for MediaTek PERICFG controller

2020-05-12 Thread Rob Herring
On Tue, May 05, 2020 at 04:02:21PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > This adds a binding document for the PERICFG controller present on > MediaTek SoCs. For now the only variant supported is 'mt8516-pericfg'. > > Signed-off-by: Bartosz Golaszewski > --- > .../ar

Re: [PATCH v1] dt-bindings: net: nxp,tja11xx: rework validation support

2020-05-12 Thread Rob Herring
On Tue, 5 May 2020 12:42:15 +0200, Oleksij Rempel wrote: > To properly identify this node, we need to use ethernet-phy-id0180.dc80. > And add missing required properties. > > Signed-off-by: Oleksij Rempel > --- > .../devicetree/bindings/net/nxp,tja11xx.yaml | 55 --- > 1 file c

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Doug Berger
On 5/12/2020 12:08 PM, Michal Kubecek wrote: > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: >> On 5/11/2020 5:47 PM, Andrew Lunn wrote: >>> On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: A comment in uapi/linux/ethtool.h states "Drivers should reject a non-ze

Re: [PATCH v1] dt-bindings: net: nxp,tja11xx: rework validation support

2020-05-12 Thread Rob Herring
On Tue, May 05, 2020 at 04:01:27PM +0200, Andrew Lunn wrote: > On Tue, May 05, 2020 at 12:42:15PM +0200, Oleksij Rempel wrote: > > To properly identify this node, we need to use ethernet-phy-id0180.dc80. > > And add missing required properties. > > > > Signed-off-by: Oleksij Rempel > > --- > > .

[PATCH v2 net-next 1/3] net: dsa: felix: qos classified based on pcp

2020-05-12 Thread Xiaoliang Yang
Set the default QoS Classification based on PCP and DEI of vlan tag, after that, frames can be Classified to different Qos based on PCP tag. If there is no vlan tag or vlan ignored, use port default Qos. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix.c | 26 ++

[PATCH v2 net-next 0/3] net: dsa: felix: tc taprio and CBS offload support

2020-05-12 Thread Xiaoliang Yang
This patch series support tc taprio and CBS hardware offload according to IEEE 802.1Qbv and IEEE-802.1Qav on VSC9959. v1->v2 changes: - Move port_qos_map_init() function to be common felix codes. - Keep const for dsa_switch_ops structs, add felix_port_setup_tc function to call port_setup_tc o

[PATCH v2 net-next 3/3] net: dsa: felix: add support Credit Based Shaper(CBS) for hardware offload

2020-05-12 Thread Xiaoliang Yang
VSC9959 hardware support the Credit Based Shaper(CBS) which part of the IEEE-802.1Qav. This patch support sch_cbs set for VSC9959. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix_vsc9959.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git

[PATCH v2 net-next 2/3] net: dsa: felix: Configure Time-Aware Scheduler via taprio offload

2020-05-12 Thread Xiaoliang Yang
Ocelot VSC9959 switch supports time-based egress shaping in hardware according to IEEE 802.1Qbv. This patch add support for TAS configuration on egress port of VSC9959 switch. Felix driver is an instance of Ocelot family, with a DSA front-end. The patch uses tc taprio hardware offload to setup TAS

Re: [v5,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-12 Thread David Ahern
On 5/8/20 1:02 AM, Po Liu wrote: > Introduce a ingress frame gate control flow action. > Tc gate action does the work like this: > Assume there is a gate allow specified ingress frames can pass at > specific time slot, and also drop at specific time slot. Tc filter > chooses the ingress frames, and

[PATCH 0/3] Bluetooth: Prevent scanning when device is not configured for wakeup

2020-05-12 Thread Abhishek Pandit-Subedi
Hi linux-bluetooth, This patch series adds a hook to prevent Bluetooth from scanning during suspend if it is not configured to wake up. It's not always clear who the wakeup owner is from looking at hdev->dev so we need the driver to inform us whether to set up scanning. By default, when no `pre

[PATCH 1/3] Bluetooth: Rename BT_SUSPEND_COMPLETE

2020-05-12 Thread Abhishek Pandit-Subedi
Renamed BT_SUSPEND_COMPLETE to BT_SUSPEND_CONFIGURE_WAKE since it sets up the event filter and whitelist for wake-up. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud --- include/net/bluetooth/hci_core.h | 2 +- net/bluetooth/hci_core.c | 2 +- net/bluetooth/hci_request

[PATCH 2/3] Bluetooth: Add hook for driver to prevent wake from suspend

2020-05-12 Thread Abhishek Pandit-Subedi
Let drivers have a hook to disable configuring scanning during suspend. Drivers should use the device_may_wakeup function call to determine whether hci should be configured for wakeup. For example, an implementation for btusb may look like the following: bool btusb_prevent_wake(struct hci_dev *

[PATCH 0/2] Bluetooth: Update LE scanning parameters for suspend

2020-05-12 Thread Abhishek Pandit-Subedi
Hi linux-bluetooth, This series updates the values used for window and interval when the system suspends. It also fixes a u8 vs u16 bug when setting up passive scanning. The values chosen for window and interval are 11.25ms and 640ms. I have tested these on several Chromebooks with different LE

[PATCH 1/2] Bluetooth: Fix incorrect type for window and interval

2020-05-12 Thread Abhishek Pandit-Subedi
The types for window and interval should be uint16, not uint8. Signed-off-by: Abhishek Pandit-Subedi --- net/bluetooth/hci_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 3f470f0e432c7..f6870e98faab2 1

[PATCH 2/2] Bluetooth: Modify LE window and interval for suspend

2020-05-12 Thread Abhishek Pandit-Subedi
When a device is suspended, it doesn't need to be as responsive to connection events. Increase the interval to 640ms (creating a duty cycle of roughly 1.75%) so that passive scanning uses much less power (vs previous duty cycle of 18.75%). The new window + interval combination has been tested to wo

Re: [PATCH iproute2-next v2 1/3] ss: introduce cgroup2 cache and helper functions

2020-05-12 Thread David Ahern
On 5/9/20 10:52 AM, Dmitry Yakunin wrote: > This patch prepares infrastructure for matching sockets by cgroups. > Two helper functions are added for transformation between cgroup v2 ID > and pathname. Cgroup v2 cache is implemented as hash table indexed by ID. > This cache is needed for faster look

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Andrew Lunn
On Wed, May 13, 2020 at 09:34:13AM +0800, Yonglong Liu wrote: > Hi, Andrew: > Thanks for your reply! > > On 2020/5/12 22:00, Andrew Lunn wrote: > > On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote: > >> I use two devices, both support 1000M speed, they are directly connected > >>

Re: [PATCH v4 bpf-next 5/7] selftests/bpf: replace test_progs and test_maps w/ general rule

2020-05-12 Thread Yauheni Kaliuta
Hi, Andrii! > On Tue, 12 May 2020 15:13:18 -0700, Andrii Nakryiko wrote: > On Tue, May 12, 2020 at 1:16 PM Yauheni Kaliuta > wrote: >> >> Hi, Andrii! >> >> The patch blanks TEST_GEN_FILES which was used by install target >> (lib.mk) to install test progs. How is it supposed to work

Re: linux-next: manual merge of the net-next tree with the net tree

2020-05-12 Thread luobin (L)
On 2020/5/13 0:47, Jakub Kicinski wrote: On Tue, 12 May 2020 13:30:51 +1000 Stephen Rothwell wrote: Hi all, Today's linux-next merge of the net-next tree got conflicts in: drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c drivers/net/ethernet/huawei/hinic/hinic_main.c between commit:

[PATCH v5 bpf-next 05/11] xdp: Add xdp_txq_info to xdp_buff

2020-05-12 Thread David Ahern
From: David Ahern Add xdp_txq_info as the Tx counterpart to xdp_rxq_info. At the moment only the device is added. Other fields (queue_index) can be added as use cases arise. >From a UAPI perspective, add egress_ifindex to xdp context. Update the verifier to reject accesses to egress_ifindex by

[PATCH v5 bpf-next 07/11] net: Support xdp in the Tx path for xdp_frames

2020-05-12 Thread David Ahern
From: David Ahern Add support to run Tx path program on xdp_frames by adding a hook to bq_xmit_all before xdp_frames are passed to ndo_xdp_xmit for the device. If an xdp_frame is dropped by the program, it is removed from the xdp_frames array with subsequent entries moved up. Signed-off-by: Dav

[PATCH v5 bpf-next 08/11] libbpf: Add egress XDP support

2020-05-12 Thread David Ahern
From: David Ahern New section name hint, xdp_egress, is added to set expected attach type at program load. Programs can use xdp_egress as the prefix in the SEC statement to load the program with the BPF_XDP_EGRESS attach type set. egress_prog_id is added to xdp_link_info to report the program id

[PATCH v5 bpf-next 11/11] samples/bpf: add XDP egress support to xdp1

2020-05-12 Thread David Ahern
From: David Ahern xdp1 and xdp2 now accept -E flag to set XDP program in the egress path. Signed-off-by: Prashant Bhole Signed-off-by: David Ahern --- samples/bpf/xdp1_user.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/

[PATCH v5 bpf-next 06/11] net: set XDP egress program on netdevice

2020-05-12 Thread David Ahern
From: David Ahern This patch handles the plumbing for installing an XDP egress program on a net_device by handling XDP_SETUP_PROG_EGRESS and XDP_QUERY_PROG_EGRESS in generic_xdp_install handler. New static key is added to signal when an egress program has been installed. Update dev_xdp_uninstall

[PATCH v5 bpf-next 10/11] selftest: Add xdp_egress attach tests

2020-05-12 Thread David Ahern
From: David Ahern Add xdp_egress attach tests: 1. verify egress programs cannot access ingress entries in xdp context 2. verify ability to load, attach, and detach xdp egress to a device. Signed-off-by: David Ahern --- .../bpf/prog_tests/xdp_egress_attach.c| 56 +++ ...

[PATCH v5 bpf-next 09/11] bpftool: Add support for XDP egress

2020-05-12 Thread David Ahern
From: David Ahern Add xdp_egress as a program type since it requires a new attach type. This follows suit with other program type + attach type combintations and leverages the SEC name in libbpf. Add NET_ATTACH_TYPE_XDP_EGRESS and update attach_type_strings to allow a user to specify 'xdp_egress

[PATCH v5 bpf-next 04/11] net: Add BPF_XDP_EGRESS as a bpf_attach_type

2020-05-12 Thread David Ahern
From: David Ahern Add new bpf_attach_type, BPF_XDP_EGRESS, for BPF programs attached at the XDP layer, but the egress path. Since egress path will not have ingress_ifindex and rx_queue_index set, update xdp_is_valid_access to block access to these entries in the xdp context when a program is att

[PATCH v5 bpf-next 03/11] net: Add XDP setup and query commands for Tx programs

2020-05-12 Thread David Ahern
From: David Ahern Add new netdev commands, XDP_SETUP_PROG_EGRESS and XDP_QUERY_PROG_EGRESS, to query and setup egress programs. Update dev_change_xdp_fd and dev_xdp_install to check for egress mode via XDP_FLAGS_EGRESS_MODE in the flags. If egress bool is set, then use XDP_SETUP_PROG_EGRESS in d

[PATCH v5 bpf-next 02/11] net: uapi for XDP programs in the egress path

2020-05-12 Thread David Ahern
From: David Ahern Running programs in the egress path, on skbs or xdp_frames, does not require driver specific resources like Rx path. Accordingly, the programs can be run in core code, so add xdp_egress_prog to net_device to hold a reference to an attached program. For UAPI, add XDP_FLAGS_EGRES

[PATCH v5 bpf-next 01/11] net: Refactor convert_to_xdp_frame

2020-05-12 Thread David Ahern
From: David Ahern Move the guts of convert_to_xdp_frame to a new helper, update_xdp_frame so it can be reused in a later patch. Suggested-by: Jesper Dangaard Brouer Signed-off-by: David Ahern Acked-by: Jesper Dangaard Brouer Acked-by: John Fastabend --- include/net/xdp.h | 30 ++

[PATCH v5 bpf-next 00/11] net: Add support for XDP in egress path

2020-05-12 Thread David Ahern
From: David Ahern This series adds support for XDP in the egress path by introducing a new XDP attachment type, BPF_XDP_EGRESS, and adding a UAPI to if_link.h for attaching the program to a netdevice and reporting the program. This allows bpf programs to be run on redirected xdp frames with the c

Re: [PATCH bpf-next 1/3] samples: bpf: refactor kprobe tracing user progs with libbpf

2020-05-12 Thread Yonghong Song
On 5/12/20 7:43 AM, Daniel T. Lee wrote: Currently, the kprobe BPF program attachment method for bpf_load is quite old. The implementation of bpf_load "directly" controls and manages(create, delete) the kprobe events of DEBUGFS. On the other hand, using using the libbpf automatically manages t

Re: [question] net: phy: rtl8211f: link speed shows 1000Mb/s but actual link speed in phy is 100Mb/s

2020-05-12 Thread Yonglong Liu
Hi, Andrew: Thanks for your reply! On 2020/5/12 22:00, Andrew Lunn wrote: > On Tue, May 12, 2020 at 08:48:21PM +0800, Yonglong Liu wrote: >> I use two devices, both support 1000M speed, they are directly connected >> with a network cable. Two devices enable autoneg, and then do the followi

Re: net/sonic: Fix some resource leaks in error handling paths

2020-05-12 Thread Finn Thain
On Tue, 12 May 2020, Markus Elfring wrote: > > Markus, if you were to write a patch to improve upon coding-style.rst, > > who should review it? > > All involved contributors have got chances to provide constructive > comments. But how could someone be elevated to "involved contributor" if thei

[PATCH -next v2] rtl8187: Remove unused variable rtl8225z2_tx_power_ofdm

2020-05-12 Thread ChenTao
Fix the following warning: drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c:609:17: warning: ‘rtl8225z2_tx_power_ofdm’ defined but not used static const u8 rtl8225z2_tx_power_ofdm[] = { Acked-by: Hin-Tak Leung Acked-by: Larry Finger Reported-by: Hulk Robot Signed-off-by: ChenTao --- v1

[PATCH -next v2] rtl8187: Remove unused variable rtl8225z2_tx_power_ofdm

2020-05-12 Thread ChenTao
Fix the following warning: drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c:609:17: warning: ‘rtl8225z2_tx_power_ofdm’ defined but not used static const u8 rtl8225z2_tx_power_ofdm[] = { Acked-by: Hin-Tak Leung Acked-by: Larry Finger Reported-by: Hulk Robot Signed-off-by: ChenTao --- d

Re: [PATCH net] netlabel: cope with NULL catmap

2020-05-12 Thread David Miller
From: Paolo Abeni Date: Tue, 12 May 2020 14:43:14 +0200 > The cipso and calipso code can set the MLS_CAT attribute on > successful parsing, even if the corresponding catmap has > not been allocated, as per current configuration and external > input. > > Later, selinux code tries to access the ca

Re: [PATCH v3 bpf-next 3/4] selftest/bpf: fmod_ret prog and implement test_overhead as part of bench

2020-05-12 Thread Yonghong Song
On 5/12/20 12:24 PM, Andrii Nakryiko wrote: Add fmod_ret BPF program to existing test_overhead selftest. Also re-implement user-space benchmarking part into benchmark runner to compare results. Results with ./bench are consistently somewhat lower than test_overhead's, but relative performance

Re: [PATCH v3 bpf-next 1/4] selftests/bpf: extract parse_num_list into generic testing_helpers.c

2020-05-12 Thread Yonghong Song
On 5/12/20 12:24 PM, Andrii Nakryiko wrote: Add testing_helpers.c, which will contain generic helpers for test runners and tests needing some common generic functionality, like parsing a set of numbers. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song

Re: [PATCH v3 bpf-next 2/4] selftests/bpf: add benchmark runner infrastructure

2020-05-12 Thread Yonghong Song
On 5/12/20 12:24 PM, Andrii Nakryiko wrote: While working on BPF ringbuf implementation, testing, and benchmarking, I've developed a pretty generic and modular benchmark runner, which seems to be generically useful, as I've already used it for one more purpose (testing fastest way to trigger B

Re: [PATCH net-next] net: dsa: tag_sja1105: appease sparse checks for ethertype accessors

2020-05-12 Thread David Miller
From: Vladimir Oltean Date: Wed, 13 May 2020 03:23:27 +0300 > A comparison between a value from the packet and an integer constant > value needs to be done by converting the value from the packet from > net->host, or the constant from host->net. Not the other way around. > Even though it makes no

Re: [PATCH net-next] net: dsa: sja1105: disable rxvlan offload for the DSA master

2020-05-12 Thread David Miller
From: Vladimir Oltean Date: Wed, 13 May 2020 02:49:21 +0300 > From: Vladimir Oltean > > On sja1105 operating in best_effort_vlan_filtering mode (when the TPID > of the DSA tags is 0x8100), it can be seen that __netif_receive_skb_core > calls __vlan_hwaccel_clear_tag right before passing the skb

  1   2   3   4   >