[bug report] net: hns3: vf indexing in hclge_add_fd_entry()

2021-03-24 Thread Dan Carpenter
Hello Jian Shen, The patch 5f2b1238b33c: "net: hns3: refactor out hclge_add_fd_entry()" from Mar 22, 2021, leads to the following static checker warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6512 hclge_fd_parse_ring_cookie() warn: array off by one? 'hdev->vport

Re: [PATCH] Bluetooth: Always call advertising disable before setting params

2021-03-24 Thread Marcel Holtmann
Hi Daniel, > In __hci_req_enable_advertising, the HCI_LE_ADV hdev flag is temporarily > cleared to allow the random address to be set, which exposes a race > condition when an advertisement is configured immediately (<10ms) after > software rotation starts to refresh an advertisement. > > In norm

Re: [PATCH] octeontx2-af: Fix memory leak of object buf

2021-03-24 Thread Sunil Kovvuri
On Tue, Mar 23, 2021 at 6:07 PM Colin King wrote: > > From: Colin Ian King > > Currently the error return path when lfs fails to allocate is not free'ing > the memory allocated to buf. Fix this by adding the missing kfree. > > Addresses-Coverity: ("Resource leak") > Fixes: f7884097141b ("octeontx

Re: [PATCH net-next] octeontx2: fix -Wnonnull warning

2021-03-24 Thread Sunil Kovvuri
On Tue, Mar 23, 2021 at 6:26 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > When compile testing this driver on a platform on which probe() is > known to fail at compile time, gcc warns about the cgx_lmactype_string[] > array being uninitialized: > > In function 'strncpy', > inlined from

Re: [PATCH net-next,v2 01/24] net: resolve forwarding path from virtual netdevice and HW destination address

2021-03-24 Thread DENG Qingfang
On Wed, Mar 24, 2021 at 02:30:32AM +0100, Pablo Neira Ayuso wrote: > This patch adds dev_fill_forward_path() which resolves the path to reach > the real netdevice from the IP forwarding side. This function takes as > input the netdevice and the destination hardware address and it walks > down the d

Re: Re: [PATCH v5 08/11] vduse: Implement an MMU-based IOMMU driver

2021-03-24 Thread Yongji Xie
On Wed, Mar 24, 2021 at 11:54 AM Jason Wang wrote: > > > 在 2021/3/15 下午1:37, Xie Yongji 写道: > > This implements an MMU-based IOMMU driver to support mapping > > kernel dma buffer into userspace. The basic idea behind it is > > treating MMU (VA->PA) as IOMMU (IOVA->PA). The driver will set > > up M

[PATCH] net: sched: Mundane typo fixes

2021-03-24 Thread Bhaskar Chowdhury
s/procdure/procedure/ s/maintanance/maintenance/ Signed-off-by: Bhaskar Chowdhury --- net/sched/sch_cbq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 320b3d31fa97..b79a7e27bb31 100644 --- a/net/sched/sch_cbq.c +++ b/ne

[PATCH] sfc-falcon: Fix a typo

2021-03-24 Thread Bhaskar Chowdhury
s/maintaning/maintaining/ Signed-off-by: Bhaskar Chowdhury --- drivers/net/ethernet/sfc/falcon/net_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/falcon/net_driver.h b/drivers/net/ethernet/sfc/falcon/net_driver.h index a529ff395ead..a381c

Re: [PATCH net-next 0/6] page_pool: recycle buffers

2021-03-24 Thread Ilias Apalodimas
Hi Alexander, On Tue, Mar 23, 2021 at 08:03:46PM +, Alexander Lobakin wrote: > From: Ilias Apalodimas > Date: Tue, 23 Mar 2021 19:01:52 +0200 > > > On Tue, Mar 23, 2021 at 04:55:31PM +, Alexander Lobakin wrote: > > > > > > > > > > > > [...] > > > > > > > > > > > > > > > > Thanks for the

[PATCH] bpf: Remove unused headers

2021-03-24 Thread Lu Wei
The header is useless in sampleip_kern.c and trace_event_kern.c, remove it. Signed-off-by: Lu Wei --- samples/bpf/sampleip_kern.c| 1 - samples/bpf/trace_event_kern.c | 1 - 2 files changed, 2 deletions(-) diff --git a/samples/bpf/sampleip_kern.c b/samples/bpf/sampleip_kern.c index f24806a

Re: [PATCH 5.10 104/157] mptcp: put subflow sock on connect error

2021-03-24 Thread Naresh Kamboju
On Mon, 22 Mar 2021 at 18:15, Greg Kroah-Hartman wrote: > > From: Florian Westphal > > [ Upstream commit f07157792c633b528de5fc1dbe2e4ea54f8e09d4 ] > > mptcp_add_pending_subflow() performs a sock_hold() on the subflow, > then adds the subflow to the join list. > > Without a sock_put the subflow s

