Re: [PATCH net-next RFC v1 08/10] nvme-tcp: Deal with netdevice DOWN events

2020-10-10 Thread Or Gerlitz
On Fri, Oct 9, 2020 at 1:50 AM Sagi Grimberg wrote: > > @@ -412,8 +413,6 @@ int nvme_tcp_offload_limits(struct nvme_tcp_queue > > *queue, > > queue->ctrl->ctrl.max_segments = limits->max_ddp_sgl_len; > > queue->ctrl->ctrl.max_hw_sectors = > > lim

Re: [PATCH v3 2/3] vhost: Use vhost_get_used_size() in vhost_vring_set_addr()

2020-10-10 Thread Michael S. Tsirkin
On Sat, Oct 10, 2020 at 10:32:13AM +0800, Jason Wang wrote: > > On 2020/10/3 下午6:02, Greg Kurz wrote: > > The open-coded computation of the used size doesn't take the event > > into account when the VIRTIO_RING_F_EVENT_IDX feature is present. > > Fix that by using vhost_get_used_size(). > > > > S

Re: [PATCH v3 1/2] vhost-vdpa: fix vhost_vdpa_map() on error condition

2020-10-10 Thread Michael S. Tsirkin
On Sat, Oct 10, 2020 at 09:48:42AM +0800, Jason Wang wrote: > > On 2020/10/3 下午1:02, Si-Wei Liu wrote: > > vhost_vdpa_map() should remove the iotlb entry just added > > if the corresponding mapping fails to set up properly. > > > > Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") > > S

[bpf-next PATCH 4/4] bpf, selftests: Add three new sockmap tests for verdict only programs

2020-10-10 Thread John Fastabend
Here we add three new tests for sockmap to test having a verdict program without setting the parser program. The first test covers the most simply case, sender proxy_recv proxy_send recv || | | verdict -+

[bpf-next PATCH 3/4] bpf, selftests: Add option to test_sockmap to omit adding parser program

2020-10-10 Thread John Fastabend
Add option to allow running without a parser program in place. To test with ping/pong program use, # test_sockmap -t ping --txmsg_omit_skb_parser this will send packets between two socket bouncing through a proxy socket that does not use a parser program. (ping)

[bpf-next PATCH 1/4] bpf, sockmap: check skb_verdict and skb_parser programs explicitly

2020-10-10 Thread John Fastabend
We are about to allow skb_verdict to run without skb_parser programs as a first step change code to check each program type specifically. This should be a mechanical change without any impact to actual result. Signed-off-by: John Fastabend --- net/core/sock_map.c | 15 --- 1 file c

[bpf-next PATCH 2/4] bpf, sockmap: Allow skipping sk_skb parser program

2020-10-10 Thread John Fastabend
Currently, we often run with a nop parser namely one that just does this, 'return skb->len'. This happens when either our verdict program can handle streaming data or it is only looking at socket data such as IP addresses and other metadata associated with the flow. The second case is common for a

[bpf-next PATCH 0/4] bpf, sockmap: allow verdict only sk_skb progs

2020-10-10 Thread John Fastabend
This allows a sockmap sk_skb verdict programs to run without a parser. For some use cases, such as verdict program that support streaming data or a l3/l4 proxy that does not use data in packet, loading the nop parser 'return skb->len' is an extra unnecessary complexity. With this series we simply c

Re: [External] Re: [PATCH] mm: proc: add Sock to /proc/meminfo

2020-10-10 Thread Muchun Song
On Sun, Oct 11, 2020 at 12:37 AM Randy Dunlap wrote: > > Hi, > > On 10/10/20 3:38 AM, Muchun Song wrote: > > The amount of memory allocated to sockets buffer can become significant. > > However, we do not display the amount of memory consumed by sockets > > buffer. In this case, knowing where the

[PATCH] net: Avoid allocing memory on memoryless numa node

2020-10-10 Thread Xianting Tian
In architecture like powerpc, we can have cpus without any local memory attached to it. In such cases the node does not have real memory. Use local_memory_node(), which is guaranteed to have memory. local_memory_node is a noop in other architectures that does not support memoryless nodes. Signed-

Re: [Patch net] ip_gre: set dev->hard_header_len properly

2020-10-10 Thread Xie He
On Sat, Oct 10, 2020 at 2:49 PM Xie He wrote: > > Another reason why tunnel devices usually don't provide > header_ops->create might be to keep consistency with TAP devices. TAP > devices are just like tunnel (TUN) devices except that they use an > additional Ethernet header after the tunnel heade

Re: [PATCH net-next 1/2] dt-bindings: net: dsa: b53: Add YAML bindings

2020-10-10 Thread Florian Fainelli
On 10/10/2020 9:46 AM, Kurt Kanzenbach wrote: Convert the b53 DSA device tree bindings to YAML in order to allow for automatic checking and such. Suggested-by: Florian Fainelli Signed-off-by: Kurt Kanzenbach Thanks for making this change, there are quite a few warnings that are going to

Re: [PATCH bpf-next v2 1/3] samples: bpf: Refactor xdp_monitor with libbpf

2020-10-10 Thread Andrii Nakryiko
On Sat, Oct 10, 2020 at 11:17 AM Daniel T. Lee wrote: > > To avoid confusion caused by the increasing fragmentation of the BPF > Loader program, this commit would like to change to the libbpf loader > instead of using the bpf_load. > > Thanks to libbpf's bpf_link interface, managing the tracepoint

Re: [PATCH bpf-next v2 3/3] samples: bpf: refactor XDP kern program maps with BTF-defined map

2020-10-10 Thread Andrii Nakryiko
On Sat, Oct 10, 2020 at 11:17 AM Daniel T. Lee wrote: > > Most of the samples were converted to use the new BTF-defined MAP as > they moved to libbpf, but some of the samples were missing. > > Instead of using the previous BPF MAP definition, this commit refactors > xdp_monitor and xdp_sample_pkts

Re: [PATCH bpf-next v2 2/3] samples: bpf: Replace attach_tracepoint() to attach() in xdp_redirect_cpu

2020-10-10 Thread Andrii Nakryiko
On Sat, Oct 10, 2020 at 11:17 AM Daniel T. Lee wrote: > > From commit d7a18ea7e8b6 ("libbpf: Add generic bpf_program__attach()"), > for some BPF programs, it is now possible to attach BPF programs > with __attach() instead of explicitly calling __attach_(). > > This commit refactors the __attach_t

Re: [PATCH bpf-next V3 0/6] bpf: New approach for BPF MTU handling

2020-10-10 Thread John Fastabend
Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:44:02 +0200 Jesper Dangaard Brouer wrote: > > > > > We will not be sprinkling validation checks across the drivers because > > > > > some reconfiguration path may occasionally yield a bad packet, or it's > > > > > hard to do something right with BPF.

Re: [PATCH bpf-next v6 3/6] bpf: allow for map-in-map with dynamic inner array map entries

2020-10-10 Thread Andrii Nakryiko
On Sat, Oct 10, 2020 at 4:40 PM Daniel Borkmann wrote: > > Recent work in f4d05259213f ("bpf: Add map_meta_equal map ops") and > 134fede4eecf > ("bpf: Relax max_entries check for most of the inner map types") added support > for dynamic inner max elements for most map-in-map types. Exceptions wer

Re: [PATCH bpf-next v5 3/6] bpf: allow for map-in-map with dynamic inner array map entries

2020-10-10 Thread Daniel Borkmann
On 10/11/20 12:02 AM, Andrii Nakryiko wrote: On Sat, Oct 10, 2020 at 1:54 PM Daniel Borkmann wrote: [...] diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index f3e36eade3d4..d578875df1ad 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -11049,6 +11049,8 @@ static in

[PATCH bpf-next v6 4/6] bpf, selftests: add test for different array inner map size

2020-10-10 Thread Daniel Borkmann
Extend the "diff_size" subtest to also include a non-inlined array map variant where dynamic inner #elems are possible. Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song --- .../selftests/bpf/prog_tests/btf_map_in_map.c | 39 - .../selftests/bpf/progs/test_btf_map_in_map.c

[PATCH bpf-next v6 5/6] bpf, selftests: make redirect_neigh test more extensible

2020-10-10 Thread Daniel Borkmann
Rename into test_tc_redirect.sh and move setup and test code into separate functions so they can be reused for newly added tests in here. Also remove the crude hack to override ifindex inside the object file via xxd and sed and just use a simple map instead. Map given iproute2 does not support BTF

[PATCH bpf-next v6 0/6] Follow-up BPF helper improvements

2020-10-10 Thread Daniel Borkmann
This series addresses most of the feedback [0] that was to be followed up from the last series, that is, UAPI helper comment improvements and getting rid of the ifindex obj file hacks in the selftest by using a BPF map instead. The __sk_buff data/data_end pointer work, I'm planning to do in a later

[PATCH bpf-next v6 6/6] bpf, selftests: add redirect_peer selftest

2020-10-10 Thread Daniel Borkmann
Extend the test_tc_redirect test and add a small test that exercises the new redirect_peer() helper for the IPv4 and IPv6 case. Signed-off-by: Daniel Borkmann --- .../selftests/bpf/progs/test_tc_peer.c| 45 +++ .../testing/selftests/bpf/test_tc_redirect.sh | 25 +++---

[PATCH bpf-next v6 2/6] bpf: add redirect_peer helper

2020-10-10 Thread Daniel Borkmann
Add an efficient ingress to ingress netns switch that can be used out of tc BPF programs in order to redirect traffic from host ns ingress into a container veth device ingress without having to go via CPU backlog queue [0]. For local containers this can also be utilized and path via CPU backlog que

[PATCH bpf-next v6 1/6] bpf: improve bpf_redirect_neigh helper description

2020-10-10 Thread Daniel Borkmann
Follow-up to address David's feedback that we should better describe internals of the bpf_redirect_neigh() helper. Suggested-by: David Ahern Signed-off-by: Daniel Borkmann Reviewed-by: David Ahern --- include/uapi/linux/bpf.h | 10 +++--- tools/include/uapi/linux/bpf.h | 10 +++--

[PATCH bpf-next v6 3/6] bpf: allow for map-in-map with dynamic inner array map entries

2020-10-10 Thread Daniel Borkmann
Recent work in f4d05259213f ("bpf: Add map_meta_equal map ops") and 134fede4eecf ("bpf: Relax max_entries check for most of the inner map types") added support for dynamic inner max elements for most map-in-map types. Exceptions were maps like array or prog array where the map_gen_lookup() callback

Re: [PATCH] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-10 Thread Anant Thazhemadam
On 10/10/20 10:33 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:26:23 +0530 Anant Thazhemadam wrote: >> GPF_KERNEL > You haven't even built this, let alone tested :/ I'm really sorry about this. Turns out, my .config wasn't set generated by make allyesconfig, and thus this regression went u

[PATCH net-next 5/6] mlxsw: ethtool: Expose the number of lanes in use

2020-10-10 Thread Ido Schimmel
From: Danielle Ratson Currently, the driver does not expose how many lanes are used when the link is up. Extract the lanes information from the device and expose it to ethtool. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/m

Re: [PATCH net-next] virtio_net: handle non-napi callers to virtnet_poll_tx

2020-10-10 Thread Jakub Kicinski
On Thu, 8 Oct 2020 11:34:36 -0700 Jonathan Lemon wrote: > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 21b71148c532..59f65ac9e4c7 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1518,7 +1518,7 @@ static int virtnet_poll_tx(struct napi_struc

[PATCH bpf-next v2 1/3] samples: bpf: Refactor xdp_monitor with libbpf

2020-10-10 Thread Daniel T. Lee
To avoid confusion caused by the increasing fragmentation of the BPF Loader program, this commit would like to change to the libbpf loader instead of using the bpf_load. Thanks to libbpf's bpf_link interface, managing the tracepoint BPF program is much easier. bpf_program__attach_tracepoint manage

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Dan Carpenter
On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote: > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you recognize the sender and know > > the content is s

[PATCH net-next 6/6] net: selftests: Add lanes setting test

2020-10-10 Thread Ido Schimmel
From: Danielle Ratson Test that setting lanes parameter is working. First, test that when setting only speed, max width is chosen as the number of lanes. Second, set max speed and max lanes in the list of advertised link modes, and then try to set max speed with the lanes below max lanes if exi

[PATCH bpf-next v2 3/3] samples: bpf: refactor XDP kern program maps with BTF-defined map

2020-10-10 Thread Daniel T. Lee
Most of the samples were converted to use the new BTF-defined MAP as they moved to libbpf, but some of the samples were missing. Instead of using the previous BPF MAP definition, this commit refactors xdp_monitor and xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format. Also, t

Re: [Patch net] ip_gre: set dev->hard_header_len properly

2020-10-10 Thread Cong Wang
On Fri, Oct 9, 2020 at 8:10 PM Xie He wrote: > > On Fri, Oct 9, 2020 at 6:07 PM Cong Wang wrote: > > > > Looking a bit deeper, I doubt the ipgre_header_ops->create is necessary, > > because 1) all other tunnels devices do not have it (ip_tunnel_header_ops > > only contains ->parse_protocol); 2) G

