[PATCH net-next] enetc: Use generic rule to map Tx rings to interrupt vectors

2021-04-09 Thread Claudiu Manoil
Even if the current mapping is correct for the 1 CPU and 2 CPU cases (currently enetc is included in SoCs with up to 2 CPUs only), better use a generic rule for the mapping to cover all possible cases. The number of CPUs is the same as the number of interrupt vectors: Per device Tx rings - device_

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Stephan Mueller
Am Freitag, dem 09.04.2021 um 10:11 +0800 schrieb Hangbin Liu: > On Thu, Apr 08, 2021 at 08:11:34AM -0700, Eric Biggers wrote: > > On Thu, Apr 08, 2021 at 07:58:08PM +0800, Hangbin Liu wrote: > > > On Thu, Apr 08, 2021 at 09:06:52AM +0800, Hangbin Liu wrote: > > > > > Also, couldn't you just consid

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Mel Gorman
On Thu, Apr 08, 2021 at 11:52:01AM -0700, Xie He wrote: > Hi Mel Gorman, > > I may have found a problem in pfmemalloc skb handling in > net/core/dev.c. I see there are "if" conditions checking for > "sk_memalloc_socks() && skb_pfmemalloc(skb)", and when the condition > is true, the skb is handled

[PATCH net] net: hns3: Trivial spell fix in hns3 driver

2021-04-09 Thread Salil Mehta
Some trivial spelling mistakes which caught my eye during the review of the code. Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

