Re: [PATCH bpf-next 00/14] xsk: support shared umems between devices and queues

2020-07-08 Thread Magnus Karlsson
On Wed, Jul 8, 2020 at 5:02 PM Maxim Mikityanskiy wrote: > > On 2020-07-02 15:18, Magnus Karlsson wrote: > > This patch set adds support to share a umem between AF_XDP sockets > > bound to different queue ids on the same device or even between > > devices. It has already been possible to do this b

[PATCH] net: enetc: use eth_broadcast_addr() to assign broadcast

2020-07-08 Thread Xu Wang
This patch is to use eth_broadcast_addr() to assign broadcast address insetad of memset(). Signed-off-by: Xu Wang --- drivers/net/ethernet/freescale/enetc/enetc_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_qos.c b/drivers/n

Re: [PATCH bpf-next 03/14] xsk: create and free context independently from umem

2020-07-08 Thread Magnus Karlsson
On Wed, Jul 8, 2020 at 5:01 PM Maxim Mikityanskiy wrote: > > On 2020-07-02 15:19, Magnus Karlsson wrote: > > Create and free the buffer pool independently from the umem. Move > > these operations that are performed on the buffer pool from the > > umem create and destroy functions to new create and

general protection fault in khugepaged

2020-07-08 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e44f65fd xen-netfront: remove redundant assignment to vari.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15de54a710 kernel config: https://syzkaller.appspot.com/x/.config?x=829871134ca5e230 das

