Re: [PATCH bpf-next v3 15/15] bpf/selftests: add tcp/udp iterator programs to selftests

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > Added tcp{4,6} and udp{4,6} bpf programs into test_progs > selftest so that they at least can load successfully. > $ ./test_progs -n 3 > ... > #3/7 tcp4:OK > #3/8 tcp6:OK > #3/9 udp4:OK > #3/10 udp6:OK > ... > #3 bpf_iter:OK

Re: [PATCH bpf-next v3 14/15] tools/bpf: add udp4/udp6 bpf iterator

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > On my VM, I got identical results between /proc/net/udp[6] and > the udp{4,6} bpf iterator. > > For udp6: > $ cat /sys/fs/bpf/p1 > sl local_address remote_address > st tx_queue rx_queue

Re: [PATCH bpf-next v3 13/15] tools/bpf: selftests: implement sample tcp/tcp6 bpf_iter programs

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > In my VM, I got identical result compared to /proc/net/{tcp,tcp6}. > For tcp6: > $ cat /proc/net/tcp6 > sl local_address remote_address > st tx_queue rx_queue tr tm->when retrnsmt uid

Re: [PATCH net-next v1 5/5] hinic: add support to get eeprom information

2020-06-22 Thread luobin (L)
On 2020/6/23 6:15, Jakub Kicinski wrote: > On Sat, 20 Jun 2020 17:42:58 +0800 Luo bin wrote: >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h >> b/drivers/net/ethernet/huawei/hinic/hinic_port.h >> index 5c916875f295..0d0354241345 100644 >> --- a/drivers/net/ethernet/huawei/hinic/hini