Re: [PATCH bpf-next V3 4/6] bpf: make it possible to identify BPF redirected SKBs

2020-10-10 Thread Jesper Dangaard Brouer
On Fri, 9 Oct 2020 11:33:33 -0700 Maciej Żenczykowski wrote: > > > This change makes it possible to identify SKBs that have been redirected > > > by TC-BPF (cls_act). This is needed for a number of cases. > > > > > > (1) For collaborating with driver ifb net_devices. > > > (2) For avoiding starti

Linux mvneta driver unable to read MAC address from HW

2020-10-10 Thread Ezra Buehler
Hello, sorry for bothering you, but I am kinda stuck here. I am running Debian buster (Linux 4.19.146) on a Synology DS214+ NAS (Marvell ARMADA XP). Unfortunately, I end up with random MAC addresses for the two Ethernet interfaces after boot. (Also with Debian sid, Linux 5.4.0.) Since commit 8cc

Re: [PATCH net 0/2] mptcp: some fallback fixes

2020-10-10 Thread Jakub Kicinski
On Fri, 9 Oct 2020 18:59:59 +0200 Paolo Abeni wrote: > pktdrill pointed-out we currently don't handle properly some > fallback scenario for MP_JOIN subflows > > The first patch addresses such issue. > > Patch 2/2 fixes a related pre-existing issue that is more > evident after 1/2: we could keep

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 23:34:51 +0530 Anant Thazhemadam wrote: > On 10/10/20 10:29 pm, Jakub Kicinski wrote: > > On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: > >> get_registers() directly returns the return value of > >> usb_control_msg_recv() - 0 if successful, and negative error num

