[PATCH v3 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX. This patch allows XDP_TX to run by reuse the existing SQ with __netif_tx_lock() hold when there a

[PATCH] e1000e: Fix error handling in e1000_set_d0_lplu_state_82571

2021-02-28 Thread Dinghao Liu
There is one e1e_wphy() call in e1000_set_d0_lplu_state_82571 that we have caught its return value but lack further handling. Check and terminate the execution flow just like other e1e_wphy() in this function. Signed-off-by: Dinghao Liu --- drivers/net/ethernet/intel/e1000e/82571.c | 2 ++ 1 fil

Re: [PATCH v2 5/6] can: c_can: prepare to up the message objects number

2021-02-28 Thread Dario Binacchi
Hi Marc, > Il 26/02/2021 09:33 Marc Kleine-Budde ha scritto: > > > On 25.02.2021 22:51:54, Dario Binacchi wrote: > > As pointed by commit c0a9f4d396c9 ("can: c_can: Reduce register access") > > the "driver casts the 16 message objects in stone, which is completely > > braindead as contemporary

Re: [PATCH v2 3/6] can: c_can: fix control interface used by c_can_do_tx

2021-02-28 Thread Dario Binacchi
Hi Marc, > Il 26/02/2021 09:44 Marc Kleine-Budde ha scritto: > > > On 25.02.2021 22:51:52, Dario Binacchi wrote: > > According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use > > IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX). > > Is this a fix? > I think that If I consider

[PATCH v3 0/6] can: c_can: add support to 64 message objects

2021-02-28 Thread Dario Binacchi
The D_CAN controller supports up to 128 messages. Until now the driver only managed 32 messages although Sitara processors and DRA7 SOC can handle 64. The series was tested on a beaglebone board. Note: I have not changed the type of tx_field (belonging to the c_can_priv structure) to atomic64_t

[PATCH v3 1/6] can: c_can: remove unused code

2021-02-28 Thread Dario Binacchi
Commit 9d23a9818cb1 ("can: c_can: Remove unused inline function") left behind C_CAN_MSG_OBJ_TX_LAST constant. Commit fa39b54ccf28 ("can: c_can: Get rid of pointless interrupts") left behind C_CAN_MSG_RX_LOW_LAST and C_CAN_MSG_OBJ_RX_SPLIT constants. The removed code also made a comment useless an

[PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-02-28 Thread Dario Binacchi
As pointed by commit c0a9f4d396c9 ("can: c_can: Reduce register access") the "driver casts the 16 message objects in stone, which is completely braindead as contemporary hardware has up to 128 message objects". The patch prepares the module to extend the number of message objects beyond the 32 cur

[PATCH v3 6/6] can: c_can: add support to 64 message objects

2021-02-28 Thread Dario Binacchi
D_CAN controller supports 16, 32, 64 or 128 message objects, comparing to 32 on C_CAN. AM335x/AM437x Sitara processors and DRA7 SOC all instantiate a D_CAN controller with 64 message objects, as described in the "DCAN features" subsection of the CAN chapter of their technical reference manuals. Th

[PATCH v3 4/6] can: c_can: use 32-bit write to set arbitration register

2021-02-28 Thread Dario Binacchi
The arbitration register is already set up with 32-bit writes in the other parts of the code except for this point. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/c_can/c_can.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/c_can/

[PATCH v3 3/6] can: c_can: fix control interface used by c_can_do_tx

2021-02-28 Thread Dario Binacchi
According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX). Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/c_can/c_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/c

[PATCH v3 2/6] can: c_can: fix indentation

2021-02-28 Thread Dario Binacchi
Commit 524369e2391f ("can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option") left behind wrong indentation, fix it. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/net/can/c_can/c_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-28 Thread DENG Qingfang
On Sun, Feb 28, 2021 at 7:47 AM Linus Walleij wrote: > > I names the previous protocol "RTL4 A" after a 4-byte tag > with protocol indicted as "A", what about naming this > "RTL2 9" in the same vein? It will be good if some other > switch is using the same protocol. (If any...) RTL8306 uses 0x9 t