Re: [PATCH bpf-next v3 11/15] tools/bpf: refactor some net macros to libbpf bpf_tracing_net.h

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > Refactor bpf_iter_ipv6_route.c and bpf_iter_netlink.c > so net macros, originally from various include/linux header > files, are moved to a new libbpf installable header file > bpf_tracing_net.h. The goal is to improve reuse so > networking

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread luobin (L)
On 2020/6/23 6:08, Jakub Kicinski wrote: >> +if (coal->tx_max_coalesced_frames > COALESCE_MAX_PENDING_LIMIT) { >> +netif_err(nic_dev, drv, netdev, >> + "Tx_max_coalesced_frames out of range[%d-%d]\n", 0, >> + COALESCE_MAX_PENDING_LIMIT); >>

Re: [PATCH bpf-next v3 06/15] bpf: add bpf_skc_to_{tcp,tcp_timewait,tcp_request}_sock() helpers

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread luobin (L)
On 2020/6/23 6:07, Jakub Kicinski wrote: > On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: >> @@ -1144,8 +1190,16 @@ static int nic_dev_init(struct pci_dev *pdev) >> goto err_reg_netdev; >> } >> >> +err = hinic_init_intr_coalesce(nic_dev); >> +if (err) { >> +

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > The helper is used in tracing programs to cast a socket > pointer to a tcp6_sock pointer. > The return value could be NULL if the casting is illegal. > > A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added > so the verifier is able t

[v1,net-next 4/4] net: enetc add tc flower offload flow metering policing action

2020-06-22 Thread Po Liu
From: Po Liu Flow metering entries in IEEE 802.1Qci is an optional function for a flow filtering module. Flow metering is two rates two buckets and three color marker to policing the frames. This patch only enable one rate one bucket and in color blind mode. Flow metering instance are as specifie

[v1,net-next 1/4] net: qos: add tc police offloading action with max frame size limit

2020-06-22 Thread Po Liu
From: Po Liu Current police offloading support the 'burst'' and 'rate_bytes_ps'. Some hardware own the capability to limit the frame size. If the frame size larger than the setting, the frame would be dropped. For the police action itself already accept the 'mtu' parameter in tc command. But not

[v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-22 Thread Po Liu
From: Po Liu Hardware may own many entries for police flow. So that make one(or multi) flow to be policed by one hardware entry. This patch add the police action index provide to the driver side make it mapping the driver hardware entry index. Signed-off-by: Po Liu --- include/net/flow_offloa

[v1,net-next 2/4] net: enetc: add support max frame size for tc flower offload

2020-06-22 Thread Po Liu
From: Po Liu Base on the tc flower offload police action add max frame size by the parameter 'mtu'. Tc flower device driver working by the IEEE 802.1Qci stream filter can implement the max frame size filtering. Add it to the current hardware tc flower stearm filter driver. Signed-off-by: Po Liu

possible deadlock in rds_wake_sk_sleep (3)

2020-06-22 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:cb8e59cc Merge git://git.kernel.org/pub/scm/linux/kernel/g.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=155e891510 kernel config: https://syzkaller.appspot.com/x/.config?x=a16ddbc78955e3a9 das

Re: [PATCH bpf-next 3/3] bpf, netns: Keep a list of attached bpf_link's

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 9:04 AM Jakub Sitnicki wrote: > > To support multi-prog link-based attachments for new netns attach types, we > need to keep track of more than one bpf_link per attach type. Hence, > convert net->bpf.links into a list, that currently can be either empty or > have just one i

Re: [PATCH bpf-next 2/3] bpf, netns: Keep attached programs in bpf_prog_array

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 9:04 AM Jakub Sitnicki wrote: > > Prepare for having multi-prog attachments for new netns attach types by > storing programs to run in a bpf_prog_array, which is well suited for > iterating over programs and running them in sequence. > > Because bpf_prog_array is dynamicall

Re: [RFC PATCH 9/9] dt-bindings: net: dsa: Add documentation for Hellcreek switches

2020-06-22 Thread Kurt Kanzenbach
On Mon Jun 22 2020, Andrew Lunn wrote: > On Mon, Jun 22, 2020 at 02:02:19PM +0200, Kurt Kanzenbach wrote: >> On Fri Jun 19 2020, Andrew Lunn wrote: >> >> > The switch is 100/100Mbps right? The MAC is only Fast ethernet. Do you >> >> > need some properties in the port@0 node to tell the switch to on

Re: [RFC PATCH 6/9] net: dsa: hellcreek: Add debugging mechanisms

2020-06-22 Thread Kurt Kanzenbach
On Mon Jun 22 2020, Andrew Lunn wrote: > On Mon, Jun 22, 2020 at 02:32:28PM +0200, Kurt Kanzenbach wrote: >> On Fri Jun 19 2020, Andrew Lunn wrote: >> >> > Are trace registers counters? >> >> >> >> No. The trace registers provide bits for error conditions and if packets >> >> have been dropped e.g

Re: [RFC PATCH 6/9] net: dsa: hellcreek: Add debugging mechanisms

2020-06-22 Thread Kurt Kanzenbach
Hi Vladimir, On Mon Jun 22 2020, Vladimir Oltean wrote: > Hi Kurt, > > On Mon, 22 Jun 2020 at 15:34, Kurt Kanzenbach wrote: >> >> * Re-prioritization of packets based on the ether type (not mac address) > > This can be done by offloading a tc skbedit priority action, and a > "protocol" key (even

Re: [PATCH bpf-next 1/3] flow_dissector: Pull BPF program assignment up to bpf-netns

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 9:03 AM Jakub Sitnicki wrote: > > Prepare for using bpf_prog_array to store attached programs by moving out > code that updates the attached program out of flow dissector. > > Managing bpf_prog_array is more involved than updating a single bpf_prog > pointer. This will let

Re: [PATCH v2 bpf-next 8/8] selftest: add tests for XDP programs in CPUMAP entries

2020-06-22 Thread Andrii Nakryiko
On Fri, Jun 19, 2020 at 9:55 PM Lorenzo Bianconi wrote: > > Similar to what have been done for DEVMAP, introduce tests to verify > ability to add a XDP program to an entry in a CPUMAP. > Verify CPUMAP programs can not be attached to devices as a normal > XDP program, and only programs with BPF_XDP

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Re: [PATCH v2 bpf-next 6/8] libbpf: add SEC name for xdp programs attached to CPUMAP

2020-06-22 Thread Andrii Nakryiko
On Fri, Jun 19, 2020 at 9:55 PM Lorenzo Bianconi wrote: > > As for DEVMAP, support SEC("xdp_cpumap*") as a short cut for loading > the program with type BPF_PROG_TYPE_XDP and expected attach type > BPF_XDP_CPUMAP. > > Signed-off-by: Lorenzo Bianconi > --- > tools/lib/bpf/libbpf.c | 2 ++ > 1 fil

Re: [PATCH bpf-next v3 06/15] bpf: add bpf_skc_to_{tcp,tcp_timewait,tcp_request}_sock() helpers

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Re: [PATCH v3 bpf-next 8/9] tools/bpftool: show info for processes holding BPF map/prog/link/btf FDs

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:24 PM Alexei Starovoitov wrote: > > On Fri, Jun 19, 2020 at 04:17:02PM -0700, Andrii Nakryiko wrote: > > Add bpf_iter-based way to find all the processes that hold open FDs against > > BPF object (map, prog, link, btf). bpftool always attempts to discover this, > > but wi

Re: [Intel-wired-lan] [PATCH net-next 1/2] i40e: optimize AF_XDP Tx completion path

2020-06-22 Thread Magnus Karlsson
On Tue, Jun 23, 2020 at 3:00 AM Samudrala, Sridhar wrote: > > > > On 6/22/2020 6:21 AM, Magnus Karlsson wrote: > > Improve the performance of the AF_XDP zero-copy Tx completion > > path. When there are no XDP buffers being sent using XDP_TX or > > XDP_REDIRECT, we do not have go through the SW rin

[PATCH net-next v3 1/3] net: phy: marvell: use a single style for referencing functions

2020-06-22 Thread Maxim Kochetkov
The kernel in general does not use &func referencing format. Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/marvell.c | 222 +++--- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/drive

[PATCH net-next v3 3/3] net: phy: marvell: Add Marvell 88E1548P support

2020-06-22 Thread Maxim Kochetkov
Add support for this new phy ID. Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/marvell.c | 23 +++ include/linux/marvell_phy.h | 1 + 2 files changed, 24 insertions(+) diff --git a/drivers/net/phy/marvell.c b/d

[PATCH net-next v3 0/3] Add Marvell 88E1340S, 88E1548P support

2020-06-22 Thread Maxim Kochetkov
This patch series add new PHY id support. Russell King asked to use single style for referencing functions. Maxim Kochetkov (3): net: phy: marvell: use a single style for referencing functions net: phy: marvell: Add Marvell 88E1340S support net: phy: marvell: Add Marvell 88E1548P support d

[PATCH net-next v3 2/3] net: phy: marvell: Add Marvell 88E1340S support

2020-06-22 Thread Maxim Kochetkov
Add support for this new phy ID. Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/phy/marvell.c | 23 +++ include/linux/marvell_phy.h | 1 + 2 files changed, 24 insertions(+) diff --git a/drivers/net/phy/marvell.c b/d

Re: mlx5e uplink hairpin forwarding

2020-06-22 Thread Eli Cohen
On Tue, Jun 23, 2020 at 09:24:25AM +0800, Tonghao Zhang wrote: > Hi Eli > Still not work > > $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower skip_sw > dst_ip 11.12.13.14 action mirred egress redirect dev enp130s0f0 > Error: mlx5_core: devices are both uplink, can't offload forwarding

Re: [PATCH v2] GUE: Fix a typo

2020-06-22 Thread David Miller
From: Aiden Leong Date: Mon, 22 Jun 2020 20:04:58 -0700 > Fix a typo in gue.h > > Signed-off-by: Aiden Leong Applied, thank you.

Re: [PATCH net-next 0/6] net: atlantic: additional A2 features

2020-06-22 Thread David Miller
From: Igor Russkikh Date: Mon, 22 Jun 2020 17:53:03 +0300 > This patchset adds more features to A2: > * half duplex rates; > * EEE; > * flow control; > * link partner capabilities reporting; > * phy loopback. > > Feature-wise A2 is almost on-par with A1 save for WoL and filtering, which > w

Re: [PATCH net v2] mptcp: drop sndr_key in mptcp_syn_options

2020-06-22 Thread David Miller
From: Geliang Tang Date: Mon, 22 Jun 2020 19:45:58 +0800 > In RFC 8684, we don't need to send sndr_key in SYN package anymore, so drop > it. > > Fixes: cc7972ea1932 ("mptcp: parse and emit MP_CAPABLE option according to v1 > spec") > Signed-off-by: Geliang Tang Applied and queued up for v5.6+

Re: [PATCH] [net/sched] tcindex_change: Remove redundant null check

2020-06-22 Thread David Miller
From: Gaurav Singh Date: Sun, 21 Jun 2020 22:24:30 -0400 > arg cannot be NULL since its already being dereferenced > before. Remove the redundant NULL check. > > Signed-off-by: Gaurav Singh Applied, thank you.

Re: linux-next: build failure after merge of the kspp tree

2020-06-22 Thread David Miller
From: Stephen Rothwell Date: Tue, 23 Jun 2020 13:51:34 +1000 > I have added the following merge fix patch. > > From: Stephen Rothwell > Date: Tue, 23 Jun 2020 13:43:06 +1000 > Subject: [PATCH] net/core/devlink.c: remove new uninitialized_var() usage > > Signed-off-by: Stephen Rothwell Applie

linux-next: build failure after merge of the kspp tree

2020-06-22 Thread Stephen Rothwell
Hi all, After merging the kspp tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: net/core/devlink.c: In function 'devlink_nl_port_function_attrs_put': net/core/devlink.c:586:3: warning: parameter names (without types) in function declaration 586 | int uninitialized_v

Re: [PATCH net-next] rtnetlink: add keepalived rtm_protocol

2020-06-22 Thread David Miller
From: Alexandre Cassen Date: Sun, 21 Jun 2020 17:34:54 +0200 > Keepalived can set global static ip routes or virtual ip routes dynamically > following VRRP protocol states. Using a dedicated rtm_protocol will help > keeping track of it. > > Signed-off-by: Alexandre Cassen Please address Nicola

Re: [PATCH] Fix check in ethtool_rx_flow_rule_create

2020-06-22 Thread David Miller
From: Gaurav Singh Date: Sun, 21 Jun 2020 11:30:17 -0400 > Fix check in ethtool_rx_flow_rule_create > > Signed-off-by: Gaurav Singh Applied and queued up for -stable with the following Fixes: tag added: Fixes: eca4205f9ec3 ("ethtool: add ethtool_rx_flow_spec to flow_rule structure translator

Re: [PATCH net-next] net: mtk_eth_soc: use resolved link config in mac_link_up()

2020-06-22 Thread David Miller
From: Russell King Date: Sun, 21 Jun 2020 15:36:39 +0100 > Convert the mtk_eth_soc driver to use the finalised link parameters in > mac_link_up() rather than the parameters in mac_config(). > > Signed-off-by: Russell King Applied.

Re: [PATCH net] hsr: avoid to create proc file after unregister

2020-06-22 Thread David Miller
From: Taehee Yoo Date: Sun, 21 Jun 2020 13:46:25 + > When an interface is being deleted, "/proc/net/dev_snmp6/" > is deleted. > The function for this is addrconf_ifdown() in the addrconf_notify() and > it is called by notification, which is NETDEV_UNREGISTER. > But, if NETDEV_CHANGEMTU is tri

[PATCH] [net/decnet] dn_route_rcv: remove redundant dev null check

2020-06-22 Thread Gaurav Singh
dev cannot be NULL here since its already being accessed before. Remove the redundant null check. Signed-off-by: Gaurav Singh --- net/decnet/dn_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 06b9983325cc..9eb7e4b62d

Re: [PATCH net-next 0/5] Multicast improvement in Ocelot and Felix drivers

2020-06-22 Thread David Miller
From: Vladimir Oltean Date: Sun, 21 Jun 2020 14:45:58 +0300 > From: Vladimir Oltean > > This series makes some basic multicast forwarding functionality work for > Felix DSA and for Ocelot switchdev. IGMP/MLD snooping in Felix is still > missing, and there are other improvements to be made in th

[PATCH v3 bpf-next 1/3] bpf: switch most helper return values from 32-bit int to 64-bit long

2020-06-22 Thread Andrii Nakryiko
Switch most of BPF helper definitions from returning int to long. These definitions are coming from comments in BPF UAPI header and are used to generate bpf_helper_defs.h (under libbpf) to be later included and used from BPF programs. In actual in-kernel implementation, all the helpers are defined

[PATCH v3 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test

2020-06-22 Thread Andrii Nakryiko
From: John Fastabend Extend original variable-length tests with a case to catch a common existing pattern of testing for < 0 for errors. Note because verifier also tracks upper bounds and we know it can not be greater than MAX_LEN here we can skip upper bound check. In ALU64 enabled compilation

[PATCH v3 bpf-next 2/3] selftests/bpf: add variable-length data concatenation pattern test

2020-06-22 Thread Andrii Nakryiko
Add selftest that validates variable-length data reading and concatentation with one big shared data array. This is a common pattern in production use for monitoring and tracing applications, that potentially can read a lot of data, but overall read much less. Such pattern allows to determine preci

[PATCH] net: qrtr: free flow in __qrtr_node_release

2020-06-22 Thread Carl Huang
The flow is allocated in qrtr_tx_wait, but not freed when qrtr node is released. (*slot) becomes NULL after radix_tree_iter_delete is called in __qrtr_node_release. The fix is to save (*slot) to a vairable and then free it. This memory leak is catched when kmemleak is enabled in kernel, the report

RE: [net-next 4/9] i40e: detect and log info about pre-recovery mode

2020-06-22 Thread Kirsher, Jeffrey T
> -Original Message- > From: Jakub Kicinski > Sent: Monday, June 22, 2020 16:56 > To: Kirsher, Jeffrey T > Cc: da...@davemloft.net; Kwapulinski, Piotr ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; > Loktionov, Aleksandr ; Bowers, AndrewX > > Subject: Re: [net-next

[PATCH v2] GUE: Fix a typo

2020-06-22 Thread Aiden Leong
Fix a typo in gue.h Signed-off-by: Aiden Leong --- include/net/gue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/gue.h b/include/net/gue.h index 3a6595bfa641..e42402f180b7 100644 --- a/include/net/gue.h +++ b/include/net/gue.h @@ -21,7 +21,7 @@ * |

Re: [PATCH RFC v8 02/11] vhost: use batched get_vq_desc version

2020-06-22 Thread Jason Wang
On 2020/6/23 上午12:00, Michael S. Tsirkin wrote: On Wed, Jun 17, 2020 at 11:19:26AM +0800, Jason Wang wrote: On 2020/6/11 下午7:34, Michael S. Tsirkin wrote: static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) { kfree(vq->descs); @@ -394,6 +400,9 @@ static long vhost_dev_a

[PATCH] [net] dcb_doit: remove redundant skb check

2020-06-22 Thread Gaurav Singh
skb cannot be NULL here since its already being accessed before: sock_net(skb->sk). Remove the redundant null check. Signed-off-by: Gaurav Singh --- net/dcb/dcbnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index d2a4553bcf39..84dde5a20

Re: [PATCH v2 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:31 PM Alexei Starovoitov wrote: > > On Mon, Jun 22, 2020 at 05:09:04PM -0700, Andrii Nakryiko wrote: > > Extend original variable-length tests with a case to catch a common > > existing pattern of testing for < 0 for errors. Note because > > verifier also tracks upper bou

Re: [PATCH bpf-next v3 09/15] bpf: add bpf_skc_to_udp6_sock() helper

2020-06-22 Thread Yonghong Song
On 6/22/20 6:47 PM, Eric Dumazet wrote: On 6/22/20 5:36 PM, Yonghong Song wrote: The helper is used in tracing programs to cast a socket pointer to a udp6_sock pointer. The return value could be NULL if the casting is illegal. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song ---

RE: [PATCH v2 bpf-next 1/3] bpf: switch most helper return values from 32-bit int to 64-bit long

2020-06-22 Thread John Fastabend
Andrii Nakryiko wrote: > Switch most of BPF helper definitions from returning int to long. These > definitions are coming from comments in BPF UAPI header and are used to > generate bpf_helper_defs.h (under libbpf) to be later included and used from > BPF programs. [...] > There could be two vari

Re: [PATCH bpf-next v3 09/15] bpf: add bpf_skc_to_udp6_sock() helper

2020-06-22 Thread Eric Dumazet
On 6/22/20 5:36 PM, Yonghong Song wrote: > The helper is used in tracing programs to cast a socket > pointer to a udp6_sock pointer. > The return value could be NULL if the casting is illegal. > > Acked-by: Martin KaFai Lau > Signed-off-by: Yonghong Song > --- > include/linux/bpf.h

Re: mlx5e uplink hairpin forwarding

2020-06-22 Thread Tonghao Zhang
On Sun, Jun 21, 2020 at 2:36 AM Eli Cohen wrote: > > On Sat, Jun 20, 2020 at 08:02:19PM +0800, Tonghao Zhang wrote: > > Hi Eli > > > > I review your patches and try to test it. > > $ tc filter add dev enp130s0f0 protocol ip prio 1 root flower dst_ip > > 11.12.13.14 skip_sw action mirred egress re

Re: [PATCH net-next v9 2/5] net: phy: Add a helper to return the index for of the internal delay

2020-06-22 Thread Dan Murphy
David On 6/22/20 5:40 PM, David Miller wrote: From: Dan Murphy Date: Fri, 19 Jun 2020 11:18:10 -0500 +s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev, + const int *delay_values, int size, bool is_rx) +{ + int i; + s32 delay; Pleas

Re: [PATCH net-next v9 1/5] dt-bindings: net: Add tx and rx internal delays

2020-06-22 Thread Dan Murphy
David Thanks for the review On 6/22/20 5:40 PM, David Miller wrote: From: Dan Murphy Date: Fri, 19 Jun 2020 11:18:09 -0500 @@ -162,6 +162,19 @@ properties: description: Specifies a reference to a node representing a SFP cage. + + rx-internal-delay-ps: Do you really want t

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

2020-06-22 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/xfrm/xfrm_device.c between commit: 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec crypto offload.") from the net tree and commit: 272c2330adc9 ("xfrm: bail early on slave pass over skb") from

Re: [Intel-wired-lan] [PATCH net-next 1/2] i40e: optimize AF_XDP Tx completion path

2020-06-22 Thread Samudrala, Sridhar
On 6/22/2020 6:21 AM, Magnus Karlsson wrote: Improve the performance of the AF_XDP zero-copy Tx completion path. When there are no XDP buffers being sent using XDP_TX or XDP_REDIRECT, we do not have go through the SW ring to clean up any entries since the AF_XDP path does not use these. In the

Re: [net-next 2/9] i40e: remove unused defines

2020-06-22 Thread Shannon Nelson
On 6/22/20 3:18 PM, Jeff Kirsher wrote: From: Jesse Brandeburg Remove all the unused defines as they are just dead weight. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e.h| 20 - .../net/ethernet/int

Re: [PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation]

2020-06-22 Thread Anchal Agarwal
On Mon, Jun 22, 2020 at 10:38:46AM +0200, Roger Pau Monné wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On Fri, Jun 19, 2020 at 11:43:12PM +, Ancha

RE: [net-next 4/9] i40e: detect and log info about pre-recovery mode

2020-06-22 Thread Kirsher, Jeffrey T
> -Original Message- > From: Jakub Kicinski > Sent: Monday, June 22, 2020 17:29 > To: Kirsher, Jeffrey T > Cc: da...@davemloft.net; Kwapulinski, Piotr ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; > Loktionov, Aleksandr ; Bowers, AndrewX > > Subject: Re: [net-next

[PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread Yonghong Song
The helper is used in tracing programs to cast a socket pointer to a tcp6_sock pointer. The return value could be NULL if the casting is illegal. A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added so the verifier is able to deduce proper return types for the helper. Different from the pr

[PATCH bpf-next v3 12/15] tools/libbpf: add more common macros to bpf_tracing_net.h

2020-06-22 Thread Yonghong Song
These newly added macros will be used in subsequent bpf iterator tcp{4,6} and udp{4,6} programs. Signed-off-by: Yonghong Song --- tools/lib/bpf/bpf_tracing_net.h | 35 + 1 file changed, 35 insertions(+) diff --git a/tools/lib/bpf/bpf_tracing_net.h b/tools/lib/bpf

[PATCH bpf-next v3 04/15] bpf: allow tracing programs to use bpf_jiffies64() helper

2020-06-22 Thread Yonghong Song
/proc/net/tcp{4,6} uses jiffies for various computations. Let us add bpf_jiffies64() helper to tracing program so bpf_iter and other programs can use it. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- kernel/trace/bpf_trace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ke

[PATCH bpf-next v3 02/15] net: bpf: implement bpf iterator for tcp

2020-06-22 Thread Yonghong Song
The bpf iterator for tcp is implemented. Both tcp4 and tcp6 sockets will be traversed. It is up to bpf program to filter for tcp4 or tcp6 only, or both families of sockets. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- net/ipv4/tcp_ipv4.c | 123

[PATCH bpf-next v3 09/15] bpf: add bpf_skc_to_udp6_sock() helper

2020-06-22 Thread Yonghong Song
The helper is used in tracing programs to cast a socket pointer to a udp6_sock pointer. The return value could be NULL if the casting is illegal. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- include/linux/bpf.h| 1 + include/uapi/linux/bpf.h | 9 - ker

[PATCH bpf-next v3 14/15] tools/bpf: add udp4/udp6 bpf iterator

2020-06-22 Thread Yonghong Song
On my VM, I got identical results between /proc/net/udp[6] and the udp{4,6} bpf iterator. For udp6: $ cat /sys/fs/bpf/p1 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 1405:

[PATCH bpf-next v3 15/15] bpf/selftests: add tcp/udp iterator programs to selftests

2020-06-22 Thread Yonghong Song
Added tcp{4,6} and udp{4,6} bpf programs into test_progs selftest so that they at least can load successfully. $ ./test_progs -n 3 ... #3/7 tcp4:OK #3/8 tcp6:OK #3/9 udp4:OK #3/10 udp6:OK ... #3 bpf_iter:OK Summary: 1/16 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song -

[PATCH bpf-next v3 11/15] tools/bpf: refactor some net macros to libbpf bpf_tracing_net.h

2020-06-22 Thread Yonghong Song
Refactor bpf_iter_ipv6_route.c and bpf_iter_netlink.c so net macros, originally from various include/linux header files, are moved to a new libbpf installable header file bpf_tracing_net.h. The goal is to improve reuse so networking tracing programs do not need to copy these macros every time they

[PATCH bpf-next v3 06/15] bpf: add bpf_skc_to_{tcp,tcp_timewait,tcp_request}_sock() helpers

2020-06-22 Thread Yonghong Song
Three more helpers are added to cast a sock_common pointer to an tcp_sock, tcp_timewait_sock or a tcp_request_sock for tracing programs. Signed-off-by: Yonghong Song --- include/linux/bpf.h| 3 ++ include/uapi/linux/bpf.h | 23 ++- kernel/trace/bpf_trace.c |

[PATCH bpf-next v3 07/15] net: bpf: add bpf_seq_afinfo in udp_iter_state

2020-06-22 Thread Yonghong Song
Similar to tcp_iter_state, a new field bpf_seq_afinfo is added to udp_iter_state to provide bpf udp iterator afinfo. This does not change /proc/net/{udp, udp6} behavior. But it enables bpf iterator to avoid get afinfo from PDE_DATA and iterate through all udp and udp6 sockets in one pass. Acked-b

[PATCH bpf-next v3 03/15] bpf: support 'X' in bpf_seq_printf() helper

2020-06-22 Thread Yonghong Song
'X' tells kernel to print hex with upper case letters. /proc/net/tcp{4,6} seq_file show() used this, and supports it in bpf_seq_printf() helper too. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- kernel/trace/bpf_trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH bpf-next v3 08/15] net: bpf: implement bpf iterator for udp

2020-06-22 Thread Yonghong Song
The bpf iterator for udp is implemented. Both udp4 and udp6 sockets will be traversed. It is up to bpf program to filter for udp4 or udp6 only, or both families of sockets. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- net/ipv4/udp.c | 116 +

[PATCH bpf-next v3 00/15] implement bpf iterator for tcp and udp sockets

2020-06-22 Thread Yonghong Song
bpf iterator implments traversal of kernel data structures and these data structures are passed to a bpf program for processing. This gives great flexibility for users to examine kernel data structure without using e.g. /proc/net which has limited and fixed format. Commit 138d0be35b14 ("net: bpf:

[PATCH bpf-next v3 13/15] tools/bpf: selftests: implement sample tcp/tcp6 bpf_iter programs

2020-06-22 Thread Yonghong Song
In my VM, I got identical result compared to /proc/net/{tcp,tcp6}. For tcp6: $ cat /proc/net/tcp6 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: :0016

[PATCH bpf-next v3 01/15] net: bpf: add bpf_seq_afinfo in tcp_iter_state

2020-06-22 Thread Yonghong Song
A new field bpf_seq_afinfo is added to tcp_iter_state to provide bpf tcp iterator afinfo. There are two reasons on why we did this. First, the current way to get afinfo from PDE_DATA does not work for bpf iterator as its seq_file inode does not conform to /proc/net/{tcp,tcp6} inode structures. Mor

[PATCH bpf-next v3 10/15] bpf/selftests: move newer bpf_iter_* type redefining to a new header file

2020-06-22 Thread Yonghong Song
Commit b9f4c01f3e0b ("selftest/bpf: Make bpf_iter selftest compilable against old vmlinux.h") and Commit dda18a5c0b75 ("selftests/bpf: Convert bpf_iter_test_kern{3, 4}.c to define own bpf_iter_meta") redefined newly introduced types in bpf programs so the bpf program can still compile properly with

Re: [net-next 9/9] i40e: silence an UBSAN false positive

2020-06-22 Thread Jakub Kicinski
On Mon, 22 Jun 2020 15:18:17 -0700 Jeff Kirsher wrote: > From: Qian Cai > > virtchnl_rss_lut.lut is used for the RSS lookup table, but in > i40e_vc_config_rss_lut(), it is indexed by subscript results in a false > positive. This is commit message is not great either. The point is that we have a

Re: [PATCH v2 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test

2020-06-22 Thread Alexei Starovoitov
On Mon, Jun 22, 2020 at 05:09:04PM -0700, Andrii Nakryiko wrote: > Extend original variable-length tests with a case to catch a common > existing pattern of testing for < 0 for errors. Note because > verifier also tracks upper bounds and we know it can not be greater > than MAX_LEN here we can skip

Re: [net-next 4/9] i40e: detect and log info about pre-recovery mode

2020-06-22 Thread Jakub Kicinski
On Tue, 23 Jun 2020 00:18:08 + Kirsher, Jeffrey T wrote: > > There is no need to use the inline keyword in C sources. Compiler will > > inline > > small static functions, anyway. > > > > Same thing in patch 8. > > I am prepping a v2, are these the only issues? Want to make sure > before s

Re: [PATCH v3 bpf-next 8/9] tools/bpftool: show info for processes holding BPF map/prog/link/btf FDs

2020-06-22 Thread Alexei Starovoitov
On Fri, Jun 19, 2020 at 04:17:02PM -0700, Andrii Nakryiko wrote: > Add bpf_iter-based way to find all the processes that hold open FDs against > BPF object (map, prog, link, btf). bpftool always attempts to discover this, > but will silently give up if kernel doesn't yet support bpf_iter BPF progra

RE: [net-next 4/9] i40e: detect and log info about pre-recovery mode

2020-06-22 Thread Kirsher, Jeffrey T
> -Original Message- > From: Jakub Kicinski > Sent: Monday, June 22, 2020 16:56 > To: Kirsher, Jeffrey T > Cc: da...@davemloft.net; Kwapulinski, Piotr ; > netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com; > Loktionov, Aleksandr ; Bowers, AndrewX > > Subject: Re: [net-next

[PATCH v2 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test

2020-06-22 Thread Andrii Nakryiko
Extend original variable-length tests with a case to catch a common existing pattern of testing for < 0 for errors. Note because verifier also tracks upper bounds and we know it can not be greater than MAX_LEN here we can skip upper bound check. In ALU64 enabled compilation converting from long->i

[PATCH v2 bpf-next 2/3] selftests/bpf: add variable-length data concatenation pattern test

2020-06-22 Thread Andrii Nakryiko
Add selftest that validates variable-length data reading and concatentation with one big shared data array. This is a common pattern in production use for monitoring and tracing applications, that potentially can read a lot of data, but overall read much less. Such pattern allows to determine preci

[PATCH v2 bpf-next 1/3] bpf: switch most helper return values from 32-bit int to 64-bit long

2020-06-22 Thread Andrii Nakryiko
Switch most of BPF helper definitions from returning int to long. These definitions are coming from comments in BPF UAPI header and are used to generate bpf_helper_defs.h (under libbpf) to be later included and used from BPF programs. In actual in-kernel implementation, all the helpers are defined

Re: [PATCH 06/11] phy: un-inline devm_mdiobus_register()

2020-06-22 Thread Florian Fainelli
On 6/22/20 3:00 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Functions should only be static inline if they're very short. This > devres helper is already over 10 lines and it will grow soon as we'll > be improving upon its approach. Pull it into mdio_devres.c. > > Signed-off-b

Re: [net-next 4/9] i40e: detect and log info about pre-recovery mode

2020-06-22 Thread Jakub Kicinski
On Mon, 22 Jun 2020 15:18:12 -0700 Jeff Kirsher wrote: > +static inline bool i40e_check_fw_empr(struct i40e_pf *pf) > +{ > +} > +static inline i40e_status i40e_handle_resets(struct i40e_pf *pf) > +{ > + const i40e_status pfr = i40e_pf_loop_reset(pf); > + > + return is_empr ? I40E_ERR_RES

Re: [PATCH 1/2] net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy

2020-06-22 Thread Russell King - ARM Linux admin
On Tue, Jun 16, 2020 at 10:31:39AM +0200, Sascha Hauer wrote: > The MVNETA_SERDES_CFG register is only available on older SoCs like the > Armada XP. On newer SoCs like the Armada 38x the fields are moved to > comphy. This patch moves the writes to this register next to the comphy > initialization,

Re: [PATCH] usbnet: smsc95xx: Fix use-after-free after removal

2020-06-22 Thread David Miller
From: Tuomas Tynkkynen Date: Sun, 21 Jun 2020 13:43:26 +0300 > Syzbot reports an use-after-free in workqueue context: > > BUG: KASAN: use-after-free in mutex_unlock+0x19/0x40 > kernel/locking/mutex.c:737 > mutex_unlock+0x19/0x40 kernel/locking/mutex.c:737 > __smsc95xx_mdio_read drivers/net/us

Re: [PATCH v2 net 0/3] net: ethtool: netdev_features_strings[] cleanup

2020-06-22 Thread David Miller
From: Alexander Lobakin Date: Sun, 21 Jun 2020 09:55:50 + > This little series adds the last forgotten feature string for > NETIF_F_GSO_TUNNEL_REMCSUM and attempts to prevent such losses > in future. > > Patches 2-3 seem more like net-next candidates rather than net-fixes, > but for me it se

Re: [PATCH net-next 0/4] mlxsw: Offload TC action pedit munge tcp/udp sport/dport

2020-06-22 Thread David Miller
From: Ido Schimmel Date: Sun, 21 Jun 2020 11:34:32 +0300 > From: Ido Schimmel > > Petr says: > > On Spectrum-2 and Spectrum-3, it is possible to overwrite L4 port number of > a TCP or UDP packet in the ACL engine. That corresponds to the pedit munges > of tcp and udp sport resp. dport fields.

Re: [PATCH] IPv6: Fix CPU contention on FIB6 GC

2020-06-22 Thread Oliver Herms
On 23.06.20 00:55, Eric Dumazet wrote: > > > On 6/22/20 1:53 PM, Oliver Herms wrote: >> When fib6_run_gc is called with parameter force=true the spinlock in >> /net/ipv6/ip6_fib.c:2310 can lock all CPUs in softirq when >> net.ipv6.route.max_size is exceeded (seen this multiple times). >> One soti

Re: [PATCH net] mlxsw: spectrum: Do not rely on machine endianness

2020-06-22 Thread David Miller
From: Ido Schimmel Date: Sun, 21 Jun 2020 11:29:17 +0300 > From: Ido Schimmel > > The second commit cited below performed a cast of 'u32 buffsize' to > '(u16 *)' when calling mlxsw_sp_port_headroom_8x_adjust(): > > mlxsw_sp_port_headroom_8x_adjust(mlxsw_sp_port, (u16 *) &buffsize); > > Colin

Re: [PATCH net-next v2 0/3] Add Marvell 88E1340S, 88E1548P support

2020-06-22 Thread David Miller
From: Maxim Kochetkov Date: Sun, 21 Jun 2020 10:59:49 +0300 > This patch series add new PHY id support. > Russell King asked to use single style for referencing functions. Series applied, thanks. But like Florian said, you should retain Reviewed-by tags when you make trivial updates to a patch

Re: [PATCH net-next 0/7] r8169: mark device as detached in PCI D3 and improve locking

2020-06-22 Thread David Miller
From: Jakub Kicinski Date: Mon, 22 Jun 2020 15:27:04 -0700 > On Sat, 20 Jun 2020 22:33:39 +0200 Heiner Kallweit wrote: >> Mark the netdevice as detached whenever parent is in PCI D3hot and not >> accessible. This mainly applies to runtime-suspend state. >> In addition take RTNL lock in suspend ca

Re: [PATCH 0/2] prepare dwmac-meson8b for G12A specific initialization

2020-06-22 Thread David Miller
From: Martin Blumenstingl Date: Sat, 20 Jun 2020 21:26:39 +0200 > Some users are reporting that RGMII (and sometimes also RMII) Ethernet > is not working for them on G12A/G12B/SM1 boards. Upon closer inspection > of the vendor code for these SoCs new register bits are found. > > It's not clear y

Re: [PATCH v2 net-next 0/2] devlink: Add board.serial_number field to info_get cb.

2020-06-22 Thread David Miller
From: Jakub Kicinski Date: Mon, 22 Jun 2020 14:53:24 -0700 > On Sat, 20 Jun 2020 22:01:55 +0530 Vasundhara Volam wrote: >> This patchset adds support for board.serial_number to devlink info_get >> cb and also use it in bnxt_en driver. ... > Reviewed-by: Jakub Kicinski Series applied, thanks.

  1   2   3   4   5   >