Re: [PATCH net-next] net: usbnet: remove driver version

2020-10-10 Thread Jakub Kicinski
On Fri, 9 Oct 2020 14:10:57 +0200 Heiner Kallweit wrote: > Obviously this driver version doesn't make sense. Go with the default > and let ethtool display the kernel version. > > Signed-off-by: Heiner Kallweit Applied, thank you!

Re: [ PATCH v1 2/2] ibmveth: Identify ingress large send packets.

2020-10-10 Thread Willem de Bruijn
On Thu, Oct 8, 2020 at 3:06 PM David Wilder wrote: > > Ingress large send packets are identified by either: > The IBMVETH_RXQ_LRG_PKT flag in the receive buffer > or with a -1 placed in the ip header checksum. > The method used depends on firmware version. > > Signed-off-by: David Wilder > Review

Re: pull-request: wireless-drivers-next-2020-10-09

2020-10-10 Thread Jakub Kicinski
On Fri, 9 Oct 2020 16:07:59 + (UTC) Kalle Valo wrote: > Hi, > > here's a pull request to net-next tree, more info below. Please let me know if > there are any problems. > > Kalle > > The following changes since commit c2568c8c9e636a56abf31da4b28b65d3ded02524: > > Merge branch 'net-Consti

Re: [PATCH] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 12:26:23 +0530 Anant Thazhemadam wrote: > GPF_KERNEL You haven't even built this, let alone tested :/