Re: Re: [PATCH v6 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-04-09 Thread Yongji Xie
On Fri, Apr 9, 2021 at 1:36 PM Jason Wang wrote: > > > 在 2021/4/8 下午5:36, Yongji Xie 写道: > > On Thu, Apr 8, 2021 at 2:57 PM Jason Wang wrote: > >> > >> 在 2021/3/31 下午4:05, Xie Yongji 写道: > >>> This VDUSE driver enables implementing vDPA devices in userspace. > >>> Both control path and data path

[PATCH net-next 0/8] ethtool: Extend module EEPROM dump API

2021-04-09 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

[PATCH net-next 1/8] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a netlink rep

[PATCH net-next 2/8] net/mlx5: Refactor module EEPROM query

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[PATCH net-next 4/8] net/mlx5: Add support for DSFP module EEPROM dumps

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 ++ include/linux/mlx5/port.h | 1 + 2 files chang

[PATCH net-next 3/8] net/mlx5: Implement get_module_eeprom_by_page()

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 44 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 41 +

[PATCH net-next 5/8] net: ethtool: Export helpers for getting EEPROM info

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn There are two ways to retrieve information from SFP EEPROMs. Many devices make use of the common code, and assign the sfp_bus pointer in the netdev to point to the bus holding the SFP device. Some MAC drivers directly implement ops in there ethool structure. Export within net/

[PATCH net-next 6/8] ethtool: Add fallback to get_module_eeprom from netlink command

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this can'

[PATCH net-next 7/8] phy: sfp: add netlink SFP support to generic SFP code

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn The new netlink API for reading SFP data requires a new op to be implemented. The idea of the new netlink SFP code is that userspace is responsible to parsing the EEPROM data and requesting pages, rather than have the kernel decide what pages are interesting and returning them.

[PATCH net-next 8/8] ethtool: wire in generic SFP module access

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn If the device has a sfp bus attached, call its sfp_get_module_eeprom_by_page() function, otherwise use the ethtool op for the device. This follows how the IOCTL works. Signed-off-by: Andrew Lunn --- net/ethtool/eeprom.c | 25 - 1 file changed, 20 inser

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Hangbin Liu
On Fri, Apr 09, 2021 at 09:08:20AM +0200, Stephan Mueller wrote: > > > > > > And how do you handle all the other places in the kernel that use > > > > > > ChaCha20 and > > > > > > SipHash?  For example, drivers/char/random.c? > > > > > > > > > > Good question, I will check it and reply to you late

RE: [PATCH net] net: stmmac: fix MAC WoL unwork if PHY doesn't support WoL

2021-04-09 Thread Joakim Zhang
Hi Andrew, > -Original Message- > From: Andrew Lunn > Sent: 2021年4月7日 20:35 > To: Joakim Zhang > Cc: peppe.cavall...@st.com; alexandre.tor...@st.com; > joab...@synopsys.com; da...@davemloft.net; k...@kernel.org; > f.faine...@gmail.com; netdev@vger.kernel.org; dl-linux-imx > ; jisheng.zh

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Xie He
On Fri, Apr 9, 2021 at 12:30 AM Mel Gorman wrote: > > Under what circumstances do you expect sk_memalloc_socks() to be false > and skb_pfmemalloc() to be true that would cause a problem? For example, if at the time the skb is allocated, "sk_memalloc_socks()" was true, then the skb might be alloca

[PATCH net-next 0/3] net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Joakim Zhang
This patch set adds new properties for of_get_mac_address from nvmem. Fugang Duan (3): dt-bindings: net: add new properties for of_get_mac_address from nvmem net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes order of_net: add property "nvmem-mac-address" for of_get_m

[PATCH net-next 1/3] dt-bindings: net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Joakim Zhang
From: Fugang Duan Currently, of_get_mac_address supports NVMEM, some platforms MAC address that read from NVMEM efuse requires to swap bytes order, so add new property "nvmem_macaddr_swap" to specify the behavior. If the MAC address is valid from NVMEM, add new property "nvmem-mac-address" in eth

[PATCH net-next 2/3] net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes order

2021-04-09 Thread Joakim Zhang
From: Fugang Duan ethernet controller driver call .of_get_mac_address() to get the mac address from devictree tree, if these properties are not present, then try to read from nvmem. For example, read MAC address from nvmem: of_get_mac_address() of_get_mac_addr_nvmem() nvm

[PATCH net-next 3/3] of_net: add property "nvmem-mac-address" for of_get_mac_addr()

2021-04-09 Thread Joakim Zhang
From: Fugang Duan If MAC address read from nvmem cell and it is valid mac address, .of_get_mac_addr_nvmem() add new property "nvmem-mac-address" in ethernet node. Once user call .of_get_mac_address() to get MAC address again, it can read valid MAC address from device tree in directly. Signed-off

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Mel Gorman
On Fri, Apr 09, 2021 at 01:33:24AM -0700, Xie He wrote: > On Fri, Apr 9, 2021 at 12:30 AM Mel Gorman > wrote: > > > > Under what circumstances do you expect sk_memalloc_socks() to be false > > and skb_pfmemalloc() to be true that would cause a problem? > > For example, if at the time the skb is

Greetings

2021-04-09 Thread Mr. Cosme Amossou
Greetings; I sent you an email a couple of days ago and haven't heard from you. Please confirm if you received my email? Yours Sincerely, Mr. Cosme Amossou (Lawyer) E-mail:co...@cabinetcosme.com

Re: [PATCH][next] mlxsw: spectrum_router: remove redundant initialization of variable force

2021-04-09 Thread Colin Ian King
On 29/03/2021 08:13, Ido Schimmel wrote: > On Sat, Mar 27, 2021 at 10:33:34PM +, Colin King wrote: >> From: Colin Ian King >> >> The variable force is being initialized with a value that is >> never read and it is being updated later with a new value. The >> initialization is redundant and can

RE: [PATCH net-next 0/3] net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Joakim Zhang
Hi, Please ignore this patch set version, I will resend it, sorry. Best Regards, Joakim Zhang > -Original Message- > From: Joakim Zhang > Sent: 2021年4月9日 16:38 > To: da...@davemloft.net; k...@kernel.org; robh...@kernel.org; > and...@lunn.ch; hkallwe...@gmail.com; li...@armlinux.org.uk;

[kbuild] Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-09 Thread Dan Carpenter
Hi Michael, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Michael-Walle/of-net-support-non-platform-devices-in-of_get_mac_address/20210406-234030 base: https://git.kernel.org/pub/scm/linux/kerne

[PATCH net-next 0/3] net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Joakim Zhang
This patch set adds new properties for of_get_mac_address from nvmem. Fugang Duan (3): dt-bindings: net: add new properties for of_get_mac_address from nvmem net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes order of_net: add property "nvmem-mac-address" for of_get_m

[PATCH net-next 2/3] net: ethernet: add property "nvmem_macaddr_swap" to swap macaddr bytes order

2021-04-09 Thread Joakim Zhang
From: Fugang Duan ethernet controller driver call .of_get_mac_address() to get the mac address from devictree tree, if these properties are not present, then try to read from nvmem. For example, read MAC address from nvmem: of_get_mac_address() of_get_mac_addr_nvmem() nvm

[PATCH net-next 1/3] dt-bindings: net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Joakim Zhang
From: Fugang Duan Currently, of_get_mac_address supports NVMEM, some platforms MAC address that read from NVMEM efuse requires to swap bytes order, so add new property "nvmem_macaddr_swap" to specify the behavior. If the MAC address is valid from NVMEM, add new property "nvmem-mac-address" in eth

[PATCH net-next 3/3] of_net: add property "nvmem-mac-address" for of_get_mac_addr()

2021-04-09 Thread Joakim Zhang
From: Fugang Duan If MAC address read from nvmem cell and it is valid mac address, .of_get_mac_addr_nvmem() add new property "nvmem-mac-address" in ethernet node. Once user call .of_get_mac_address() to get MAC address again, it can read valid MAC address from device tree in directly. Signed-off

[PATCH] MAINTAINERS: update maintainer entry for freescale fec driver

2021-04-09 Thread Joakim Zhang
Update maintainer entry for freescale fec driver. Suggested-by: Heiner Kallweit Signed-off-by: Joakim Zhang --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1cc3976040d5..efc76153114c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Xie He
On Fri, Apr 9, 2021 at 1:44 AM Mel Gorman wrote: > > That would imply that the tap was communicating with a swap device to > allocate a pfmemalloc skb which shouldn't happen. Furthermore, it would > require the swap device to be deactivated while pfmemalloc skbs still > existed. Have you encounter

Re: [PATCH][next] mlxsw: spectrum_router: remove redundant initialization of variable force

2021-04-09 Thread Joe Perches
On Mon, 2021-03-29 at 09:04 +0300, Dan Carpenter wrote: > On Sat, Mar 27, 2021 at 10:33:34PM +, Colin King wrote: > > From: Colin Ian King > > > > The variable force is being initialized with a value that is > > never read and it is being updated later with a new value. The > > initialization

Re: [PATCH net-next 0/3] net: make PHY PM ops a no-op if MAC driver manages PHY PM

2021-04-09 Thread Heiner Kallweit
On 07.04.2021 17:50, Heiner Kallweit wrote: > Resume callback of the PHY driver is called after the one for the MAC > driver. The PHY driver resume callback calls phy_init_hw(), and this is > potentially problematic if the MAC driver calls phy_start() in its resume > callback. One issue was reporte

Re: [PATCH net] net: fix hangup on napi_disable for threaded napi

2021-04-09 Thread Paolo Abeni
On Wed, 2021-04-07 at 11:13 -0700, Jakub Kicinski wrote: > On Wed, 07 Apr 2021 16:54:29 +0200 Paolo Abeni wrote: > > > > I think in the above example even the normal processing will be > > > > fooled?!? e.g. even without the napi_disable(), napi_thread_wait() will > > > > will miss the event/will

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Mel Gorman
On Fri, Apr 09, 2021 at 02:14:12AM -0700, Xie He wrote: > On Fri, Apr 9, 2021 at 1:44 AM Mel Gorman wrote: > > > > That would imply that the tap was communicating with a swap device to > > allocate a pfmemalloc skb which shouldn't happen. Furthermore, it would > > require the swap device to be dea

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Eric Dumazet
On 4/9/21 11:14 AM, Xie He wrote: > On Fri, Apr 9, 2021 at 1:44 AM Mel Gorman wrote: >> >> That would imply that the tap was communicating with a swap device to >> allocate a pfmemalloc skb which shouldn't happen. Furthermore, it would >> require the swap device to be deactivated while pfmemall

[PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out panic and oops helpers. There are several purposes of doing this: - dropping dependency in bug.h - dropping a loop by moving out panic_notifier.h - unload kernel.h

Re: [PATCH net] net: fix hangup on napi_disable for threaded napi

2021-04-09 Thread Eric Dumazet
On 4/9/21 11:24 AM, Paolo Abeni wrote: > On Wed, 2021-04-07 at 11:13 -0700, Jakub Kicinski wrote: >> On Wed, 07 Apr 2021 16:54:29 +0200 Paolo Abeni wrote: > I think in the above example even the normal processing will be > fooled?!? e.g. even without the napi_disable(), napi_thread_wait(

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Xie He
On Fri, Apr 9, 2021 at 2:58 AM Mel Gorman wrote: > > On Fri, Apr 09, 2021 at 02:14:12AM -0700, Xie He wrote: > > > > Do you mean that at the time "sk_memalloc_socks()" changes from "true" > > to "false", there would be no in-flight skbs currently being received, > > and all network communications

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Xie He
On Fri, Apr 9, 2021 at 3:04 AM Eric Dumazet wrote: > > Note that pfmemalloc skbs are normally dropped in sk_filter_trim_cap() > > Simply make sure your protocol use it. It seems "sk_filter_trim_cap" needs an "struct sock" argument. Some of my protocols act like a middle layer to another protocol

flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Koen Vandeputte
Hi All, I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 Booting it shows the splat below on each run. [1] It seems there are 2 patches regarding flexcan which were introduced in 4.14.226 --> ce59ffca5c49 ("can: flexcan: enable RX FIFO after FRZ/HALT valid") --> bb7c9039a3

Re: [PATCH net-next] enetc: Use generic rule to map Tx rings to interrupt vectors

2021-04-09 Thread Vladimir Oltean
On Fri, Apr 09, 2021 at 10:16:13AM +0300, Claudiu Manoil wrote: > Even if the current mapping is correct for the 1 CPU and 2 CPU cases > (currently enetc is included in SoCs with up to 2 CPUs only), better > use a generic rule for the mapping to cover all possible cases. > The number of CPUs is the

Re: [PATCH] net/rds: Avoid potential use after free in rds_send_remove_from_sock

2021-04-09 Thread Eric Dumazet
On 4/7/21 2:09 AM, Aditya Pakki wrote: > In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource > is freed and later under spinlock, causing potential use-after-free. > Set the free pointer to NULL to avoid undefined behavior. > > Signed-off-by: Aditya Pakki > --- > net/rds/m

cnic: issue with double assignment to ictx->xstorm_st_context.common.flags

2021-04-09 Thread Colin Ian King
Hi, Analysis of linux with Coverity has detected an issue with the assignment of ictx->xstorm_st_context.common.fla in drivers/net/ethernet/broadcom/cnic.c in function cnic_setup_bnx2x_ctx. This was introduced a while back with the following commit: commit 619c5cb6885b936c44ae1422ef805b69c629148

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Petr Machata
Jamal Hadi Salim writes: > I am concerned about adding new opcodes which only make sense if you > offload (or make sense only if you are running in s/w). > > Those opcodes are intended to be generic abstractions so the dispatcher > can decide what to do next. Adding things that are specific onl

[PATCH net-next 0/4] veth: allow GRO even without XDP

2021-04-09 Thread Paolo Abeni
This series allows the user-space to enable GRO/NAPI on a veth device even without attaching an XDP program. It does not change the default veth behavior (no NAPI, no GRO), except that the GRO feature bit on top of this series will be effectively off by default on veth devices. Note that currently

[PATCH net-next 2/4] veth: allow enabling NAPI even without XDP

2021-04-09 Thread Paolo Abeni
Currently the veth device has the GRO feature bit set, even if no GRO aggregation is possible with the default configuration, as the veth device does not hook into the GRO engine. Flipping the GRO feature bit from user-space is a no-op, unless XDP is enabled. In such scenario GRO could actually ta

[PATCH net-next 1/4] veth: use skb_orphan_partial instead of skb_orphan

2021-04-09 Thread Paolo Abeni
As described by commit 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb."), orphaning a skb in the TX path will cause OoO. Let's use skb_orphan_partial() instead of skb_orphan(), so that we keep the sk around for queue's selection sake and we still avoid the problem fixed with

[PATCH net-next 3/4] veth: refine napi usage

2021-04-09 Thread Paolo Abeni
After the previous patch, when enabling GRO, locally generated TCP traffic experiences some measurable overhead, as it traverses the GRO engine without any chance of aggregation. This change refine the NAPI receive path admission test, to avoid unnecessary GRO overhead in most scenarios, when GRO

[PATCH net-next 4/4] self-tests: add veth tests

2021-04-09 Thread Paolo Abeni
Add some basic veth tests, that verify the expected flags and aggregation with different setups (default, xdp, etc...) Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/veth.sh | 177 +++ 2 files changed, 178 inserti

[PATCH] cxgb4: Fix unintentional sign extension issues

2021-04-09 Thread Colin King
From: Colin Ian King The shifting of the u8 integers f->fs.nat_lip[] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of the u8 is set then all then all the upper 32 bits of the u64 end up as also being set because of th

[PATCH net-next] ehea: add missing MODULE_DEVICE_TABLE

2021-04-09 Thread Qiheng Lin
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin --- drivers/net/ethernet/ibm/ehea/ehea_main.c | 1 + 1 file changed, 1 insertion

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Jamal Hadi Salim
On 2021-04-08 5:25 p.m., Jakub Kicinski wrote: On Thu, 8 Apr 2021 10:05:07 -0400 Jamal Hadi Salim wrote: On 2021-04-08 9:38 a.m., Petr Machata wrote: The TC action "trap" is used to instruct the HW datapath to drop the matched packet and transfer it for processing in the SW pipeline. If instead

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Marc Kleine-Budde
On 4/9/21 12:18 PM, Koen Vandeputte wrote: > Hi All, > > I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 > Booting it shows the splat below on each run. [1] > > > It seems there are 2 patches regarding flexcan which were introduced in > 4.14.226 > > --> ce59ffca5c49 ("can:

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Jamal Hadi Salim
On 2021-04-09 7:03 a.m., Petr Machata wrote: Jamal Hadi Salim writes: I am concerned about adding new opcodes which only make sense if you offload (or make sense only if you are running in s/w). Those opcodes are intended to be generic abstractions so the dispatcher can decide what to do nex

Re: [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Sebastian Reichel
Hi, On Fri, Apr 09, 2021 at 01:02:50PM +0300, Andy Shevchenko wrote: > kernel.h is being used as a dump for all kinds of stuff for a long time. > Here is the attempt to start cleaning it up by splitting out panic and > oops helpers. > > There are several purposes of doing this: > - dropping depen

Re: Problem in pfmemalloc skb handling in net/core/dev.c

2021-04-09 Thread Eric Dumazet
On 4/9/21 12:14 PM, Xie He wrote: > On Fri, Apr 9, 2021 at 3:04 AM Eric Dumazet wrote: >> >> Note that pfmemalloc skbs are normally dropped in sk_filter_trim_cap() >> >> Simply make sure your protocol use it. > > It seems "sk_filter_trim_cap" needs an "struct sock" argument. Some of > my proto

[PATCH] nfc: pn533: remove redundant assignment

2021-04-09 Thread samirweng1979
From: wengjianfeng In many places,first assign a value to a variable and then return the variable. which is redundant, we should directly return the value. in pn533_rf_field funciton,return statement in the if statement is redundant, we just delete it. Signed-off-by: wengjianfeng --- drivers/n

[PATCH net-next] cxgb4: remove unneeded if-null-free check

2021-04-09 Thread Qiheng Lin
Eliminate the following coccicheck warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:529:3-9: WARNING: NULL check before some freeing functions is not needed. drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:533:2-8: WARNING: NULL check before some freeing functions is not needed. driv

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Greg KH
On Fri, Apr 09, 2021 at 01:21:05PM +0200, Marc Kleine-Budde wrote: > On 4/9/21 12:18 PM, Koen Vandeputte wrote: > > Hi All, > > > > I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 > > Booting it shows the splat below on each run. [1] > > > > > > It seems there are 2 patches r

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-04-09 Thread Michal Soltys
On 3/29/21 10:52 PM, Ido Schimmel wrote: ip_route_me_harder() does not set source / destination port in the flow key, so it explains why fib rules that use them are not hit after mangling the packet. These keys were added in 4.17, but I don't think this use case every worked. You have a differen

[PATCH net-next] net: enetc: fix array underflow in error handling code

2021-04-09 Thread Dan Carpenter
This loop will try to unmap enetc_unmap_tx_buff[-1] and crash. Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/f

Re: [RFC v3 net-next 0/4] MT7530 interrupt support

2021-04-09 Thread René van Dorst
Quoting Andrew Lunn : On Thu, Apr 08, 2021 at 11:00:08PM +0800, DENG Qingfang wrote: Hi René, On Thu, Apr 8, 2021 at 10:02 PM René van Dorst wrote: > > Tested on Ubiquiti ER-X-SFP (MT7621) with 1 external phy which uses irq=POLL. > I wonder if the external PHY's IRQ can be registered i

RE: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-09 Thread Parav Pandit
> From: Jason Gunthorpe > Sent: Thursday, April 8, 2021 5:46 PM > On Wed, Apr 07, 2021 at 03:44:35PM +, Parav Pandit wrote: > > > > If it returns EOPNOTUPP then the remove is never called so if it > > > allocated memory and left it allocated then it is leaking memory. > > > > > I probably

Re: [RFC net-next 1/1] seg6: add counters support for SRv6 Behaviors

2021-04-09 Thread Andrea Mayer
On Wed, 7 Apr 2021 13:24:04 -0700 Jakub Kicinski wrote: > On Wed, 7 Apr 2021 20:03:32 +0200 Andrea Mayer wrote: > > This patch provides counters for SRv6 Behaviors as defined in [1], section > > 6. For each SRv6 Behavior instance, the counters defined in [1] are: > > > > - the total number of

RE: [PATCH net-next] net: enetc: fix array underflow in error handling code

2021-04-09 Thread Claudiu Manoil
>-Original Message- >From: Dan Carpenter [...] >Subject: [PATCH net-next] net: enetc: fix array underflow in error handling >code > >This loop will try to unmap enetc_unmap_tx_buff[-1] and crash. > >Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT") >Signed-off-by: Dan Carpen

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Simo Sorce
On Fri, 2021-04-09 at 08:02 +0200, Ard Biesheuvel wrote: > On Fri, 9 Apr 2021 at 05:03, Jason A. Donenfeld wrote: > > On Fri, Apr 09, 2021 at 10:49:07AM +0800, Hangbin Liu wrote: > > > On Thu, Apr 08, 2021 at 08:44:35PM -0600, Jason A. Donenfeld wrote: > > > > Since it's just a normal module libra

Re: [PATCH net-next] net: enetc: fix array underflow in error handling code

2021-04-09 Thread Vladimir Oltean
On Fri, Apr 09, 2021 at 03:24:28PM +0300, Dan Carpenter wrote: > This loop will try to unmap enetc_unmap_tx_buff[-1] and crash. > > Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT") > Signed-off-by: Dan Carpenter > --- > drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- > 1 fil

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Koen Vandeputte
On 09.04.21 13:21, Marc Kleine-Budde wrote: On 4/9/21 12:18 PM, Koen Vandeputte wrote: Hi All, I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 Booting it shows the splat below on each run. [1] It seems there are 2 patches regarding flexcan which were introduced in 4.14.2

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-04-09 Thread Florian Westphal
Michal Soltys wrote: > On 3/29/21 10:52 PM, Ido Schimmel wrote: > > > > ip_route_me_harder() does not set source / destination port in the > > flow key, so it explains why fib rules that use them are not hit after > > mangling the packet. These keys were added in 4.17, but I > > don't think this

[PATCH] net: thunderx: Fix unintentional sign extension issue

2021-04-09 Thread Colin King
From: Colin Ian King The shifting of the u8 integers rq->caching by 26 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that rq->caching is greater than 0x1f then all then all the upper 32 bits of the u64 end up as also being set because of th

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Marc Kleine-Budde
On 09.04.2021 14:55:59, Koen Vandeputte wrote: > > On 09.04.21 13:21, Marc Kleine-Budde wrote: > > On 4/9/21 12:18 PM, Koen Vandeputte wrote: > > > Hi All, > > > > > > I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 > > > Booting it shows the splat below on each run. [1] > > >

Re: Re: [PATCH] backports: crypto user - make NETLINK_CRYPTO work

2021-04-09 Thread Jianmin Wang
On Fri, Apr 09, 2021 at 08:36:07 +0200, Greg KH > On Thu, Apr 08, 2021 at 07:11:48PM +, Jianmin Wang wrote: > > while the new services need to invoke libkcapi in the container environment. > > > > We have verified that the problem doesn't exist on newer kernel version. > > However, due to man

Re: [BUG / question] in routing rules, some options (e.g. ipproto, sport) cause rules to be ignored in presence of packet marks

2021-04-09 Thread Ido Schimmel
On Fri, Apr 09, 2021 at 03:02:41PM +0200, Florian Westphal wrote: > Michal Soltys wrote: > > On 3/29/21 10:52 PM, Ido Schimmel wrote: > > > > > > ip_route_me_harder() does not set source / destination port in the > > > flow key, so it explains why fib rules that use them are not hit after > > > m

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Greg KH
On Fri, Apr 09, 2021 at 03:10:01PM +0200, Marc Kleine-Budde wrote: > On 09.04.2021 14:55:59, Koen Vandeputte wrote: > > > > On 09.04.21 13:21, Marc Kleine-Budde wrote: > > > On 4/9/21 12:18 PM, Koen Vandeputte wrote: > > > > Hi All, > > > > > > > > I just updated kernel 4.14 within OpenWRT from 4

net: sxgbe: issue with incorrect masking / case values in switch statements

2021-04-09 Thread Colin Ian King
Hi, Static analysis with Coverity has found an issue with the sxgbe driver in drivers/net/ethernet/samsung/sxgbe/sxgbe_mtl.c from the following commit: commit 1edb9ca69e8a7988900fc0283e10550b5592164d Author: Siva Reddy Date: Tue Mar 25 12:10:54 2014 -0700 net: sxgbe: add basic framework f

Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)

2021-04-09 Thread Andrew Lunn
For the structs containing variables with the same sizes, or already size aligned > variables, we knew the __packed has no effect. And for these structs, it > doesn't > cause performance impact either, correct? > > But in the future, if different sized variables are added, the __packed may

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Petr Machata
Jamal Hadi Salim writes: > On 2021-04-09 7:03 a.m., Petr Machata wrote: >> Jamal Hadi Salim writes: >> >>> I am concerned about adding new opcodes which only make sense if you >>> offload (or make sense only if you are running in s/w). >>> >>> Those opcodes are intended to be generic abstract

Re: [PATCH net-next 1/3] dt-bindings: net: add new properties for of_get_mac_address from nvmem

2021-04-09 Thread Rob Herring
On Fri, Apr 9, 2021 at 4:07 AM Joakim Zhang wrote: > > From: Fugang Duan > > Currently, of_get_mac_address supports NVMEM, some platforms What's of_get_mac_address? This is a binding patch. Don't mix Linux things in it. > MAC address that read from NVMEM efuse requires to swap bytes > order, so

Re: [PATCH] net/Bluetooth - delete unneeded variable initialization

2021-04-09 Thread Marcel Holtmann
Hi Kai, > Delete unneeded variable initialization. > > Signed-off-by: Kai Ye > --- > net/bluetooth/6lowpan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-09 Thread George McCollister
On Thu, Apr 8, 2021 at 7:39 PM Sven Van Asbroeck wrote: > > From: Sven Van Asbroeck > > The ethernet frame length is calculated incorrectly. Depending on > the value of RX_HEAD_PADDING, this may result in ethernet frames > that are too short (cut off at the end), or too long (garbage added > to t

Re: [PATCH v1] Bluetooth: Return whether a connection is outbound

2021-04-09 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by: Alai

Re: [PATCH v2] Bluetooth: hci_h5: btrtl: Add quirk for keep power in suspend/resume

2021-04-09 Thread Marcel Holtmann
Hi Hilda, > RTL8822C devices support BT wakeup Host. Add a quirk for these specific > devices did not power off during suspend and resume. > By this change, if the Host support that received BT device signal then > it can be wakeup. > > Signed-off-by: hildawu > --- > Changes in v2: > - Add missi

Re: [PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-09 Thread Tom Talpey
On 4/6/2021 7:49 AM, Jason Gunthorpe wrote: On Mon, Apr 05, 2021 at 11:42:31PM +, Chuck Lever III wrote: We need to get a better idea what correctness testing has been done, and whether positive correctness testing results can be replicated on a variety of platforms. RO has been rolling

Re: [PATCH net v1] lan743x: fix ethernet frame cutoff issue

2021-04-09 Thread Sven Van Asbroeck
Hi George, On Fri, Apr 9, 2021 at 10:12 AM George McCollister wrote: > > I'm glad everyone was able to work together to get this fixed properly > without any figure pointing or mud slinging! Kudos everyone. Same, this is what the kernel community is supposed to be all about. And thank you for t

Re: [PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-09 Thread Chuck Lever III
> On Apr 9, 2021, at 10:26 AM, Tom Talpey wrote: > > On 4/6/2021 7:49 AM, Jason Gunthorpe wrote: >> On Mon, Apr 05, 2021 at 11:42:31PM +, Chuck Lever III wrote: >> >>> We need to get a better idea what correctness testing has been done, >>> and whether positive correctness testing result

Re: [PATCH net-next 3/4] veth: refine napi usage

2021-04-09 Thread Toke Høiland-Jørgensen
Paolo Abeni writes: > After the previous patch, when enabling GRO, locally generated > TCP traffic experiences some measurable overhead, as it traverses > the GRO engine without any chance of aggregation. > > This change refine the NAPI receive path admission test, to avoid > unnecessary GRO over

Re: [PATCH net-next 2/4] veth: allow enabling NAPI even without XDP

2021-04-09 Thread Toke Høiland-Jørgensen
Paolo Abeni writes: > Currently the veth device has the GRO feature bit set, even if > no GRO aggregation is possible with the default configuration, > as the veth device does not hook into the GRO engine. > > Flipping the GRO feature bit from user-space is a no-op, unless > XDP is enabled. In su

Re: [ovs-dev] [PATCH] openvswitch: perform refragmentation for packets which pass through conntrack

2021-04-09 Thread Ilya Maximets
On 4/8/21 10:41 PM, Aaron Conole wrote: > Joe Stringer writes: > >> Hey Aaron, long time no chat :) > > Same :) > >> On Fri, Mar 19, 2021 at 1:43 PM Aaron Conole wrote: >>> >>> When a user instructs a flow pipeline to perform connection tracking, >>> there is an implicit L3 operation that occu

Re: [PATCH net-next 3/4] veth: refine napi usage

2021-04-09 Thread Paolo Abeni
hello, On Fri, 2021-04-09 at 16:57 +0200, Toke Høiland-Jørgensen wrote: > Paolo Abeni writes: > > > After the previous patch, when enabling GRO, locally generated > > TCP traffic experiences some measurable overhead, as it traverses > > the GRO engine without any chance of aggregation. > > > >

Re: [PATCH net] net: fix hangup on napi_disable for threaded napi

2021-04-09 Thread Jakub Kicinski
On Fri, 09 Apr 2021 11:24:07 +0200 Paolo Abeni wrote: > I think it can be simplified as the following - if NAPIF_STATE_DISABLE > is set, napi_threaded_poll()/__napi_poll() will return clearing the > SCHEDS bits after trying to poll the device: Indeed! > diff --git a/net/core/dev.c b/net/core/dev.

Re: [PATCH net-next 3/4] veth: refine napi usage

2021-04-09 Thread Toke Høiland-Jørgensen
Paolo Abeni writes: > hello, > > On Fri, 2021-04-09 at 16:57 +0200, Toke Høiland-Jørgensen wrote: >> Paolo Abeni writes: >> >> > After the previous patch, when enabling GRO, locally generated >> > TCP traffic experiences some measurable overhead, as it traverses >> > the GRO engine without any

Re: [PATCH net-next 2/4] veth: allow enabling NAPI even without XDP

2021-04-09 Thread Paolo Abeni
On Fri, 2021-04-09 at 16:58 +0200, Toke Høiland-Jørgensen wrote: > Paolo Abeni writes: > > > Currently the veth device has the GRO feature bit set, even if > > no GRO aggregation is possible with the default configuration, > > as the veth device does not hook into the GRO engine. > > > > Flippin

[PATCH net v2] net: fix hangup on napi_disable for threaded napi

2021-04-09 Thread Paolo Abeni
napi_disable() is subject to an hangup, when the threaded mode is enabled and the napi is under heavy traffic. If the relevant napi has been scheduled and the napi_disable() kicks in before the next napi_threaded_wait() completes - so that the latter quits due to the napi_disable_pending() conditi

Re: [PATCH rdma-next 00/10] Enable relaxed ordering for ULPs

2021-04-09 Thread Tom Talpey
On 4/9/2021 10:45 AM, Chuck Lever III wrote: On Apr 9, 2021, at 10:26 AM, Tom Talpey wrote: On 4/6/2021 7:49 AM, Jason Gunthorpe wrote: On Mon, Apr 05, 2021 at 11:42:31PM +, Chuck Lever III wrote: We need to get a better idea what correctness testing has been done, and whether posit

Re: [PATCH net v2] net: fix hangup on napi_disable for threaded napi

2021-04-09 Thread Heiner Kallweit
On 09.04.2021 17:24, Paolo Abeni wrote: > napi_disable() is subject to an hangup, when the threaded > mode is enabled and the napi is under heavy traffic. > > If the relevant napi has been scheduled and the napi_disable() > kicks in before the next napi_threaded_wait() completes - so > that the la

[PATCH] erspan/erspan6: fix JSON output

2021-04-09 Thread Christian Poessinger
The format for erspan/erspan6 output is not valid JSON, as on version 2 a valueless key was presented. The direction should be value and erspan_dir should be the key. Fixes: 289763626721 ("erspan: add erspan version II support") Cc: u9012...@gmail.com Cc: Stephen Hemminger Reported-by: Christian

RE: [RFC PATCH hyperv-next] scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs

2021-04-09 Thread Michael Kelley
From: Andrea Parri (Microsoft) Sent: Thursday, April 8, 2021 9:13 AM > > Use blk_mq_unique_tag() to generate requestIDs for StorVSC, avoiding > all issues with allocating enough entries in the VMbus requestor. This looks good to me! I'm glad to see that the idea worked without too much complex

[syzbot] WARNING: refcount bug in sk_psock_get

2021-04-09 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:9c54130c Add linux-next specific files for 20210406 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17d8d7aad0 kernel config: https://syzkaller.appspot.com/x/.config?x=d125958c3995ddcd dashboard

  1   2   3   >