[PATCH] i40e: Fix error handling in i40e_vsi_open

2021-02-28 Thread Dinghao Liu
When vsi->type == I40E_VSI_FDIR, we have caught the return value of i40e_vsi_request_irq() but without further handling. Check and execute memory clean on failure just like the other i40e_vsi_request_irq(). Fixes: 8a9eb7d3cbcab ("i40e: rework fdir setup and teardown") Signed-off-by: Dinghao Liu -

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-28 Thread Shay Agroskin
Lorenzo Bianconi writes: ... diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 102f2c91fdb8..7ad0557dedbd 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c ... @@ -339,8

[PATCH] iwlegacy: Add missing check in il4965_commit_rxon

2021-02-28 Thread Dinghao Liu
There is one il_set_tx_power() call in this function without return value check. Print error message and return error code on failure just like the other il_set_tx_power() call. Signed-off-by: Dinghao Liu --- drivers/net/wireless/intel/iwlegacy/4965.c | 6 +- 1 file changed, 5 insertions(+),

[PATCH iproute2] iproute: fix printing resolved localhost

2021-02-28 Thread Luca Boccassi
format_host_rta_r might return a cached hostname via its return value and not use the input buffer. Before: $ ip -resolve -6 route dev lo proto kernel metric 256 pref medium After: $ ip/ip -resolve -6 route localhost dev lo proto kernel metric 256 pref medium Bug-Debian: https://bugs.debian.o

Re: [RESEND PATCH v18 0/3] userspace MHI client interface driver

2021-02-28 Thread Aleksander Morgado
Hey Manivannan, Jakub & all, > > So please let us know the path forward on this series. We are open to > any suggestions but you haven't provided one till now. > I just found out that Sierra Wireless also provides their own version of mhi-net and mhi-uci in precompiled binaries for several Ubuntu