Re: [PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-10 Thread Jérôme Pouiller
On Saturday 10 October 2020 14:40:34 CEST Greg Kroah-Hartman wrote: > On Sat, Oct 10, 2020 at 02:22:13PM +0200, Jérôme Pouiller wrote: > > On Friday 9 October 2020 20:52:47 CEST Kalle Valo wrote: > > > Jerome Pouiller writes: > > > > > > > From: Jérôme Pouiller > > > > > > > > Smatch complains: >

Re: [PATCH bpf-next V3 0/6] bpf: New approach for BPF MTU handling

2020-10-10 Thread Jesper Dangaard Brouer
On Fri, 9 Oct 2020 16:00:10 -0700 Jakub Kicinski wrote: > On Fri, 09 Oct 2020 13:49:14 -0700 John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Thu, 08 Oct 2020 16:08:57 +0200 Jesper Dangaard Brouer wrote: > > > > V3: Drop enforcement of MTU in net-core, leave it to drivers > > >

Re: [PATCH bpf-next v2] bpf_fib_lookup: optionally skip neighbour lookup

2020-10-10 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > On 10/9/20 11:28 PM, David Ahern wrote: >> On 10/9/20 11:42 AM, Toke Høiland-Jørgensen wrote: >>> David Ahern writes: On 10/9/20 3:13 AM, Toke Høiland-Jørgensen wrote: > The bpf_fib_lookup() helper performs a neighbour lookup for the > destination > IP

Re: [ PATCH v1 2/2] ibmveth: Identify ingress large send packets.

2020-10-10 Thread Willem de Bruijn
On Sat, Oct 10, 2020 at 12:40 PM Willem de Bruijn wrote: > > On Thu, Oct 8, 2020 at 3:06 PM David Wilder wrote: > > > > Ingress large send packets are identified by either: > > The IBMVETH_RXQ_LRG_PKT flag in the receive buffer > > or with a -1 placed in the ip header checksum. > > The method use

Re: [PATCH v1 2/6] staging: qlge: coredump via devlink health reporter

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:02 +0800, Coiby Xu wrote: [...] > > > + do { \ > > > + err = fill_seg_(fmsg, &dump->seg_hdr, dump->seg_regs); \ > > > + if (err) { \ > > > + kvfree(

[PATCH V2] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-10 Thread Marek Vasut
The phy_reset_after_clk_enable() is always called with ndev->phydev, however that pointer may be NULL even though the PHY device instance already exists and is sufficient to perform the PHY reset. This condition happens in fec_open(), where the clock must be enabled first, then the PHY must be res

[PATCH net-next v2] ne2k: Enable RW-Bugfix

2020-10-10 Thread Armin Wolf
Correct a typo in ne.c and ne2k-pci.c which prevented activation of the RW-Bugfix. Also enable the RW-Bugfix by default since not doing so could (according to the Datasheet) cause the system to lock up with some chips. Signed-off-by: Armin Wolf --- v2 changes: - change NE8390_RW_BUGFIX to NE_RW_B

Re: [PATCH net-next] r8169: factor out handling rtl8169_stats

2020-10-10 Thread Jakub Kicinski
On Fri, 9 Oct 2020 16:20:34 +0200 Heiner Kallweit wrote: > Factor out handling the private packet/byte counters to new > functions rtl_get_priv_stats() and rtl_inc_priv_stats(). > > Signed-off-by: Heiner Kallweit Applied, thank you!

Re: [PATCH v1 5/6] staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef land

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:00 +0800, Coiby Xu wrote: [...] > > > > Please also update drivers/staging/qlge/TODO accordingly. There is still > > a lot of debugging code IMO (the netif_printk statements - kernel > > tracing can be used instead of those) but this patch is a substantial > > improvement. > > Th

Re: [ PATCH v1 1/2] ibmveth: Switch order of ibmveth_helper calls.

2020-10-10 Thread Willem de Bruijn
On Thu, Oct 8, 2020 at 3:06 PM David Wilder wrote: > > ibmveth_rx_csum_helper() must be called after ibmveth_rx_mss_helper() > as ibmveth_rx_csum_helper() may alter ip and tcp checksum values. > > Signed-off-by: David Wilder > Reviewed-by: Thomas Falcon > Reviewed-by: Cristobal Forno > Reviewed

Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 09:54:57 +0200 Dmitry Vyukov wrote: > On Sat, Oct 10, 2020 at 1:16 AM Jakub Kicinski wrote: > > On Wed, 7 Oct 2020 10:17:25 + Aleksandr Nogikh wrote: > > > From: Aleksandr Nogikh > > > > > > Remote KCOV coverage collection enables coverage-guided fuzzing of the > > > co

[PATCH bpf-next v2 0/3] samples: bpf: Refactor XDP programs with libbpf

2020-10-10 Thread Daniel T. Lee
To avoid confusion caused by the increasing fragmentation of the BPF Loader program, this commit would like to convert the previous bpf_load loader with the libbpf loader. Thanks to libbpf's bpf_link interface, managing the tracepoint BPF program is much easier. bpf_program__attach_tracepoint mana

[PATCH bpf-next v2 1/3] samples: bpf: Refactor xdp_monitor with libbpf

2020-10-10 Thread Daniel T. Lee
To avoid confusion caused by the increasing fragmentation of the BPF Loader program, this commit would like to change to the libbpf loader instead of using the bpf_load. Thanks to libbpf's bpf_link interface, managing the tracepoint BPF program is much easier. bpf_program__attach_tracepoint manage

Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:24 +0800, Coiby Xu wrote: > On Sat, Oct 10, 2020 at 04:35:14PM +0900, Benjamin Poirier wrote: > > On 2020-10-08 19:58 +0800, Coiby Xu wrote: > > > Initialize devlink health dump framework for the dlge driver so the > > > coredump could be done via devlink. > > > > > > Signed-off-b

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-10 Thread Heiner Kallweit
On 09.10.2020 18:06, Heiner Kallweit wrote: > On 09.10.2020 17:58, Jakub Kicinski wrote: >> On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: >>> I'm thinking about a __napi_schedule version that disables hard irq's >>> conditionally, based on variable force_irqthreads, exported by the irq >

Re: [PATCH bpf-next 0/3] samples: bpf: Refactor XDP programs with libbpf

2020-10-10 Thread Daniel T. Lee
On Sat, Oct 10, 2020 at 3:30 AM Andrii Nakryiko wrote: > > On Fri, Oct 9, 2020 at 9:04 AM Daniel T. Lee wrote: > > > > To avoid confusion caused by the increasing fragmentation of the BPF > > Loader program, this commit would like to convert the previous bpf_load > > loader with the libbpf loader

Re: [PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-10 Thread Greg Kroah-Hartman
On Sat, Oct 10, 2020 at 02:22:13PM +0200, Jérôme Pouiller wrote: > On Friday 9 October 2020 20:52:47 CEST Kalle Valo wrote: > > Jerome Pouiller writes: > > > > > From: Jérôme Pouiller > > > > > > Smatch complains: > > > > > >drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() war

[PATCH bpf-next v2 3/3] samples: bpf: refactor XDP kern program maps with BTF-defined map

2020-10-10 Thread Daniel T. Lee
Most of the samples were converted to use the new BTF-defined MAP as they moved to libbpf, but some of the samples were missing. Instead of using the previous BPF MAP definition, this commit refactors xdp_monitor and xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format. Also, t

Re: [CRAZY-RFF] debugfs: track open files and release on remove

2020-10-10 Thread Johannes Berg
On Sat, 2020-10-10 at 11:38 +0200, Greg KH wrote: > On Fri, Oct 09, 2020 at 10:48:09AM +0200, Johannes Berg wrote: > > On Fri, 2020-10-09 at 10:47 +0200, Greg KH wrote: > > > > > > I think adding the .owner everywhere would be good, and perhaps we can > > > > somehow put a check somewhere like > >

[PATCH] mm: proc: add Sock to /proc/meminfo

2020-10-10 Thread Muchun Song
The amount of memory allocated to sockets buffer can become significant. However, we do not display the amount of memory consumed by sockets buffer. In this case, knowing where the memory is consumed by the kernel is very difficult. On our server with 500GB RAM, sometimes we can see 25GB disappear

[PATCH net-next 2/2] dt-bindings: net: dsa: b53: Drop old bindings

2020-10-10 Thread Kurt Kanzenbach
The device tree bindings have been converted to YAML. No need to keep the text file around. Update MAINTAINERS file accordingly. Signed-off-by: Kurt Kanzenbach --- .../devicetree/bindings/net/dsa/b53.txt | 149 -- MAINTAINERS | 2 +- 2 fi

Re: [PATCH] net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()

2020-10-10 Thread Marek Vasut
On 10/9/20 8:02 PM, Jakub Kicinski wrote: > On Fri, 9 Oct 2020 19:34:10 +0200 Marek Vasut wrote: > To an untrained eye this looks pretty weird. I see, I'm not quite sure how to address this comment. >>> >>> If ndev->phydev sometimes is not-NULL on open, then that's a valid >>> s

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: > get_registers() directly returns the return value of > usb_control_msg_recv() - 0 if successful, and negative error number > otherwise. Are you expecting Greg to take this as a part of some USB subsystem changes? I don't see usb_contro

Re: [PATCH bpf-next 2/3] samples: bpf: Replace attach_tracepoint() to attach() in xdp_redirect_cpu

2020-10-10 Thread Daniel T. Lee
On Sat, Oct 10, 2020 at 3:23 AM Andrii Nakryiko wrote: > > On Fri, Oct 9, 2020 at 9:04 AM Daniel T. Lee wrote: > > > > From commit d7a18ea7e8b6 ("libbpf: Add generic bpf_program__attach()"), > > for some BPF programs, it is now possible to attach BPF programs > > with __attach() instead of explic

[PATCH net-next 1/2] dt-bindings: net: dsa: b53: Add YAML bindings

2020-10-10 Thread Kurt Kanzenbach
Convert the b53 DSA device tree bindings to YAML in order to allow for automatic checking and such. Suggested-by: Florian Fainelli Signed-off-by: Kurt Kanzenbach --- .../devicetree/bindings/net/dsa/b53.yaml | 249 ++ 1 file changed, 249 insertions(+) create mode 100644 Doc

[PATCH 2/2] cx82310_eth: use netdev_err instead of dev_err

2020-10-10 Thread Ondrej Zary
Use netdev_err for better device identification in syslog. Signed-off-by: Ondrej Zary --- drivers/net/usb/cx82310_eth.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c index 043679311

[PATCH 1/2] cx82310_eth: re-enable ethernet mode after router reboot

2020-10-10 Thread Ondrej Zary
When the router is rebooted without a power cycle, the USB device remains connected but its configuration is reset. This results in a non-working ethernet connection with messages like this in syslog: usb 2-2: RX packet too long: 65535 B Re-enable ethernet mode when receiving a packet with

[PATCH bpf-next v5 1/6] bpf: improve bpf_redirect_neigh helper description

2020-10-10 Thread Daniel Borkmann
Follow-up to address David's feedback that we should better describe internals of the bpf_redirect_neigh() helper. Suggested-by: David Ahern Signed-off-by: Daniel Borkmann Reviewed-by: David Ahern --- include/uapi/linux/bpf.h | 10 +++--- tools/include/uapi/linux/bpf.h | 10 +++--

[PATCH net-next 1/2] can-isotp: implement cleanups / improvements from review

2020-10-10 Thread Oliver Hartkopp
As pointed out by Jakub Kicinski here: https://marc.info/?l=linux-can&m=160229286216008 this patch addresses the remarked issues: - remove empty lines in comment - remove default=y for CAN_ISOTP in Kconfig - make use of pr_notice_once() - use GFP_KERNEL instead of gfp_any() in soft hrtimer context

[PATCH bpf-next v5 4/6] bpf, selftests: add test for different array inner map size

2020-10-10 Thread Daniel Borkmann
Extend the "diff_size" subtest to also include a non-inlined array map variant where dynamic inner #elems are possible. Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song --- .../selftests/bpf/prog_tests/btf_map_in_map.c | 39 - .../selftests/bpf/progs/test_btf_map_in_map.c

[PATCH bpf-next v5 0/6] Follow-up BPF helper improvements

2020-10-10 Thread Daniel Borkmann
This series addresses most of the feedback [0] that was to be followed up from the last series, that is, UAPI helper comment improvements and getting rid of the ifindex obj file hacks in the selftest by using a BPF map instead. The __sk_buff data/data_end pointer work, I'm planning to do in a later

[PATCH bpf-next v5 5/6] bpf, selftests: make redirect_neigh test more extensible

2020-10-10 Thread Daniel Borkmann
Rename into test_tc_redirect.sh and move setup and test code into separate functions so they can be reused for newly added tests in here. Also remove the crude hack to override ifindex inside the object file via xxd and sed and just use a simple map instead. Map given iproute2 does not support BTF

[Linux-kernel-mentees] [PATCH net] ethtool: strset: Fix out of bound read in strset_parse_request()

2020-10-10 Thread Anmol Karn
Flag ``ETHTOOL_A_STRSET_COUNTS_ONLY`` tells the kernel to only return the string counts of the sets, but, when req_info->counts_only tries to read the tb[ETHTOOL_A_STRSET_COUNTS_ONLY] it gets out of bound. - net/ethtool/strset.c The bug seems to trigger in this line: req_info->counts_only = t

[PATCH bpf-next v5 6/6] bpf, selftests: add redirect_peer selftest

2020-10-10 Thread Daniel Borkmann
Extend the test_tc_redirect test and add a small test that exercises the new redirect_peer() helper for the IPv4 and IPv6 case. Signed-off-by: Daniel Borkmann --- .../selftests/bpf/progs/test_tc_peer.c| 45 +++ .../testing/selftests/bpf/test_tc_redirect.sh | 25 +++---

[PATCH bpf-next v5 2/6] bpf: add redirect_peer helper

2020-10-10 Thread Daniel Borkmann
Add an efficient ingress to ingress netns switch that can be used out of tc BPF programs in order to redirect traffic from host ns ingress into a container veth device ingress without having to go via CPU backlog queue [0]. For local containers this can also be utilized and path via CPU backlog que

[PATCH bpf-next v5 3/6] bpf: allow for map-in-map with dynamic inner array map entries

2020-10-10 Thread Daniel Borkmann
Recent work in f4d05259213f ("bpf: Add map_meta_equal map ops") and 134fede4eecf ("bpf: Relax max_entries check for most of the inner map types") added support for dynamic inner max elements for most map-in-map types. Exceptions were maps like array or prog array where the map_gen_lookup() callback

Re: [PATCH bpf-next v5 3/6] bpf: allow for map-in-map with dynamic inner array map entries

2020-10-10 Thread Andrii Nakryiko
On Sat, Oct 10, 2020 at 1:54 PM Daniel Borkmann wrote: > > Recent work in f4d05259213f ("bpf: Add map_meta_equal map ops") and > 134fede4eecf > ("bpf: Relax max_entries check for most of the inner map types") added support > for dynamic inner max elements for most map-in-map types. Exceptions wer

Re: [Patch net] ip_gre: set dev->hard_header_len properly

2020-10-10 Thread Xie He
On Sat, Oct 10, 2020 at 11:58 AM Cong Wang wrote: > > On Fri, Oct 9, 2020 at 8:10 PM Xie He wrote: > > > > This seems so weird to me. If a user is using an AF_PACKET/RAW socket, > > the user is supposed to do what the header_ops->create function does > > (that is, creating two headers and leaving

Re: [PATCH RFC PKS/PMEM 09/58] drivers/gpu: Utilize new kmap_thread()

2020-10-10 Thread Ira Weiny
On Sat, Oct 10, 2020 at 12:03:49AM +0200, Daniel Vetter wrote: > On Fri, Oct 09, 2020 at 12:49:44PM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls in the gpu stack are localized to a single thread. > > To avoid the over head of global PKRS updates use the new kma

[PATCH net-next 2/2] can: remove obsolete version strings

2020-10-10 Thread Oliver Hartkopp
As pointed out by Jakub Kicinski here: https://marc.info/?l=linux-can&m=160229286216008 this patch removes the obsolete version information of the different CAN protocols and the AF_CAN core module. Signed-off-by: Oliver Hartkopp --- include/linux/can/core.h | 7 --- include/net/netns/can.h

[PATCH bpf-next v2 2/3] samples: bpf: Replace attach_tracepoint() to attach() in xdp_redirect_cpu

2020-10-10 Thread Daniel T. Lee
>From commit d7a18ea7e8b6 ("libbpf: Add generic bpf_program__attach()"), for some BPF programs, it is now possible to attach BPF programs with __attach() instead of explicitly calling __attach_(). This commit refactors the __attach_tracepoint() with libbpf's generic __attach() method. In addition,

[PATCH net-next 0/2] dt-bindings: net: dsa: b53: Add YAML bindings

2020-10-10 Thread Kurt Kanzenbach
Hi, the DSA device tree bindings have been converted to YAML. Let's start using them. Convert the b53 bindings as suggested by Florian Fainelli. Kurt Kanzenbach (2): dt-bindings: net: dsa: b53: Add YAML bindings dt-bindings: net: dsa: b53: Drop old bindings .../devicetree/bindings/net/dsa/b

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Dan Carpenter
On Sat, Oct 10, 2020 at 04:18:11PM +0300, Dan Carpenter wrote: > On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote: > > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > > > CAUTION: This email originated from outside of the organization. Do not > > > click links or open att

[PATCH] mm: memcontrol: localize mem_cgroup_sockets_enabled() check

2020-10-10 Thread Muchun Song
Move the mem_cgroup_sockets_enabled() checks into memcg socket charge or uncharge functions, so the users don't have to explicitly check that condition. This is purely code cleanup patch without any functional change. But move the sk_memcg member of the sock structure to the CONFIG_MEMCG scope. S

Re: [PATCH 08/17] can: add ISO 15765-2:2016 transport protocol

2020-10-10 Thread Oliver Hartkopp
On 10.10.20 02:57, Jakub Kicinski wrote: On Wed, 7 Oct 2020 23:31:50 +0200 Marc Kleine-Budde wrote: From: Oliver Hartkopp CAN Transport Protocols offer support for segmented Point-to-Point communication between CAN nodes via two defined CAN Identifiers. As CAN frames can only transport a s

Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 15:08:15 +0200 Heiner Kallweit wrote: > On 09.10.2020 18:06, Heiner Kallweit wrote: > > On 09.10.2020 17:58, Jakub Kicinski wrote: > >> On Fri, 9 Oct 2020 16:54:06 +0200 Heiner Kallweit wrote: > >>> I'm thinking about a __napi_schedule version that disables hard irq's > >>>

Re: [PATCH bpf-next V3 0/6] bpf: New approach for BPF MTU handling

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 12:44:02 +0200 Jesper Dangaard Brouer wrote: > > > > We will not be sprinkling validation checks across the drivers because > > > > some reconfiguration path may occasionally yield a bad packet, or it's > > > > hard to do something right with BPF. > > > > > > This is a dr

Re: [PATCH] dpaa_eth: enable NETIF_MSG_HW by default

2020-10-10 Thread Jakub Kicinski
On Thu, 8 Oct 2020 14:37:44 + Madalin Bucur (OSS) wrote: > > From: Maxim Kochetkov > > > > When packets are received on the error queue, this function under > > net_ratelimit(): > > > > netif_err(priv, hw, net_dev, "Err FD status = 0x%08x\n"); > > > > does not get printed. Instead we only s

Re: [PATCH RFC PKS/PMEM 10/58] drivers/rdma: Utilize new kmap_thread()

2020-10-10 Thread Bernard Metzler
-ira.we...@intel.com wrote: - >To: "Andrew Morton" , "Thomas Gleixner" >, "Ingo Molnar" , "Borislav >Petkov" , "Andy Lutomirski" , "Peter >Zijlstra" >From: ira.we...@intel.com >Date: 10/09/2020 09:52PM >Cc: "Ira Weiny" , "Mike Marciniszyn" >, "Dennis Dalessandro" >, "Doug Ledford" , >"Jas

Re: inconsistent lock state in sco_conn_del

2020-10-10 Thread Xu, Yanfei
> syzbot has found a reproducer for the following issue on: > > HEAD commit:e8878ab8 Merge tag 'spi-fix-v5.9-rc4' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1213075990 > kernel config: https://syzkaller.appspot.com/x/.co

Re: [PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-10 Thread Jérôme Pouiller
On Friday 9 October 2020 20:52:47 CEST Kalle Valo wrote: > Jerome Pouiller writes: > > > From: Jérôme Pouiller > > > > Smatch complains: > > > >drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: > > potential NULL parameter dereference 'wvif' > >drivers/staging/wfx/da

Re: [PATCH 08/17] can: add ISO 15765-2:2016 transport protocol

2020-10-10 Thread Oliver Hartkopp
On 10.10.20 17:44, Jakub Kicinski wrote: On Sat, 10 Oct 2020 16:29:06 +0200 Oliver Hartkopp wrote: diff --git a/net/can/Kconfig b/net/can/Kconfig index 25436a715db3..021fe03a8ed6 100644 --- a/net/can/Kconfig +++ b/net/can/Kconfig @@ -55,6 +55,19 @@ config CAN_GW source "net/can/j1939/K

Re: [PATCH net-next] drivers/net/wan/hdlc_fr: Move the skb_headroom check out of fr_hard_header

2020-10-10 Thread Jakub Kicinski
On Wed, 7 Oct 2020 11:32:03 -0700 Xie He wrote: > Move the skb_headroom check out of fr_hard_header and into pvc_xmit. > This has two benefits: > > 1. Originally we only do this check for skbs sent by users on Ethernet- > emulating PVC devices. After the change we do this check for skbs sent on >

Re: [PATCH 2/8] staging: wfx: check memory allocation

2020-10-10 Thread Jérôme Pouiller
On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Jerome Pouiller writes: > > > From: Jérôme Pouiller > > >

Re: [net-next PATCH v1] net: phy: Move of_mdio from drivers/of to drivers/net/mdio

2020-10-10 Thread Jakub Kicinski
On Thu, 8 Oct 2020 20:17:06 +0530 Calvin Johnson wrote: > Better place for of_mdio.c is drivers/net/mdio. > Move of_mdio.c from drivers/of to drivers/net/mdio > > Signed-off-by: Calvin Johnson Applied, thank you.

Re: [PATCH 08/17] can: add ISO 15765-2:2016 transport protocol

2020-10-10 Thread Jakub Kicinski
On Sat, 10 Oct 2020 16:29:06 +0200 Oliver Hartkopp wrote: > >> diff --git a/net/can/Kconfig b/net/can/Kconfig > >> index 25436a715db3..021fe03a8ed6 100644 > >> --- a/net/can/Kconfig > >> +++ b/net/can/Kconfig > >> @@ -55,6 +55,19 @@ config CAN_GW > >> > >> source "net/can/j1939/Kconfig" > >>

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Jakub Kicinski
On Sun, 11 Oct 2020 00:14:05 +0530 Anant Thazhemadam wrote: > Ah, my apologies. You're right. It doesn't look like those helpers have made > their way into the networking tree yet. > > (This gets mentioned here as well, >     https://www.mail-archive.com/netdev@vger.kernel.org/msg357843.html) > >

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

2020-10-10 Thread Jakub Kicinski
On Thu, 8 Oct 2020 12:42:03 +0200 Johannes Berg wrote: > Hi Dave, > > And also a few more patches for net-next, mostly fixes > for the work that recently landed there. > > Please pull and let me know if there's any problem. .. aand pulled, thanks!

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
Hi, On 10/10/20 10:29 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: >> get_registers() directly returns the return value of >> usb_control_msg_recv() - 0 if successful, and negative error number >> otherwise. > Are you expecting Greg to take this as a par

  1   2   >