Re: [PATCH v6 4/7] pidfd: Replace open-coded partial receive_fd()

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 02:22:20PM +0200, Christian Brauner wrote: > So while the patch is correct it leaves 5.6 and 5.7 with a bug in the > pidfd_getfd() implementation and that just doesn't seem right. I'm > wondering whether we should introduce: > > void sock_update(struct file *file) > { >

Re: [PATCH iproute2-next v2] iproute2 Support lockless token bucket (ltb)

2020-07-08 Thread Stephen Hemminger
On Thu, 09 Jul 2020 00:38:27 +0800 "YU, Xiangning" wrote: > +static int ltb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, > +struct nlmsghdr *n, const char *dev) > +{ > + struct tc_ltb_opt opt; If you use empty initializer in C it will make everyth

[PATCH iproute2,v2 1/2] ip xfrm: update man page on setting/printing XFRMA_IF_ID in states/policies

2020-07-08 Thread Eyal Birger
In commit aed63ae1acb9 ("ip xfrm: support setting/printing XFRMA_IF_ID attribute in states/policies") I added the ability to set/print the xfrm interface ID without updating the man page. Fixes: aed63ae1acb9 ("ip xfrm: support setting/printing XFRMA_IF_ID attribute in states/policies") Signed-of

[PATCH iproute2,v2 2/2] ip xfrm: policy: support policies with IF_ID in get/delete/deleteall

2020-07-08 Thread Eyal Birger
The XFRMA_IF_ID attribute is set in policies for them to be associated with an XFRM interface (4.19+). Add support for getting/deleting policies with this attribute. For supporting 'deleteall' the XFRMA_IF_ID attribute needs to be explicitly copied. Signed-off-by: Eyal Birger --- ip/xfrm_polic

[PATCH iproute2,v2 0/2] ip xfrm: policy: support policies with IF_ID in get/delete/deleteall

2020-07-08 Thread Eyal Birger
Allow getting/deleting policies which contain an xfrm interface ID. First patch fixes the man page with regards to the original addition of IF-ID in ip xfrm operations. --- v1 -> v2: update man page Eyal Birger (2): ip xfrm: update man page on setting/printing XFRMA_IF_ID in states/polici

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-07-08 Thread Jason Wang
On 2020/7/8 下午9:13, Kishon Vijay Abraham I wrote: Hi Jason, On 7/8/2020 4:52 PM, Jason Wang wrote: On 2020/7/7 下午10:45, Kishon Vijay Abraham I wrote: Hi Jason, On 7/7/2020 3:17 PM, Jason Wang wrote: On 2020/7/6 下午5:32, Kishon Vijay Abraham I wrote: Hi Jason, On 7/3/2020 12:46 PM, Jason W

Re: amplifying qdisc

2020-07-08 Thread Stephen Hemminger
On Thu, 9 Jul 2020 16:10:34 +1000 Russell Strong wrote: > Hi, > > I'm attempting to fill a link with background traffic that is sent > whenever the link is idle. To do this I've creates a qdisc that will > repeat the last packet in the queue for a defined number of times > (possibly infinite in

amplifying qdisc

2020-07-08 Thread Russell Strong
Hi, I'm attempting to fill a link with background traffic that is sent whenever the link is idle. To do this I've creates a qdisc that will repeat the last packet in the queue for a defined number of times (possibly infinite in the future). I am able to control the contents of the fill traffic by

[PATCH v2 bpf 0/2] bpf: net: Fixes in sk_user_data of reuseport_array

2020-07-08 Thread Martin KaFai Lau
This set fixes two issues on sk_user_data when a sk is added to a reuseport_array. The first patch is to avoid the sk_user_data being copied to a cloned sk. The second patch avoids doing bpf_sk_reuseport_detach() on sk_user_data that is not managed by reuseport_array. Since the changes are mostl

[PATCH v2 bpf 2/2] bpf: net: Avoid incorrect bpf_sk_reuseport_detach call

2020-07-08 Thread Martin KaFai Lau
bpf_sk_reuseport_detach is currently called when sk->sk_user_data is not NULL. It is incorrect because sk->sk_user_data may not be managed by the bpf's reuseport_array. It has been reported in [1] that, the bpf_sk_reuseport_detach() which is called from udp_lib_unhash() has corrupted the sk_user_

[PATCH v2 bpf 1/2] bpf: net: Avoid copying sk_user_data of reuseport_array during sk_clone

2020-07-08 Thread Martin KaFai Lau
It makes little sense for copying sk_user_data of reuseport_array during sk_clone_lock(). This patch reuses the SK_USER_DATA_NOCOPY bit introduced in commit f1ff5ce2cd5e ("net, sk_msg: Clear sk_user_data pointer on clone if tagged"). It is used to mark the sk_user_data is not supposed to be copie

Re: [PATCH v6 6/7] seccomp: Introduce addfd ioctl to seccomp user notifier

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 03:30:49PM +0200, Christian Brauner wrote: > Hm, maybe change that description to sm like: > > [...] Cool, yeah. Thanks! I've tweaked it a little more > > + /* 24 is original sizeof(struct seccomp_notif_addfd) */ > > + if (size < 24 || size >= PAGE_SIZE) > > +

[PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning

2020-07-08 Thread Frank Wunderlich
From: René van Dorst in recent Kernel-Versions there are warnings about incorrect MTU-Size like these: mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port x eth0: mtu greater than device maximum mtk_soc_eth 1b10.ethernet eth0: error -22 setting MTU to include DSA overhead Fixes: bfc

Re: [PATCH net-next v2 09/10] bnxt: convert to new udp_tunnel_nic infra

2020-07-08 Thread Michael Chan
On Wed, Jul 8, 2020 at 6:18 PM Jakub Kicinski wrote: > > Convert to new infra, taking advantage of sleeping in callbacks. > > Signed-off-by: Jakub Kicinski > --- > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 133 ++ > drivers/net/ethernet/broadcom/bnxt/bnxt.h | 6 - > 2 fil

[Linux-kernel-mentees] [PATCH] net/bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt()

2020-07-08 Thread Peilin Ye
Check upon `num_rsp` is insufficient. A malformed event packet with a large `num_rsp` number makes hci_extended_inquiry_result_evt() go out of bounds. Fix it. Also, make `num_rsp` unsigned. This patch fixes the following syzbot bug: https://syzkaller.appspot.com/bug?id=4bf11aa05c4ca51ce0df86

Re: [PATCH bpf-next v3 16/16] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-08 Thread Andrii Nakryiko
On Thu, Jul 2, 2020 at 6:00 AM Jakub Sitnicki wrote: > > On Thu, Jul 02, 2020 at 01:01 PM CEST, Lorenz Bauer wrote: > > On Thu, 2 Jul 2020 at 10:24, Jakub Sitnicki wrote: > >> > >> Add tests to test_progs that exercise: > >> > >> - attaching/detaching/querying programs to BPF_SK_LOOKUP hook, > >

[iproute2-next] tipc: fixed a compile warning in tipc/link.c

2020-07-08 Thread Hoang Huu Le
Fixes: 5027f233e35b ("tipc: add link broadcast get") Signed-off-by: Hoang Huu Le --- tipc/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tipc/link.c b/tipc/link.c index ba77a20152ea..192736eaa154 100644 --- a/tipc/link.c +++ b/tipc/link.c @@ -217,7 +217,7 @@ static int

Re: [PATCH bpf-next v3 12/16] libbpf: Add support for SK_LOOKUP program type

2020-07-08 Thread Andrii Nakryiko
On Thu, Jul 2, 2020 at 2:25 AM Jakub Sitnicki wrote: > > Make libbpf aware of the newly added program type, and assign it a > section name. > > Signed-off-by: Jakub Sitnicki > --- > > Notes: > v3: > - Move new libbpf symbols to version 0.1.0. > - Set expected_attach_type in probe_load

Re: [PATCH] drivers/net/wan/x25_asy: Fix to make it work

2020-07-08 Thread Xie He
This email is a detailed explanation of how to test the LAPB drivers, just in case you have time to check. Thanks! This email has 4 parts. 1) How to set up "lapbether" links (for comparison) 2) How to set up "x25_asy" links 3) How to test using AF_X25 sockets 4) How to test using AF_PACKET

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

2020-07-08 Thread Andrii Nakryiko
On Thu, Jul 2, 2020 at 2:25 AM Jakub Sitnicki wrote: > > Add a new program type BPF_PROG_TYPE_SK_LOOKUP with a dedicated attach type > BPF_SK_LOOKUP. The new program kind is to be invoked by the transport layer > when looking up a listening socket for a new connection request for > connection orie

Re: [PATCH bpf-next v3 01/16] bpf, netns: Handle multiple link attachments

2020-07-08 Thread Andrii Nakryiko
On Thu, Jul 2, 2020 at 2:24 AM Jakub Sitnicki wrote: > > Extend the BPF netns link callbacks to rebuild (grow/shrink) or update the > prog_array at given position when link gets attached/updated/released. > > This let's us lift the limit of having just one link attached for the new > attach type i

Re: [PATCH bpf-next 3/3] bpf: Add kernel module with user mode driver that populates bpffs.

2020-07-08 Thread Andrii Nakryiko
On Thu, Jul 2, 2020 at 1:04 PM Alexei Starovoitov wrote: > > From: Alexei Starovoitov > > Add kernel module with user mode driver that populates bpffs with > BPF iterators. > > $ mount bpffs /sys/fs/bpf/ -t bpf > $ ls -la /sys/fs/bpf/ > total 4 > drwxrwxrwt 2 root root0 Jul 2 00:27 . > drwx

