Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 09:58:06AM +0800, xiangxia.m@gmail.com wrote: > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to them. Now when disable the LRO,

Re: [PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module

2020-09-29 Thread Michael S. Tsirkin
On Tue, Sep 29, 2020 at 09:57:44AM +0300, Eli Cohen wrote: > On Tue, Sep 29, 2020 at 02:51:12AM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 09:34:33AM +0300, Eli Cohen wrote: > > > On Tue, Sep 29, 2020 at 02:26:44AM -0400, Michael S. Tsirkin wrote: > > > > On Tue, Sep 29, 2020 at 0

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 2:22 PM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 02:10:56PM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 1:55 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 29, 2020 at 09:45:24AM +0800, Tonghao Zhang wrote: > > > > On Tue, Sep 29, 2020 at 3:2

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Michael S. Tsirkin
On Tue, Sep 29, 2020 at 02:59:03PM +0800, Tonghao Zhang wrote: > On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 29, 2020 at 09:58:06AM +0800, xiangxia.m@gmail.com wrote: > > > From: Tonghao Zhang > > > > > > Open vSwitch and Linux bridge will disable LRO of the

Re: [PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-29 Thread Michael S. Tsirkin
On Tue, Sep 29, 2020 at 03:17:50PM +0800, Tonghao Zhang wrote: > On Tue, Sep 29, 2020 at 2:22 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 29, 2020 at 02:10:56PM +0800, Tonghao Zhang wrote: > > > On Tue, Sep 29, 2020 at 1:55 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Tue, Sep 29,

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Willem de Bruijn
On Tue, Sep 29, 2020 at 9:23 AM Michael S. Tsirkin wrote: > > On Tue, Sep 29, 2020 at 02:59:03PM +0800, Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 29, 2020 at 09:58:06AM +0800, xiangxia.m@gmail.com wrote: > > > > From: Tonghao Zh

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Willem de Bruijn
On Tue, Sep 29, 2020 at 4:00 AM wrote: > > From: Tonghao Zhang > > Open vSwitch and Linux bridge will disable LRO of the interface > when this interface added to them. Now when disable the LRO, the > virtio-net csum is disable too. That drops the forwarding performance. I had focused on the code

Re: [PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module

2020-09-29 Thread Eli Cohen
On Tue, Sep 29, 2020 at 03:17:05AM -0400, Michael S. Tsirkin wrote: > > > > Use "select MLX5_CORE" > > instead of "depends on MLX5_CORE" > > > > Wasn't this agreed upon? > > Hmm I don't know. I recall a similar discussion around VHOST_IOTLB. > That's different ... I see. > > I see > > [linux

Re: [PATCH v2] ath10k: sdio: remove redundant check in for loop

2020-09-29 Thread Kalle Valo
Alex Dewar writes: >> I agree. Anyone can come up with a patch? > > Hi Kalle, > > I was thinking of having a go at this. Have you applied the v2 of this > patch yet though? I couldn't see it in wireless-drivers-next. I just > don't want to have to rebase the patch if you were going to apply this

Re: [PATCH] vhost: Don't call vq_access_ok() when using IOTLB

2020-09-29 Thread Michael S. Tsirkin
On Mon, Sep 28, 2020 at 02:35:04PM +0200, Greg Kurz wrote: > When the IOTLB device is enabled, the vring addresses we get from > userspace are GIOVAs. It is thus wrong to pass them to vq_access_ok() > which only takes HVAs. The IOTLB map is likely empty at this stage, > so there isn't much that can

Re: [PATCH v3 -next] vdpa: mlx5: change Kconfig depends to fix build errors

2020-09-29 Thread Michael S. Tsirkin
On Thu, Sep 24, 2020 at 08:47:05AM -0700, Randy Dunlap wrote: > On 9/24/20 3:24 AM, Eli Cohen wrote: > > On Thu, Sep 24, 2020 at 05:30:55AM -0400, Michael S. Tsirkin wrote: > --- linux-next-20200917.orig/drivers/vdpa/Kconfig > +++ linux-next-20200917/drivers/vdpa/Kconfig > @@ -31,7 +

[GIT PULL] virtio: last minute fixes

2020-09-29 Thread Michael S. Tsirkin
Unfortunately there are a couple more reported issues in vhost and vdpa, but those fixes are still being worked upon, no reason to delay those that are ready. The following changes since commit ba4f184e126b751d1bffad5897f263108befc780: Linux 5.9-rc6 (2020-09-20 16:33:55 -0700) are available in

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:32 PM Willem de Bruijn wrote: > > On Tue, Sep 29, 2020 at 4:00 AM wrote: > > > > From: Tonghao Zhang > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > when this interface added to them. Now when disable the LRO, the > > virtio-net csum is disab

[PATCH v2] Bluetooth: Move force_bredr_smp debugfs into hci_debugfs_create_bredr

2020-09-29 Thread Claire Chang
Avoid multiple attempts to create the debugfs entry, force_bredr_smp, by moving it from the SMP registration to the BR/EDR controller init section. hci_debugfs_create_bredr is only called when HCI_SETUP and HCI_CONFIG is not set. Signed-off-by: Claire Chang --- v2: correct a typo in commit messag

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Tonghao Zhang
On Tue, Sep 29, 2020 at 3:29 PM Willem de Bruijn wrote: > > On Tue, Sep 29, 2020 at 9:23 AM Michael S. Tsirkin wrote: > > > > On Tue, Sep 29, 2020 at 02:59:03PM +0800, Tonghao Zhang wrote: > > > On Tue, Sep 29, 2020 at 2:23 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Tue, Sep 29, 2020

[PATCH net-next 0/7] drop_monitor: Convert to use devlink tracepoint

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Drop monitor is able to monitor both software and hardware originated drops. Software drops are monitored by having drop monitor register its probe on the 'kfree_skb' tracepoint. Hardware originated drops are monitored by having devlink call into drop monitor whenever it receiv

[Linux-kernel-mentees][PATCH] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-09-29 Thread Anant Thazhemadam
When get_registers() fails (which happens when usb_control_msg() fails) in set_ethernet_addr(), the uninitialized value of node_id gets copied as the address. Checking for the return values appropriately, and handling the case wherein set_ethernet_addr() fails like this, helps in avoiding the mac

Re: [PATCH] qtnfmac: fix resource leaks on unsupported iftype error return path

2020-09-29 Thread Kalle Valo
Colin King wrote: > From: Colin Ian King > > Currently if an unsupported iftype is detected the error return path > does not free the cmd_skb leading to a resource leak. Fix this by > free'ing cmd_skb. > > Addresses-Coverity: ("Resource leak") > Fixes: 805b28c05c8e ("qtnfmac: prepare for AP_VL

Re: wl1251/wl12xx: fix a typo in comments

2020-09-29 Thread Kalle Valo
Wang Qing wrote: > Modify the comment typo: "compliment" -> "complement". > > Signed-off-by: Wang Qing Patch applied to wireless-drivers-next.git, thanks. 42af278bff02 wl1251/wl12xx: fix a typo in comments -- https://patchwork.kernel.org/patch/11801073/ https://wireless.wiki.kernel.org/en/

[PATCH net-next 2/7] drop_monitor: Prepare probe functions for devlink tracepoint

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Drop monitor supports two alerting modes: Summary and packet. Prepare a probe function for each, so that they could be later registered on the devlink tracepoint by calling register_trace_devlink_trap_report(), based on the configured alerting mode. Signed-off-by: Ido Schimmel

[PATCH net-next 3/7] drop_monitor: Convert to using devlink tracepoint

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Convert drop monitor to use the recently introduced 'devlink_trap_report' tracepoint instead of having devlink call into drop monitor. This is both consistent with software originated drops ('kfree_skb' tracepoint) and also allows drop monitor to be built as a module and still

[PATCH net-next 7/7] selftests: net: Add drop monitor test

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Test that drop monitor correctly captures both software and hardware originated packet drops. # ./drop_monitor_tests.sh Software drops test TEST: Capturing active software drops [ OK ] TEST: Capturing inactive software drops

Re: [PATCH] wl3501_cs: Remove unnecessary NULL check

2020-09-29 Thread Kalle Valo
Alex Dewar wrote: > In wl3501_detach(), link->priv is checked for a NULL value before being > passed to free_netdev(). However, it cannot be NULL at this point as it > has already been passed to other functions, so just remove the check. > > Addresses-Coverity: CID 710499: Null pointer dereferen

[PATCH net-next 1/7] devlink: Add a tracepoint for trap reports

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Add a tracepoint for trap reports so that drop monitor could register its probe on it. Use trace_devlink_trap_report_enabled() to avoid wasting cycles setting the trap metadata if the tracepoint is not enabled. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- include

[PATCH net-next 6/7] drop_monitor: Filter control packets in drop monitor

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel Previously, devlink called into drop monitor in order to report hardware originated drops / exceptions. devlink intentionally filtered control packets and did not pass them to drop monitor as they were not dropped by the underlying hardware. Now drop monitor registers its prob

[PATCH net-next 4/7] drop_monitor: Remove no longer used functions

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel The old probe functions that were invoked by drop monitor code are no longer called and can thus be removed. They were replaced by actual probe functions that are registered on the recently introduced 'devlink_trap_report' tracepoint. Signed-off-by: Ido Schimmel Reviewed-by:

[PATCH net-next 5/7] drop_monitor: Remove duplicate struct

2020-09-29 Thread Ido Schimmel
From: Ido Schimmel 'struct net_dm_hw_metadata' is a duplicate of 'struct devlink_trap_metadata'. Remove the former and simplify the code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- net/core/drop_monitor.c | 27 ++- 1 file changed, 10 insertions(+), 17 del

Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1

2020-09-29 Thread Kalle Valo
Amit Pundir wrote: > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845) > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error > message in ath10k_qmi_host_cap_send_sync(), but we can still > bring up WiFi services successfully on AOSP if we ignore it. > > We suspect either the host

Re: [PATCH -next v2] ath9k: Remove set but not used variable

2020-09-29 Thread Kalle Valo
Li Heng wrote: > This addresses the following gcc warning with "make W=1": > > drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1331:18: warning: > ‘ar9580_1p0_pcie_phy_clkreq_enable_L1’ defined but not used > [-Wunused-const-variable=] > > drivers/net/wireless/ath/ath9k/ar9580_1p0_initval

[PATCH v2] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode

2020-09-29 Thread longguang.yue
It's ipvs's duty to do traffic statistic if packets get hit, no matter what mode it is. Signed-off-by: longguang.yue --- net/netfilter/ipvs/ip_vs_conn.c | 13 +++-- net/netfilter/ipvs/ip_vs_core.c | 5 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/net/netfilter/i

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Willem de Bruijn
On Tue, Sep 29, 2020 at 9:56 AM Tonghao Zhang wrote: > > On Tue, Sep 29, 2020 at 3:32 PM Willem de Bruijn > wrote: > > > > On Tue, Sep 29, 2020 at 4:00 AM wrote: > > > > > > From: Tonghao Zhang > > > > > > Open vSwitch and Linux bridge will disable LRO of the interface > > > when this interface

Re: [PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-29 Thread Willem de Bruijn
On Tue, Sep 29, 2020 at 4:00 AM wrote: > > From: Tonghao Zhang > > Open vSwitch and Linux bridge will disable LRO of the interface > when this interface added to them. Now when disable the LRO, the > virtio-net csum is disable too. That drops the forwarding performance. > > Fixes: a02e8964eaf9 ("

Re: [Linux-kernel-mentees][PATCH] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-09-29 Thread Anant Thazhemadam
A sample crash report can be found here.     https://syzkaller.appspot.com/text?tag=CrashReport&x=1748691190 The line where the bug seems to get triggered is, if (!batadv_compare_eth(hard_iface->net_dev->dev_addr,                     net_dev->dev_addr)) Looks like it goes through the list of

Re: [Linux-kernel-mentees][PATCH] net: usb: rtl8150: prevent set_ethernet_addr from setting uninit address

2020-09-29 Thread Petko Manolov
On 20-09-29 13:50:28, Anant Thazhemadam wrote: > When get_registers() fails (which happens when usb_control_msg() fails) > in set_ethernet_addr(), the uninitialized value of node_id gets copied > as the address. > > Checking for the return values appropriately, and handling the case > wherein set_

[PATCH bpf-next 1/2] bpf: introduce BPF_F_SHARE_PE for perf event array

2020-09-29 Thread Song Liu
Currently, perf event in perf event array is removed from the array when the map fd used to add the event is closed. This behavior makes it difficult to the share perf events with perf event array. Introduce perf event map that keeps the perf event open with a new flag BPF_F_SHARE_PE. With this fl

[PATCH bpf-next 2/2] selftests/bpf: add tests for BPF_F_SHARE_PE

2020-09-29 Thread Song Liu
Add tests for perf event array with and without BPF_F_SHARE_PE. Add a perf event to array via fd mfd. Without BPF_F_SHARE_PE, the perf event is removed when mfd is closed. With BPF_F_SHARE_PE, the perf event is removed when the map is freed. Signed-off-by: Song Liu --- .../bpf/prog_tests/perf_e

[PATCH bpf-next 0/2] introduce BPF_F_SHARE_PE

2020-09-29 Thread Song Liu
This set introduces BPF_F_SHARE_PE to perf event array for better sharing of perf event. By default, perf event array removes the perf event when the map fd used to add the event is closed. With BPF_F_SHARE_PE set, however, the perf event will stay in the array until it is removed, or the map is cl

Re: [PATCH] vhost: Don't call vq_access_ok() when using IOTLB

2020-09-29 Thread Greg Kurz
On Tue, 29 Sep 2020 03:45:28 -0400 "Michael S. Tsirkin" wrote: > On Mon, Sep 28, 2020 at 02:35:04PM +0200, Greg Kurz wrote: > > When the IOTLB device is enabled, the vring addresses we get from > > userspace are GIOVAs. It is thus wrong to pass them to vq_access_ok() > > which only takes HVAs. Th

Re: [PATCH] ath11k: remove auto_start from channel config struct

2020-09-29 Thread Kalle Valo
Manivannan Sadhasivam writes: > Recent change in MHI bus removed the option to auto start the channels > during MHI driver probe. The channel will only be started when the MHI > client driver like QRTR gets probed. So, remove the option from ath11k > channel config struct. > > Fixes: 1399fb87ea3e

Re: [PATCH v7 bpf-next 4/8] selftests/bpf: add bpf_snprintf_btf helper tests

2020-09-29 Thread Daniel Borkmann
On 9/28/20 1:31 PM, Alan Maguire wrote: Tests verifying snprintf()ing of various data structures, flags combinations using a tp_btf program. Tests are skipped if __builtin_btf_type_id is not available to retrieve BTF type ids. Signed-off-by: Alan Maguire [...] +void test_snprintf_btf(void) +{

[PATCH v2] ath11k: remove auto_start from channel config struct

2020-09-29 Thread Kalle Valo
From: Manivannan Sadhasivam Recent change in MHI bus removed the option to auto start the channels during MHI driver probe. The channel will only be started when the MHI client driver like QRTR gets probed. So, remove the option from ath11k channel config struct. Fixes: 1399fb87ea3e ("ath11k: re

Re: [PATCH bpf-next v2 4/4] selftest: bpf: Test copying a sockmap and sockhash

2020-09-29 Thread Lorenz Bauer
On Tue, 29 Sep 2020 at 07:06, Martin KaFai Lau wrote: ... > > + /* We need a temporary buffer on the stack, since the verifier doesn't > > + * let us use the pointer from the context as an argument to the > > helper. > Is it something that can be improved later? > > others LGTM. Yeah,

[PATCH net-next 0/7] octeontx2-af: cleanup and extend parser config

2020-09-29 Thread Stanislaw Kardach
Current KPU configuration data is spread over multiple files which makes it hard to read. Clean this up by gathering all configuration data in a single structure and also in a single file (npc_profile.h). This should increase the readability of KPU handling code (since it always references same str

[PATCH net-next 1/7] octeontx2-af: fix LD CUSTOM LTYPE aliasing

2020-09-29 Thread Stanislaw Kardach
Since LD contains LTYPE definitions tweaked toward efficient NIX_AF_RX_FLOW_KEY_ALG(0..31)_FIELD(0..4) usage, the original location of NPC_LT_LD_CUSTOM0/1 was aliased with MPLS_IN_* definitions. Moving custom frame to value 6 and 7 removes the aliasing at the cost of custom frames being also consid

[PATCH net-next 2/7] octeontx2-af: cleanup KPU config data

2020-09-29 Thread Stanislaw Kardach
Refactor KPU related NPC code gathering all configuration data in a structured format and putting it in one place (npc_profile.h). This increases readability and makes it easier to extend the profile configuration (as opposed to jumping between multiple header and source files). To do this: * Gath

[PATCH net-next 6/7] octeontx2-af: optimize parsing of IPv6 fragments

2020-09-29 Thread Stanislaw Kardach
From: Abhijit Ayarekar IPv6 fragmented packet may not contain completed layer 4 information. So stop KPU parsing after setting ipv6 fragmentation flag. Signed-off-by: Abhijit Ayarekar Acked-by: Sunil Goutham --- .../marvell/octeontx2/af/npc_profile.h| 80 +-- 1 file ch

[PATCH net-next 3/7] octeontx2-af: add parser support for Forward DSA

2020-09-29 Thread Stanislaw Kardach
From: Hariprasad Kelam Marvell Prestera switches supports distributed switch architecture by inserting Forward DSA tag of 4 bytes right after ethernet SMAC. This tag don't have a tpid field. This patch provides parser and extraction support for the same. Default ldata extraction profile added fo

[PATCH net-next 5/7] octeontx2-af: Add IPv6 fields to default MKEX

2020-09-29 Thread Stanislaw Kardach
From: Vidhya Vidhyaraman Added some IPv6 protocol fields to the default MKEX profile. They include everything from the beginning of IP header and up to source address. The pattern occupies full KW2 in MCAM entry. Only one out of two LD registers for this protocol is used. Signed-off-by: Vidhya V

[PATCH net-next 4/7] octeontx2-af: fix Extended DSA and eDSA parsing

2020-09-29 Thread Stanislaw Kardach
From: Satha Rao KPU profile interpret Extended DSA and eDSA by looking source dev. This was incorrect and it restricts to use few source device ids and also created confusion while parsing regular DSA tag. With below patch lookup was based on bit 12 of Word0. This is always zero for DSA tag and i

[PATCH net-next 7/7] octeontx2-af: add parser support for NAT-T-ESP

2020-09-29 Thread Stanislaw Kardach
From: Kiran Kumar K Add support for NAT-T-ESP to KPU parser configuration. NAT ESP is a UDP based protocol. So move ESP to LE so that both UDP and ESP can be extracted. Signed-off-by: Kiran Kumar K Acked-by: Sunil Goutham --- .../net/ethernet/marvell/octeontx2/af/npc.h | 2 +- .../marvell/

[PATCH bpf-next v3 3/4] selftests: bpf: remove shared header from sockmap iter test

2020-09-29 Thread Lorenz Bauer
The shared header to define SOCKMAP_MAX_ENTRIES is a bit overkill. Dynamically allocate the sock_fd array based on bpf_map__max_entries instead. Suggested-by: Yonghong Song Signed-off-by: Lorenz Bauer Acked-by: Yonghong Song --- .../selftests/bpf/prog_tests/sockmap_basic.c | 36 +-

[PATCH bpf-next v3 0/4] [PATCH bpf-next v2 0/4] Sockmap copying

2020-09-29 Thread Lorenz Bauer
Changes in v3: - Initialize duration to 0 in selftests (Martin) Changes in v2: - Check sk_fullsock in map_update_elem (Martin) Enable calling map_update_elem on sockmaps from bpf_iter context. This in turn allows us to copy a sockmap by iterating its elements. The change itself is tiny, all than

[PATCH bpf-next v3 2/4] selftests: bpf: Add helper to compare socket cookies

2020-09-29 Thread Lorenz Bauer
We compare socket cookies to ensure that insertion into a sockmap worked. Pull this out into a helper function for use in other tests. Signed-off-by: Lorenz Bauer --- .../selftests/bpf/prog_tests/sockmap_basic.c | 50 +-- 1 file changed, 36 insertions(+), 14 deletions(-) diff -

[PATCH bpf-next v3 1/4] bpf: sockmap: enable map_update_elem from bpf_iter

2020-09-29 Thread Lorenz Bauer
Allow passing a pointer to a BTF struct sock_common* when updating a sockmap or sockhash. Since BTF pointers can fault and therefore be NULL at runtime we need to add an additional !sk check to sock_map_update_elem. Since we may be passed a request or timewait socket we also need to check sk_fullso

[PATCH bpf-next v3 4/4] selftest: bpf: Test copying a sockmap and sockhash

2020-09-29 Thread Lorenz Bauer
Since we can now call map_update_elem(sockmap) from bpf_iter context it's possible to copy a sockmap or sockhash in the kernel. Add a selftest which exercises this. Signed-off-by: Lorenz Bauer --- .../selftests/bpf/prog_tests/sockmap_basic.c | 14 +- .../selftests/bpf/progs/bpf_iter_soc

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

2020-09-29 Thread Huazhong Tan
There are some misc updates for the HNS3 ethernet driver. #1 uses the queried BD number as the limit for TSO. #2 renames trace event hns3_over_8bd since #1. #3 adds UDP segmentation offload support. #4 adds RoCE VF reset support. #5 is a minor cleanup. #6 & #7 add debugfs for device specifications

[PATCH net-next 6/7] net: hns3: debugfs add new command to query device specifications

2020-09-29 Thread Huazhong Tan
From: Guangbin Huang In order to query specifications of the device, add a new debugfs command "dev spec" to do that. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 28 ++ 1 file changed, 28 insertions(+)

[PATCH net-next 5/7] net: hns3: remove unused code in hns3_self_test()

2020-09-29 Thread Huazhong Tan
From: Guojia Liao NETIF_F_HW_VLAN_CTAG_FILTER is not set in netdev->hw_feature, but set in netdev->features. So the handler of NETIF_F_HW_VLAN_CTAG_FILTER in hns3_self_test() is always true, remove it. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/

[PATCH net-next 3/7] net: hns3: add UDP segmentation offload support

2020-09-29 Thread Huazhong Tan
Add support for UDP segmentation offload to the HNS3 driver when the device can do it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns

[PATCH net-next 1/7] net: hns3: replace macro HNS3_MAX_NON_TSO_BD_NUM

2020-09-29 Thread Huazhong Tan
Currently, the driver is able to query the device's specifications, which includes the maximum BD number of non TSO packet, so replace macro HNS3_MAX_NON_TSO_BD_NUM with the queried value, and rewrite macro HNS3_MAX_NON_TSO_SIZE whose value depends on the the maximum BD number of non TSO packet. A

[PATCH net-next 4/7] net: hns3: Add RoCE VF reset support

2020-09-29 Thread Huazhong Tan
Add RoCE VF client reset support by notifying the RoCE VF client when hns3 VF is resetting and adding a interface to query whether CMDQ is ready to work. Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 50 ++ .../ethernet/hisilicon/hns3/hn

[PATCH net-next 2/7] net: hns3: rename trace event hns3_over_8bd

2020-09-29 Thread Huazhong Tan
Since the maximun BD number may not be 8 now, so rename hns3_over_8bd() to hns3_over_max_bd(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3_trace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) dif

[PATCH net-next 7/7] net: hns3: dump tqp enable status in debugfs

2020-09-29 Thread Huazhong Tan
From: Guangbin Huang Adds debugfs to dump tqp enable status. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 22 -- drivers/net/ethernet/hisilico

Re: [PATCH bpf-next] libbpf: export bpf_object__reuse_map() to libbpf api

2020-09-29 Thread Hangbin Liu
On Mon, Sep 28, 2020 at 08:30:42PM -0700, Andrii Nakryiko wrote: > > @@ -431,6 +431,7 @@ bpf_map__prev(const struct bpf_map *map, const struct > > bpf_object *obj); > > /* get/set map FD */ > > LIBBPF_API int bpf_map__fd(const struct bpf_map *map); > > LIBBPF_API int bpf_map__reuse_fd(struct bp

Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-29 Thread Martin Habets
On Mon, Sep 28, 2020 at 09:05:52PM +0100, Edward Cree wrote: > efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out > whether it is safe to sleep (for MCDI) or not. > The only caller from which it was not is efx_net_stats(), which can be > invoked under dev_base_lock from net-sysf

[RFC PATCH v2 net-next 02/21] net: mscc: ocelot: return error if VCAP filter is not found

2020-09-29 Thread Vladimir Oltean
From: Xiaoliang Yang Although it doesn't look like it is possible to hit these conditions from user space, there are 2 separate, but related, issues. First, the ocelot_vcap_block_get_filter_index function, née ocelot_ace_rule_get_index_id prior to the aae4e500e106 ("net: mscc: ocelot: generalize

[RFC PATCH v2 net-next 01/21] net: mscc: ocelot: introduce a new ocelot_target_{read,write} API

2020-09-29 Thread Vladimir Oltean
There are some targets (register blocks) in the Ocelot switch that are instantiated more than once. For example, the VCAP IS1, IS2 and ES0 blocks all share the same register layout for interacting with the cache for the TCAM and the action RAM. For the VCAPs, the procedure for servicing them is ac

[RFC PATCH v2 net-next 00/21] Offload tc-flower to mscc_ocelot switch using VCAP chains

2020-09-29 Thread Vladimir Oltean
The purpose of this patch is to add more comprehensive support for flow offloading in the mscc_ocelot library and switch drivers. The design (with chains) is the result of this discussion: https://lkml.org/lkml/2020/6/2/203 Still posting as RFC because there might still be some bugs and missing c

[RFC PATCH v2 net-next 08/21] net: mscc: ocelot: auto-detect VCAP ES0 and IS1 parameters

2020-09-29 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/ethernet/mscc/ocelot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 8a9ad0507b99..2eba6b5385d1 100644 --- a/drivers/net/ethernet/msc

[RFC PATCH v2 net-next 06/21] net: mscc: ocelot: add definitions for VCAP IS1 keys, actions and target

2020-09-29 Thread Vladimir Oltean
As a preparation step for the offloading to IS1, let's create the infrastructure for talking with this hardware block. Signed-off-by: Vladimir Oltean --- Changes in v2: Added definitions for VSC9953 and VSC7514. arch/mips/boot/dts/mscc/ocelot.dtsi| 3 +- drivers/net/dsa/ocelot/felix_vs

[RFC PATCH v2 net-next 21/21] selftests: ocelot: add some example VCAP IS1, IS2 and ES0 tc offloads

2020-09-29 Thread Vladimir Oltean
Provide an example script which can be used as a skeleton for offloading TCAM rules in the Ocelot switches. Signed-off-by: Vladimir Oltean --- Changes in v2: None. MAINTAINERS | 1 + .../drivers/net/ocelot/test_tc_chains.sh | 179 ++ 2 fi

[RFC PATCH v2 net-next 03/21] net: mscc: ocelot: generalize existing code for VCAP

2020-09-29 Thread Vladimir Oltean
In the Ocelot switches there are 3 TCAMs: VCAP ES0, IS1 and IS2, which have the same register layout but different actions. The Ocelot driver currently only supports VCAP IS2, the security enforcement block which implements Access Control List actions (trap, drop, police). In preparation of VCAP I

[RFC PATCH v2 net-next 07/21] net: mscc: ocelot: add definitions for VCAP ES0 keys, actions and target

2020-09-29 Thread Vladimir Oltean
As a preparation step for the offloading to ES0, let's create the infrastructure for talking with this hardware block. Signed-off-by: Vladimir Oltean --- Changes in v2: Added definitions for VSC9953 and VSC7514. arch/mips/boot/dts/mscc/ocelot.dtsi| 3 +- drivers/net/dsa/ocelot/felix_vs

[RFC PATCH v2 net-next 09/21] net: mscc: ocelot: parse flower action before key

2020-09-29 Thread Vladimir Oltean
When we'll make the switch to multiple chain offloading, we'll want to know first what VCAP block the rule is offloaded to. This impacts what keys are available. Since the VCAP block is determined by what actions are used, parse the action first. Signed-off-by: Vladimir Oltean --- Changes in v2:

[RFC PATCH v2 net-next 10/21] net: mscc: ocelot: offload multiple tc-flower actions in same rule

2020-09-29 Thread Vladimir Oltean
At this stage, the tc-flower offload of mscc_ocelot can only delegate rules to the VCAP IS2 security enforcement block. These rules have, in hardware, separate bits for policing and for overriding the destination port mask and/or copying to the CPU. So it makes sense that we attempt to expose some

[RFC PATCH v2 net-next 12/21] net: mscc: ocelot: add a new ocelot_vcap_block_find_filter_by_id function

2020-09-29 Thread Vladimir Oltean
And rename the existing find to ocelot_vcap_block_find_filter_by_index. The index is the position in the TCAM, and the id is the flow cookie given by tc. Signed-off-by: Vladimir Oltean --- Changes in v2: None. drivers/net/ethernet/mscc/ocelot_vcap.c | 26 ++--- drivers/net/e

[RFC PATCH v2 net-next 11/21] net: mscc: ocelot: change vcap to be compatible with full and quad entry

2020-09-29 Thread Vladimir Oltean
From: Xiaoliang Yang When calculating vcap data offset, the function only supports half key entry. This patch modify vcap_data_offset_get function to calculate a correct data offset when setting VCAP Type-Group to VCAP_TG_FULL or VCAP_TG_QUARTER. Signed-off-by: Xiaoliang Yang --- Changes in v2:

[RFC PATCH v2 net-next 05/21] net: mscc: ocelot: automatically detect VCAP IS2 constants

2020-09-29 Thread Vladimir Oltean
The numbers in struct vcap_props may be fun to look at, but they are not fun to derive, especially since they are not a straightforward copy-and-paste from the reference manual. Ease the work of hardware porters and read from hardware the constants that were exported for this particular purpose. N

[RFC PATCH v2 net-next 04/21] net: mscc: ocelot: auto-detect packet buffer size and number of frame references

2020-09-29 Thread Vladimir Oltean
Since we can read these parameters from hardware, let's do that and avoid errors in the future. Rename the confusing "shared queue size" to "packet buffer size" while at it. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. drivers/net/dsa/ocelot/felix.c | 1 - drive

[RFC PATCH v2 net-next 20/21] net: mscc: ocelot: offload redirect action to VCAP IS2

2020-09-29 Thread Vladimir Oltean
Via the OCELOT_MASK_MODE_REDIRECT flag put in the IS2 action vector, it is possible to replace previous forwarding decisions with the port mask installed in this rule. I have studied Table 54 "MASK_MODE and PORT_MASK Combinations" from the VSC7514 documentation and it appears to behave sanely when

[RFC PATCH v2 net-next 19/21] net: mscc: ocelot: relax ocelot_exclusive_mac_etype_filter_rules()

2020-09-29 Thread Vladimir Oltean
The issue which led to the introduction of this check was that MAC_ETYPE rules, such as filters on dst_mac and src_mac, would only match non-IP frames. There is a knob in VCAP_S2_CFG which forces all IP frames to be treated as non-IP, which is what we're currently doing if the user requested a dst_

[RFC PATCH v2 net-next 16/21] net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1

2020-09-29 Thread Vladimir Oltean
From: Xiaoliang Yang VCAP IS1 is a VCAP module which can filter on the most common L2/L3/L4 Ethernet keys, and modify the results of the basic QoS classification and VLAN classification based on those flow keys. There are 3 VCAP IS1 lookups, mapped over chains 1, 11000 and 12000. Currently t

[RFC PATCH v2 net-next 17/21] net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0

2020-09-29 Thread Vladimir Oltean
From: Xiaoliang Yang VCAP ES0 is an egress VCAP operating on all outgoing frames. This patch added ES0 driver to support vlan push action of tc filter. Usage: tc filter add dev swp1 egress protocol 802.1Q flower indev swp0 skip_sw \ vlan_id 1 vlan_prio 1 action vlan push id 2 priority 2

[RFC PATCH v2 net-next 15/21] net: mscc: ocelot: create TCAM skeleton from tc filter chains

2020-09-29 Thread Vladimir Oltean
For Ocelot switches, there are 2 ingress pipelines for flow offload rules: VCAP IS1 (Ingress Classification) and IS2 (Security Enforcement). IS1 and IS2 support different sets of actions. The pipeline order for a packet on ingress is: Basic classification -> VCAP IS1 -> VCAP IS2 Furthermore, IS1

[RFC PATCH v2 net-next 13/21] net: mscc: ocelot: look up the filters in flower_stats() and flower_destroy()

2020-09-29 Thread Vladimir Oltean
Currently a new filter is created, containing just enough correct information to be able to call ocelot_vcap_block_find_filter_by_index() on it. This will be limiting us in the future, when we'll have more metadata associated with a filter, which will matter in the stats() and destroy() callbacks,

[RFC PATCH v2 net-next 14/21] net: mscc: ocelot: introduce conversion helpers between port and netdev

2020-09-29 Thread Vladimir Oltean
Since the mscc_ocelot_switch_lib is common between a pure switchdev and a DSA driver, the procedure of retrieving a net_device for a certain port index differs, as those are registered by their individual front-ends. Up to now that has been dealt with by always passing the port index to the switch

[RFC PATCH v2 net-next 18/21] net: mscc: ocelot: only install TCAM entries into a specific lookup and PAG

2020-09-29 Thread Vladimir Oltean
We were installing TCAM rules with the LOOKUP field as unmasked, meaning that all entries were matching on all lookups. Now that lookups are exposed as individual chains, let's make the LOOKUP explicit when offloading TCAM entries. Signed-off-by: Vladimir Oltean --- Changes in v2: None. drivers

build failure (BTFIDS) with CONFIG_NET && !CONFIG_INET

2020-09-29 Thread Michal Kubecek
Hello, our builds of s390x for zfcpdump fail since 5.9-rc1 with BTFIDS vmlinux FAILED unresolved symbol tcp_timewait_sock make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-zfcpdump-5.9.rc7/linux-5.9-rc7/Makefile:1176: vmlinux] Error 255 I believe this is caused by commit fce557bcef11 (

[PATCH v2] net/mlx5e: Fix use of freed pointer

2020-09-29 Thread Alex Dewar
If the call to mlx5_fc_create() fails, then shared_counter will be freed before its member, shared_counter->counter, is accessed to retrieve the error code. Fix by using an intermediate variable. Addresses-Coverity: CID 1497153: Memory - illegal accesses (USE_AFTER_FREE) Fixes: 1edae2335adf ("net/

Re: [PATCH bpf-next v9 04/11] bpf: move prog->aux->linked_prog and trampoline into bpf_link on attach

2020-09-29 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Fri, Sep 25, 2020 at 11:25:03PM +0200, Toke Høiland-Jørgensen wrote: >> >> int bpf_check_attach_target(struct bpf_verifier_log *log, >> const struct bpf_prog *prog, >> -const struct bpf_prog *tgt_prog, >> +

Re: [PATCH linux-can-next/flexcan 3/4] can: flexcan: add CAN wakeup function for i.MX8

2020-09-29 Thread Marc Kleine-Budde
On 9/25/20 5:10 PM, Joakim Zhang wrote: > The System Controller Firmware (SCFW) is a low-level system function > which runs on a dedicated Cortex-M core to provide power, clock, and > resource management. It exists on some i.MX8 processors. e.g. i.MX8QM > (QM, QP), and i.MX8QX (QXP, DX). > > SCU d

Re: [PATCH V3 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-29 Thread Marc Kleine-Budde
On 9/28/20 8:02 PM, Joakim Zhang wrote: > One issue was reported at a baremetal environment, which is used for > FPGA verification. "The first transfer will fail for extended ID > format(for both 2.0B and FD format), following frames can be transmitted > and received successfully for extended forma

[PATCH 4.4 01/85] af_key: pfkey_dump needs parameter validation

2020-09-29 Thread Greg Kroah-Hartman
From: Mark Salyzyn commit 37bd22420f856fcd976989f1d4f1f7ad28e1fcac upstream. In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return EINVAL if either are out of r

pull request: bluetooth-next 2020-09-29

2020-09-29 Thread Johan Hedberg
Hi Dave, Here's the main bluetooth-next pull request for 5.10: - Multiple fixes to suspend/resume handling - Added mgmt events for controller suspend/resume state - Improved extended advertising support - btintel: Enhanced support for next generation controllers - Added Qualcomm Bluetooth So

[PATCH 4.9 001/121] af_key: pfkey_dump needs parameter validation

2020-09-29 Thread Greg Kroah-Hartman
From: Mark Salyzyn commit 37bd22420f856fcd976989f1d4f1f7ad28e1fcac upstream. In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return EINVAL if either are out of r

[PATCH 4.14 001/166] af_key: pfkey_dump needs parameter validation

2020-09-29 Thread Greg Kroah-Hartman
From: Mark Salyzyn commit 37bd22420f856fcd976989f1d4f1f7ad28e1fcac upstream. In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return EINVAL if either are out of r

Re: [PATCH V3 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-29 Thread Marc Kleine-Budde
On 9/29/20 1:27 PM, Joakim Zhang wrote: > [...] >>> + reg_ctrl2 = priv->read(®s->ctrl2); >>> + reg_ctrl2 |= FLEXCAN_CTRL2_WRMFRZ; >>> + priv->write(reg_ctrl2, ®s->ctrl2); >>> + >>> + /* ranging from 0x0080 to 0x0ADF, ram details as below list: >>> +* 0x0080--0x087F: 128 MBs >>> +

[PATCH bpf-next 1/2] selftests/bpf: fix unused-result warning in snprintf_btf.c

2020-09-29 Thread Alan Maguire
Daniel reports: +system("ping -c 1 127.0.0.1 > /dev/null"); This generates the following new warning when compiling BPF selftests: [...] EXT-OBJ [test_progs] cgroup_helpers.o EXT-OBJ [test_progs] trace_helpers.o EXT-OBJ [test_progs] network_helpers.o EXT-OBJ [test_progs] testin

[PATCH v2 devicetree 2/2] powerpc: dts: t1040rdb: add ports for Seville Ethernet switch

2020-09-29 Thread Vladimir Oltean
From: Vladimir Oltean Define the network interface names for the switch ports and hook them up to the 2 QSGMII PHYs that are onboard. A conscious decision was taken to go along with the numbers that are written on the front panel of the board and not with the hardware numbers of the switch chip

[PATCH 5.4 287/388] perf metricgroup: Free metric_events on error

2020-09-29 Thread Greg Kroah-Hartman
From: Ian Rogers [ Upstream commit a159e2fe89b4d1f9fb54b0ae418b961e239bf617 ] Avoid a simple memory leak. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Cong Wang Cc: Daniel Borkmann Cc: Jin Yao Cc: Jiri Olsa Cc: John Fast

  1   2   3   4   5   >