[RFC PATCH net 0/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-02-28 Thread Ido Schimmel
From: Ido Schimmel Patch #1 prevents blackhole nexthops from being flushed when the loopback device goes down given that as far as user space is concerned, these nexthops do not have a nexthop device. Patch #2 adds a test case. This is a user visible change, so sending as RFC. Personally, I th

[RFC PATCH net 2/2] selftests: fib_nexthops: Test blackhole nexthops when loopback goes down

2021-02-28 Thread Ido Schimmel
From: Ido Schimmel Test that blackhole nexthops are not flushed when the loopback device goes down. Output without previous patch: # ./fib_nexthops.sh -t basic Basic functional tests -- TEST: List with nothing defined [ OK ] TEST: Ne

[RFC PATCH net 1/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-02-28 Thread Ido Schimmel
From: Ido Schimmel As far as user space is concerned, blackhole nexthops do not have a nexthop device and therefore should not be affected by the administrative or carrier state of any netdev. However, when the loopback netdev goes down all the blackhole nexthops are flushed. This happens becaus

[RFC PATCH 1/12] x86/Hyper-V: Add visibility parameter for vmbus_establish_gpadl()

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add visibility parameter for vmbus_establish_gpadl() and prepare to change host visibility when create gpadl for buffer. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- arch/x86/include/asm/hyperv-tlfs.h | 9 + drivers

[RFC PATCH 2/12] x86/Hyper-V: Add new hvcall guest address host visibility support

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add new hvcall guest address host visibility support. Mark vmbus ring buffer visible to host when create gpadl buffer and mark back to not visible when tear down gpadl buffer. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- arc

[RFC PATCH 00/12] x86/Hyper-V: Add Hyper-V Isolation VM support

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset is to add support for these Isolation VM support in Linux. The memory of these vms are encrypted and host can't access guest memory directly

[RFC PATCH 11/12] HV/Netvsc: Add Isolation VM support for netvsc driver

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add Isolation VM support for netvsc driver. Map send/receive ring buffer in extra address space in SNP isolation VM, reserve bounce buffer for packets sent via vmbus_sendpacket_pagebuffer() and release bounce buffer via hv_pkt_bounce() when get send complete response from host.

[RFC PATCH 9/12] x86/Hyper-V: Add new parameter for vmbus_sendpacket_pagebuffer()/mpb_desc()

2021-02-28 Thread Tianyu Lan
From: Tianyu Lan Add new parameter io_type and struct bounce_pkt for vmbus_sendpacket_pagebuffer() and vmbus_sendpacket_mpb_desc() in order to add bounce buffer support later. Signed-off-by: Sunil Muthuswamy Co-Developed-by: Sunil Muthuswamy Signed-off-by: Tianyu Lan --- drivers/hv/channel.

[PATCH wpan 03/17] net: ieee802154: nl-mac: fix check on panid

2021-02-28 Thread Alexander Aring
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them. Reported-by: syzbot+d4c07de0144f6f63b...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl-mac.c | 7 --- 1 file changed, 4 inser

[PATCH wpan 05/17] net: ieee802154: stop dump llsec keys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec keys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[PATCH wpan 06/17] net: ieee802154: forbid monitor for add llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
This patch adds a missing consume_skb() when deliver a skb to upper monitor interfaces of a wpan phy. Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/mac802154/rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/rx.c

[PATCH wpan 07/17] net: ieee802154: forbid monitor for del llsec key

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec key for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 08/17] net: ieee802154: stop dump llsec devs for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devs for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c b/

[PATCH wpan 04/17] net: ieee802154: forbid monitor for set llsec params

2021-02-28 Thread Alexander Aring
This patch forbids to set llsec params for monitor interfaces which we don't support yet. Reported-by: syzbot+8b6719da8a04beeaf...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH wpan 12/17] net: ieee802154: forbid monitor for add llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 09/17] net: ieee802154: forbid monitor for add llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 11/17] net: ieee802154: stop dump llsec devkeys for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec devkeys for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154.c

[PATCH wpan 00/17] ieee802154: syzbot fixes

2021-02-28 Thread Alexander Aring
Hi, this patch series contains fixes found by syzbot for nl802154 and a memory leak each time we receiving a skb for monitor interfaces. The first three patches are misc fixes, all others are to forbid monitor interfaces to access security mib values which are never initialized for monitor interf

[PATCH wpan 10/17] net: ieee802154: forbid monitor for del llsec dev

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec dev for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl802

[PATCH wpan 01/17] net: ieee802154: make shift exponent unsigned

2021-02-28 Thread Alexander Aring
This patch changes the iftype type variable to unsigned that it can never be reach a negative value. Reported-by: syzbot+7bf7b22759195c9a2...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH wpan 14/17] net: ieee802154: stop dump llsec seclevels for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec seclevels for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ieee802154/nl802154

[PATCH wpan 13/17] net: ieee802154: forbid monitor for del llsec devkey

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec devkey for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/nl

[PATCH wpan 16/17] net: ieee802154: forbid monitor for del llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+fbf4fc11a819824e0...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3

[PATCH wpan 15/17] net: ieee802154: forbid monitor for add llsec seclevel

2021-02-28 Thread Alexander Aring
This patch forbids to add llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ieee802154/

[PATCH wpan 17/17] net: ieee802154: stop dump llsec params for monitors

2021-02-28 Thread Alexander Aring
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors. Reported-by: syzbot+cde43a581a8e5f317...@syzkaller.appspotmail.com Signed-off-by: Alexander Aring --- net/ieee802154/nl802154.c | 5 + 1 fil

Re: [RESEND PATCH v18 0/3] userspace MHI client interface driver

2021-02-28 Thread Manivannan Sadhasivam
On Sun, Feb 28, 2021 at 03:12:42PM +0100, Aleksander Morgado wrote: > Hey Manivannan, Jakub & all, > > > > > So please let us know the path forward on this series. We are open to > > any suggestions but you haven't provided one till now. > > > > I just found out that Sierra Wireless also provides