[PATCH net v3 1/1] qed: Populate nvm-file attributes while reading nvm config partition.

2020-07-08 Thread Sudarsana Reddy Kalluru
NVM config file address will be modified when the MBI image is upgraded. Driver would return stale config values if user reads the nvm-config (via ethtool -d) in this state. The fix is to re-populate nvm attribute info while reading the nvm config values/partition. Changes from previous version: -

[Patch net] net_sched: fix a memory leak in atm_tc_init()

2020-07-08 Thread Cong Wang
When tcf_block_get() fails inside atm_tc_init(), atm_tc_put() is called to release the qdisc p->link.q. But the flow->ref prevents it to do so, as the flow->ref is still zero. Fix this by moving the p->link.ref initialization before tcf_block_get(). Fixes: 6529eaba33f0 ("net: sched: introduce tcf

Re: [RFC net-next 2/2] net: disable UDP GSO feature when CSUM is disabled

2020-07-08 Thread tanhuazhong
On 2020/7/9 10:47, Eric Dumazet wrote: On 7/8/20 7:30 PM, tanhuazhong wrote: On 2020/7/8 13:36, Eric Dumazet wrote: On 7/7/20 8:48 PM, Huazhong Tan wrote: Since UDP GSO feature is depended on checksum offload, so disable UDP GSO feature when CSUM is disabled, then from user-space also

Re: [PATCH iproute2] configure: support ipset version 7 with kernel version 5

2020-07-08 Thread Tony Ambardar
On Wed, 8 Jul 2020 at 08:49, Stephen Hemminger wrote: > > On Tue, 7 Jul 2020 00:58:33 -0700 > Tony Ambardar wrote: > > > The configure script checks for ipset v6 availability but doesn't test > > for v7, which is backward compatible and used on kernel v5.x systems. > > Update the script to test

Re: [RFC net-next 1/2] udp: add NETIF_F_GSO_UDP_L4 to NETIF_F_SOFTWARE_GSO

2020-07-08 Thread tanhuazhong
On 2020/7/8 20:11, Willem de Bruijn wrote: On Tue, Jul 7, 2020 at 11:50 PM Huazhong Tan wrote: Add NETIF_F_SOFTWARE_GSO to the the list of GSO features with a software fallback. This allows UDP GSO to be used even if the hardware does not support it, That is already the case if just call

Re: [RFC net-next 2/2] net: disable UDP GSO feature when CSUM is disabled

2020-07-08 Thread Eric Dumazet
On 7/8/20 7:30 PM, tanhuazhong wrote: > > > On 2020/7/8 13:36, Eric Dumazet wrote: >> >> >> On 7/7/20 8:48 PM, Huazhong Tan wrote: >>> Since UDP GSO feature is depended on checksum offload, so disable >>> UDP GSO feature when CSUM is disabled, then from user-space also >>> can see UDP GSO feat

Re: [RFC net-next 2/2] net: disable UDP GSO feature when CSUM is disabled

2020-07-08 Thread tanhuazhong
On 2020/7/8 13:36, Eric Dumazet wrote: On 7/7/20 8:48 PM, Huazhong Tan wrote: Since UDP GSO feature is depended on checksum offload, so disable UDP GSO feature when CSUM is disabled, then from user-space also can see UDP GSO feature is disabled. Signed-off-by: Huazhong Tan --- net/core/

Re: [net-next PATCH 3/3 v1] net: dsa: rtl8366: Use DSA core to set up VLAN

2020-07-08 Thread Florian Fainelli
On 7/8/2020 1:44 PM, Linus Walleij wrote: > The current code in the RTL8366 VLAN handling code > initializes the default VLANs like this: > > Ingress packets: > > port 0 ---> VLAN 1 ---> CPU port (5) > port 1 ---> VLAN 2 ---> CPU port (5) > port 2 ---> VLAN 3 ---> CPU port (5) > port

Re: [RFC net-next 1/2] udp: add NETIF_F_GSO_UDP_L4 to NETIF_F_SOFTWARE_GSO

2020-07-08 Thread Eric Dumazet
On 7/8/20 7:16 PM, tanhuazhong wrote: > > > On 2020/7/8 13:26, Eric Dumazet wrote: >> >> >> On 7/7/20 8:48 PM, Huazhong Tan wrote: >>> Add NETIF_F_SOFTWARE_GSO to the the list of GSO features with >> >> >> s/NETIF_F_SOFTWARE_GSO/NETIF_F_GSO_UDP_L4/ >> > > yes, thanks. > >>> a software fallba

Re: [net-next PATCH 2/3 v1] net: dsa: rtl8366: Fix VLAN set-up

2020-07-08 Thread Florian Fainelli
On 7/8/2020 1:44 PM, Linus Walleij wrote: > Alter the rtl8366_vlan_add() to call rtl8366_set_vlan() > inside the loop that goes over all VIDs since we now > properly support calling that function more than once. > Augment the loop to postincrement as this is more > intuitive. > > The loop moved

Re: [RFC net-next 1/2] udp: add NETIF_F_GSO_UDP_L4 to NETIF_F_SOFTWARE_GSO

2020-07-08 Thread tanhuazhong
On 2020/7/8 13:26, Eric Dumazet wrote: On 7/7/20 8:48 PM, Huazhong Tan wrote: Add NETIF_F_SOFTWARE_GSO to the the list of GSO features with s/NETIF_F_SOFTWARE_GSO/NETIF_F_GSO_UDP_L4/ yes, thanks. a software fallback. This allows UDP GSO to be used even if the hardware does not supp

Re: [net-next PATCH 1/3 v1] net: dsa: rtl8366: Fix VLAN semantics

2020-07-08 Thread Florian Fainelli
On 7/8/2020 1:44 PM, Linus Walleij wrote: > The RTL8366 would not handle adding new members (ports) to > a VLAN: the code assumed that ->port_vlan_add() was only > called once for a single port. When intializing the > switch with .configure_vlan_while_not_filtering set to > true, the function is

Re: [PATCH v2 2/2] bitfield.h: split up __BF_FIELD_CHECK macro

2020-07-08 Thread Alex Elder
On 7/8/20 6:04 PM, Nick Desaulniers wrote: > This macro has a few expansion sites that pass literal 0s as parameters. > Split these up so that we do the precise checks where we care about > them. > > Suggested-by: Alex Elder > Signed-off-by: Nick Desaulniers I do like this better. It makes it

Re: [PATCH v2 2/2] bitfield.h: split up __BF_FIELD_CHECK macro

2020-07-08 Thread Alex Elder
On 7/8/20 6:04 PM, Nick Desaulniers wrote: > This macro has a few expansion sites that pass literal 0s as parameters. > Split these up so that we do the precise checks where we care about > them. > > Suggested-by: Alex Elder > Signed-off-by: Nick Desaulniers I do like this better. It makes it

Re: [PATCH v2 1/2 net] bitfield.h: don't compile-time validate _val in FIELD_FIT

2020-07-08 Thread Alex Elder
On 7/8/20 6:04 PM, Nick Desaulniers wrote: > From: Jakub Kicinski > > When ur_load_imm_any() is inlined into jeq_imm(), it's possible for the > compiler to deduce a case where _val can only have the value of -1 at > compile time. Specifically, > > /* struct bpf_insn: _s32 imm */ > u64 imm = insn

[PATCHv6 bpf-next 3/3] selftests/bpf: add xdp_redirect_multi test

2020-07-08 Thread Hangbin Liu
Add a bpf selftest for new helper xdp_redirect_map_multi(). In this test we have 3 forward groups groups and 1 exclude group. The test will redirect each interface's packets to all the interfaces in the forward group, and exclude the interface in exclude map. We will also test both DEVMAP and DEVMA

[PATCHv6 bpf-next 2/3] sample/bpf: add xdp_redirect_map_multicast test

2020-07-08 Thread Hangbin Liu
This is a sample for xdp multicast. In the sample we could forward all packets between given interfaces. v5: add a null_map as we have strict the arg2 to ARG_CONST_MAP_PTR. Move the testing part to bpf selftest in next patch. v4: no update. v3: add rxcnt map to show the packet transmit speed.

[PATCHv6 bpf-next 1/3] xdp: add a new helper for dev map multicast support

2020-07-08 Thread Hangbin Liu
This patch is for xdp multicast support. In this implementation we add a new helper to accept two maps: forward map and exclude map. We will redirect the packet to all the interfaces in *forward map*, but exclude the interfaces that in *exclude map*. To achive this I add a new ex_map for struct bp

[PATCHv6 bpf-next 0/3] xdp: add a new helper for dev map multicast support

2020-07-08 Thread Hangbin Liu
This patch is for xdp multicast support. which has been discussed before[0], The goal is to be able to implement an OVS-like data plane in XDP, i.e., a software switch that can forward XDP frames to multiple ports. To achieve this, an application needs to specify a group of interfaces to forward a

Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc

2020-07-08 Thread Eric Dumazet
On 7/8/20 5:58 PM, YU, Xiangning wrote: > > > On 7/8/20 5:08 PM, Eric Dumazet wrote: >> >> >> On 7/8/20 4:59 PM, YU, Xiangning wrote: >> >>> >>> Yes, we are touching a cache line here to make sure aggregation tasklet is >>> scheduled immediately. In most cases it is a call to test_and_set_bit

[PATCH net-next v2 01/10] debugfs: make sure we can remove u32_array files cleanly

2020-07-08 Thread Jakub Kicinski
debugfs_create_u32_array() allocates a small structure to wrap the data and size information about the array. If users ever try to remove the file this leads to a leak since nothing ever frees this wrapper. That said there are no upstream users of debugfs_create_u32_array() that'd remove a u32 arr

[PATCH net-next v2 07/10] ixgbe: don't clear UDP tunnel ports when RXCSUM is disabled

2020-07-08 Thread Jakub Kicinski
It appears the clearing of UDP tunnel ports when RXCSUM is disabled is unnecessary. Driver will not pay attention to checksum bits if RXCSUM is not set, so we can let the hardware parse the packets. Note that the UDP tunnel port NDO handlers don't pay attention to the state of RXCSUM, so the ports

[PATCH net-next v2 00/10] udp_tunnel: add NIC RX port offload infrastructure

2020-07-08 Thread Jakub Kicinski
Kernel has a facility to notify drivers about the UDP tunnel ports so that devices can recognize tunneled packets. This is important mostly for RX - devices which don't support CHECKSUM_COMPLETE can report checksums of inner packets, and compute RSS over inner headers. Some drivers also match the U

[PATCH net-next v2 06/10] selftests: net: add a test for UDP tunnel info infra

2020-07-08 Thread Jakub Kicinski
Add validating the UDP tunnel infra works. $ ./udp_tunnel_nic.sh PASSED all 383 checks Signed-off-by: Jakub Kicinski --- .../drivers/net/netdevsim/udp_tunnel_nic.sh | 786 ++ 1 file changed, 786 insertions(+) create mode 100644 tools/testing/selftests/drivers/net/netdevsim/u

[PATCH net-next v2 10/10] mlx4: convert to new udp_tunnel_nic infra

2020-07-08 Thread Jakub Kicinski
Convert to new infra, make use of the ability to sleep in the callback. Signed-off-by: Jakub Kicinski --- .../net/ethernet/mellanox/mlx4/en_netdev.c| 107 -- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 - 2 files changed, 25 insertions(+), 84 deletions(-) diff --git

[PATCH net-next v2 08/10] ixgbe: convert to new udp_tunnel_nic infra

2020-07-08 Thread Jakub Kicinski
Make use of new common udp_tunnel_nic infra. ixgbe supports IPv4 only, and only single VxLAN and Geneve ports (one each). v2: - split out the RXCSUM feature handling to separate change; - declare structs separately; - use ti.type instead of assuming table 0 is VxLAN; - move setting netdev->udp

[PATCH net-next v2 03/10] udp_tunnel: add central NIC RX port offload infrastructure

2020-07-08 Thread Jakub Kicinski
Cater to devices which: (a) may want to sleep in the callbacks; (b) only have IPv4 support; (c) need all the programming to happen while the netdev is up. Drivers attach UDP tunnel offload info struct to their netdevs, where they declare how many UDP ports of various tunnel types they support.

[PATCH net-next v2 09/10] bnxt: convert to new udp_tunnel_nic infra

2020-07-08 Thread Jakub Kicinski
Convert to new infra, taking advantage of sleeping in callbacks. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 133 ++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 6 - 2 files changed, 34 insertions(+), 105 deletions(-) diff --git a/drivers/

[PATCH net-next v2 02/10] udp_tunnel: re-number the offload tunnel types

2020-07-08 Thread Jakub Kicinski
Make it possible to use tunnel types as flags more easily. There doesn't appear to be any user using the type as an array index, so this should make no difference. Signed-off-by: Jakub Kicinski --- include/net/udp_tunnel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH net-next v2 05/10] netdevsim: add UDP tunnel port offload support

2020-07-08 Thread Jakub Kicinski
Add UDP tunnel port handlers to our fake driver so we can test the core infra. Signed-off-by: Jakub Kicinski --- drivers/net/netdevsim/Makefile | 2 +- drivers/net/netdevsim/dev.c | 1 + drivers/net/netdevsim/netdev.c | 12 +- drivers/net/netdevsim/netdevsim.h | 19 +++

[PATCH net-next v2 04/10] ethtool: add tunnel info interface

2020-07-08 Thread Jakub Kicinski
Add an interface to report offloaded UDP ports via ethtool netlink. Now that core takes care of tracking which UDP tunnel ports the NICs are aware of we can quite easily export this information out to user space. The responsibility of writing the netlink dumps is split between ethtool code and ud

Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc

2020-07-08 Thread YU, Xiangning
On 7/8/20 5:08 PM, Eric Dumazet wrote: > > > On 7/8/20 4:59 PM, YU, Xiangning wrote: > >> >> Yes, we are touching a cache line here to make sure aggregation tasklet is >> scheduled immediately. In most cases it is a call to test_and_set_bit(). > > > test_and_set_bit() is dirtying the cach

[PATCH v18 18/23] NET: Store LSM netlabel data in a lsmblob

2020-07-08 Thread Casey Schaufler
Netlabel uses LSM interfaces requiring an lsmblob and the internal storage is used to pass information between these interfaces, so change the internal data from a secid to a lsmblob. Update the netlabel interfaces and their callers to accommodate the change. This requires that the modules using ne

[PATCH v18 17/23] LSM: security_secid_to_secctx in netlink netfilter

2020-07-08 Thread Casey Schaufler
Change netlink netfilter interfaces to use lsmcontext pointers, and remove scaffolding. Reviewed-by: Kees Cook Reviewed-by: John Johansen Acked-by: Stephen Smalley Signed-off-by: Casey Schaufler cc: netdev@vger.kernel.org --- net/netfilter/nfnetlink_queue.c | 31 --

[PATCH v18 15/23] LSM: Use lsmcontext in security_secid_to_secctx

2020-07-08 Thread Casey Schaufler
Replace the (secctx,seclen) pointer pair with a single lsmcontext pointer to allow return of the LSM identifier along with the context and context length. This allows security_release_secctx() to know how to release the context. Callers have been modified to use or save the returned data from the n

[PATCH v18 14/23] LSM: Ensure the correct LSM context releaser

2020-07-08 Thread Casey Schaufler
Add a new lsmcontext data structure to hold all the information about a "security context", including the string, its size and which LSM allocated the string. The allocation information is necessary because LSMs have different policies regarding the lifecycle of these strings. SELinux allocates and

[PATCH v18 06/23] LSM: Use lsmblob in security_secctx_to_secid

2020-07-08 Thread Casey Schaufler
Change security_secctx_to_secid() to fill in a lsmblob instead of a u32 secid. Multiple LSMs may be able to interpret the string, and this allows for setting whichever secid is appropriate. Change security_secmark_relabel_packet() to use a lsmblob instead of a u32 secid. In some other cases there i

[PATCH v18 05/23] net: Prepare UDS for security module stacking

2020-07-08 Thread Casey Schaufler
Change the data used in UDS SO_PEERSEC processing from a secid to a more general struct lsmblob. Update the security_socket_getpeersec_dgram() interface to use the lsmblob. There is a small amount of scaffolding code that will come out when the security_secid_to_secctx() code is brought in line wit

Re: [PATCH net-next v1 2/5] net: sched: Introduce helpers for qevent blocks

2020-07-08 Thread Petr Machata
Petr Machata writes: > Cong Wang writes: > > I'll think about it some more. For now I will at least fix the lack of > locking. I guess I could store smp_processor_id() that acquired the lock in struct qdisc_skb_head. Do a trylock instead of lock, and on fail check the stored value. I'll need

Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc

2020-07-08 Thread Eric Dumazet
On 7/8/20 4:59 PM, YU, Xiangning wrote: > > Yes, we are touching a cache line here to make sure aggregation tasklet is > scheduled immediately. In most cases it is a call to test_and_set_bit(). test_and_set_bit() is dirtying the cache line even if the bit is already set. > > We might be

Re: [PATCH net-next 4/9] ethtool: add tunnel info interface

2020-07-08 Thread Michal Kubecek
On Wed, Jul 08, 2020 at 04:30:49PM -0700, Jakub Kicinski wrote: > > > + ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, /* nest - _UDP_ENTRY_* > > > */ > > > + > > > + /* add new constants above here */ > > > + __ETHTOOL_A_TUNNEL_UDP_TABLE_CNT, > > > + ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A

Re: [PATCH v2 net] tcp: make sure listeners don't initialize congestion-control state

2020-07-08 Thread Eric Dumazet
On 7/8/20 4:18 PM, Christoph Paasch wrote: > syzkaller found its way into setsockopt with TCP_CONGESTION "cdg". > tcp_cdg_init() does a kcalloc to store the gradients. As sk_clone_lock > just copies all the memory, the allocated pointer will be copied as > well, if the app called setsockopt(...,

Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc

2020-07-08 Thread YU, Xiangning
On 7/8/20 3:29 PM, Eric Dumazet wrote: > > > On 7/8/20 9:38 AM, YU, Xiangning wrote: >> Lockless Token Bucket (LTB) is a qdisc implementation that controls the >> use of outbound bandwidth on a shared link. With the help of lockless >> qdisc, and by decoupling rate limiting and bandwidth shari

Re: [PATCH v6 5/7] fs: Expand __receive_fd() to accept existing fd

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 02:38:54PM +0200, Christian Brauner wrote: > On Mon, Jul 06, 2020 at 01:17:18PM -0700, Kees Cook wrote: > > Expand __receive_fd() with support for replace_fd() for the coming seccomp > > "addfd" ioctl(). Add new wrapper receive_fd_replace() for the new behavior > > and updat

Re: [PATCH v6 4/7] pidfd: Replace open-coded partial receive_fd()

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 02:22:20PM +0200, Christian Brauner wrote: > On Mon, Jul 06, 2020 at 01:17:17PM -0700, Kees Cook wrote: > > The sock counting (sock_update_netprioidx() and sock_update_classid()) was > > missing from pidfd's implementation of received fd installation. Replace > > the open-co

Re: [PATCH v6 3/7] fs: Add receive_fd() wrapper for __receive_fd()

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 01:49:23PM +0200, Christian Brauner wrote: > On Mon, Jul 06, 2020 at 01:17:16PM -0700, Kees Cook wrote: > > For both pidfd and seccomp, the __user pointer is not used. Update > > __receive_fd() to make writing to ufd optional via a NULL check. However, > > for the receive_fd

Re: [Intel-wired-lan] [net-next, v7 5/5] ice: add switch rule management for DCF

2020-07-08 Thread Jakub Kicinski
On Wed, 8 Jul 2020 22:55:21 + Nguyen, Anthony L wrote: > > @@ -490,7 +476,7 @@ ice_aq_alloc_free_vsi_list(struct ice_hw *hw, u16 > > *vsi_list_id, > > * > > * Add(0x02a0)/Update(0x02a1)/Remove(0x02a2) switch rules commands > > to firmware > > */ > > -static enum ice_status > > +enum ice_s

Re: [PATCH v6 1/7] net/scm: Regularize compat handling of scm_detach_fds()

2020-07-08 Thread Kees Cook
On Tue, Jul 07, 2020 at 01:41:03PM +0200, Christian Brauner wrote: > On Mon, Jul 06, 2020 at 01:17:14PM -0700, Kees Cook wrote: > > Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup > > scm_detach_fds") into the compat code. > > > > Move the check added in commit 1f466e1f15cf ("ne

Re: [PATCH] ath10k: Keep track of which interrupts fired, don't poll them

2020-07-08 Thread Brian Norris
On Wed, Jul 8, 2020 at 4:14 PM Doug Anderson wrote: > On Wed, Jul 8, 2020 at 4:03 PM Brian Norris wrote: > > If I'm reading correctly, you're removing the only remaining use of > > 'per_ce_irq'. Should we kill the field entirely? > > Ah, you are indeed correct! I hadn't noticed that. Unless I h

Re: [PATCH net-next 4/9] ethtool: add tunnel info interface

2020-07-08 Thread Jakub Kicinski
On Thu, 9 Jul 2020 00:32:24 +0200 Michal Kubecek wrote: > On Tue, Jul 07, 2020 at 02:24:29PM -0700, Jakub Kicinski wrote: > > + > > +-++-+ > > + | ``ETHTOOL_A_TUNNEL_INFO_HEADER``| nested | reply header > >

Re: [net-next 10/10] net/mlx5e: Add support for PCI relaxed ordering

2020-07-08 Thread Jason Gunthorpe
On Wed, Jul 08, 2020 at 06:16:30PM -0500, Bjorn Helgaas wrote: > I suspect there may be device-specific controls, too, because [1] > claims to enable/disable Relaxed Ordering but doesn't touch the > PCIe Device Control register. Device-specific controls are > certainly allowed, but

[PATCH v2 net] tcp: make sure listeners don't initialize congestion-control state

2020-07-08 Thread Christoph Paasch
syzkaller found its way into setsockopt with TCP_CONGESTION "cdg". tcp_cdg_init() does a kcalloc to store the gradients. As sk_clone_lock just copies all the memory, the allocated pointer will be copied as well, if the app called setsockopt(..., TCP_CONGESTION) on the listener. If now the socket wi

Re: [net-next 10/10] net/mlx5e: Add support for PCI relaxed ordering

2020-07-08 Thread Bjorn Helgaas
On Sun, Jul 08, 2040 at 11:22:12AM +0300, Aya Levin wrote: > On 7/6/2020 10:49 PM, David Miller wrote: > > From: Aya Levin > > Date: Mon, 6 Jul 2020 16:00:59 +0300 > > > > > Assuming the discussions with Bjorn will conclude in a well-trusted > > > API that ensures relaxed ordering in enabled, I'd

Re: [PATCH] ath10k: Keep track of which interrupts fired, don't poll them

2020-07-08 Thread Doug Anderson
Hi, On Wed, Jul 8, 2020 at 4:03 PM Brian Norris wrote: > > On Tue, Jul 7, 2020 at 10:18 AM Douglas Anderson > wrote: > > diff --git a/drivers/net/wireless/ath/ath10k/ce.h > > b/drivers/net/wireless/ath/ath10k/ce.h > > index a440aaf74aa4..666ce384a1d8 100644 > > --- a/drivers/net/wireless/ath/a

Re: [PATCH net-next 7/9] ixgbe: convert to new udp_tunnel_nic infra

2020-07-08 Thread Alexander Duyck
On Wed, Jul 8, 2020 at 2:25 PM Jakub Kicinski wrote: > > On Wed, 8 Jul 2020 10:00:36 -0700 Alexander Duyck wrote: > > On Tue, Jul 7, 2020 at 2:28 PM Jakub Kicinski wrote: > > > > > > Make use of new common udp_tunnel_nic infra. ixgbe supports > > > IPv4 only, and only single VxLAN and Geneve port

Re: [PATCH net-next] bonding: don't need RTNL for ipsec helpers

2020-07-08 Thread David Miller
From: Jarod Wilson Date: Wed, 8 Jul 2020 18:58:49 -0400 > The bond_ipsec_* helpers don't need RTNL, and can potentially get called > without it being held, so switch from rtnl_dereference() to > rcu_dereference() to access bond struct data. > > Lightly tested with xfrm bonding, no problems foun

Re: [PATCH] ath10k: Keep track of which interrupts fired, don't poll them

2020-07-08 Thread Brian Norris
On Tue, Jul 7, 2020 at 10:18 AM Douglas Anderson wrote: > diff --git a/drivers/net/wireless/ath/ath10k/ce.h > b/drivers/net/wireless/ath/ath10k/ce.h > index a440aaf74aa4..666ce384a1d8 100644 > --- a/drivers/net/wireless/ath/ath10k/ce.h > +++ b/drivers/net/wireless/ath/ath10k/ce.h ... > @@ -376,12

Re: [PATCH bpf-next 0/6] Improve libbpf support of old kernels

2020-07-08 Thread Daniel Borkmann
On 7/8/20 3:53 AM, Andrii Nakryiko wrote: This patch set improves libbpf's support of old kernels, missing features like BTF support, global variables support, etc. Most critical one is a silent drop of CO-RE relocations if libbpf fails to load BTF (despite sanitization efforts). This is frequen

[PATCH net-next] bonding: don't need RTNL for ipsec helpers

2020-07-08 Thread Jarod Wilson
The bond_ipsec_* helpers don't need RTNL, and can potentially get called without it being held, so switch from rtnl_dereference() to rcu_dereference() to access bond struct data. Lightly tested with xfrm bonding, no problems found, should address the syzkaller bug referenced below. Reported-by: s

Re: [PATCH bpf-next V3 0/2] BPF selftests test runner 'test_progs' use proper shell exit codes

2020-07-08 Thread Daniel Borkmann
On 7/7/20 9:12 AM, Jesper Dangaard Brouer wrote: This patchset makes it easier to use test_progs from shell scripts, by using proper shell exit codes. The process's exit status should be a number between 0 and 255 as defined in man exit(3) else it will be masked to comply. Shell exit codes used

Re: [Intel-wired-lan] [net-next, v7 5/5] ice: add switch rule management for DCF

2020-07-08 Thread Nguyen, Anthony L
On Wed, 2020-07-01 at 09:25 +0800, Haiyue Wang wrote: > The PF shall track all the outstanding switch filters (filter IDs to > be > precise) added by the DCF. > > Upon a VF reset event, the PF shall clear all outstanding switch > filters > for the given VF. Upon completion of either VF or PF reset

Re: [PATCH bpf-next] bpf: Fix another bpftool segfault without skeleton code enabled

2020-07-08 Thread Daniel Borkmann
On 7/8/20 1:08 PM, louis.pe...@netronome.com wrote: From: Louis Peens emit_obj_refs_json needs to added the same as with emit_obj_refs_plain to prevent segfaults, similar to Commit "8ae4121bd89e bpf: Fix bpftool without skeleton code enabled"). See the error below: # ./bpftool -p prog

Re: [PATCH net] cxgb4: fix all-mask IP address comparison

2020-07-08 Thread David Miller
From: Rahul Lakkireddy Date: Thu, 9 Jul 2020 03:14:27 +0530 > Convert all-mask IP address to Big Endian, instead, for comparison. > > Fixes: f286dd8eaad5 ("cxgb4: use correct type for all-mask IP address > comparison") > Signed-off-by: Rahul Lakkireddy Applied.

Re: [PATCH net-next 1/2] dt-bindings: dp83867: Fix the type of device

2020-07-08 Thread David Miller
From: Fabio Estevam Date: Wed, 8 Jul 2020 18:24:21 -0300 > DP83867 is an Ethernet PHY, not a charger, so fix the documentation > accordingly. > > Fixes: 74ac28f16486 ("dt-bindings: dp83867: Convert DP83867 to yaml") > Signed-off-by: Fabio Estevam Applied.

Re: [PATCH net-next 2/2] dt-bindings: dp83869: Fix the type of device

2020-07-08 Thread David Miller
From: Fabio Estevam Date: Wed, 8 Jul 2020 18:24:22 -0300 > DP83869 is an Ethernet PHY, not a charger, so fix the documentation > accordingly. > > Fixes: 4d66c56f7efe ("dt-bindings: net: dp83869: Add TI dp83869 phy") > Signed-off-by: Fabio Estevam Applied.

Re: [PATCH v2] tipc: fix retransmission on unicast links

2020-07-08 Thread David Miller
From: Hamish Martin Date: Thu, 9 Jul 2020 09:06:44 +1200 > A scenario has been observed where a 'bc_init' message for a link is not > retransmitted if it fails to be received by the peer. This leads to the > peer never establishing the link fully and it discarding all other data > received on th

Re: [PATCH net-next] bonding: deal with xfrm state in all modes and add more error-checking

2020-07-08 Thread David Miller
From: Jarod Wilson Date: Wed, 8 Jul 2020 13:46:31 -0400 > It's possible that device removal happens when the bond is in non-AB mode, > and addition happens in AB mode, so bond_ipsec_del_sa() never gets called, > which leaves security associations in an odd state if bond_ipsec_add_sa() > then get

Re: [net-next PATCH 0/2 v6] RTL8366RB tagging support

2020-07-08 Thread David Miller
From: Linus Walleij Date: Wed, 8 Jul 2020 14:25:35 +0200 > This patch set adds DSA tagging support to the RTL8366RB > DSA driver. > > There is a minor performance improvement in the tag parser > compared to the previous patch set and the review tags > have been collected. Series applied, thank

Re: [PATCH net-next 4/9] ethtool: add tunnel info interface

2020-07-08 Thread Michal Kubecek
On Tue, Jul 07, 2020 at 02:24:29PM -0700, Jakub Kicinski wrote: > Add an interface to report offloaded UDP ports via ethtool netlink. > > Now that core takes care of tracking which UDP tunnel ports the NICs > are aware of we can quite easily export this information out to > user space. > > The re

Re: [PATCH net-next V2 1/2] ethtool: Add support for 100Gbps per lane link modes

2020-07-08 Thread David Miller
From: Saeed Mahameed Date: Mon, 6 Jul 2020 20:42:32 -0700 > From: Meir Lichtinger > > Define 100G, 200G and 400G link modes using 100Gbps per lane > > LR, ER and FR are defined as a single link mode because they are > using same technology and by design are fully interoperable. > EEPROM conte

Re: [PATCH net-next V2 2/2] net/mlx5: Added support for 100Gbps per lane link modes

2020-07-08 Thread David Miller
From: Saeed Mahameed Date: Mon, 6 Jul 2020 20:42:33 -0700 > From: Meir Lichtinger > > This patch exposes new link modes using 100Gbps per lane, including 100G, > 200G and 400G modes. > > Signed-off-by: Meir Lichtinger > Reviewed-by: Aya Levin > Signed-off-by: Saeed Mahameed Applied.

Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc

2020-07-08 Thread Eric Dumazet
On 7/8/20 9:38 AM, YU, Xiangning wrote: > Lockless Token Bucket (LTB) is a qdisc implementation that controls the > use of outbound bandwidth on a shared link. With the help of lockless > qdisc, and by decoupling rate limiting and bandwidth sharing, LTB is > designed to scale in the cloud data c

Re: [PATCH net] l2tp: remove skb_dst_set() from l2tp_xmit_skb()

2020-07-08 Thread David Miller
From: Xin Long Date: Tue, 7 Jul 2020 02:02:32 +0800 > In the tx path of l2tp, l2tp_xmit_skb() calls skb_dst_set() to set > skb's dst. However, it will eventually call inet6_csk_xmit() or > ip_queue_xmit() where skb's dst will be overwritten by: > >skb_dst_set_noref(skb, dst); > > without r

Re: [PATCH net-next v4 0/9] bnxt_en: Driver update for net-next.

2020-07-08 Thread David Miller
From: Jakub Kicinski Date: Wed, 8 Jul 2020 14:39:39 -0700 > On Wed, 8 Jul 2020 07:53:52 -0400 Michael Chan wrote: >> This patchset implements ethtool -X to setup user-defined RSS indirection >> table. The new infrastructure also allows the proper logical ring index >> to be used to populate the

  1   2   3   4   >