RE: [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-24 Thread Voon, Weifeng
> On Tue, 16 Mar 2021 20:18:21 +0800 Voon Weifeng wrote: > > From: Ong Boon Leong > > > > Now we introduce MSI interrupt service routines and hook these > > routines up if stmmac_open() sees valid irq line being requested:- > > > > stmmac_mac_interrupt():- MAC (dev->irq), WOL (wol_irq), LPI (l

Re: [PATCH 5.10 000/156] 5.10.26-rc2 review

2021-03-24 Thread Naresh Kamboju
On Tue, 23 Mar 2021 at 14:19, Naresh Kamboju wrote: > > On Mon, 22 Mar 2021 at 20:49, Greg Kroah-Hartman > wrote: > > > > This is the start of the stable review cycle for the 5.10.26 release. > > There are 156 patches in this series, all will be posted as a response > > to this one. If anyone ha

Re: Re: [PATCH v5 09/11] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-03-24 Thread Yongji Xie
On Wed, Mar 24, 2021 at 12:43 PM Jason Wang wrote: > > > 在 2021/3/15 下午1:37, Xie Yongji 写道: > > This VDUSE driver enables implementing vDPA devices in userspace. > > Both control path and data path of vDPA devices will be able to > > be handled in userspace. > > > > In the control path, the VDUSE

Re: Re: [PATCH v5 10/11] vduse: Add config interrupt support

2021-03-24 Thread Yongji Xie
On Wed, Mar 24, 2021 at 12:45 PM Jason Wang wrote: > > > 在 2021/3/15 下午1:37, Xie Yongji 写道: > > This patch introduces a new ioctl VDUSE_INJECT_CONFIG_IRQ > > to support injecting config interrupt. > > > > Signed-off-by: Xie Yongji > > > I suggest to squash this into path 9. > Will do it in v6.

Re: [PATCH 5.10 104/157] mptcp: put subflow sock on connect error

2021-03-24 Thread Florian Westphal
Naresh Kamboju wrote: > On Mon, 22 Mar 2021 at 18:15, Greg Kroah-Hartman > wrote: > > > > From: Florian Westphal > > > > [ Upstream commit f07157792c633b528de5fc1dbe2e4ea54f8e09d4 ] > > > > mptcp_add_pending_subflow() performs a sock_hold() on the subflow, > > then adds the subflow to the join l

[PATCH net-next] net: stmmac: support FPE link partner hand-shaking procedure

2021-03-24 Thread mohammad . athari . ismail
From: Ong Boon Leong In order to discover whether remote station supports frame preemption, local station sends verify mPacket and expects response mPacket in return from the remote station. So, we add the functions to send and handle event when verify mPacket and response mPacket are exchanged

RE: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-24 Thread David Laight
From: Martin Sebor > Sent: 22 March 2021 22:08 ... > In GCC 11, all access warnings expect objects to be either declared > or allocated. Pointers with constant values are taken to point to > nothing valid (as Arnd mentioned above, this is to detect invalid > accesses to members of structs at addre

Re: [mm, net-next v2] mm: net: memcg accounting for TCP rx zerocopy

2021-03-24 Thread Michal Hocko
On Tue 23-03-21 11:47:54, Arjun Roy wrote: > On Tue, Mar 23, 2021 at 7:34 AM Michal Hocko wrote: > > > > On Wed 17-03-21 18:12:55, Johannes Weiner wrote: > > [...] > > > Here is an idea of how it could work: > > > > > > struct page already has > > > > > > struct {/* page_po

Re: [PATCH 5.10 104/157] mptcp: put subflow sock on connect error

2021-03-24 Thread Greg Kroah-Hartman
On Wed, Mar 24, 2021 at 10:04:12AM +0100, Florian Westphal wrote: > Naresh Kamboju wrote: > > On Mon, 22 Mar 2021 at 18:15, Greg Kroah-Hartman > > wrote: > > > > > > From: Florian Westphal > > > > > > [ Upstream commit f07157792c633b528de5fc1dbe2e4ea54f8e09d4 ] > > > > > > mptcp_add_pending_subf

Re: [PATCH 5.10 104/157] mptcp: put subflow sock on connect error

2021-03-24 Thread Greg Kroah-Hartman
On Wed, Mar 24, 2021 at 02:02:06PM +0530, Naresh Kamboju wrote: > On Mon, 22 Mar 2021 at 18:15, Greg Kroah-Hartman > wrote: > > > > From: Florian Westphal > > > > [ Upstream commit f07157792c633b528de5fc1dbe2e4ea54f8e09d4 ] > > > > mptcp_add_pending_subflow() performs a sock_hold() on the subflow

Re: [PATCH net-next 6/6] mvneta: recycle buffers

2021-03-24 Thread Lorenzo Bianconi
[...] > > diff --git a/drivers/net/ethernet/marvell/mvneta.c > > b/drivers/net/ethernet/marvell/mvneta.c > > index a635cf84608a..8b3250394703 100644 > > --- a/drivers/net/ethernet/marvell/mvneta.c > > +++ b/drivers/net/ethernet/marvell/mvneta.c > > @@ -2332,7 +2332,7 @@ mvneta_swbm_build_skb(struc

Re: [PATCH v2] net: make unregister netdev warning timeout configurable

2021-03-24 Thread Leon Romanovsky
On Tue, Mar 23, 2021 at 07:49:23AM +0100, Dmitry Vyukov wrote: > netdev_wait_allrefs() issues a warning if refcount does not drop to 0 > after 10 seconds. While 10 second wait generally should not happen > under normal workload in normal environment, it seems to fire falsely > very often during fuz

[PATCH v3 net] net: dsa: only unset VLAN filtering when last port leaves last VLAN-aware bridge

2021-03-24 Thread Vladimir Oltean
From: Vladimir Oltean DSA is aware of switches with global VLAN filtering since the blamed commit, but it makes a bad decision when multiple bridges are spanning the same switch: ip link add br0 type bridge vlan_filtering 1 ip link add br1 type bridge vlan_filtering 1 ip link set swp2 master br0

[PATCH] net: axienet: allow setups without MDIO

2021-03-24 Thread Daniel Mack
In setups with fixed-link settings on the hardware bus there is no mdio node in DTS. axienet_probe() already handles that gracefully but lp->mii_bus is then NULL. Fix code that tries to blindly grab the MDIO lock by introducing two helper functions that make the locking conditional. Signed-off-by

Re: [PATCH v3 net] net: dsa: only unset VLAN filtering when last port leaves last VLAN-aware bridge

2021-03-24 Thread Kurt Kanzenbach
On Wed Mar 24 2021, Vladimir Oltean wrote: > From: Vladimir Oltean > > DSA is aware of switches with global VLAN filtering since the blamed > commit, but it makes a bad decision when multiple bridges are spanning > the same switch: > > ip link add br0 type bridge vlan_filtering 1 > ip link add br1

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 2:27 AM, Andrew Lunn wrote: +#define ETH_MODULE_EEPROM_PAGE_LEN 256 Sorry to keep raising issues, but I think you want to make this constant 128. Yes, i also think the KAPI should be limited to returning a maximum of a 1/2 page per call. OK. +#define MODULE_EEPROM_MAX_OFFSET

Re: [PATCH net-next,v2 01/24] net: resolve forwarding path from virtual netdevice and HW destination address

2021-03-24 Thread Pablo Neira Ayuso
On Wed, Mar 24, 2021 at 03:27:11PM +0800, DENG Qingfang wrote: > On Wed, Mar 24, 2021 at 02:30:32AM +0100, Pablo Neira Ayuso wrote: > > This patch adds dev_fill_forward_path() which resolves the path to reach > > the real netdevice from the IP forwarding side. This function takes as > > input the n

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 2:54 AM, Andrew Lunn wrote: +static int eeprom_prepare_data(const struct ethnl_req_info *req_base, +struct ethnl_reply_data *reply_base, +struct genl_info *info) +{ + struct eeprom_reply_data *reply = MODULE_EEPROM_REPDA

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 7:47 PM, Don Bollinger wrote: I don't even see a need for this. The offset should be within one 1/2 page, of one bank. So offset >= 0 and <= 127. Length is also > 0 and <- 127. And offset+length is <= 127. I like the clean approach, but... How do you request low memory? Duh!

Re: [PATCH 1/2] net: ipv4: route.c: add likely() statements

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune Deng wrote: > Add likely() statements in ipv4_confirm_neigh() for 'rt->rt_gw_family > == AF_INET'. Why? Such macros are beneficial in only specific cases, most of the time, likely/unlikely is cargo cult. > > Signed-off-by: Yejune Deng > --- > ne

[PATCH net-next 0/2] dt-bindings: define property describing supported ethernet PHY modes

2021-03-24 Thread Marek Behún
Hello, the Marvell Alaska PHYs (88X3310, 88E2110) can, depending on their configuration, change the PHY mode to the MAC, depending on the copper/fiber speed. The 88X3310, for example, can be configured (via MACTYPE register) so that it communicates with the MAC in sgmii for 10/100/1000mbps, 2500b

[PATCH net-next 2/2] dt-bindings: ethernet-phy: define `supported-mac-connection-types` property

2021-03-24 Thread Marek Behún
An ethernet PHY may support PHY interface modes that are not wired on a specific board (or are broken for some other reason). For example the Marvell 88X3310 PHY supports connecting the MAC with the PHY with `xaui` and `rxaui`, the MAC can also support these modes, but it is possible for a board n

[PATCH net-next 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes

2021-03-24 Thread Marek Behún
In order to be able to define a property describing an array of PHY interface modes, we need to change the current scalar `phy-connection-type`, which lists the possible PHY interface modes, to an array of length 1 (otherwise we would need to define the same list at two different places). Moreover

RE: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-24 Thread David Laight
From: David Laight > Sent: 24 March 2021 09:12 > > From: Martin Sebor > > Sent: 22 March 2021 22:08 > ... > > In GCC 11, all access warnings expect objects to be either declared > > or allocated. Pointers with constant values are taken to point to > > nothing valid (as Arnd mentioned above, this

Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-24 Thread Jon Hunter
Hi Joakim, Starting with v5.12-rc3 I noticed that one of our boards, Tegra186 Jetson TX2, was not long resuming from suspend. Bisect points to commit 9c63faaa931e ("net: stmmac: re-init rx buffers when mac resume back") and reverting this on top of mainline fixes the problem. Interestingly, the b

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Tobias Waldekranz
On Wed, Mar 24, 2021 at 01:15, Vladimir Oltean wrote: > On Tue, Mar 23, 2021 at 10:17:30PM +0100, Tobias Waldekranz wrote: >> On Tue, Mar 23, 2021 at 21:03, Vladimir Oltean wrote: >> > On Tue, Mar 23, 2021 at 03:48:51PM +0100, Tobias Waldekranz wrote: >> >> On Tue, Mar 23, 2021 at 13:35, Vladimir

Re: [PATCH 1/2] net: ipv4: route.c: add likely() statements

2021-03-24 Thread Yejune Deng
My reasons are as following: ipv4_confirm_neigh() belongs to ipv4_dst_ops that family is AF_INET, and ipv4_neigh_lookup() is also added likely() when rt->rt_gw_family is equal to AF_INET. On Wed, Mar 24, 2021 at 6:34 PM Leon Romanovsky wrote: > > On Wed, Mar 24, 2021 at 11:09:22AM +0800, Yejune D

Re: [PATCH net-next 1/2] net: phy: add genphy_c45_loopback

2021-03-24 Thread Heiner Kallweit
On 23.03.2021 17:46, Wong Vee Khee wrote: > Add generic code to enable C45 PHY loopback into the common phy-c45.c > file. This will allow C45 PHY drivers aceess this by setting > .set_loopback. > > Suggested-by: Heiner Kallweit > Signed-off-by: Wong Vee Khee > --- > drivers/net/phy/phy-c45.c |

Re: [PATCH nf-next] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-24 Thread Oz Shlomo
Hi, On 3/24/2021 3:38 AM, Pablo Neira Ayuso wrote: Hi Marcelo, On Mon, Mar 22, 2021 at 03:09:51PM -0300, Marcelo Ricardo Leitner wrote: On Wed, Mar 03, 2021 at 05:11:47PM +0100, Pablo Neira Ayuso wrote: [...] Or probably make the cookie unique is sufficient? The cookie refers to the memory a

Re: [PATCH bpf] bpf: Take module reference for ip in module code

2021-03-24 Thread Jiri Olsa
On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote: > On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote: > > Currently module can be unloaded even if there's a trampoline > > register in it. It's easily reproduced by running in parallel: > > > > # while :; do ./test_progs

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 11:52:49AM +0100, Tobias Waldekranz wrote: > >> This is the tragedy: I know for a fact that a DSA soft parser exists, > >> but because of the aforementioned maze of NDAs and license agreements > >> we, the community, cannot have nice things. > > > > Oh yeah? You can even cre

Re: [PATCH net-next 0/6] page_pool: recycle buffers

2021-03-24 Thread Alexander Lobakin
From: Ilias Apalodimas Date: Wed, 24 Mar 2021 09:50:38 +0200 > Hi Alexander, Hi! > On Tue, Mar 23, 2021 at 08:03:46PM +, Alexander Lobakin wrote: > > From: Ilias Apalodimas > > Date: Tue, 23 Mar 2021 19:01:52 +0200 > > > > > On Tue, Mar 23, 2021 at 04:55:31PM +, Alexander Lobakin wrote

Re: [bug report] net: hns3: vf indexing in hclge_add_fd_entry()

2021-03-24 Thread shenjian (K)
Hello Dan, Thanks for your  report! 在 2021/3/24 15:01, Dan Carpenter 写道: Hello Jian Shen, The patch 5f2b1238b33c: "net: hns3: refactor out hclge_add_fd_entry()" from Mar 22, 2021, leads to the following static checker warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Andrew Lunn
> OK, so following the comments here, I will ignore backward compatibility of > having global offset and length. Yes, we can do that in userspace. > That means I assume in this KAPI I am asked to get data from specific page. > Should I also require user space to send page number to this KAPI (I m

Re: [PATCH 1/2] net: ipv4: route.c: add likely() statements

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 07:01:19PM +0800, Yejune Deng wrote: > My reasons are as following: ipv4_confirm_neigh() belongs to > ipv4_dst_ops that family is AF_INET, and ipv4_neigh_lookup() is also > added likely() when rt->rt_gw_family is equal to AF_INET. It is part of that cargo cult. Please suppo

RE: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-24 Thread Joakim Zhang
> -Original Message- > From: Jon Hunter > Sent: 2021年3月24日 18:51 > To: Joakim Zhang > Cc: netdev@vger.kernel.org; Linux Kernel Mailing List > ; linux-tegra ; > Jakub Kicinski > Subject: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac > resume back > > Hi Joakim, > > Sta

Re: [PATCH] net: phy: dp83867: perform soft reset and retain established link

2021-03-24 Thread Andrew Lunn
On Tue, Mar 23, 2021 at 08:00:06PM -0500, prane...@ti.com wrote: > From: Praneeth Bajjuri > > Current logic is performing hard reset and causing the programmed > registers to be wiped out. > > as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf > 8.6.26 Control Register (CTRL) > do

Re: [PATCH] net: axienet: allow setups without MDIO

2021-03-24 Thread Andrew Lunn
On Wed, Mar 24, 2021 at 10:48:55AM +0100, Daniel Mack wrote: > In setups with fixed-link settings on the hardware bus there is no mdio node > in DTS. axienet_probe() already handles that gracefully but lp->mii_bus is > then NULL. > > Fix code that tries to blindly grab the MDIO lock by introducing

Re: Regression v5.12-rc3: net: stmmac: re-init rx buffers when mac resume back

2021-03-24 Thread Jon Hunter
On 24/03/2021 12:20, Joakim Zhang wrote: ... > Sorry for this breakage at your side. > > You mean one of your boards? Does other boards with STMMAC can work fine? We have two devices with the STMMAC and one works OK and the other fails. They are different generation of device and so there co

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Tobias Waldekranz
On Wed, Mar 24, 2021 at 01:44, Andrew Lunn wrote: >> This was my initial approach. It gets quite messy though. Since taggers >> can be modules, there is no way of knowing if a supplied protocol name >> is garbage ("asdf"), or just part of a module in an initrd that is not >> loaded yet when you ar

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Tobias Waldekranz
On Wed, Mar 24, 2021 at 13:34, Vladimir Oltean wrote: > On Wed, Mar 24, 2021 at 11:52:49AM +0100, Tobias Waldekranz wrote: >> >> This is the tragedy: I know for a fact that a DSA soft parser exists, >> >> but because of the aforementioned maze of NDAs and license agreements >> >> we, the community

Re: [PATCH] net: axienet: allow setups without MDIO

2021-03-24 Thread Daniel Mack
On 3/24/21 1:38 PM, Andrew Lunn wrote: > On Wed, Mar 24, 2021 at 10:48:55AM +0100, Daniel Mack wrote: >> In setups with fixed-link settings on the hardware bus there is no mdio node >> in DTS. axienet_probe() already handles that gracefully but lp->mii_bus is >> then NULL. >> >> Fix code that tries

[PATCH v2] net: axienet: allow setups without MDIO

2021-03-24 Thread Daniel Mack
In setups with fixed-link settings there is no mdio node in DTS. axienet_probe() already handles that gracefully but lp->mii_bus is then NULL. Fix code that tries to blindly grab the MDIO lock by introducing two helper functions that make the locking conditional. Signed-off-by: Daniel Mack --- v

[PATCH] [v2] hinic: avoid gcc -Wrestrict warning

2021-03-24 Thread Arnd Bergmann
From: Arnd Bergmann With extra warnings enabled, gcc complains that snprintf should not take the same buffer as source and destination: drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function 'hinic_set_settings_to_hw': drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:480:9: error: 'snp

[PATCH net-next v2 0/6] net: ipa: versions and registers

2021-03-24 Thread Alex Elder
Version 2 of this series adds kernel-doc descriptions for all members of the ipa_version enumerated type in patch 2. The original description of the series is below. -Alex This series is sort of a mix of things, generally related to updating IPA versions a

[PATCH net-next v2 1/6] net: ipa: reduce IPA version assumptions

2021-03-24 Thread Alex Elder
Modify conditional tests throughout the IPA code so they do not assume that IPA v3.5.1 is the oldest version supported. Also remove assumptions that IPA v4.5 is the newest version of IPA supported. Augment versions in comments with "+", to be clearer that the comment applies to a version and subs

[PATCH net-next v2 2/6] net: ipa: update version definitions

2021-03-24 Thread Alex Elder
Add IPA version definitions for all IPA v3.x and v4.x. Fix the GSI version associated with IPA version 4.1. Signed-off-by: Alex Elder --- v2: - Add kernel-doc descriptions for ipa_version members. drivers/net/ipa/ipa_version.h | 29 ++--- 1 file changed, 22 insertions(+

[PATCH net-next v2 6/6] net: ipa: increase channels and events

2021-03-24 Thread Alex Elder
Increase the maximum number of channels and event rings supported by the driver, to allow the maximum available on the SDX55. Signed-off-by: Alex Elder --- drivers/net/ipa/gsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/gsi.h b/drivers/net/ipa/gsi.h

[PATCH net-next v2 5/6] net: ipa: move ipa_aggr_granularity_val()

2021-03-24 Thread Alex Elder
We only use ipa_aggr_granularity_val() inside "ipa_main.c", so it doesn't really need to be defined in a header file. It makes some sense to be grouped with the register definitions, but it is unlike the other inline functions now defined in "ipa_reg.h". So move it into "ipa_main.c" where it's us

[PATCH net-next v2 4/6] net: ipa: limit local processing context address

2021-03-24 Thread Alex Elder
Not all of the bits of the LOCAL_PKT_PROC_CNTXT register are valid. Until IPA v4.5, there are 17 valid bits (though the bottom three must be zero). Starting with IPA v4.5, 18 bits are valid. Introduce proc_cntxt_base_addr_encoded() to encode the base address for use in the register using only the

[PATCH net-next v2 3/6] net: ipa: define the ENDP_INIT_NAT register

2021-03-24 Thread Alex Elder
Define the ENDP_INIT_NAT register for setting up the NAT configuration for an endpoint. We aren't using NAT at this time, so explicitly set the type to BYPASS for all endpoints. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 17 - drivers/net/ipa/ipa_reg.h |

Re: [PATCH v3 bpf-next 06/17] libbpf: xsk: use bpf_link

2021-03-24 Thread Maciej Fijalkowski
On Mon, Mar 22, 2021 at 10:47:09PM +0100, Toke Høiland-Jørgensen wrote: > Maciej Fijalkowski writes: > > > Currently, if there are multiple xdpsock instances running on a single > > interface and in case one of the instances is terminated, the rest of > > them are left in an inoperable state due

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 02:01:14PM +0100, Tobias Waldekranz wrote: > On Wed, Mar 24, 2021 at 13:34, Vladimir Oltean wrote: > > On Wed, Mar 24, 2021 at 11:52:49AM +0100, Tobias Waldekranz wrote: > >> >> This is the tragedy: I know for a fact that a DSA soft parser exists, > >> >> but because of the

Re: [PATCH] [v2] hinic: avoid gcc -Wrestrict warning

2021-03-24 Thread Rasmus Villemoes
On 24/03/2021 14.07, Arnd Bergmann wrote: > From: Arnd Bergmann > > With extra warnings enabled, gcc complains that snprintf should not > take the same buffer as source and destination: > > drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function > 'hinic_set_settings_to_hw': > drivers/ne

Re: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs

2021-03-24 Thread Leon Romanovsky
On Tue, Mar 23, 2021 at 06:59:52PM -0500, Shiraz Saleem wrote: > From: Mustafa Ismail > > Register auxiliary drivers which can attach to auxiliary RDMA > devices from Intel PCI netdev drivers i40e and ice. Implement the private > channel ops, and register net notifiers. > > Signed-off-by: Mustaf

Re: [PATCH bpf] bpf: Take module reference for ip in module code

2021-03-24 Thread Jiri Olsa
On Wed, Mar 24, 2021 at 12:31:42PM +0100, Jiri Olsa wrote: > On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote: > > On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote: > > > Currently module can be unloaded even if there's a trampoline > > > register in it. It's easily repro

[PATCH] dt-bindings: net: micrel-ksz90x1.txt: correct documentation

2021-03-24 Thread Dinh Nguyen
Correct the Micrel phy documentation for the ksz9021 and ksz9031 phys for how the phy skews are set. Signed-off-by: Dinh Nguyen --- .../bindings/net/micrel-ksz90x1.txt | 96 ++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bind

Re: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs

2021-03-24 Thread Jason Gunthorpe
On Wed, Mar 24, 2021 at 03:47:34PM +0200, Leon Romanovsky wrote: > On Tue, Mar 23, 2021 at 06:59:52PM -0500, Shiraz Saleem wrote: > > From: Mustafa Ismail > > > > Register auxiliary drivers which can attach to auxiliary RDMA > > devices from Intel PCI netdev drivers i40e and ice. Implement the pr

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Vladimir Oltean
On Tue, Mar 23, 2021 at 10:17:30PM +0100, Tobias Waldekranz wrote: > > I don't see any place in the network stack that recalculates the FCS if > > NETIF_F_RXALL is set. Additionally, without NETIF_F_RXFCS, I don't even > > know how could the stack even tell a packet with bad FCS apart from one > >

Re: [PATCH v2 00/10] Rid W=1 warnings from OF

2021-03-24 Thread Rob Herring
On Tue, Mar 23, 2021 at 2:36 AM Lee Jones wrote: > > On Mon, 22 Mar 2021, Rob Herring wrote: > > > On Thu, Mar 18, 2021 at 4:40 AM Lee Jones wrote: > > > > > > This set is part of a larger effort attempting to clean-up W=1 > > > kernel builds, which are currently overwhelmingly riddled with > > >

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 04:03:17PM +0200, Vladimir Oltean wrote: > I think there exists an intermediate approach between processing the > frames on the RX queue and installing a soft parser. I meant "RX error queue", sorry for the confusion.

Re: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs

2021-03-24 Thread Leon Romanovsky
On Wed, Mar 24, 2021 at 11:00:46AM -0300, Jason Gunthorpe wrote: > On Wed, Mar 24, 2021 at 03:47:34PM +0200, Leon Romanovsky wrote: > > On Tue, Mar 23, 2021 at 06:59:52PM -0500, Shiraz Saleem wrote: > > > From: Mustafa Ismail > > > > > > Register auxiliary drivers which can attach to auxiliary RD

Re: [PATCH] [v2] hinic: avoid gcc -Wrestrict warning

2021-03-24 Thread Arnd Bergmann
On Wed, Mar 24, 2021 at 2:29 PM Rasmus Villemoes wrote: > On 24/03/2021 14.07, Arnd Bergmann wrote: > > > if (set_settings & HILINK_LINK_SET_SPEED) { > > speed_level = hinic_ethtool_to_hw_speed_level(speed); > > err = snprintf(set_link_str, SET_LINK_STR_MAX_LEN,

Re: [PATCH 5.10 104/157] mptcp: put subflow sock on connect error

2021-03-24 Thread Sasha Levin
On Wed, Mar 24, 2021 at 10:22:29AM +0100, Greg Kroah-Hartman wrote: On Wed, Mar 24, 2021 at 10:04:12AM +0100, Florian Westphal wrote: Naresh Kamboju wrote: > On Mon, 22 Mar 2021 at 18:15, Greg Kroah-Hartman > wrote: > > > > From: Florian Westphal > > > > [ Upstream commit f07157792c633b528de5

[PATCH net-next] netdevsim: switch to memdup_user_nul()

2021-03-24 Thread 'Wei Yongjun
From: Wei Yongjun Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/netdevsim/health.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/netdevsim/health.c b/dr

Re: [PATCH v2 08/23] RDMA/irdma: Register auxiliary driver and implement private channel OPs

2021-03-24 Thread Jason Gunthorpe
On Wed, Mar 24, 2021 at 04:17:20PM +0200, Leon Romanovsky wrote: > On Wed, Mar 24, 2021 at 11:00:46AM -0300, Jason Gunthorpe wrote: > > On Wed, Mar 24, 2021 at 03:47:34PM +0200, Leon Romanovsky wrote: > > > On Tue, Mar 23, 2021 at 06:59:52PM -0500, Shiraz Saleem wrote: > > > > From: Mustafa Ismail

Re: [PATCH net-next 1/8] udp: fixup csum for GSO receive slow path

2021-03-24 Thread Paolo Abeni
On Tue, 2021-03-23 at 21:45 -0400, Willem de Bruijn wrote: > On Mon, Mar 22, 2021 at 12:36 PM Paolo Abeni wrote: > > On Mon, 2021-03-22 at 09:18 -0400, Willem de Bruijn wrote: > > > On Sun, Mar 21, 2021 at 1:01 PM Paolo Abeni wrote: > > > > When looping back UDP GSO over UDP tunnel packets to an

[PATCH bpf 1/3] libbpf: ensure umem pointer is non-NULL before dereferencing

2021-03-24 Thread Ciara Loftus
Calls to xsk_socket__create dereference the umem to access the fill_save and comp_save pointers. Make sure the umem is non-NULL before doing this. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Ciara Loftus --- tools/lib/bpf/xsk.c | 3 +++ 1 file

[PATCH bpf 0/3] AF_XDP Socket Creation Fixes

2021-03-24 Thread Ciara Loftus
This series fixes some issues around socket creation for AF_XDP. Patch 1 fixes a potential NULL pointer dereference in xsk_socket__create_shared. Patch 2 ensures that the umem passed to xsk_socket__create(_shared) remains unchanged in event of failure. Patch 3 makes it possible for xsk_socket__c

[PATCH bpf 2/3] libbpf: restore umem state after socket create failure

2021-03-24 Thread Ciara Loftus
If the call to socket_create fails, the user may want to retry the socket creation using the same umem. Ensure that the umem is in the same state on exit if the call failed by restoring the _save pointers and not unmapping the set of umem rings if those pointers are non NULL. Fixes: 2f6324a3937f (

[PATCH bpf 3/3] libbpf: ignore return values of setsockopt for XDP rings.

2021-03-24 Thread Ciara Loftus
During xsk_socket__create the XDP_RX_RING and XDP_TX_RING setsockopts are called to create the rx and tx rings for the AF_XDP socket. If the ring has already been set up, the setsockopt will return an error. However, in the event of a failure during xsk_socket__create(_shared) after the rings have

!

2021-03-24 Thread Paolo Abeni
On Tue, 2021-03-23 at 21:54 -0400, Willem de Bruijn wrote: > > I did not look at that before your suggestion. Thanks for pointing out. > > > > I think the problem is specific to UDP: when processing the outer UDP > > header that is potentially eligible for both NETIF_F_GSO_UDP_L4 and > > gro_recei

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Tobias Waldekranz
On Wed, Mar 24, 2021 at 16:03, Vladimir Oltean wrote: > On Tue, Mar 23, 2021 at 10:17:30PM +0100, Tobias Waldekranz wrote: >> > I don't see any place in the network stack that recalculates the FCS if >> > NETIF_F_RXALL is set. Additionally, without NETIF_F_RXFCS, I don't even >> > know how could t

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 04:02:52PM +0100, Tobias Waldekranz wrote: > On Wed, Mar 24, 2021 at 16:03, Vladimir Oltean wrote: > > On Tue, Mar 23, 2021 at 10:17:30PM +0100, Tobias Waldekranz wrote: > >> > I don't see any place in the network stack that recalculates the FCS if > >> > NETIF_F_RXALL is s

[PATCH][next] net: bridge: Fix missing return assignment from br_vlan_replay_one call

2021-03-24 Thread Colin King
From: Colin Ian King The call to br_vlan_replay_one is returning an error return value but this is not being assigned to err and the following check on err is currently always false because err was initialized to zero. Fix this by assigning err. Addresses-Coverity: ("'Constant' variable guards d

Re: [PATCH v2 00/10] Rid W=1 warnings from OF

2021-03-24 Thread Lee Jones
On Wed, 24 Mar 2021, Rob Herring wrote: > On Tue, Mar 23, 2021 at 2:36 AM Lee Jones wrote: > > > > On Mon, 22 Mar 2021, Rob Herring wrote: > > > > > On Thu, Mar 18, 2021 at 4:40 AM Lee Jones wrote: > > > > > > > > This set is part of a larger effort attempting to clean-up W=1 > > > > kernel buil

Re: [PATCH 1/5] dt-bindings: soc: qcom: wcnss: Add firmware-name property

2021-03-24 Thread Rob Herring
On Thu, 11 Mar 2021 16:33:14 -0800, Bjorn Andersson wrote: > The WCNSS needs firmware which differs between platforms, and possibly > boards. Add a new property "firmware-name" to allow the DT to specify > the platform/board specific path to this firmware file. > > Signed-off-by: Bjorn Andersson

Re: [PATCH 10/11] drm/i915: avoid stringop-overread warning on pri_latency

2021-03-24 Thread Jani Nikula
On Mon, 22 Mar 2021, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc-11 warns about what appears to be an out-of-range array access: > > In function ‘snb_wm_latency_quirk’, > inlined from ‘ilk_setup_wm_latency’ at > drivers/gpu/drm/i915/intel_pm.c:3108:3: > drivers/gpu/drm/i915/intel_pm.c

[PATCH net-next 2/2] net: enetc: don't depend on system endianness in enetc_set_mac_ht_flt

2021-03-24 Thread Vladimir Oltean
From: Vladimir Oltean When enetc runs out of exact match entries for unicast address filtering, it switches to an approach based on hash tables, where multiple MAC addresses might end up in the same bucket. However, the enetc_set_mac_ht_flt function currently depends on the system endianness, be

[PATCH net-next 1/2] net: enetc: don't depend on system endianness in enetc_set_vlan_ht_filter

2021-03-24 Thread Vladimir Oltean
From: Vladimir Oltean ENETC has a 64-entry hash table for VLAN RX filtering per Station Interface, which is accessed through two 32-bit registers: VHFR0 holding the low portion, and VHFR1 holding the high portion. The enetc_set_vlan_ht_filter function looks at the pf->vlan_ht_filter bitmap, whic

Re: [PATCH][next] net: bridge: Fix missing return assignment from br_vlan_replay_one call

2021-03-24 Thread Vladimir Oltean
On Wed, Mar 24, 2021 at 03:09:50PM +, Colin King wrote: > From: Colin Ian King > > The call to br_vlan_replay_one is returning an error return value but > this is not being assigned to err and the following check on err is > currently always false because err was initialized to zero. Fix this

Re: [PATCH net-next,v2 01/24] net: resolve forwarding path from virtual netdevice and HW destination address

2021-03-24 Thread DENG Qingfang
On Wed, Mar 24, 2021 at 11:03:54AM +0100, Pablo Neira Ayuso wrote: > > For this scenario specifically, it should be possible extend the > existing flowtable netlink API to allow hostapd to flush entries in > the flowtable for the client changing AP. The APs are external, are we going to install h

Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol

2021-03-24 Thread Tobias Waldekranz
On Wed, Mar 24, 2021 at 17:08, Vladimir Oltean wrote: > On Wed, Mar 24, 2021 at 04:02:52PM +0100, Tobias Waldekranz wrote: >> On Wed, Mar 24, 2021 at 16:03, Vladimir Oltean wrote: >> > On Tue, Mar 23, 2021 at 10:17:30PM +0100, Tobias Waldekranz wrote: >> >> > I don't see any place in the network

RE: [PATCH net-next 1/2] net: enetc: don't depend on system endianness in enetc_set_vlan_ht_filter

2021-03-24 Thread Claudiu Manoil
>-Original Message- >From: Vladimir Oltean >Sent: Wednesday, March 24, 2021 5:45 PM >To: Jakub Kicinski ; David S. Miller > >Cc: netdev@vger.kernel.org; Claudiu Manoil ; >Vladimir Oltean >Subject: [PATCH net-next 1/2] net: enetc: don't depend on system >endianness in enetc_set_vlan_ht_fil

RE: [PATCH net-next 2/2] net: enetc: don't depend on system endianness in enetc_set_mac_ht_flt

2021-03-24 Thread Claudiu Manoil
>-Original Message- >From: Vladimir Oltean >Sent: Wednesday, March 24, 2021 5:45 PM >To: Jakub Kicinski ; David S. Miller > >Cc: netdev@vger.kernel.org; Claudiu Manoil ; >Vladimir Oltean >Subject: [PATCH net-next 2/2] net: enetc: don't depend on system >endianness in enetc_set_mac_ht_flt

RE: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread David Laight
From: Alex Elder > Sent: 23 March 2021 01:05 > It is possible for a 32 bit x86 build to use a 64 bit DMA address. > > There are two remaining spots where the IPA driver does a modulo > operation to check alignment of a DMA address, and under certain > conditions this can lead to a build error on i

[PATCH net-next 1/7] net: phy: marvell10g: rename register

2021-03-24 Thread Marek Behún
The MV_V2_PORT_MAC_TYPE_* is part of the CTRL register. Rename to MV_V2_PORT_CTRL_MACTYPE_*. Signed-off-by: Marek Behún --- drivers/net/phy/marvell10g.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index b

[PATCH net-next 2/7] net: phy: marvell10g: fix typo

2021-03-24 Thread Marek Behún
This space should be a tab instead. Signed-off-by: Marek Behún --- drivers/net/phy/marvell10g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 96c081a7ec54..567e7900e5b8 100644 --- a/drivers/net/phy/marvell10g

[PATCH net-next 5/7] net: phy: marvell10g: save MACTYPE instead of rate_matching boolean

2021-03-24 Thread Marek Behún
Save MACTYPE instead of rate_matching boolean. We will need this for other configurations. Signed-off-by: Marek Behún --- drivers/net/phy/marvell10g.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 46e8

  1   2   3   4   >