Re: [RFC PATCH net-next 11/12] Documentation: networking: switchdev: clarify device driver behavior

2021-02-28 Thread Ido Schimmel
On Sun, Feb 21, 2021 at 11:33:54PM +0200, Vladimir Oltean wrote: > From: Florian Fainelli > > This patch provides details on the expected behavior of switchdev > enabled network devices when operating in a "stand alone" mode, as well > as when being bridge members. This clarifies a number of thin

[PATCH 01/11] pragma once: delete include/linux/atm_suni.h

2021-02-28 Thread Alexey Dobriyan
>From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 10 Feb 2021 21:07:45 +0300 Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h This file has been empty since 2.3.99-pre3! Delete it instead of converting to #pragma once. Sig

[PATCH 10/11] pragma once: delete few backslashes

2021-02-28 Thread Alexey Dobriyan
>From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 19 Feb 2021 13:37:24 +0300 Subject: [PATCH 10/11] pragma once: delete few backslashes Some macros contain one backslash too many and end up being the last macro in a header file. When #pragma

[PATCH net] net: dsa: tag_rtl4_a: fix egress tags

2021-02-28 Thread DENG Qingfang
Commit 86dd9868b878 has several issues, but was accepted too soon before anyone could take a look. - Double free. dsa_slave_xmit() will free the skb if the xmit function returns NULL, but the skb is already freed by eth_skb_pad(). Use __skb_put_padto() to avoid that. - Unnecessary allocation.

[PATCH 12/11] pragma once: scripted treewide conversion

