Re: [PATCH bpf-next v2 1/5] selftests/bpf: generalize helpers to control background listener

2020-05-06 Thread Martin KaFai Lau
On Tue, May 05, 2020 at 01:27:26PM -0700, Stanislav Fomichev wrote: > Move the following routines that let us start a background listener > thread and connect to a server by fd to the test_prog: > * start_server_thread - start background INADDR_ANY thread > * stop_server_thread - stop the thread >

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Bartosz Golaszewski
Hi Andrew, thanks for the review. wt., 5 maj 2020 o 19:47 Andrew Lunn napisał(a): > > > +static struct net_device *mtk_mac_get_netdev(struct mtk_mac_priv *priv) > > +{ > > + char *ptr = (char *)priv; > > + > > + return (struct net_device *)(ptr - ALIGN(sizeof(struct net_device), > > +

Re: [PATCH bpf-next 0/4] RV64 BPF JIT Optimizations

2020-05-06 Thread Björn Töpel
On Wed, 6 May 2020 at 02:03, Luke Nelson wrote: > > This patch series introduces a set of optimizations to the BPF JIT > on RV64. The optimizations are related to the verifier zero-extension > optimization and BPF_JMP BPF_K. > > We tested the optimizations on a QEMU riscv64 virt machine, using > l

Re: [PATCH 06/11] net: ethernet: mtk-eth-mac: new driver

2020-05-06 Thread Bartosz Golaszewski
Hi Jakub, thanks for the review. wt., 5 maj 2020 o 20:04 Jakub Kicinski napisał(a): > > > +/* Represents the actual structure of descriptors used by the MAC. We can > > + * reuse the same structure for both TX and RX - the layout is the same, > > only > > + * the flags differ slightly. > > + */

Re: [EXT] [PATCH 1/2] net: qed*: Reduce RX and TX default ring count when running inside kdump kernel

2020-05-06 Thread Bhupesh Sharma
Hello Igor, On Wed, May 6, 2020 at 12:21 PM Igor Russkikh wrote: > > > > > #include > > +#include > > #include > > #include > > #include > > @@ -574,13 +575,13 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, > > __be16 proto, > > #define RX_RING_SIZE ((u16)BIT(RX_RING_SIZE

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > Hi Michael > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Monday, May 4, 2020 8:16 PM > > To: Linus Torvalds > > Cc: k...@vger.kernel.org; virtualizat...@lists.linux-foundation.org; > > netdev@vger.kernel.org;

Re: [RFC PATCH bpf-next 04/13] xsk: introduce AF_XDP buffer allocation API

2020-05-06 Thread Björn Töpel
On Tue, 5 May 2020 at 16:28, Maxim Mikityanskiy wrote: > [...] > > > > - if (((d->addr + d->len) & q->chunk_mask) != (d->addr & q->chunk_mask) > > || > > - d->options) { > > +static inline bool xskq_cons_is_valid_desc(struct xsk_queue *q, > > +s

Re: [PATCH bpf-next v2 11/20] bpf: add task and task/file iterator targets

2020-05-06 Thread Andrii Nakryiko
On Sun, May 3, 2020 at 11:28 PM Yonghong Song wrote: > > Only the tasks belonging to "current" pid namespace > are enumerated. > > For task/file target, the bpf program will have access to > struct task_struct *task > u32 fd > struct file *file > where fd/file is an open file for the task. >

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-06 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 07:24:18PM -0700, Eric Dumazet wrote: > > > On 5/5/20 6:25 PM, Michael S. Tsirkin wrote: > > On Tue, May 05, 2020 at 06:19:09PM -0700, Eric Dumazet wrote: > >> > >> > >> On 5/5/20 5:43 PM, Michael S. Tsirkin wrote: > >>> On Tue, May 05, 2020 at 03:40:09PM -0700, Eric Dumaz

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Greg KH
On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > Hi Michael > > > > > -Original Message- > > > From: Michael S. Tsirkin > > > Sent: Monday, May 4, 2020 8:16 PM > > > To: Linus Torvalds > > > Cc: k...@vger

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > We should not exclude headroom and tailroom when XDP is set. So this > patch fixes this by initializing the truesize from PAGE_SIZE when XDP > is set. > > Cc: Jesper Dangaard Brouer > Signed-off-by: Jason Wang Seems too aggressive, w

Re: cgroup pointed by sock is leaked on mode switch

2020-05-06 Thread Zefan Li
On 2020/5/6 10:16, Zefan Li wrote: On 2020/5/6 9:50, Yang Yingliang wrotee: +cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is increasing: linux-dVpNUK:~ # find /sys/

[PATCH v1 net-next 1/6] net: mscc: ocelot: introduce a new ocelot_target_{read,write} API

2020-05-06 Thread Xiaoliang Yang
From: 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

[PATCH v1 net-next 3/6] net: mscc: ocelot: change vcap to be compatible with full and quad entry

2020-05-06 Thread 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 --- drivers/net/ethernet/mscc/ocelot_ace

[PATCH v1 net-next 2/6] net: mscc: ocelot: generalize existing code for VCAP IS2

2020-05-06 Thread Xiaoliang Yang
From: Vladimir Oltean The Ocelot driver only supports VCAP IS2, the security enforcement block which implements Access Control List actions (trap, drop, police). In preparation of VCAP IS1 support, generalize the existing code to work with any VCAP. In that direction, move all VCAP instantiation

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: > We tried to reserve space for vnet header before > xdp.data_hard_start. But this is useless since the packet could be > modified by XDP which may invalidate the information stored in the > header and there's no way for XDP to know the ex

[PATCH v1 net-next 5/6] net: mscc: ocelot: VCAP ES0 support

2020-05-06 Thread Xiaoliang Yang
VCAP ES0 is an egress VCAP working 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 skip_sw vlan_id 1 vlan_prio 1 action vlan push id 2 priority 2 Signed-off-by: Xiaoliang Yang

[PATCH v1 net-next 4/6] net: mscc: ocelot: VCAP IS1 support

2020-05-06 Thread Xiaoliang Yang
VCAP IS1 is a VCAP module which can filter MAC, IP, VLAN, protocol, and TCP/UDP ports keys, and do Qos and VLAN retag actions. This patch added VCAP IS1 support in ocelot ace driver, which can supports vlan modify action of tc filter. Usage: tc qdisc add dev swp0 ingress tc filter a

[PATCH v1 net-next 6/6] net: dsa: tag_ocelot: use VLAN information from tagging header when available

2020-05-06 Thread Xiaoliang Yang
From: Vladimir Oltean When the Extraction Frame Header contains a valid classified VLAN, use that instead of the VLAN header present in the packet. Signed-off-by: Vladimir Oltean --- net/dsa/tag_ocelot.c | 29 + 1 file changed, 29 insertions(+) diff --git a/net/dsa

[PATCH v1 net-next 0/6] net: ocelot: VCAP IS1 and ES0 support

2020-05-06 Thread Xiaoliang Yang
This series patches adds support for VCAP IS1 and ES0 module. VCAP IS1 supports FLOW_ACTION_VLAN_MANGLE action to filter MAC, IP, VLAN, protocol, and TCP/UDP ports keys and retag vlan tag. VCAP ES0 supports FLOW_ACTION_VLAN_PUSH action to filter vlan keys and push a specific vlan tag to frames.

Re: [PATCH net-next 10/11] s390/qeth: allow reset via ethtool

2020-05-06 Thread Julian Wiedmann
On 05.05.20 23:28, Jakub Kicinski wrote: > On Tue, 5 May 2020 21:57:43 +0200 Julian Wiedmann wrote: >>> This is the comment from the uAPI header: >>> >>> /* The reset() operation must clear the flags for the components which >>> * were actually reset. On successful return, the flags indicate the

Re: [PATCH bpf-next 0/4] RV64 BPF JIT Optimizations

2020-05-06 Thread Daniel Borkmann
On 5/6/20 9:08 AM, Björn Töpel wrote: On Wed, 6 May 2020 at 02:03, Luke Nelson wrote: This patch series introduces a set of optimizations to the BPF JIT on RV64. The optimizations are related to the verifier zero-extension optimization and BPF_JMP BPF_K. We tested the optimizations on a QEMU

performance bug in virtio net xdp

2020-05-06 Thread Michael S. Tsirkin
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay aro

[PATCH v2 net-next 05/10] s390/qeth: don't use restricted offloads for local traffic

2020-05-06 Thread Julian Wiedmann
Current OSA models don't support TSO for traffic to local next-hops, and some old models didn't offer TX CSO for such packets either. So as part of .ndo_features_check, check if a packet's next-hop resides on the same OSA Adapter. Opt out from affected HW offloads accordingly. Signed-off-by: Juli

[PATCH v2 net-next 01/10] s390/qeth: keep track of LP2LP capability for csum offload

2020-05-06 Thread Julian Wiedmann
When enabling TX CSO, make a note of whether the device has support for LP2LP offloading. This will become relevant in subsequent patches. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 3 +++ drivers/s390/net/qeth_core_main.c | 23 ++- 2 files change

[PATCH v2 net-next 03/10] s390/qeth: add debugfs file for local IP addresses

2020-05-06 Thread Julian Wiedmann
For debugging purposes, provide read access to the local_addr caches via debug/qeth//local_addrs. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 2 ++ drivers/s390/net/qeth_core_main.c | 32 ++- 2 files changed, 33 insertions(+), 1 deletion(-)

[PATCH v2 net-next 07/10] s390/qeth: indicate contiguous TX buffer elements

2020-05-06 Thread Julian Wiedmann
The TX path usually maps the full content of a page into a buffer element. But there's specific skb layouts (ie. linearized TSO skbs) where the HW header (1) requires a separate buffer element, and (2) is page-contiguous with the packet data that's mapped into the next buffer element. Flag such buf

[PATCH v2 net-next 02/10] s390/qeth: process local address events

2020-05-06 Thread Julian Wiedmann
In configurations where specific HW offloads are in use, OSA adapters will raise notifications to their virtual devices about the IP addresses that currently reside on the same adapter. Cache these addresses in two RCU-enabled hash tables, and flush the tables once the relevant HW offload(s) get di

[PATCH v2 net-next 09/10] s390/qeth: return error when starting a reset fails

2020-05-06 Thread Julian Wiedmann
When starting the reset worker via sysfs is unsuccessful, return an error to the user. Modernize the sysfs input parsing while at it. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter --- drivers/s390/net/qeth_core.h | 2 +- drivers/s390/net/qeth_core_main.c | 26 ++

[PATCH v2 net-next 10/10] s390/qeth: clean up Kconfig help text

2020-05-06 Thread Julian Wiedmann
Remove a stale doc link. While at it also reword the help text to get rid of an outdated marketing term. Signed-off-by: Julian Wiedmann --- drivers/s390/net/Kconfig | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig in

[PATCH v2 net-next 00/10] s390/qeth: updates 2020-05-06

2020-05-06 Thread Julian Wiedmann
Hi Dave, please apply the following patch series for qeth to netdev's net-next tree. Same patches as yesterday, except that the ethtool reset has been dropped for now. This primarily adds infrastructure to deal with HW offloads when the packets get forwarded over the adapter's internal switch. As

[PATCH v2 net-next 06/10] s390/qeth: merge TX skb mapping code

2020-05-06 Thread Julian Wiedmann
Merge the __qeth_fill_buffer() helper into its only caller. This way all mapping-related context is in one place, and we can make some more use of it in a subsequent patch. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 64 +-- 1 file changed,

[PATCH v2 net-next 04/10] s390/qeth: extract helpers for next-hop lookup

2020-05-06 Thread Julian Wiedmann
These will be used in a subsequent patch. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h| 29 ++--- drivers/s390/net/qeth_l3_main.c | 18 +- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/s390/net/qeth_core.h

[PATCH v2 net-next 08/10] s390/qeth: set TX IRQ marker on last buffer in a group

2020-05-06 Thread Julian Wiedmann
When qeth_flush_buffers() gets called for a group of TX buffers (currently up to 2 for OSA-style devices), the code iterates over each buffer for some final processing. During this processing, it sets the TX IRQ marker on the leading buffer rather than the last one. This can result in delayed TX c

Re: [BUG] Inconsistent lock state in virtnet poll

2020-05-06 Thread Jason Wang
On 2020/5/6 下午3:31, Michael S. Tsirkin wrote: On Tue, May 05, 2020 at 07:24:18PM -0700, Eric Dumazet wrote: On 5/5/20 6:25 PM, Michael S. Tsirkin wrote: On Tue, May 05, 2020 at 06:19:09PM -0700, Eric Dumazet wrote: On 5/5/20 5:43 PM, Michael S. Tsirkin wrote: On Tue, May 05, 2020 at 03:40:0

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jason Wang
On 2020/5/6 下午3:53, Michael S. Tsirkin wrote: On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the heade

Re: [PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers

2020-05-06 Thread Jason Wang
On 2020/5/6 下午3:37, Michael S. Tsirkin wrote: On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: We should not exclude headroom and tailroom when XDP is set. So this patch fixes this by initializing the truesize from PAGE_SIZE when XDP is set. Cc: Jesper Dangaard Brouer Signed-off-by

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jesper Dangaard Brouer
On Wed, 6 May 2020 14:16:32 +0800 Jason Wang wrote: > We tried to reserve space for vnet header before > xdp.data_hard_start. But this is useless since the packet could be > modified by XDP which may invalidate the information stored in the > header and IMHO above statements are wrong. XDP cann

Re: [PATCH v2 1/2] iopoll: Introduce read_poll_timeout_atomic macro

2020-05-06 Thread Kalle Valo
Kai-Heng Feng wrote: > Like read_poll_timeout, an atomic variant for multiple parameter read > function can be useful. > > Will be used by a later patch. > > Signed-off-by: Kai-Heng Feng Patch applied to wireless-drivers-next.git, thanks. 57a29df34146 iopoll: Introduce read_poll_timeout_atom

Re: [PATCH v2 2/2] rtw88: Use udelay instead of usleep in atomic context

2020-05-06 Thread Kalle Valo
Kai-Heng Feng wrote: > It's incorrect to use usleep in atomic context. > > Switch to a macro which uses udelay instead of usleep to prevent the issue. > > Fixes: 6343a6d4b213 ("rtw88: Add delay on polling h2c command status bit") > Signed-off-by: Kai-Heng Feng Patch applied to wireless-driver

Re: [PATCH v2] ipw2x00: Remove a memory allocation failure log message

2020-05-06 Thread Kalle Valo
Christophe JAILLET wrote: > Axe a memory allocation failure log message. This message is useless and > incorrect (vmalloc is not used here for the memory allocation) > > This has been like that since the very beginning of this driver in > commit 43f66a6ce8da ("Add ipw2200 wireless driver.") > >

Re: [PATCH] rtlwifi: use true,false for bool variable in rtl_init_rfkill()

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > The 'blocked' is a bool variable, and '==' expression itself is bool > too. So no need to convert it to 0/1. > > This fixes the following coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/base.c:508:13-41: WARNING: > Comparison of 0/1 to bool variable > > Signed-o

Re: [PATCH v2] ray_cs: use true,false for bool variable

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/ray_cs.c:2797:5-14: WARNING: Comparison of 0/1 to > bool variable > drivers/net/wireless/ray_cs.c:2798:2-11: WARNING: Assignment of 0/1 to > bool variable > > Signed-off-by: Jason Yan Patch applied to wireless-d

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Jason Wang
On 2020/5/6 下午4:21, Jesper Dangaard Brouer wrote: On Wed, 6 May 2020 14:16:32 +0800 Jason Wang wrote: We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the header

Re: performance bug in virtio net xdp

2020-05-06 Thread Jason Wang
On 2020/5/6 下午4:08, Michael S. Tsirkin wrote: So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen

Re: performance bug in virtio net xdp

2020-05-06 Thread Jesper Dangaard Brouer
On Wed, 6 May 2020 04:08:27 -0400 "Michael S. Tsirkin" wrote: > So for mergeable bufs, we use ewma machinery to guess the correct buffer > size. If we don't guess correctly, XDP has to do aggressive copies. > > Problem is, xdp paths do not update the ewma at all, except > sometimes with XDP_PASS

Re: [PATCH net v1] rtw88: fix an issue about leak system resources

2020-05-06 Thread Kalle Valo
Dejin Zheng wrote: > the related system resources were not released when pci_iomap() return > error in the rtw_pci_io_mapping() function. add pci_release_regions() to > fix it. > > Fixes: e3037485c68ec1a ("rtw88: new Realtek 802.11ac driver") > Cc: Andy Shevchenko > Signed-off-by: Dejin Zheng

Re: [PATCH] brcmfmac: remove Comparison to bool in brcmf_p2p_send_action_frame()

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1781:9-12: > WARNING: Comparison to bool > drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1785:5-8: > WARNING: Comparison to bool > > Signed-off-by: Jason Yan > Reviewed-

Re: [PATCH] brcmsmac: remove Comparison to bool in brcms_b_txstatus()

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:1060:6-12: > WARNING: Comparison to bool > > Signed-off-by: Jason Yan Patch applied to wireless-drivers-next.git, thanks. 4f5cf93395d7 brcmsmac: remove Comparison to bool in b

Re: [PATCH] rtlwifi: remove comparison of 0/1 to bool variable

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > The variable 'rtlpriv->rfkill.rfkill_state' is bool and can directly > assigned to bool values. > > Fix the following coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/core.c:1725:14-42: WARNING: > Comparison of 0/1 to bool variable > > Signed-off-by: Jason Yan

Re: [PATCH 03/15] mwifiex: avoid -Wstringop-overflow warning

2020-05-06 Thread Kalle Valo
Arnd Bergmann wrote: > gcc-10 reports a warning for mwifiex_cmd_802_11_key_material_v1: > > drivers/net/wireless/marvell/mwifiex/sta_cmd.c: In function > 'mwifiex_cmd_802_11_key_material_v1': > cc1: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=] > In file included from

Re: [PATCH] libertas_tf: avoid a null dereference in pointer priv

2020-05-06 Thread Kalle Valo
Colin King wrote: > From: Colin Ian King > > Currently there is a check if priv is null when calling lbtf_remove_card > but not in a previous call to if_usb_reset_dev that can also dereference > priv. Fix this by also only calling lbtf_remove_card if priv is null. > > It is noteable that ther

Re: [PATCH] b43: remove Comparison of 0/1 to bool variable in phy_n.c

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/broadcom/b43/phy_n.c:5510:19-32: WARNING: > Comparison of 0/1 to bool variable > > Signed-off-by: Jason Yan Patch applied to wireless-drivers-next.git, thanks. e2b9ac590810 b43: remove Comparison of 0/1 to bool

Re: [PATCH] b43: remove Comparison of 0/1 to bool variable in pio.c

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/broadcom/b43/pio.c:768:10-25: WARNING: Comparison > of 0/1 to bool variable > > Signed-off-by: Jason Yan Patch applied to wireless-drivers-next.git, thanks. f8f24ece2192 b43: remove Comparison of 0/1 to bool va

Re: [PATCH] rtlwifi: rtl8188ee: remove Comparison to bool in rf.c

2020-05-06 Thread Kalle Valo
Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c:476:6-14: WARNING: > Comparison to bool > drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c:54:5-22: WARNING: > Comparison to bool > > Signed-off-by: Jason Yan Patch applied to w

Re: [PATCH bpf-next v2] libbpf: fix probe code to return EPERM if encountered

2020-05-06 Thread Eelco Chaudron
On 4 May 2020, at 20:43, Andrii Nakryiko wrote: On Mon, May 4, 2020 at 2:13 AM Eelco Chaudron wrote: When the probe code was failing for any reason ENOTSUP was returned, even if this was due to no having enough lock space. This patch fixes this by returning EPERM to the user application,

[v4,iproute2-next 1/2] iproute2-next:tc:action: add a gate control action

2020-05-06 Thread Po Liu
Introduce a ingress frame gate control flow action. Tc gate action does the work like this: Assume there is a gate allow specified ingress frames can pass at specific time slot, and also drop at specific time slot. Tc filter chooses the ingress frames, and tc gate action would specify what slot doe

[v4,iproute2-next 2/2] iproute2-next: add gate action man page

2020-05-06 Thread Po Liu
This patch is to add the man page for the tc gate action. Signed-off-by: Po Liu --- man/man8/tc-gate.8 | 123 + 1 file changed, 123 insertions(+) create mode 100644 man/man8/tc-gate.8 diff --git a/man/man8/tc-gate.8 b/man/man8/tc-gate.8 new file mode

Re: [PATCH] netfilter: fix make target xt_TCPMSS.o error.

2020-05-06 Thread Jan Engelhardt
On Wednesday 2020-05-06 08:50, Huang Qijun wrote: >When compiling netfilter, there will be an error >"No rule to make target 'net/netfilter/xt_TCPMSS.o'", >because the xt_TCPMSS.c in the makefile is uppercase, >and the file name of the source file (xt_tcpmss.c) is lowercase. >-obj-$(CONFIG_NETFIL

Re: [RFC PATCHv2 bpf-next 1/2] xdp: add a new helper for dev map multicast support

2020-05-06 Thread Hangbin Liu
Hi Toke, Thanks for your review, please see replies below. On Fri, Apr 24, 2020 at 04:34:49PM +0200, Toke Høiland-Jørgensen wrote: > > > > The general data path is kept in net/core/filter.c. The native data > > path is in kernel/bpf/devmap.c so we can use direct calls to > > get better performace

[PATCH net-next] net: renesas: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/renesas/sh_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ren

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Stefano Garzarella
On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > Hi Michael > > > > > -Original Message- > > > From: Michael S. Tsirkin > > > Sent: Monday, May 4, 2020 8:16 PM > > > To: Linus Torvalds > > > Cc: k...@vger

Re: [RFC PATCHv2 bpf-next 1/2] xdp: add a new helper for dev map multicast support

2020-05-06 Thread Hangbin Liu
Hi Lorenzo, Thanks for the comments, please see replies below. On Fri, Apr 24, 2020 at 04:19:08PM +0200, Lorenzo Bianconi wrote: > > +bool dev_in_exclude_map(struct bpf_dtab_netdev *obj, struct bpf_map *map, > > + int exclude_ifindex) > > +{ > > + struct bpf_dtab_netdev *in_

Re: [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'

2020-05-06 Thread Karsten Graul
On 06/05/2020 08:55, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: Thank you, good catch. Your patch will be part of our next patch submission. Regards, Karsten > > net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link': > net/smc/smc_llc.c:753:31: warning: > variable 'del

Re: [GIT PULL] vhost: fixes

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 11:25:46AM +0200, Stefano Garzarella wrote: > On Wed, May 06, 2020 at 03:19:55AM -0400, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 03:28:47AM +, Justin He wrote: > > > Hi Michael > > > > > > > -Original Message- > > > > From: Michael S. Tsirkin > > >

Re: WARNING: proc registration bug in snmp6_register_dev

2020-05-06 Thread syzbot
syzbot has bisected this bug to: commit e0a4b99773d3d8d3fb40087805f8fd858a23e582 Author: Taehee Yoo Date: Fri Feb 28 18:02:10 2020 + hsr: use upper/lower device infrastructure bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1481118210 start commit: ac935d22 Add linu

Re: [PATCH v1 net-next 4/6] net: mscc: ocelot: VCAP IS1 support

2020-05-06 Thread Allan W. Nielsen
Hi Xiaoliang, On 06.05.2020 15:48, Xiaoliang Yang wrote: VCAP IS1 is a VCAP module which can filter MAC, IP, VLAN, protocol, and TCP/UDP ports keys, and do Qos and VLAN retag actions. This patch added VCAP IS1 support in ocelot ace driver, which can supports vlan modify action of tc filter. Usag

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:34:36PM +0800, Jason Wang wrote: > > On 2020/5/6 下午4:21, Jesper Dangaard Brouer wrote: > > On Wed, 6 May 2020 14:16:32 +0800 > > Jason Wang wrote: > > > > > We tried to reserve space for vnet header before > > > xdp.data_hard_start. But this is useless since the packe

Re: [PATCH net-next] net: bridge: return false in br_mrp_enabled()

2020-05-06 Thread Nikolay Aleksandrov
On 06/05/2020 09:16, Jason Yan wrote: > Fix the following coccicheck warning: > > net/bridge/br_private.h:1334:8-9: WARNING: return of 0/1 in function > 'br_mrp_enabled' with return type bool > > Signed-off-by: Jason Yan > --- > net/bridge/br_private.h | 2 +- > 1 file changed, 1 insertion(+),

Re: [RFC PATCH bpf-next 04/13] xsk: introduce AF_XDP buffer allocation API

2020-05-06 Thread Maxim Mikityanskiy
On 2020-05-04 14:37, Björn Töpel wrote: From: Björn Töpel In order to simplify AF_XDP zero-copy enablement for NIC driver developers, a new AF_XDP buffer allocation API is added. The implementation is based on a single core (single producer/consumer) buffer pool for the AF_XDP UMEM. A buffer i

Re: [PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP

2020-05-06 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 04:19:40PM +0800, Jason Wang wrote: > > On 2020/5/6 下午3:53, Michael S. Tsirkin wrote: > > On Wed, May 06, 2020 at 02:16:32PM +0800, Jason Wang wrote: > > > We tried to reserve space for vnet header before > > > xdp.data_hard_start. But this is useless since the packet could

Re: [RFC PATCHv2 bpf-next 1/2] xdp: add a new helper for dev map multicast support

2020-05-06 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > Hi Toke, > > Thanks for your review, please see replies below. > > On Fri, Apr 24, 2020 at 04:34:49PM +0200, Toke Høiland-Jørgensen wrote: >> > >> > The general data path is kept in net/core/filter.c. The native data >> > path is in kernel/bpf/devmap.c so we can use direct c

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-06 Thread Jan Kara
On Wed 06-05-20 02:06:56, Souptick Joarder wrote: > On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: > > > > On 2020-05-05 12:14, Souptick Joarder wrote: > > > Currently {get|pin}_user_pages_fast() have 3 return value 0, -errno > > > and no of pinned pages. The only case where these two function

Re: [RFC net-next] net: phy: at803x: add cable diagnostics support

2020-05-06 Thread Michael Walle
Am 2020-05-06 11:01, schrieb Matthias May: I've worked with this PHY quite often and we've hacked together some support for the CDT in uboot. Have you done any tests with the cable on the other side being plugged in? yes With the cable being plugged in, we something (1 out of 10 or so) obs

[PATCH 1/2 net] net: mvpp2: prevent buffer overflow in mvpp22_rss_ctx()

2020-05-06 Thread Dan Carpenter
The "rss_context" variable comes from the user via ethtool_get_rxfh(). It can be any u32 value except zero. Eventually it gets passed to mvpp22_rss_ctx() and if it is over MVPP22_N_RSS_TABLES (8) then it results in an array overflow. Fixes: 895586d5dc32 ("net: mvpp2: cls: Use RSS contexts to han

[PATCH 2/2 net] net: mvpp2: cls: Prevent buffer overflow in mvpp2_ethtool_cls_rule_del()

2020-05-06 Thread Dan Carpenter
The "info->fs.location" is a u32 that comes from the user via the ethtool_set_rxnfc() function. We need to check for invalid values to prevent a buffer overflow. I copy and pasted this check from the mvpp2_ethtool_cls_rule_ins() function. Fixes: 90b509b39ac9 ("net: mvpp2: cls: Add Classification

Re: [PATCH net-next v2 3/3] net: phy: mscc: use phy_package_shared

2020-05-06 Thread Antoine Tenart
Hello Michael, Quoting Michael Walle (2020-05-04 23:31:36) > > diff --git a/drivers/net/phy/mscc/mscc_main.c > b/drivers/net/phy/mscc/mscc_main.c > index 5391acdece05..a505286b2195 100644 > --- a/drivers/net/phy/mscc/mscc_main.c > +++ b/drivers/net/phy/mscc/mscc_main.c > -static bool vsc8584_is_

[PATCH net] netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code

2020-05-06 Thread Dan Carpenter
Smatch complains that the value for "cmd" comes from the network and can't be trusted. The value is actually checked at the end of these functions so I just copied that here as well. Fixes: f09943fefe6b ("[NETFILTER]: nf_conntrack/nf_nat: add PPTP helper port") Signed-off-by: Dan Carpenter ---

Re: [PATCH v2 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-05-06 Thread Paul Blakey
On 5/6/2020 5:16 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > goto action"), will decapsulate the tunnel packets if there is a goto > action in chain 0. But in some case, we don't want do that, for example:

Re: [PATCH v2 1/3] net/mlx5e: Implicitly decap the tunnel packet when necessary

2020-05-06 Thread Paul Blakey
On 5/6/2020 5:16 AM, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with > goto action"), will decapsulate the tunnel packets if there is a goto > action in chain 0. But in some case, we don't want do that, for example

Re: [PATCH v1 net-next 4/6] net: mscc: ocelot: VCAP IS1 support

2020-05-06 Thread Vladimir Oltean
Hi Allan, On Wed, 6 May 2020 at 12:45, Allan W. Nielsen wrote: > > Hi Xiaoliang, > > On 06.05.2020 15:48, Xiaoliang Yang wrote: > >VCAP IS1 is a VCAP module which can filter MAC, IP, VLAN, protocol, and > >TCP/UDP ports keys, and do Qos and VLAN retag actions. > >This patch added VCAP IS1 support

[PATCH net-next] net: socionext: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/socionext/sni_ave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/so

Re: [PATCH] Bluetooth: Terminate the link if pairing is cancelled

2020-05-06 Thread Marcel Holtmann
Hi Luiz, >>> If user decides to cancel ongoing pairing process (e.g. by clicking >>> the cancel button on the pairing/passkey window), abort any ongoing >>> pairing and then terminate the link. >>> >>> Signed-off-by: Manish Mandlik >>> --- >>> Hello Linux-Bluetooth, >>> >>> This patch aborts an

[PATCH net-next] net: mediatek: Fix use correct return type for ndo_start_xmit()

2020-05-06 Thread wangyunjian
From: Yunjian Wang The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. Signed-off-by: Yunjian Wang --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

Re: INFO: task hung in linkwatch_event (2)

2020-05-06 Thread Yunsheng Lin
On 2020/5/6 12:25, Hillf Danton wrote: > > On Wed, 6 May 2020 09:38:21 Yunsheng Lin wrote: >> >> On 2020/4/29 17:59, syzbot wrote: >>> Hello, >>> >>> syzbot found the following crash on: >>> >>> HEAD commit:b4f63322 Merge branch 'for-linus' of git://git.kernel.org/.. >>> git tree: upstre

[PATCH -next] net: enetc: Make some symbols static

2020-05-06 Thread ChenTao
Fix the following warning: drivers/net/ethernet/freescale/enetc/enetc_qos.c:427:20: warning: symbol 'enetc_act_fwd' was not declared. Should it be static? drivers/net/ethernet/freescale/enetc/enetc_qos.c:966:20: warning: symbol 'enetc_check_flow_actions' was not declared. Should it be static? Rep

Re: INFO: task hung in linkwatch_event (2)

2020-05-06 Thread Yunsheng Lin
+cc Xiaoguang & Jens On 2020/5/6 14:56, Hillf Danton wrote: > > Wed, 29 Apr 2020 02:59:13 -0700 >> syzbot found the following crash on: >> >> HEAD commit:b4f63322 Merge branch 'for-linus' of git://git.kernel.org/.. >> git tree: upstream >> console output: https://syzkaller.appspot.com/x/

[PATCH net] netfilter: flowtable: Add pending bit for offload work

2020-05-06 Thread Paul Blakey
Gc step can queue offloaded flow del work or stats work. Those work items can race each other and a flow could be freed before the stats work is executed and querying it. To avoid that, add a pending bit that if a work exists for a flow don't queue another work for it. This will also avoid adding m

[PATCH net] netfilter: flowtable: Fix expired flow not being deleted from software

2020-05-06 Thread Paul Blakey
Once a flow is considered expired, it is marked as DYING, and scheduled a delete from hardware. The flow will be deleted from software, in the next gc_step after hardware deletes the flow (and flow is marked DEAD). Till that happens, the flow's timeout might be updated from a previous scheduled sta

Re: [PATCH net,v2] net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE

2020-05-06 Thread Edward Cree
On 06/05/2020 00:29, Jakub Kicinski wrote: > IIRC we went from the pure bitfield implementation (which was my > preference) to one where 0 means disabled. > > Unfortunately we ended up with a convoluted API where drivers have to > check for magic 0 or 'any' values. Yeah, I said something dumb a cou

[PATCH net-next 03/12] net: qed: invoke err notify on critical areas

2020-05-06 Thread Igor Russkikh
In a number of critical places not only debug trace should be printed, but the appropriate hw error condition should be raised and error handling/recovery should start. Introduce our new qed_hw_err_notify invocation in these places to record and indicate critical error conditions in hardware. Sig

[PATCH net-next 04/12] net: qed: critical err reporting to management firmware

2020-05-06 Thread Igor Russkikh
On various critical errors, notification handler should also report the err information into the management firmware. MFW can interact with server/motherboard backend agents - these are used by server manufacturers to monitor server HW health. Thus, it is important for driver to report on any fau

[PATCH net-next 00/12] net: qed/qede: critical hw error handling

2020-05-06 Thread Igor Russkikh
FastLinQ devices as a complex systems may observe various hardware level error conditions, both severe and recoverable. Driver is able to detect and report this, but so far it only did trace/dmesg based reporting. Here we implement an extended hw error detection, service task handler captures a d

[PATCH net-next 12/12] net: qed: fix bad formatting

2020-05-06 Thread Igor Russkikh
On some adjacent code, fix bad code formatting Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh --- include/linux/qed/qed_if.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h

[PATCH net-next 11/12] net: qed: introduce critical hardware error handler

2020-05-06 Thread Igor Russkikh
MCP may signal driver about generic critical failure. Driver has to collect mdump information (get_retain), it pushes that to logs and triggers generic notification on "hardware attention" event. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh --- drivers

[PATCH net-next 10/12] net: qed: introduce critical fan failure handler

2020-05-06 Thread Igor Russkikh
Fan failure is sent by firmware, driver reacts on this error with newly introduced notification path. It will collect dump and shut down the device to prevent physical breakage Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogi

[PATCH net-next 05/12] net: qed: cleanup debug related declarations

2020-05-06 Thread Igor Russkikh
Thats probably a legacy code had double declaration of some fields. Cleanup this, removing copy and fixing references. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh --- drivers/net/ethernet/qlogic/qed/qed.h | 11 +++-- drivers/net/ethernet/qlo

[PATCH net-next 06/12] net: qed: gather debug data on hw errors

2020-05-06 Thread Igor Russkikh
To implement debug dump retrieval on a live system we add callbacks to collect the same data which is collected now during manual `ethtool -d` call. But we instead collect the dump immediately at the moment bad thing happens, and save it for later retrieval by the same `ethtool -d`. To have abili

[PATCH net-next 07/12] net: qed: attention clearing properties

2020-05-06 Thread Igor Russkikh
On different hardware events we have to respond differently, on some of hardware indications hw attention (error condition) should be cleared by the driver to continue normal functioning. Here we introduce attention clear flags, and put them on some important events (in aeu_descs). Signed-off-by:

[PATCH net-next 02/12] net: qede: add hw err scheduled handler

2020-05-06 Thread Igor Russkikh
qede (ethernet level driver) registers a callback handler. This handler maintains eth dev state flags/bits to track error processing. It implements in place processing part for nonsleeping context (WARN_ON trigger), and a deferred (delayed work) part which triggers recovery process for recoverable

  1   2   3   4   5   >