Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-03 Thread Martin Schiller
On 2020-07-30 10:02, Xie He wrote: Hi Martin, I'm currently working on a plan to make all X.25 drivers (lapbether.c, x25_asy.c, hdlc_x25.c) to set dev->hard_header_len / dev->needed_headroom correctly. So that upper layers no longer need to guess how much headroom a X.25 device needs with a co

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-03 Thread Hongbo Wang
> > + if (vlan->proto == ETH_P_8021AD) { > > + ocelot->enable_qinq = true; > > + ocelot_port->qinq_mode = true; > > + } > ... > > + if (vlan->proto == ETH_P_8021AD) { > > + ocelot->enable_qinq = false; > > + ocelot_port->qinq_mode = false

[PATCH net-next v2 2/6] tunnels: PMTU discovery support for directly bridged IP packets

2020-08-03 Thread Stefano Brivio
It's currently possible to bridge Ethernet tunnels carrying IP packets directly to external interfaces without assigning them addresses and routes on the bridged network itself: this is the case for UDP tunnels bridged with a standard bridge or by Open vSwitch. PMTU discovery is currently broken w

Re: [PATCH net-next 1/6] ipv4: route: Ignore output interface in FIB lookup for PMTU route

2020-08-03 Thread Stefano Brivio
On Mon, 3 Aug 2020 17:30:46 -0600 David Ahern wrote: > On 8/3/20 2:52 PM, Stefano Brivio wrote: > > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > > index a01efa062f6b..c14fd8124f57 100644 > > --- a/net/ipv4/route.c > > +++ b/net/ipv4/route.c > > @@ -1050,6 +1050,7 @@ static void ip_rt_update

[PATCH net-next v2 3/6] vxlan: Support for PMTU discovery on directly bridged links

2020-08-03 Thread Stefano Brivio
If the interface is a bridge or Open vSwitch port, and we can't forward a packet because it exceeds the local PMTU estimate, trigger an ICMP or ICMPv6 reply to the sender, using the same interface to forward it back. If metadata collection is enabled, reverse destination and source addresses, so t

[PATCH net-next v2 0/6] Support PMTU discovery with bridged UDP tunnels

2020-08-03 Thread Stefano Brivio
Currently, PMTU discovery for UDP tunnels only works if packets are routed to the encapsulating interfaces, not bridged. This results from the fact that we generally don't have valid routes to the senders we can use to relay ICMP and ICMPv6 errors, and makes PMTU discovery completely non-functiona

[PATCH net-next v2 4/6] geneve: Support for PMTU discovery on directly bridged links

2020-08-03 Thread Stefano Brivio
If the interface is a bridge or Open vSwitch port, and we can't forward a packet because it exceeds the local PMTU estimate, trigger an ICMP or ICMPv6 reply to the sender, using the same interface to forward it back. If metadata collection is enabled, set destination and source addresses for the f

Re: [PATCH net-next 3/6] vxlan: Support for PMTU discovery on directly bridged links

2020-08-03 Thread Stefano Brivio
On Mon, 3 Aug 2020 17:48:48 -0600 David Ahern wrote: > On 8/3/20 2:52 PM, Stefano Brivio wrote: > > + err = skb_tunnel_check_pmtu(skb, ndst, VXLAN_HEADROOM, > > + netif_is_bridge_port(dev) || > > + netif_is_ovs_

[PATCH net-next v2 6/6] selftests: pmtu.sh: Add tests for UDP tunnels handled by Open vSwitch

2020-08-03 Thread Stefano Brivio
The new tests check that IP and IPv6 packets exceeding the local PMTU estimate, forwarded by an Open vSwitch instance from another node, result in the correct route exceptions being created, and that communication with end-to-end fragmentation, over GENEVE and VXLAN Open vSwitch ports, is now possi

[PATCH net-next v2 5/6] selftests: pmtu.sh: Add tests for bridged UDP tunnels

2020-08-03 Thread Stefano Brivio
The new tests check that IP and IPv6 packets exceeding the local PMTU estimate, both locally generated and forwarded by a bridge from another node, result in the correct route exceptions being created, and that communication with end-to-end fragmentation over VXLAN and GENEVE tunnels is now possibl

[PATCH net-next v2 1/6] ipv4: route: Ignore output interface in FIB lookup for PMTU route

2020-08-03 Thread Stefano Brivio
Currently, processes sending traffic to a local bridge with an encapsulation device as a port don't get ICMP errors if they exceed the PMTU of the encapsulated link. David Ahern suggested this as a hack, but it actually looks like the correct solution: when we update the PMTU for a given destinati

Re: [PATCH net-next 2/6] tunnels: PMTU discovery support for directly bridged IP packets

2020-08-03 Thread Stefano Brivio
On Mon, 3 Aug 2020 17:44:16 -0600 David Ahern wrote: > On 8/3/20 2:52 PM, Stefano Brivio wrote: > > @@ -461,6 +464,91 @@ static inline void iptunnel_xmit_stats(struct > > net_device *dev, int pkt_len) > > [...] > > > > +static inline int skb_tunnel_check_pmtu(struct sk_buff *skb, > > +

Re: [PATCH net-next] ip_vti: Fix unused variable warning

2020-08-03 Thread Steffen Klassert
On Mon, Aug 03, 2020 at 03:13:49PM -0700, David Miller wrote: > From: YueHaibing > Date: Fri, 31 Jul 2020 14:49:52 +0800 > > > If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, > > > > net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used > > [-Wunused-variable] > >

Re: KASAN: use-after-free Read in hci_send_acl

2020-08-03 Thread syzbot
syzbot has bisected this issue to: commit 4ffcd582301bd020b1f9d00c55473af305ec19b5 Author: Michael Chan Date: Mon Sep 19 07:58:07 2016 + bnxt_en: Pad TX packets below 52 bytes. bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=167b0f0490 start commit: ac3a0c84 Merge g

RE: [PATCH 2/2] net: phy: Associate device node with fixed PHY

2020-08-03 Thread Madalin Bucur (OSS)
> -Original Message- > From: Russell King - ARM Linux admin > Sent: 03 August 2020 19:54 > To: Madalin Bucur (OSS) > Cc: Andrew Lunn ; Vikas Singh > ; f.faine...@gmail.com; hkallwe...@gmail.com; > netdev@vger.kernel.org; Calvin Johnson (OSS) ; > kuldip dwivedi ; Vikas Singh > > Subject:

[vhost:vhost 42/49] drivers/rpmsg/virtio_rpmsg_bus.c:28:10: fatal error: 'linux/virtio_rpmsg.h' file not found

2020-08-03 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: dc7b1c0685d566bdd756b8a8f05ad45d28659c01 commit: bba6f4f52c31af1ce4ebcc063afa08eb063b3d2c [42/49] rpmsg: move common structures and defines to headers config: mips-randconfig-r014-20200803 (attached as .config

Re: pull-request: wireless-drivers-next-2020-08-02

2020-08-03 Thread Kalle Valo
David Miller writes: > From: Kalle Valo > Date: Sun, 2 Aug 2020 19:01:36 + (UTC) > >> here's a pull request to net-next tree, more info below. Please let me know >> if >> there are any problems. > > There are many several non-trivial mt76 conflicts, can you please sort > this out and send

[PATCH V2] via-velocity: Use more typical logging styles

2020-08-03 Thread Joe Perches
Use netdev_ in place of VELOCITY_PRT. Use pr_ in place of printk(KERN_. Miscellanea: o Add pr_fmt to prefix pr_ output with "via-velocity: " o Remove now unused functions and macros o Realign some logging lines o Remove devname where pr_ is also used Signed-off-by: Joe Perches --- OK, here...

[net-next:master 152/154] net/core/fib_rules.c:26:7: sparse: sparse: undefined preprocessor identifier 'CONFIG_IP_MULTIPLE_TABLES'

2020-08-03 Thread kernel test robot
:: commit date: 2 days ago config: s390-randconfig-s032-20200803 (attached as .config) compiler: s390-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install

Re: [PATCH net-next 0/5] net: dsa: loop: Preparatory changes for

2020-08-03 Thread Florian Fainelli
On 8/3/2020 6:20 PM, David Miller wrote: > From: Florian Fainelli > Date: Mon, 3 Aug 2020 13:03:49 -0700 > >> These patches are all meant to help pave the way for a 802.1Q data path >> added to the mockup driver, making it more useful than just testing for >> configuration. Sending those out

[PATCH net-next v4 0/2] hinic: mailbox channel enhancement

2020-08-03 Thread Luo bin
add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. Luo bin (2): hinic: add generating mailbox random index support hinic: add check for mailbox msg from VF .../

[PATCH net-next v4 2/2] hinic: add check for mailbox msg from VF

2020-08-03 Thread Luo bin
PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin --- V1~V2: - fix W=1 C=1 warnings .../net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 8 + .../net/ethernet/huawei/hinic/hinic_hw_mbox.c | 173 +- .../net/

[PATCH net-next v4 1/2] hinic: add generating mailbox random index support

2020-08-03 Thread Luo bin
add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin --- v3~V4: - take hinic_glb_pf_vf_offset() out of the for loop V2~V3: - use get_random_u32() instead of get_random_bytes() - remove unnecessary cast - remov

Re: [PATCH] net: vmxnet3: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread Jia-Ju Bai
On 2020/8/4 6:59, David Miller wrote: From: Jia-Ju Bai Date: Sun, 2 Aug 2020 21:11:07 +0800 In vmxnet3_probe_device(), "adapter" is mapped to streaming DMA: adapter->adapter_pa = dma_map_single(..., adapter, ...); Then "adapter" is accessed at many places in this function. Theses acce

Re: [PATCH net-next v3 1/2] hinic: add generating mailbox random index support

2020-08-03 Thread luobin (L)
On 2020/8/4 6:05, Jakub Kicinski wrote: > On Sat, 1 Aug 2020 10:49:34 +0800 Luo bin wrote: >> add support to generate mailbox random id of VF to ensure that >> mailbox messages PF received are from the correct VF. >> >> Signed-off-by: Luo bin >> --- >> V2~V3 fix review opinions pointed out by Jaku

net-next is CLOSED

2020-08-03 Thread David Miller
Bug fixes only now, thank you.

Re: pull-request: bpf-next 2020-08-04

2020-08-03 Thread David Miller
From: Daniel Borkmann Date: Tue, 4 Aug 2020 01:56:40 +0200 > The following pull-request contains BPF updates for your *net-next* tree. Pulled, there was a minor conflict in net/core/dev.c please double check my work. Thank you!

Re: [PATCH v3 net-next 11/11] sfc_ef100: add nic-type for VFs, and bind to them

2020-08-03 Thread kernel test robot
bd0b33b24897ba9ddad221e8ac5b6f0e38a2e004 config: x86_64-randconfig-a015-20200803 (attached as .config) compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add

[PATCHv2 net 2/2] vxlan: fix getting tos value from DSCP field

2020-08-03 Thread Hangbin Liu
In commit 71130f29979c ("vxlan: fix tos value before xmit") we strict the vxlan tos value before xmit. But as IP tos field has been obsoleted by RFC2474, and updated by RFC3168 later. We should use new DSCP field, or we will lost the first 3 bits value when xmit. Fixes: 71130f29979c ("vxlan: fix t

[PATCHv2 net 1/2] net: add IP_DSCP_MASK

2020-08-03 Thread Hangbin Liu
In RFC1349 it defined TOS field like 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | PRECEDENCE| TOS | MBZ | +-+-+-+-+-+-+-+-+ But this has been obsoleted by RFC2474, and upd

[PATCHv2 net 0/2] Add IP_DSCP_MASK and fix vxlan tos value before xmit

2020-08-03 Thread Hangbin Liu
This patch set is aim to update the old IP_TOS_MASK to new IP_DSCP_MASK as tos value has been obsoleted for a long time. But to make sure we don't break any existing behaviour, we can't just replease all IP_TOS_MASK to new IP_DSCP_MASK. So let's update it case by case. The first issue we will fix

Re: [PATCH v3 net-next 11/11] sfc_ef100: add nic-type for VFs, and bind to them

2020-08-03 Thread David Miller
From: kernel test robot Date: Tue, 4 Aug 2020 09:16:30 +0800 >drivers/net/ethernet/sfc/ef100_nic.c:835:3: error: 'const struct > efx_nic_type' has no member named 'filter_rfs_expire_one' > 835 | .filter_rfs_expire_one = efx_mcdi_filter_rfs_expire_one, > | ^~~

RE: [RFC PATCH v4 bpf-next 05/12] bpf: tcp: Add bpf_skops_established()

2020-08-03 Thread John Fastabend
Martin KaFai Lau wrote: > In tcp_init_transfer(), it currently calls the bpf prog to give it a > chance to handle the just "ESTABLISHED" event (e.g. do setsockopt > on the newly established sk). Right now, it is done by calling the > general purpose tcp_call_bpf(). > > In the later patch, it also

Re: [PATCH net-next 0/6] Support PMTU discovery with bridged UDP tunnels

2020-08-03 Thread David Miller
From: Stefano Brivio Date: Mon, 3 Aug 2020 22:52:08 +0200 > Currently, PMTU discovery for UDP tunnels only works if packets are > routed to the encapsulating interfaces, not bridged. > > This results from the fact that we generally don't have valid routes > to the senders we can use to relay IC

Re: [pull request][net-next 0/5] Mellanox, mlx5 updates 2020-08-03

2020-08-03 Thread David Miller
From: Saeed Mahameed Date: Mon, 3 Aug 2020 13:41:46 -0700 > This patchset adds misc updates to mlx5. > > Please note there is one non-mlx5 patch from Jakub that adds support > for static vxlan port configuration in udp tunnel infrastructure. > > For more information please see tag log below. >

Re: [PATCH v3 net-next 00/11] sfc: driver for EF100 family NICs, part 2

2020-08-03 Thread David Miller
From: Jakub Kicinski Date: Mon, 3 Aug 2020 15:26:57 -0700 > On Mon, 3 Aug 2020 21:30:32 +0100 Edward Cree wrote: >> This series implements the data path and various other functionality >> for Xilinx/Solarflare EF100 NICs. >> >> Changed from v2: >> * Improved error handling of design params (pa

Re: [PATCH net-next 2/2] enetc: use napi_schedule to be compatible with PREEMPT_RT

2020-08-03 Thread David Miller
From: Vladimir Oltean Date: Mon, 3 Aug 2020 23:10:09 +0300 > From: Jiafei Pan > > The driver calls napi_schedule_irqoff() from a context where, in RT, > hardirqs are not disabled, since the IRQ handler is force-threaded. > > In the call path of this function, __raise_softirq_irqoff() is modif

Re: [PATCH net-next 1/2] dpaa2-eth: use napi_schedule to be compatible with PREEMPT_RT

2020-08-03 Thread David Miller
From: Vladimir Oltean Date: Mon, 3 Aug 2020 23:10:08 +0300 > From: Jiafei Pan > > The driver calls napi_schedule_irqoff() from a context where, in RT, > hardirqs are not disabled, since the IRQ handler is force-threaded. > > In the call path of this function, __raise_softirq_irqoff() is modif

Re: [PATCH net-next 0/5] net: dsa: loop: Preparatory changes for

2020-08-03 Thread David Miller
From: Florian Fainelli Date: Mon, 3 Aug 2020 13:03:49 -0700 > These patches are all meant to help pave the way for a 802.1Q data path > added to the mockup driver, making it more useful than just testing for > configuration. Sending those out now since there is no real need to > wait. Series ap

Re: [PATCH bpf-next 2/5] libbpf: support BPF_PROG_TYPE_USER programs

2020-08-03 Thread Song Liu
> On Aug 2, 2020, at 6:40 PM, Andrii Nakryiko wrote: > > On Sat, Aug 1, 2020 at 1:50 AM Song Liu wrote: >> [...] > >> }; >> >> LIBBPF_API int bpf_prog_test_run_xattr(struct bpf_prog_test_run_attr >> *test_attr); >> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c >> index b9

Re: [PATCH net-next] ptp: only allow phase values lower than 1 period

2020-08-03 Thread David Miller
From: Vladimir Oltean Date: Mon, 3 Aug 2020 22:49:21 +0300 > The way we define the phase (the difference between the time of the > signal's rising edge, and the closest integer multiple of the period), > it doesn't make sense to have a phase value larger than 1 period. > > So deny these setting

Re: [PATCH net-next] cxgb4: add TC-MATCHALL IPv6 support

2020-08-03 Thread David Miller
From: Rahul Lakkireddy Date: Tue, 4 Aug 2020 00:00:08 +0530 > Matching IPv6 traffic require allocating their own individual slots > in TCAM. So, fetch additional slots to insert IPv6 rules. Also, fetch > the cumulative stats of all the slots occupied by the Matchall rule. > > Signed-off-by: Rah

Re: [PATCH net-next] net: dsa: sja1105: poll for extts events from a timer

2020-08-03 Thread David Miller
From: Vladimir Oltean Date: Mon, 3 Aug 2020 20:51:58 +0300 > The current poll interval is enough to ensure that rising and falling > edge events are not lost for a 1 PPS signal with 50% duty cycle. > > But when we deliver the events to user space, it will try to infer if > they were correspondi

Re: [PATCH net] mptcp: fix bogus sendmsg() return code under pressure

2020-08-03 Thread David Miller
From: Paolo Abeni Date: Mon, 3 Aug 2020 18:40:39 +0200 > In case of memory pressure, mptcp_sendmsg() may call > sk_stream_wait_memory() after succesfully xmitting some > bytes. If the latter fails we currently return to the > user-space the error code, ignoring the succeful xmit. > > Address th

RE: [RFC PATCH v4 bpf-next 04/12] tcp: Add saw_unknown to struct tcp_options_received

2020-08-03 Thread John Fastabend
Martin KaFai Lau wrote: > In a later patch, the bpf prog only wants to be called to handle > a header option if that particular header option cannot be handled by > the kernel. This unknown option could be written by the peer's bpf-prog. > It could also be a new standard option that the running ke

Re: [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps

2020-08-03 Thread David Miller
From: Ido Schimmel Date: Mon, 3 Aug 2020 19:11:32 +0300 > From: Ido Schimmel > > Petr says: > > A recent patch set added the ability to mirror buffer related drops > (e.g., early drops) through a netdev. This patch set adds the ability to > trap such packets to the local CPU for analysis. >

Re: [PATCH net-next] mptcp: use mptcp_for_each_subflow in mptcp_stream_accept

2020-08-03 Thread David Miller
From: Geliang Tang Date: Mon, 3 Aug 2020 21:00:44 +0800 > Use mptcp_for_each_subflow in mptcp_stream_accept instead of > open-coding. > > Signed-off-by: Geliang Tang Applied, thank you.

Re: [PATCH net-next] fib: Fix undef compile warning

2020-08-03 Thread David Miller
From: YueHaibing Date: Mon, 3 Aug 2020 21:19:48 +0800 > net/core/fib_rules.c:26:7: warning: "CONFIG_IP_MULTIPLE_TABLES" is not > defined, evaluates to 0 [-Wundef] > #elif CONFIG_IP_MULTIPLE_TABLES >^ > > Fixes: 8b66a6fd34f5 ("fib: fix another fib_rules_ops indir

RE: [RFC PATCH v4 bpf-next 03/12] tcp: bpf: Add TCP_BPF_RTO_MIN for bpf_setsockopt

2020-08-03 Thread John Fastabend
Martin KaFai Lau wrote: > This patch adds bpf_setsockopt(TCP_BPF_RTO_MIN) to allow bpf prog > to set the min rto of a connection. It could be used together > with the earlier patch which has added bpf_setsockopt(TCP_BPF_DELACK_MAX). > > A later selftest patch will communicate the max delay ack in

Re: pull-request: mac80211-next 2020-08-03

2020-08-03 Thread David Miller
From: Johannes Berg Date: Mon, 3 Aug 2020 14:15:55 +0200 > Not sure you'll still take a few stragglers, but if you're > going to make a last pass then having a few more things in > would be nice. One (the while -> if) is something I'd even > send as a bugfix later, the rest are just nice to have

Re: [PATCH net-next] net: stmmac: fix failed to suspend if phy based WOL is enabled

2020-08-03 Thread David Miller
From: Jisheng Zhang Date: Mon, 3 Aug 2020 16:56:47 +0800 > With the latest net-next tree, if test suspend/resume after enabling > WOL, we get error as below: > > [ 487.086365] dpm_run_callback(): mdio_bus_suspend+0x0/0x30 returns -16 > [ 487.086375] PM: Device stmmac-0:00 failed to suspend: er

Re: [PATCH] via-velocity: Add missing KERN_ where needed

2020-08-03 Thread Joe Perches
On Mon, 2020-08-03 at 15:42 -0700, David Miller wrote: > From: Joe Perches > Date: Sat, 01 Aug 2020 08:51:03 -0700 > > > Link status is emitted on multiple lines as it does not use > > KERN_CONT. > > > > Coalesce the multi-part logging into a single line output and > > add missing KERN_ to a cou

Re: [PATCH v3] seg6_iptunnel: Refactor seg6_lwt_headroom out of uapi header

2020-08-03 Thread David Miller
From: Ioana-Ruxandra Stancioi Date: Mon, 3 Aug 2020 07:33:33 + > From: Ioana-Ruxandra Stăncioi > > Refactor the function seg6_lwt_headroom out of the seg6_iptunnel.h uapi > header, because it is only used in seg6_iptunnel.c. Moreover, it is only > used in the kernel code, as indicated by t

RE: [RFC PATCH v4 bpf-next 02/12] tcp: bpf: Add TCP_BPF_DELACK_MAX setsockopt

2020-08-03 Thread John Fastabend
Martin KaFai Lau wrote: > This change is mostly from an internal patch and adapts it from sysctl > config to the bpf_setsockopt setup. > > The bpf_prog can set the max delay ack by using > bpf_setsockopt(TCP_BPF_DELACK_MAX). This max delay ack can be communicated > to its peer through bpf header

Re: [PATCH net-next] tcp: apply a floor of 1 for RTT samples from TCP timestamps

2020-08-03 Thread David Miller
From: Jianfeng Wang Date: Thu, 30 Jul 2020 23:49:16 + > For retransmitted packets, TCP needs to resort to using TCP timestamps > for computing RTT samples. In the common case where the data and ACK > fall in the same 1-millisecond interval, TCP senders with millisecond- > granularity TCP time

RE: [RFC PATCH v4 bpf-next 01/12] tcp: Use a struct to represent a saved_syn

2020-08-03 Thread John Fastabend
Martin KaFai Lau wrote: > The TCP_SAVE_SYN has both the network header and tcp header. > The total length of the saved syn packet is currently stored in > the first 4 bytes (u32) of an array and the actual packet data is > stored after that. > > A later patch will add a bpf helper that allows to g

RE: [PATCH bpf-next v3 2/2] tools/bpf: support new uapi for map element bpf iterator

2020-08-03 Thread John Fastabend
Yonghong Song wrote: > Previous commit adjusted kernel uapi for map > element bpf iterator. This patch adjusted libbpf API > due to uapi change. bpftool and bpf_iter selftests > are also changed accordingly. > > Signed-off-by: Yonghong Song > --- Acked-by: John Fastabend

RE: [PATCH bpf-next v3 1/2] bpf: change uapi for bpf iterator map elements

2020-08-03 Thread John Fastabend
Yonghong Song wrote: > Commit a5cbe05a6673 ("bpf: Implement bpf iterator for > map elements") added bpf iterator support for > map elements. The map element bpf iterator requires > info to identify a particular map. In the above > commit, the attr->link_create.target_fd is used > to carry map_fd an

Re: [PATCH ethtool 2/7] cable_test: clean up unused parameters

2020-08-03 Thread Andrew Lunn
On Mon, Aug 03, 2020 at 01:57:09PM +0200, Michal Kubecek wrote: > Functions nl_cable_test_ntf_attr() and nl_cable_test_tdr_ntf_attr() do not > use nlctx parameter and as they are not callbacks with fixed signature, we > can simply drop it. Once we do, the same is true for cable_test_ntf_nest() > an

pull-request: bpf-next 2020-08-04

2020-08-03 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. We've added 73 non-merge commits during the last 9 day(s) which contain a total of 135 files changed, 4603 insertions(+), 1013 deletions(-). The main changes are: 1) Implement bpf_link support for XDP. Also add

Re: [iproute2-next v2 5/5] devlink: support setting the overwrite mask

2020-08-03 Thread David Ahern
On 8/3/20 5:30 PM, Jacob Keller wrote: > > Slightly unrelated: but the recent change to using a bitfield32 results > in a "GENMASK is undefined".. I'm not sure what the proper way to fix > this is, since we'd like to still use GENMASK to define the supported > bitfields. I guess we need to pull in

Re: [PATCH net-next 3/6] vxlan: Support for PMTU discovery on directly bridged links

2020-08-03 Thread David Ahern
On 8/3/20 2:52 PM, Stefano Brivio wrote: > + err = skb_tunnel_check_pmtu(skb, ndst, VXLAN_HEADROOM, > + netif_is_bridge_port(dev) || > + netif_is_ovs_port(dev)); you have this check in a few places. Maybe a

Re: [PATCH net-next 0/6] Support PMTU discovery with bridged UDP tunnels

2020-08-03 Thread David Ahern
On 8/3/20 5:28 PM, Florian Westphal wrote: > Stefano Brivio wrote: >> Currently, PMTU discovery for UDP tunnels only works if packets are >> routed to the encapsulating interfaces, not bridged. >> >> This results from the fact that we generally don't have valid routes >> to the senders we can use

Re: [PATCH net-next 2/6] tunnels: PMTU discovery support for directly bridged IP packets

2020-08-03 Thread David Ahern
On 8/3/20 2:52 PM, Stefano Brivio wrote: > @@ -461,6 +464,91 @@ static inline void iptunnel_xmit_stats(struct net_device > *dev, int pkt_len) > } > } > > +/** > + * skb_tunnel_check_pmtu() - Check, update PMTU and trigger ICMP reply as > needed > + * @skb: Buffer being sent by encaps

Re: [iproute2-next v2 5/5] devlink: support setting the overwrite mask

2020-08-03 Thread Jacob Keller
On 8/3/2020 8:53 AM, David Ahern wrote: > On 7/31/20 6:21 PM, Jacob Keller wrote: >> Add support for specifying the overwrite sections to allow in the flash >> update command. This is done by adding a new "overwrite" option which >> can take either "settings" or "identifiers" passing the overwri

Re: [PATCH net-next 1/6] ipv4: route: Ignore output interface in FIB lookup for PMTU route

2020-08-03 Thread David Ahern
On 8/3/20 2:52 PM, Stefano Brivio wrote: > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > index a01efa062f6b..c14fd8124f57 100644 > --- a/net/ipv4/route.c > +++ b/net/ipv4/route.c > @@ -1050,6 +1050,7 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, > struct sock *sk, > struct flo

Re: [PATCH net-next 0/6] Support PMTU discovery with bridged UDP tunnels

2020-08-03 Thread Florian Westphal
Stefano Brivio wrote: > Currently, PMTU discovery for UDP tunnels only works if packets are > routed to the encapsulating interfaces, not bridged. > > This results from the fact that we generally don't have valid routes > to the senders we can use to relay ICMP and ICMPv6 errors, and makes > PMTU

Re: [PATCH net-next] tipc: Use is_broadcast_ether_addr() instead of memcmp()

2020-08-03 Thread David Miller
From: Huang Guobin Date: Sun, 2 Aug 2020 22:00:55 -0400 > Using is_broadcast_ether_addr() instead of directly use > memcmp() to determine if the ethernet address is broadcast > address. > > spatch with a semantic match is used to found this problem. > (http://coccinelle.lip6.fr/) > > Signed-off

Re: [PATCH net v3 0/5] DPAA FMan driver fixes

2020-08-03 Thread David Miller
From: Florinel Iordache Date: Mon, 3 Aug 2020 10:07:29 +0300 > Here are several fixes for the DPAA FMan driver. > > v2 changes: > * corrected patch 4 by removing the line added by mistake > * used longer fixes tags with the first 12 characters of the SHA-1 ID > > v3 changes: > * remove the emp

Re: pull-request: wireless-drivers-next-2020-08-02

2020-08-03 Thread David Miller
From: Kalle Valo Date: Sun, 2 Aug 2020 19:01:36 + (UTC) > here's a pull request to net-next tree, more info below. Please let me know if > there are any problems. There are many several non-trivial mt76 conflicts, can you please sort this out and send me another pull request? Thank you.

[RFC PATCH v4 bpf-next 11/12] bpf: selftests: tcp header options

2020-08-03 Thread Martin KaFai Lau
This patch adds tests for the new bpf tcp header option feature. test_tcp_hdr_options.c: - It tests header option writing and parsing in 3WHS, normal regular connection establishment, fastopen, and syncookie. - In syncookie, the passive side's bpf prog is asking the active side to resend its b

[RFC PATCH v4 bpf-next 09/12] bpf: tcp: Allow bpf prog to write and parse TCP header option

2020-08-03 Thread Martin KaFai Lau
[ Note: The TCP changes here is mainly to implement the bpf pieces into the bpf_skops_*() functions introduced in the earlier patches. ] The earlier effort in BPF-TCP-CC allows the TCP Congestion Control algorithm to be written in BPF. It opens up opportunities to allow a faster turnaround ti

[RFC PATCH v4 bpf-next 07/12] bpf: tcp: Add bpf_skops_hdr_opt_len() and bpf_skops_write_hdr_opt()

2020-08-03 Thread Martin KaFai Lau
The bpf prog needs to parse the SYN header to learn what options have been sent by the peer's bpf-prog before writing its options into SYNACK. This patch adds a "syn_skb" arg to tcp_make_synack() and send_synack(). This syn_skb will eventually be made available (as read-only) to the bpf prog. When

[RFC PATCH v4 bpf-next 10/12] bpf: selftests: Add fastopen_connect to network_helpers

2020-08-03 Thread Martin KaFai Lau
This patch adds a fastopen_connect() helper which will be used in a later test. Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/network_helpers.c | 37 +++ tools/testing/selftests/bpf/network_helpers.h | 2 + 2 files changed, 39 insertions(+) diff --git a/tools/

[RFC PATCH v4 bpf-next 12/12] tcp: bpf: Optionally store mac header in TCP_SAVE_SYN

2020-08-03 Thread Martin KaFai Lau
This patch is adapted from Eric's patch in an earlier discussion [1]. The TCP_SAVE_SYN currently only stores the network header and tcp header. This patch allows it to optionally store the mac header also if the setsockopt's optval is 2. It requires one more bit for the "save_syn" bit field in t

[RFC PATCH v4 bpf-next 08/12] bpf: sock_ops: Change some members of sock_ops_kern from u32 to u8

2020-08-03 Thread Martin KaFai Lau
A later patch needs to add a few pointers and a few u8 to sock_ops_kern. Hence, this patch saves some spaces by moving some of the existing members from u32 to u8 so that the later patch can still fit everything in a cacheline. Signed-off-by: Martin KaFai Lau --- include/linux/filter.h | 4 ++-

[RFC PATCH v4 bpf-next 05/12] bpf: tcp: Add bpf_skops_established()

2020-08-03 Thread Martin KaFai Lau
In tcp_init_transfer(), it currently calls the bpf prog to give it a chance to handle the just "ESTABLISHED" event (e.g. do setsockopt on the newly established sk). Right now, it is done by calling the general purpose tcp_call_bpf(). In the later patch, it also needs to pass the just-received skb

[RFC PATCH v4 bpf-next 04/12] tcp: Add saw_unknown to struct tcp_options_received

2020-08-03 Thread Martin KaFai Lau
In a later patch, the bpf prog only wants to be called to handle a header option if that particular header option cannot be handled by the kernel. This unknown option could be written by the peer's bpf-prog. It could also be a new standard option that the running kernel does not support it while a

[RFC PATCH v4 bpf-next 01/12] tcp: Use a struct to represent a saved_syn

2020-08-03 Thread Martin KaFai Lau
The TCP_SAVE_SYN has both the network header and tcp header. The total length of the saved syn packet is currently stored in the first 4 bytes (u32) of an array and the actual packet data is stored after that. A later patch will add a bpf helper that allows to get the tcp header alone from the sav

[RFC PATCH v4 bpf-next 06/12] bpf: tcp: Add bpf_skops_parse_hdr()

2020-08-03 Thread Martin KaFai Lau
The patch adds a function bpf_skops_parse_hdr(). It will call the bpf prog to parse the TCP header received at a tcp_sock that has at least reached the ESTABLISHED state. For the packets received during the 3WHS (SYN, SYNACK and ACK), the received skb will be available to the bpf prog during the c

[RFC PATCH v4 bpf-next 02/12] tcp: bpf: Add TCP_BPF_DELACK_MAX setsockopt

2020-08-03 Thread Martin KaFai Lau
This change is mostly from an internal patch and adapts it from sysctl config to the bpf_setsockopt setup. The bpf_prog can set the max delay ack by using bpf_setsockopt(TCP_BPF_DELACK_MAX). This max delay ack can be communicated to its peer through bpf header option. The receiving peer can then

Re: [PATCH bpf-next v3 0/2] bpf: change uapi for bpf iterator map elements

2020-08-03 Thread Andrii Nakryiko
On Mon, Aug 3, 2020 at 3:44 PM Yonghong Song wrote: > > Andrii raised a concern that current uapi for bpf iterator map > element is a little restrictive and not suitable for future potential > complex customization. This is a valid suggestion, considering people > may indeed add more complex custi

[RFC PATCH v4 bpf-next 03/12] tcp: bpf: Add TCP_BPF_RTO_MIN for bpf_setsockopt

2020-08-03 Thread Martin KaFai Lau
This patch adds bpf_setsockopt(TCP_BPF_RTO_MIN) to allow bpf prog to set the min rto of a connection. It could be used together with the earlier patch which has added bpf_setsockopt(TCP_BPF_DELACK_MAX). A later selftest patch will communicate the max delay ack in a bpf tcp header option and then

[RFC PATCH v4 bpf-next 00/12] BPF TCP header options

2020-08-03 Thread Martin KaFai Lau
The earlier effort in BPF-TCP-CC allows the TCP Congestion Control algorithm to be written in BPF. It opens up opportunities to allow a faster turnaround time in testing/releasing new congestion control ideas to production environment. The same flexibility can be extended to writing TCP header op

Re: [net-next v2 2/5] devlink: introduce flash update overwrite mask

2020-08-03 Thread Jacob Keller
On 8/3/2020 8:38 AM, Jiri Pirko wrote: > Sat, Aug 01, 2020 at 02:21:56AM CEST, jacob.e.kel...@intel.com wrote: > > [...] > >> +nla_mask = info->attrs[DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK]; >> +if (nla_mask) { >> +if (!(supported_params & >> DEVLINK_SUPPORT_FLASH_UPDATE

Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get()

2020-08-03 Thread Jason Gunthorpe
On Sun, Aug 02, 2020 at 03:45:40PM -0700, Joe Perches wrote: > On Sun, 2020-08-02 at 19:28 -0300, Jason Gunthorpe wrote: > > On Sun, Aug 02, 2020 at 03:23:58PM -0700, Joe Perches wrote: > > > On Sun, 2020-08-02 at 19:10 -0300, Jason Gunthorpe wrote: > > > > On Sat, Aug 01, 2020 at 08:38:33AM +0300,

Re: [PATCH 0/7] Netfilter updates for net-next

2020-08-03 Thread David Miller
From: Pablo Neira Ayuso Date: Sun, 2 Aug 2020 20:31:41 +0200 > 1) UAF in chain binding support from previous batch, from Dan Carpenter. > > 2) Queue up delayed work to expire connections with no destination, >from Andrew Sy Kim. > > 3) Use fallthrough pseudo-keyword, from Gustavo A. R. Sil

Re: [PATCH] net: sgi: ioc3-eth: Fix the size used in some 'dma_free_coherent()' calls

2020-08-03 Thread David Miller
From: Christophe JAILLET Date: Sun, 2 Aug 2020 15:52:04 +0200 > Update the size used in 'dma_free_coherent()' in order to match the one > used in the corresponding 'dma_alloc_coherent()'. > > Fixes: 369a782af0f1 ("net: sgi: ioc3-eth: ensure tx ring is 16k aligned.") > Signed-off-by: Christophe

Re: [PATCH 2/2] net: spider_net: Remove a useless memset

2020-08-03 Thread David Miller
From: Christophe JAILLET Date: Sun, 2 Aug 2020 15:53:48 +0200 > Avoid a memset after a call to 'dma_alloc_coherent()'. > This is useless since > commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH 1/2] net: spider_net: Fix the size used in a 'dma_free_coherent()' call

2020-08-03 Thread David Miller
From: Christophe JAILLET Date: Sun, 2 Aug 2020 15:53:33 +0200 > Update the size used in 'dma_free_coherent()' in order to match the one > used in the corresponding 'dma_alloc_coherent()', in > 'spider_net_init_chain()'. > > Fixes: d4ed8f8d1fb7 ("Spidernet DMA coalescing") > Signed-off-by: Chris

Re: [PATCH] net: vmxnet3: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 21:11:07 +0800 > In vmxnet3_probe_device(), "adapter" is mapped to streaming DMA: > adapter->adapter_pa = dma_map_single(..., adapter, ...); > > Then "adapter" is accessed at many places in this function. > > Theses accesses may cause data inconsistency

Re: [PATCH] liquidio: Fix wrong return value in cn23xx_get_pf_num()

2020-08-03 Thread David Miller
From: Tianjia Zhang Date: Sun, 2 Aug 2020 19:15:44 +0800 > On an error exit path, a negative error code should be returned > instead of a positive return value. > > Fixes: 0c45d7fe12c7e ("liquidio: fix use of pf in pass-through mode in a > virtual machine") > Cc: Rick Farrington > Signed-off-

Re: [PATCH net v2] net: bridge: clear skb private space on bridge dev xmit

2020-08-03 Thread David Miller
From: Nikolay Aleksandrov Date: Sun, 2 Aug 2020 15:50:39 +0300 > We need to clear all of the bridge private skb variables as they can be > stale due to the packet having skb->cb initialized earlier and then > transmitted through the bridge device. Similar memset is already done on > bridge's inp

Re: [PATCH] net/enetc: Fix wrong return value in enetc_psfp_parse_clsflower()

2020-08-03 Thread David Miller
From: Tianjia Zhang Date: Sun, 2 Aug 2020 19:15:38 +0800 > In the case of invalid rule, a positive value EINVAL is returned here. > I think this is a typo error. It is necessary to return an error value. > > Cc: Po Liu > Signed-off-by: Tianjia Zhang Applied.

Re: [PATCH] net: ethernet: aquantia: Fix wrong return value

2020-08-03 Thread David Miller
From: Tianjia Zhang Date: Sun, 2 Aug 2020 19:15:37 +0800 > In function hw_atl_a0_hw_multicast_list_set(), when an invalid > request is encountered, a negative error code should be returned. > > Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific > functions") > Cc: Davi

Re: [PATCH] atm: eni: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 17:16:11 +0800 > In do_tx(), skb->data is mapped to streaming DMA on line : > paddr = dma_map_single(...,skb->data,DMA_TO_DEVICE); > > Then skb->data is accessed on line 1153: > (skb->data[3] & 0xf) > > This access may cause data inconsistency bet

Re: [PATCH] atm: idt77252: avoid accessing the data mapped to streaming DMA

2020-08-03 Thread David Miller
From: Jia-Ju Bai Date: Sun, 2 Aug 2020 17:33:40 +0800 > In queue_skb(), skb->data is mapped to streaming DMA on line 850: > dma_map_single(..., skb->data, ...); > > Then skb->data is accessed on lines 862 and 863: > tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | >(s

Re: [net-next PATCH] net: phy: mdio-mvusb: select MDIO_DEVRES in Kconfig

2020-08-03 Thread David Miller
From: Bartosz Golaszewski Date: Sun, 2 Aug 2020 09:49:53 +0200 > From: Bartosz Golaszewski > > PHYLIB is not selected by the mvusb driver but it uses mdio devres > helpers. Explicitly select MDIO_DEVRES in this driver's Kconfig entry. > > Reported-by: kernel test robot > Fixes: 1814cff26739

Re: [PATCH] appletalk: Fix atalk_proc_init() return path

2020-08-03 Thread David Miller
From: Lukas Wunner Date: Sun, 2 Aug 2020 07:06:51 +0200 > From: Vincent Duvert > > Add a missing return statement to atalk_proc_init so it doesn't return > -ENOMEM when successful. This allows the appletalk module to load > properly. > > Fixes: e2bcd8b0ce6e ("appletalk: use remove_proc_subtre

Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-03 Thread Florian Fainelli
On 7/30/2020 3:25 AM, hongbo.w...@nxp.com wrote: > From: "hongbo.wang" > > This featue can be test using network test tools mispelled: feature, can be used to test network test tools? or can be used to exercise network test tool? > TX-tool -> swp0 -> swp1 -> RX-tool > > TX-tool

  1   2   3   4   >