2021-02-28 Thread Alexey Dobriyan
[ Bcc a lot of lists so that people understand what's this is all ] [ about without creating uber-cc-thread. ] [ Apologies if I missed your subsystem] [ Please see [PATCH 11/11: pragma once: conversion script (in Pytho

Re: [PATCH net] net: dsa: tag_rtl4_a: fix egress tags

2021-02-28 Thread Florian Fainelli
On 2/28/2021 9:08 AM, DENG Qingfang wrote: > Commit 86dd9868b878 has several issues, but was accepted too soon > before anyone could take a look. > > - Double free. dsa_slave_xmit() will free the skb if the xmit function > returns NULL, but the skb is already freed by eth_skb_pad(). Use > _

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Sat, 27 Feb 2021 20:51:14 +0300 Hi, > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. > It was caused by __netdev_alloc_skb(), which doesn't check len value after > adding NET_SKB_PAD. > Order will be >= MAX_ORDER and passed to __alloc_pag

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 18:14:46 + Alexander Lobakin wrote: > > [1] WARNING in __alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:5014 > > Call Trace: > > __alloc_pages include/linux/gfp.h:511 [inline] > > __alloc_pages_node include/linux/gfp.h:524 [inline] > > alloc_pages_node include/linux/gfp

Re: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 19:58:17 +0300 Alexey Dobriyan wrote: > From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan > Date: Wed, 10 Feb 2021 21:07:45 +0300 > Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h > > This file has been empty sin

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Alexander Lobakin
From: Jakub Kicinski Date: Sun, 28 Feb 2021 10:55:52 -0800 > On Sun, 28 Feb 2021 18:14:46 + Alexander Lobakin wrote: > > > [1] WARNING in __alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:5014 > > > Call Trace: > > > __alloc_pages include/linux/gfp.h:511 [inline] > > > __alloc_pages_node i

Re: [PATCH net v2] net: fix race between napi kthread mode and busy poll

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 15:23:56 -0800 Wei Wang wrote: > > > Indeed, looks like the task will be in WAKING state until it runs? > > > We can switch the check in napi_schedule() from > > > > > > if (thread->state == TASK_RUNNING) > > > > > > to > > > > > > if (!(thread->state & TASK_

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Pavel Skripkin
Hi, thanks for reply! > From: Pavel Skripkin > Date: Sat, 27 Feb 2021 20:51:14 +0300 > > Hi, > > > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= > > MAX_ORDER. > > It was caused by __netdev_alloc_skb(), which doesn't check len > > value after adding NET_SKB_PAD. > > Order wi

Re: [PATCH v3 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 16:22:47 +0800 Xuan Zhuo wrote: > +static void virtnet_put_xdp_sq(struct virtnet_info *vi, struct send_queue > *sq) > +{ > + struct netdev_queue *txq; > + unsigned int qp; > + > + if (vi->curr_queue_pairs <= nr_cpu_ids) { > + qp = sq - vi->sq; > +

Re: [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 08:38:24 -0800 Florian Fainelli wrote: > On 2/26/2021 5:20 AM, Rafał Miłecki wrote: > > From: Rafał Miłecki > > > > When receiving a lot of packets hardware may run out of free > > descriptiors and stop RX ring. Enable it every time after handling > > received packets. > > >

Re: [PATCH net v2] ethtool: fix the check logic of at least one channel for RX/TX

2021-02-28 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 25 Feb 2021 13:51:02 +0100 you wrote: > From: Yinjun Zhang > > The command "ethtool -L combined 0" may clean the RX/TX channel > count and skip the error path, since the attrs > tb[ETHTOOL_A_CHANNELS_RX_COUNT] and tb[

Re: [PATCH net] net: phy: ti: take into account all possible interrupt sources

2021-02-28 Thread Jakub Kicinski
On Fri, 26 Feb 2021 17:30:20 +0200 Ioana Ciornei wrote: > diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c > index be1224b4447b..f7a2ec150e54 100644 > --- a/drivers/net/phy/dp83822.c > +++ b/drivers/net/phy/dp83822.c > @@ -290,6 +290,7 @@ static int dp83822_config_intr(struct phy_

Re: [PATCH net] net: Fix gro aggregation for udp encaps with zero csum

2021-02-28 Thread Jakub Kicinski
On Sat, 27 Feb 2021 09:16:38 -0800 John Fastabend wrote: > Willem de Bruijn wrote: > > On Fri, Feb 26, 2021 at 4:23 PM Daniel Borkmann > > wrote: > > > > > > We noticed a GRO issue for UDP-based encaps such as vxlan/geneve when the > > > csum for the UDP header itself is 0. In that case, GRO ag

Re: [RESEND net 0/3] net: hns3: fixes fot -net

2021-02-28 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Sat, 27 Feb 2021 15:24:50 +0800 you wrote: > The patchset includes some fixes for the HNS3 ethernet driver. > > Jian Shen (3): > net: hns3: fix error mask definition of flow director > net: hns3: fix query vlan mask val

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Sun, 28 Feb 2021 22:28:13 +0300 > Hi, thanks for reply! > > > From: Pavel Skripkin > > Date: Sat, 27 Feb 2021 20:51:14 +0300 > > > > Hi, > > > > > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= > > > MAX_ORDER. > > > It was caused by __netdev_alloc_s

Re: [PATCH v3] net/core/skbuff: fix passing wrong size to __alloc_skb

2021-02-28 Thread Pavel Skripkin
> From: Pavel Skripkin > Date: Sun, 28 Feb 2021 22:28:13 +0300 > > > Hi, thanks for reply! > > > > > From: Pavel Skripkin > > > Date: Sat, 27 Feb 2021 20:51:14 +0300 > > > > > > Hi, > > > > > > > syzbot found WARNING in __alloc_pages_nodemask()[1] when order > > > > >= > > > > MAX_ORDER. >

[PATCH net 0/3] Fix TRSCER masks in the Ether driver

2021-02-28 Thread Sergey Shtylyov
Here are 3 patches against DaveM's 'net' repo. I'm fixing the TRSCER masks in the driver to match the manuals... [1/3] sh_eth: fix TRSCER mask for SH771x [2/3] sh_eth: fix TRSCER mask for R7S72100 [3/3] sh_eth: fix TRSCER mask for R7S9210

[PATCH net 1/3] sh_eth: fix TRSCER mask for SH771x

2021-02-28 Thread Sergey Shtylyov
According to the SH7710, SH7712, SH7713 Group User's Manual: Hardware, Rev. 3.00, the TRSCER register actually has only bit 7 valid (and named differently), with all the other bits reserved. Apparently, this was not the case with some early revisions of the manual as we have the other bits declar

[PATCH net 2/3] sh_eth: fix TRSCER mask for R7S72100

2021-02-28 Thread Sergey Shtylyov
According to the RZ/A1H Group, RZ/A1M Group User's Manual: Hardware, Rev. 4.00, the TRSCER register has bit 9 reserved, hence we can't use the driver's default TRSCER mask. Add the explicit initializer for sh_eth_cpu_data::trscer_err_mask for R7S72100. Fixes: db893473d313 ("sh_eth: Add support

[PATCH net 3/3] sh_eth: fix TRSCER mask for R7S9210

2021-02-28 Thread Sergey Shtylyov
According to the RZ/A2M Group User's Manual: Hardware, Rev. 2.00, the TRSCER register has bit 9 reserved, hence we can't use the driver's default TRSCER mask. Add the explicit initializer for sh_eth_cpu_data:: trscer_err_mask for R7S9210. Fixes: 6e0bb04d0e4f ("sh_eth: Add R7S9210 support") Signe

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: > > On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: > > On Thu, Feb 25, 2021 at 12:36:07PM +0800, Jason Wang wrote: > > > On 2021/2/24 7:12 下午, Cornelia Huck wrote: > > > > On Wed, 24 Feb 2021 17:29:07 +0800 > > > > Jason Wang wrote: > >

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Thu, Feb 25, 2021 at 04:56:42PM -0800, Si-Wei Liu wrote: > > Hi Michael, > > Are you okay to live without this ioctl for now? I think QEMU is the one > that needs to be fixed and will have to be made legacy guest aware. I think > the kernel can just honor the feature negotiation result done by

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: > > > On 2/23/2021 9:04 PM, Michael S. Tsirkin wrote: > > On Tue, Feb 23, 2021 at 11:35:57AM -0800, Si-Wei Liu wrote: > > > > > > On 2/23/2021 5:26 AM, Michael S. Tsirkin wrote: > > > > On Tue, Feb 23, 2021 at 10:03:57AM +0800, Jason Wa

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 05:30:37PM +0800, Jason Wang wrote: > > On 2021/2/24 4:43 下午, Michael S. Tsirkin wrote: > > On Wed, Feb 24, 2021 at 04:26:43PM +0800, Jason Wang wrote: > > > Basically on first guest access QEMU would tell kernel whether > > > guest is using the legacy or the mode

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Michael S. Tsirkin
On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: > > Detecting it isn't enough though, we will need a new ioctl to notify > > the kernel that it's a legacy guest. Ugh :( > Well, although I think adding an ioctl is doable, may I know what the use > case there will be for kernel to leverag

Re: rename the command ip

2021-02-28 Thread Phil Sutter
William, [Cc'ing netdev list as that's the place to discuss iproute2 development.] On Fri, Feb 26, 2021 at 12:04:12PM -0600, William Chen wrote: > I see your excellent contributions to iproute2. I hope that you are well. Thanks! > But I have to say the command name "ip" is not good. It renders

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-28 Thread Lorenzo Bianconi
> > Lorenzo Bianconi writes: > > > ... > > diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c > > b/drivers/net/ethernet/amazon/ena/ena_netdev.c > > index 102f2c91fdb8..7ad0557dedbd 100644 > > --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c > > +++ b/drivers/net/ethernet/amazon/ena/ena

Re: [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode

2021-02-28 Thread Vladimir Oltean
On Sat, Feb 27, 2021 at 02:18:20PM +0100, Michael Walle wrote: > Am 2021-02-27 01:16, schrieb Vladimir Oltean: > > On Fri, Feb 26, 2021 at 03:49:22PM -0800, Jakub Kicinski wrote: > > > On Sat, 27 Feb 2021 01:42:44 +0200 Vladimir Oltean wrote: > > > > On Fri, Feb 26, 2021 at 03:28:36PM -0800, Jakub

[PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Pavel Skripkin

[PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Pavel Skripkin
syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. It was caused by a huge length value passed from userspace to qrtr_tun_write_iter(), which tries to allocate skb. Since the value comes from the untrusted source there is no need to raise a warning in __alloc_pages_nodem

Re: [RFC PATCH net 2/2] selftests: fib_nexthops: Test blackhole nexthops when loopback goes down

2021-02-28 Thread David Ahern
On 2/28/21 7:26 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Test that blackhole nexthops are not flushed when the loopback device > goes down. > > > Signed-off-by: Ido Schimmel > --- > tools/testing/selftests/net/fib_nexthops.sh | 8 > 1 file changed, 8 insertions(+) > > diff

Re: [RFC PATCH net 1/2] nexthop: Do not flush blackhole nexthops when loopback goes down

2021-02-28 Thread David Ahern
On 2/28/21 7:26 AM, Ido Schimmel wrote: > From: Ido Schimmel > > As far as user space is concerned, blackhole nexthops do not have a > nexthop device and therefore should not be affected by the > administrative or carrier state of any netdev. > > However, when the loopback netdev goes down all t

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
When an IPv4 packet with a destination address of broadcast is received on an ingress interface, it will not be forwarded out of the egress interface if the ingress interface is not configured with bc_forwarding but the egress interface is. If both the ingress and egress interfaces are configured

Re: [PATCH v4] net/qrtr: fix __netdev_alloc_skb call

2021-02-28 Thread Alexander Lobakin
From: Pavel Skripkin Date: Mon, 1 Mar 2021 02:22:40 +0300 > syzbot found WARNING in __alloc_pages_nodemask()[1] when order >= MAX_ORDER. > It was caused by a huge length value passed from userspace to > qrtr_tun_write_iter(), > which tries to allocate skb. Since the value comes from the untruste

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
Allow an IPv4 packet with a destination address of broadcast to be forwarded if the ingress interface is not configured with bc_forwarding but the egress interface is. This is inline with Cisco's implementation of directed broadcast. Henry Shen (1): net:ipv4: Fix pakcet not forwarded when ing

Re: [PATCH iproute2-next] mptcp: add support for port based endpoint

2021-02-28 Thread David Ahern
On 2/19/21 1:42 PM, Paolo Abeni wrote: > The feature is supported by the kernel since 5.11-net-next, > let's allow user-space to use it. > > Just parse and dump an additional, per endpoint, u16 attribute > > Signed-off-by: Paolo Abeni > --- > ip/ipmptcp.c| 16 ++-- > man/man

[PATCH] net:ipv4: Packet is not forwarded if bc_forwarding not configured on ingress interface

2021-02-28 Thread Henry Shen
When an IPv4 packet with a destination address of broadcast is received on an ingress interface, it will not be forwarded out of the egress interface if the ingress interface is not configured with bc_forwarding but the egress interface is. If both the ingress and egress interfaces are configured

[PATCH] net:ipv4: Packet is not forwarded when ingress interface is not configured with bc_forwarding

2021-02-28 Thread Henry Shen
Allow an IPv4 packet with a destination address of broadcast to be forwarded if the ingress interface is not configured with bc_forwarding but the egress interface is. This is inline with Cisco's implementation of directed broadcast. Henry Shen (1): net:ipv4: Fix pakcet not forwarded when ing

Re: [PATCH] inetpeer: use else if instead of if to reduce judgment

2021-02-28 Thread Yejune Deng
Thanks,I will adopt it and resubmit. On Fri, Feb 26, 2021 at 10:50 PM Eric Dumazet wrote: > > > > On 2/26/21 11:57 AM, Yejune Deng wrote: > > In inet_initpeers(), if si.totalram <= (8192*1024)/PAGE_SIZE, it will > > be judged three times. Use else if instead of if, it only needs to be > > judged

[PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Jisheng Zhang
I met below warning when cating a small size(about 80bytes) txt file on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we miss iov_iter_advance() if the read count is 0, so we didn't truncate the pipe, then iov_iter_pipe() thinks the pipe is full. Fix it by calling iov_iter_advance

[PATCH] can: c_can_pci: fix use-after-free

2021-02-28 Thread Tong Zhang
There is a UAF in c_can_pci_remove(). dev is released by free_c_can_dev() and is used by pci_iounmap(pdev, priv->base) later. To fix this issue, save the mmio address before releasing dev. [ 1795.746699] == [ 1795.747093] BUG: KASAN:

[PATCH v4 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX. This patch allows XDP_TX to run by reuse the existing SQ with __netif_tx_lock() hold when there a

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Dominique Martinet
Jisheng Zhang wrote on Mon, Mar 01, 2021 at 10:33:36AM +0800: > I met below warning when cating a small size(about 80bytes) txt file > on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we > miss iov_iter_advance() if the read count is 0, so we didn't truncate > the pipe, then iov_i

Re: [PATCH] net: 9p: free what was emitted when read count is 0

2021-02-28 Thread Jisheng Zhang
On Mon, 1 Mar 2021 11:51:24 +0900 Dominique Martinet wrote: > > > Jisheng Zhang wrote on Mon, Mar 01, 2021 at 10:33:36AM +0800: > > I met below warning when cating a small size(about 80bytes) txt file > > on 9pfs(msize=2097152 is passed to 9p mount option), the reason is we > > miss iov_iter_ad

Re: [PATCH wpan 02/17] net: ieee802154: fix memory leak when deliver monitor skbs

2021-02-28 Thread Alexander Aring
Hi Stefan, On Sun, 28 Feb 2021 at 10:21, Alexander Aring wrote: > > This patch adds a missing consume_skb() when deliver a skb to upper > monitor interfaces of a wpan phy. > > Reported-by: syzbot+44b651863a17760a8...@syzkaller.appspotmail.com > Signed-off-by: Alexander Aring > --- > net/mac8021

Re: [PATCH] net:ipv4: Packet is not forwarded if bc_forwarding not configured on ingress interface

2021-02-28 Thread David Ahern
On 2/28/21 5:53 PM, Henry Shen wrote: > When an IPv4 packet with a destination address of broadcast is received > on an ingress interface, it will not be forwarded out of the egress > interface if the ingress interface is not configured with bc_forwarding > but the egress interface is. If both the

[PATCH v5 net-next] virtio-net: support XDP when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp does not use the XDP_TX/XDP_REDIRECT. Th

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:25 上午, Michael S. Tsirkin wrote: On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: On Thu, Feb 25, 2021 at 12:36:07PM +0800, Jason Wang wrote: On 2021/2/24 7:12 下午, Cornelia Huck wrote: On Wed, 24 Feb 2021 17:29:07 +080

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:30 上午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 05:30:37PM +0800, Jason Wang wrote: On 2021/2/24 4:43 下午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 04:26:43PM +0800, Jason Wang wrote: Basically on first guest access QEMU would tell kernel whether gu

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-02-28 Thread Jason Wang
On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: Detecting it isn't enough though, we will need a new ioctl to notify the kernel that it's a legacy guest. Ugh :( Well, although I think adding an ioctl is doable, may I know what the use

[PATCH] xfrm: Use actual socket sk instead of skb socket for xfrm_output_resume

2021-02-28 Thread Evan Nimmo
A situation can occur where the interface bound to the sk is different to the interface bound to the sk attached to the skb. The interface bound to the sk is the correct one however this information is lost inside xfrm_output2 and instead the sk on the skb is used in xfrm_output_resume instead. Thi

[PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-02-28 Thread Tong Zhang
Currently doing modprobe c_can_pci will make kernel complain "Unbalanced pm_runtime_enable!", this is caused by pm_runtime_enable() called before pm is initialized in register_candev() and doing so will also cause it to enable twice. This fix is similar to 227619c3ff7c, move those pm_enable/disable

  1   2   >