Re: [V9fs-developer] [PATCH kernel] 9p/trans_fd: Check file mode at opening

2020-07-29 Thread Greg Kurz
On Wed, 29 Jul 2020 09:50:21 +1000 Alexey Kardashevskiy wrote: > > > On 29/07/2020 03:42, Greg Kurz wrote: > > Hi Alexey, > > > > Working on 9p now ?!? ;-) > > No, I am running syzkaller and seeing things :) > :) > > > Cc'ing Dominique Martinet who appears to be the person who takes care

回复: INFO: rcu detected stall in tc_modify_qdisc

2020-07-29 Thread Zhang, Qiang
发件人: linux-kernel-ow...@vger.kernel.org 代表 syzbot 发送时间: 2020年7月29日 13:53 收件人: da...@davemloft.net; fweis...@gmail.com; j...@mojatatu.com; j...@resnulli.us; linux-ker...@vger.kernel.org; mi...@kernel.org; netdev@vger.kernel.org; syzkaller-b...@googlegr

Aw: Re: [PATCH] net: ethernet: mtk_eth_soc: Always call mtk_gmac0_rgmii_adjust() for mt7623

2020-07-29 Thread Frank Wunderlich
Hi, Thank you David's to get this finally applied. Add recipient for stable tree as TRGMII on 5.4+ is also broken without this Patch. regards Frank > Gesendet: Mittwoch, 29. Juli 2020 um 02:05 Uhr > Von: "David Miller" Applied.

Re: [PATCH v3] net: ethernet: mtk_eth_soc: fix mtu warning

2020-07-29 Thread Landen Chao
Hi Frank, If you send next version of patch, you can help to add the Signed-off line. Thanks. Signed-off-by: Landen Chao On Tue, 2020-07-28 at 23:53 +0800, Jakub Kicinski wrote: > On Tue, 28 Jul 2020 14:27:43 +0200 Frank Wunderlich wrote: > > From: Landen Chao > > Hi gents, > > if the patch i

Re: [PATCH] net: nixge: fix potential memory leak in nixge_probe()

2020-07-29 Thread Markus Elfring
> If some processes in nixge_probe() fail, free_netdev(dev) > needs to be called to aviod a memory leak. * Would you like to avoid a typo in this change description? * An imperative wording can be preferred here, can't it? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree

RE: [PATCH 2/4] net: make sockptr_is_null strict aliasing safe

2020-07-29 Thread David Laight
From: Christoph Hellwig > Sent: 28 July 2020 17:39 > > While the kernel in general is not strict aliasing safe we can trivially > do that in sockptr_is_null without affecting code generation, so always > check the actually assigned union member. Even with 'strict aliasing' gcc (at least) guarant

[PATCH v4] net: ethernet: mtk_eth_soc: fix MTU warnings

2020-07-29 Thread Frank Wunderlich
From: Landen Chao in recent kernel versions there are warnings about incorrect MTU size like these: eth0: mtu greater than device maximum mtk_soc_eth 1b10.ethernet eth0: error -22 setting MTU to include DSA overhead Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Fixes

Re: fentry/fexit attach to EXT type XDP program does not work

2020-07-29 Thread Jiri Olsa
On Wed, Jul 29, 2020 at 08:23:56AM +0200, Eelco Chaudron wrote: SNIP > > > > > a patch > > > > > that would nice. > > > > > You can also send it to me before bpf-next opens and I can verify > > > > > it, and > > > > > clean up the self-test so it can be included as well. > > > > > > > > > > > >

KASAN: vmalloc-out-of-bounds Read in get_counters

2020-07-29 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:68845a55 Merge branch 'akpm' into master (patches from And.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1366896490 kernel config: https://syzkaller.appspot.com/x/.config?x=f87a5e4232fdb267 das

Re: [PATCH net] devlink: ignore -EOPNOTSUPP errors on dumpit

2020-07-29 Thread Jiri Pirko
Wed, Jul 29, 2020 at 01:15:07AM CEST, k...@kernel.org wrote: >Number of .dumpit functions try to ignore -EOPNOTSUPP errors. >Recent change missed that, and started reporting all errors >but -EMSGSIZE back from dumps. This leads to situation like >this: > >$ devlink dev info >devlink answers: Operat

RE: [PATCH 4/4] net: improve the user pointer check in init_user_sockptr

2020-07-29 Thread David Laight
From: Christoph Hellwig > Sent: 28 July 2020 17:39 > > Make sure not just the pointer itself but the whole range lies in > the user address space. For that pass the length and then use > the access_ok helper to do the check. Now that the address is never changed it is enough to check the base ad

[PATCH net] vxlan: Ensure FDB dump is performed under RCU

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel The commit cited below removed the RCU read-side critical section from rtnl_fdb_dump() which means that the ndo_fdb_dump() callback is invoked without RCU protection. This results in the following warning [1] in the VXLAN driver, which relied on the callback being invoked from

[PATCH net] ipv4: Silence suspicious RCU usage warning

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel fib_trie_unmerge() is called with RTNL held, but not from an RCU read-side critical section. This leads to the following warning [1] when the FIB alias list in a leaf is traversed with hlist_for_each_entry_rcu(). Since the function is always called with RTNL held and since mod

Re: [PATCH] ethernet: fix potential memory leak in gemini_ethernet_port_probe()

2020-07-29 Thread Markus Elfring
> If some processes in gemini_ethernet_port_probe() fail, > free_netdev(dev) needs to be called to avoid a memory leak. Would you like to use an imperative wording for this change description? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-29 Thread Jon Nettleton
On Wed, Jul 29, 2020 at 4:53 AM Jeremy Linton wrote: > > Hi, > > On 7/28/20 7:39 PM, Florian Fainelli wrote: > > On 7/28/2020 3:30 PM, Jeremy Linton wrote: > >> Hi, > >> > >> On 7/28/20 3:06 AM, Dan Callaghan wrote: > >>> Excerpts from Andrew Lunn's message of 2020-07-24 21:14:36 +02:00: > No

Re: [PATCH bpf-next v5 15/15] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-29 Thread Jakub Sitnicki
Hi Daniel, On Tue, Jul 28, 2020 at 10:47 PM CEST, Daniel Borkmann wrote: [...] > Jakub, I'm actually seeing a slightly different one on my test machine with > sk_lookup: > > # ./test_progs -t sk_lookup > #14 cgroup_skb_sk_lookup:OK > #73/1 query lookup prog:OK > #73/2 TCP IPv4 redir port:OK > #

[PATCH net] selftests/bpf: add xdpdrv mode for test_xdp_redirect

2020-07-29 Thread Hangbin Liu
This patch add xdpdrv mode for test_xdp_redirect.sh since veth has support native mode. After update here is the test result: ]# ./test_xdp_redirect.sh selftests: test_xdp_redirect xdpgeneric [PASS] selftests: test_xdp_redirect xdpdrv [PASS] Signed-off-by: Hangbin Liu --- .../selftests/bpf/test

Re: [PATCH bpf-next v5 15/15] selftests/bpf: Tests for BPF_SK_LOOKUP attach point

2020-07-29 Thread Jakub Sitnicki
Hi Andrii, On Tue, Jul 28, 2020 at 10:13 PM CEST, Andrii Nakryiko wrote: [...] > We are getting this failure in Travis CI when syncing libbpf [0]: > > ``` > ip: either "local" is duplicate, or "nodad" is garbage > > switch_netns:PASS:unshare 0 nsec > > switch_netns:FAIL:system failed > > (/home/

Re: general protection fault in vsock_poll

2020-07-29 Thread syzbot
syzbot has bisected this issue to: commit 408624af4c89989117bb2c6517bd50b7708a2fcd Author: Stefano Garzarella Date: Tue Dec 10 10:43:06 2019 + vsock: use local transport when it is loaded bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17e6489b10 start commit: 92ed3

RE: [PATCH 2/4] net: make sockptr_is_null strict aliasing safe

2020-07-29 Thread Jan Engelhardt
On Wednesday 2020-07-29 10:04, David Laight wrote: >From: Christoph Hellwig >> Sent: 28 July 2020 17:39 >> >> While the kernel in general is not strict aliasing safe we can trivially >> do that in sockptr_is_null without affecting code generation, so always >> check the actually assigned union

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Jason Wang
On 2020/7/28 下午5:04, Eli Cohen wrote: On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) +{ + struct vhost_virtqueue *vq = &v->vqs[qid]; + const struct vdpa_config_ops *ops = v->vdpa->config; +

[PATCH net 0/6] mlxsw fixes

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel This patch set contains various fixes for mlxsw. Patches #1-#2 fix two trap related issues introduced in previous cycle. Patches #3-#5 fix rare use-after-frees discovered by syzkaller. After over a week of fuzzing with the fixes, the bugs did not reproduce. Patch #6 from Ami

[PATCH net 1/6] mlxsw: spectrum_router: Allow programming link-local host routes

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel Cited commit added the ability to program link-local prefix routes to the ASIC so that relevant packets are routed and trapped correctly. However, host routes were not included in the change and thus not programmed to the ASIC. This can result in packets being trapped via an e

[PATCH net 5/6] mlxsw: spectrum_router: Fix use-after-free in router init / de-init

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel Several notifiers are registered as part of router initialization. Since some of these notifiers are registered before the end of the initialization, it is possible for them to access uninitialized or freed memory when processing notifications [1]. Additionally, some of these

[PATCH net 4/6] mlxsw: core: Free EMAD transactions using kfree_rcu()

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel The lifetime of EMAD transactions (i.e., 'struct mlxsw_reg_trans') is managed using RCU. They are freed using kfree_rcu() once the transaction ends. However, in case the transaction failed it is freed immediately after being removed from the active transactions list. This is p

[PATCH net 6/6] selftests: ethtool: Fix test when only two speeds are supported

2020-07-29 Thread Ido Schimmel
From: Amit Cohen The test case check_highest_speed_is_chosen() configures $h1 to advertise a subset of its supported speeds and checks that $h2 chooses the highest speed from the subset. To find the common advertised speeds between $h1 and $h2, common_speeds_get() is called. Currently, the firs

[PATCH net 2/6] mlxsw: spectrum: Use different trap group for externally routed packets

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel Cited commit mistakenly removed the trap group for externally routed packets (e.g., via the management interface) and grouped locally routed and externally routed packet traps under the same group, thereby subjecting them to the same policer. This can result in problems, for e

[PATCH net 3/6] mlxsw: core: Increase scope of RCU read-side critical section

2020-07-29 Thread Ido Schimmel
From: Ido Schimmel The lifetime of the Rx listener item ('rxl_item') is managed using RCU, but is dereferenced outside of RCU read-side critical section, which can lead to a use-after-free. Fix this by increasing the scope of the RCU read-side critical section. Fixes: 93c1edb27f9e ("mlxsw: Intr

Re: [PATCH v2 0/9] ptp: Add generic header parsing function

2020-07-29 Thread Kurt Kanzenbach
On Tue Jul 28 2020, David Miller wrote: > It looks like some mlxsw et al. issues wrt. which header is expected at > skb->data when certain helper functions are invoked need to be resolved > still. Yes, the length check needs to be sorted out first. So, please don't merge this version. Thanks, Kur

Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-29 Thread Calvin Johnson
On Wed, Jul 29, 2020 at 10:43:34AM +0200, Jon Nettleton wrote: > On Wed, Jul 29, 2020 at 4:53 AM Jeremy Linton wrote: > > > > Hi, > > > > On 7/28/20 7:39 PM, Florian Fainelli wrote: > > > On 7/28/2020 3:30 PM, Jeremy Linton wrote: > > >> Hi, > > >> > > >> On 7/28/20 3:06 AM, Dan Callaghan wrote: >

Re: general protection fault in vsock_poll

2020-07-29 Thread Stefano Garzarella
On Wed, Jul 29, 2020 at 01:59:05AM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 408624af4c89989117bb2c6517bd50b7708a2fcd > Author: Stefano Garzarella > Date: Tue Dec 10 10:43:06 2019 + > > vsock: use local transport when it is loaded > > bisection log: https:/

[PATCH net-next v2] net: mvneta: fix comment about phylink_speed_down

2020-07-29 Thread Jisheng Zhang
mvneta has switched to phylink, so the comment should look like "We may have called phylink_speed_down before". Signed-off-by: Jisheng Zhang --- Since v1: - drop patch2 which tries to avoid link flapping when changing mtu I need more time on the change mtu refactoring. drivers/net/etherne

Re: [PATCH net-nex 2/2] net: mvneta: Don't speed down the PHY when changing mtu

2020-07-29 Thread Jisheng Zhang
Hi David, On Tue, 28 Jul 2020 17:52:02 -0700 (PDT) David Miller wrote: > > > > @@ -3651,7 +3651,8 @@ static void mvneta_stop_dev(struct mvneta_port *pp) > > > > set_bit(__MVNETA_DOWN, &pp->state); > > > > - if (device_may_wakeup(&pp->dev->dev)) > > + if (device_may_wakeup(&pp->dev

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang wrote: > > On 2020/7/28 下午5:04, Eli Cohen wrote: > >On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: > >>+static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) > >>+{ > >>+ struct vhost_virtqueue *vq = &v->vqs[qid]; >

[PATCH v1 0/3] net: ethernet: use generic power management

2020-07-29 Thread Vaibhav Gupta
Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to upgrade power management in net ethernet drivers. This has been done by upgrading .suspend() and .resume() callbacks. The upgrade makes sure that the involvement of PCI Core does not change the order of op

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Russell King - ARM Linux admin
On Tue, Jul 28, 2020 at 11:06:08PM +0200, Petr Machata wrote: > > Kurt Kanzenbach writes: > > > On Mon Jul 27 2020, Petr Machata wrote: > >> So this looks good, and works, but I'm wondering about one thing. > > > > Thanks for testing. > > > >> > >> Your code (and evidently most drivers as well)

Re: [PATCH] net: ethernet: fix potential memory leak in gemini_ethernet_port_probe()

2020-07-29 Thread Jisheng Zhang
On Wed, 29 Jul 2020 11:46:06 +0800 Lu Wei wrote: > > > If some processes in gemini_ethernet_port_probe() fail, > free_netdev(dev) needs to be called to avoid a memory leak. Using devm_alloc_etherdev_mqs() would be much simpler > > Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini

Re: [PATCH net-next v2] net: mvneta: fix comment about phylink_speed_down

2020-07-29 Thread Russell King - ARM Linux admin
On Wed, Jul 29, 2020 at 05:49:09PM +0800, Jisheng Zhang wrote: > mvneta has switched to phylink, so the comment should look > like "We may have called phylink_speed_down before". > > Signed-off-by: Jisheng Zhang Reviewed-by: Russell King > --- > Since v1: > - drop patch2 which tries to avoid

Re: [PATCH v1] farsync: use generic power management

2020-07-29 Thread Vaibhav Gupta
On Tue, Jul 28, 2020 at 03:04:13PM -0500, Bjorn Helgaas wrote: > On Tue, Jul 28, 2020 at 09:58:10AM +0530, Vaibhav Gupta wrote: > > The .suspend() and .resume() callbacks are not defined for this driver. > > Still, their power management structure follows the legacy framework. To > > bring it under

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Jason Wang
On 2020/7/29 下午5:55, Eli Cohen wrote: On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang wrote: On 2020/7/28 下午5:04, Eli Cohen wrote: On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) +{ + struct vhost_vi

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Kurt Kanzenbach
On Wed Jul 29 2020, Russell King - ARM Linux admin wrote: > On Tue, Jul 28, 2020 at 11:06:08PM +0200, Petr Machata wrote: >> >> Kurt Kanzenbach writes: >> >> > On Mon Jul 27 2020, Petr Machata wrote: >> >> So this looks good, and works, but I'm wondering about one thing. >> > >> > Thanks for tes

[PATCH net] net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct

2020-07-29 Thread wenxu
From: wenxu When openvswitch conntrack offload with act_ct action. Fragment packets defrag in the ingress tc act_ct action and miss the next chain. Then the packet pass to the openvswitch datapath without the mru. The over mtu packet will be dropped in output action in openvswitch for over mtu.

Re: [net-next 5/6] i40e, xsk: increase budget for AF_XDP path

2020-07-29 Thread Björn Töpel
On 2020-07-28 22:15, Jakub Kicinski wrote: On Tue, 28 Jul 2020 12:08:41 -0700 Tony Nguyen wrote: diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 1f2dd591dbf1..99f4afdc403d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/dr

[PATCH] uapi, seg6_iptunnel: Add missing include in seg6_iptunnel.h

2020-07-29 Thread Ioana-Ruxandra Stancioi
From: Ioana-Ruxandra Stăncioi Include in uapi/linux/seg6_iptunnel.h to fix the following linux/seg6_iptunnel.h compilation error: invalid application of 'sizeof' to incomplete type 'struct ipv6hdr' head = sizeof(struct ipv6hdr); ^~ This is to allow including

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

2020-07-29 Thread Russell King - ARM Linux admin
On Tue, Jul 14, 2020 at 05:26:28PM +0100, Russell King wrote: > Add PTP basic support for Marvell 88E151x PHYs. These PHYs support > timestamping the egress and ingress of packets, but does not support > any packet modification, nor do we support any filtering beyond > selecting packets that the h

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
On Wed, Jul 29, 2020 at 06:19:52PM +0800, Jason Wang wrote: I am checking internally if we can work in a mode not requiring to acknowledge the interrupt. I will update. Thanks for the explanations. > > On 2020/7/29 下午5:55, Eli Cohen wrote: > >On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason Wang

Re: [PATCH v8 bpf-next 12/13] selftests/bpf: Add test for d_path helper

2020-07-29 Thread Jiri Olsa
On Tue, Jul 28, 2020 at 12:53:00PM -0700, Andrii Nakryiko wrote: SNIP > > + if (CHECK_FAIL(ret < 0)) > > + goto out_close; > > + ret = set_pathname(procfd, pid); > > + if (CHECK_FAIL(ret < 0)) > > + goto out_close; > > + ret = set_pathname(devfd

linux-next: build failure after merge of the net-next tree

2020-07-29 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (i386 defconfig) failed like this: x86_64-linux-gnu-ld: net/core/fib_rules.o: in function `fib_rules_lookup': fib_rules.c:(.text+0x5c6): undefined reference to `fib6_rule_match' x86_64-linux-gnu-ld: fib_rules.c:(.text+0x5d8): undef

Re: [PATCH ipsec] xfrm: esp6: fix the location of the transport header with encapsulation

2020-07-29 Thread Steffen Klassert
On Mon, Jul 27, 2020 at 04:03:47PM +0200, Sabrina Dubroca wrote: > commit 17175d1a27c6 ("xfrm: esp6: fix encapsulation header offset > computation") changed esp6_input_done2 to correctly find the size of > the IPv6 header that precedes the TCP/UDP encapsulation header, but > didn't adjust the final

[PATCH v3 net-next 03/11] qed: swap param init and publish

2020-07-29 Thread Igor Russkikh
In theory that could lead to race condition Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev

[PATCH v3 net-next 02/11] qed/qede: make devlink survive recovery

2020-07-29 Thread Igor Russkikh
Before that, devlink instance lifecycle was linked to qed_dev object, that causes devlink to be recreated on each recovery. Changing it by making higher level driver (qede) responsible for its life. This way devlink will survive recoveries. qede will store devlink structure pointer as a part of i

[PATCH v3 net-next 08/11] qed*: make use of devlink recovery infrastructure

2020-07-29 Thread Igor Russkikh
Remove forcible recovery trigger and put it as a normal devlink callback. This allows user to enable/disable it via devlink health set pci/:03:00.0 reporter fw_fatal auto_recover false Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- dr

[PATCH v3 net-next 00/11] qed: introduce devlink health support

2020-07-29 Thread Igor Russkikh
This is a followup implementation after series https://patchwork.ozlabs.org/project/netdev/cover/20200514095727.1361-1-irussk...@marvell.com/ This is an implementation of devlink health infrastructure. With this we are now able to report HW errors to devlink, and it'll take its own actions depen

[PATCH v3 net-next 01/11] qed: move out devlink logic into a new file

2020-07-29 Thread Igor Russkikh
We are extending devlink infrastructure, thus move the existing stuff into a new file qed_devlink.c Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed_devlin

[PATCH v3 net-next 04/11] qed: fix kconfig help entries

2020-07-29 Thread Igor Russkikh
This patch replaces stubs in kconfig help entries with an actual description. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/ne

[PATCH v3 net-next 05/11] qed: implement devlink info request

2020-07-29 Thread Igor Russkikh
Here we return existing fw & mfw versions, we also fetch device's serial number. The base device specific structure (qed_dev_info) was not directly available to the base driver before. Thus, here we create and store a private copy of this structure in qed_dev root object. Signed-off-by: Igor Russ

[PATCH v3 net-next 07/11] qed: use devlink logic to report errors

2020-07-29 Thread Igor Russkikh
Use devlink_health_report to push error indications. We implement this in qede via callback function to make it possible to reuse the same for other drivers sitting on top of qed in future. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers

[PATCH v3 net-next 06/11] qed: health reporter init deinit seq

2020-07-29 Thread Igor Russkikh
Here we declare health reporter ops (empty for now) and register these in qed probe and remove callbacks. This way we get devlink attached to all kind of qed* PCI device entities: networking or storage offload entity. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by:

[PATCH v3 net-next 09/11] qed: implement devlink dump

2020-07-29 Thread Igor Russkikh
Gather and push out full device dump to devlink. Device dump is the same as with `ethtool -d`, but now its generated exactly at the moment bad thing happens. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- drivers/net/ethernet/qlogic/qed/qed_dev

[PATCH v3 net-next 11/11] qede: make driver reliable on unload after failures

2020-07-29 Thread Igor Russkikh
In case recovery was not successful, netdev still should be present. But we should clear cdev if something bad happens on recovery. We also check cdev for null on dev close. That could be a case if recovery was not successful. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed

[PATCH v3 net-next 10/11] qed: align adjacent indent

2020-07-29 Thread Igor Russkikh
Fix indent on some of adjacent declarations. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon --- include/linux/qed/qed_if.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/qed/qed_if.h b/include/linux/qed

Re: Bug: ip utility fails to show routes with large # of multipath next-hops

2020-07-29 Thread Ido Schimmel
On Tue, Jul 28, 2020 at 05:52:44PM -0700, Ashutosh Grewal wrote: > Hello David and all, > > I hope this is the correct way to report a bug. Sure > > I observed this problem with 256 v4 next-hops or 128 v6 next-hops (or > 128 or so # of v4 next-hops with labels). > > Here is an example - > > r

Re: [PATCH v8 bpf-next 08/13] bpf: Add BTF_SET_START/END macros

2020-07-29 Thread Jiri Olsa
On Tue, Jul 28, 2020 at 12:39:06PM -0700, Andrii Nakryiko wrote: SNIP > > [...] > > > +#define BTF_SET_START(name)\ > > +__BTF_ID_LIST(name, local) \ > > +asm( \ > > +".pushsection " BTF_ID

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Grygorii Strashko
On 29/07/2020 00:06, Petr Machata wrote: Kurt Kanzenbach writes: On Mon Jul 27 2020, Petr Machata wrote: So this looks good, and works, but I'm wondering about one thing. Thanks for testing. Your code (and evidently most drivers as well) use a different check than mlxsw, namely skb->

Re: [PATCH v1] farsync: use generic power management

2020-07-29 Thread Bjorn Helgaas
On Wed, Jul 29, 2020 at 03:47:30PM +0530, Vaibhav Gupta wrote: > On Tue, Jul 28, 2020 at 03:04:13PM -0500, Bjorn Helgaas wrote: > > On Tue, Jul 28, 2020 at 09:58:10AM +0530, Vaibhav Gupta wrote: > > > The .suspend() and .resume() callbacks are not defined for this driver. > > > Still, their power m

[PATCH] net/mlx5e: fix bpf_prog refcnt leaks in mlx5e_alloc_rq

2020-07-29 Thread Xin Xiong
The function invokes bpf_prog_inc(), which increases the refcount of a bpf_prog object "rq->xdp_prog" if the object isn't NULL. The refcount leak issues take place in two error handling paths. When mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function simply returns the error code and fo

Re: [PATCH v3 net-next 02/11] qed/qede: make devlink survive recovery

2020-07-29 Thread Jiri Pirko
Wed, Jul 29, 2020 at 01:38:37PM CEST, irussk...@marvell.com wrote: >Before that, devlink instance lifecycle was linked to qed_dev object, Before what? >that causes devlink to be recreated on each recovery. > >Changing it by making higher level driver (qede) responsible for its >life. This way de

Re: [PATCH v3 net-next 03/11] qed: swap param init and publish

2020-07-29 Thread Jiri Pirko
Wed, Jul 29, 2020 at 01:38:38PM CEST, irussk...@marvell.com wrote: >In theory that could lead to race condition Describe the problem, tell the codebase what to do. Plus, this looks like a -net material. Please consider pushing this separatelly with proper "fixes" tag. > >Signed-off-by: Igor Rus

Re: [PATCH v3 net-next 05/11] qed: implement devlink info request

2020-07-29 Thread Jiri Pirko
Wed, Jul 29, 2020 at 01:38:40PM CEST, irussk...@marvell.com wrote: >Here we return existing fw & mfw versions, we also fetch device's >serial number. > >The base device specific structure (qed_dev_info) was not directly >available to the base driver before. >Thus, here we create and store a private

Re: [PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit

2020-07-29 Thread Roi Dayan
On 2020-07-28 5:42 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jul 28, 2020 at 02:57:59PM +0300, Roi Dayan wrote: >> On heavily loaded systems the GC can take time to go over all existing >> conns and reset their timeout. At that time other calls like from >> nf_conntrack_in() can call of nf_ct

[PATCH iproute2 master v3] bridge: fdb show: fix fdb entry state output for json context

2020-07-29 Thread Julien Fortin
From: Julien Fortin bridge json fdb show is printing an incorrect / non-machine readable value, when using -j (json output) we are expecting machine readable data that shouldn't require special handling/parsing. $ bridge -j fdb show | \ python -c \ 'import sys,json;print(json.dumps(json.loads(sy

[PATCH] atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent

2020-07-29 Thread Xin Xiong
atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a reference of atm_dev with increased refcount or NULL if fails. The refcount leaks issues occur in two error handling paths. If dev_data->persist is zero or PRIV(dev)->vcc isn't NULL, the function returns 0 without decreasing the

Re: [PATCH v3 net-next 07/11] qed: use devlink logic to report errors

2020-07-29 Thread Jiri Pirko
Wed, Jul 29, 2020 at 01:38:42PM CEST, irussk...@marvell.com wrote: >Use devlink_health_report to push error indications. >We implement this in qede via callback function to make it possible >to reuse the same for other drivers sitting on top of qed in future. > >Signed-off-by: Igor Russkikh >Signe

[PATCH bpf-next] Documentation/bpf: Use valid and new links in index.rst

2020-07-29 Thread Tiezhu Yang
There exists an error "404 Not Found" when I clik the html link of "Documentation/networking/filter.rst" in the BPF documentation [1], fix it. Additionally, use the new links about "BPF and XDP Reference Guide" and "bpf(2)" to avoid redirects. [1] https://www.kernel.org/doc/html/latest/bpf/ Fixe

[PATCH bpf-next v2] Documentation/bpf: Use valid and new links in index.rst

2020-07-29 Thread Tiezhu Yang
There exists an error "404 Not Found" when I click the html link of "Documentation/networking/filter.rst" in the BPF documentation [1], fix it. Additionally, use the new links about "BPF and XDP Reference Guide" and "bpf(2)" to avoid redirects. [1] https://www.kernel.org/doc/html/latest/bpf/ Fix

Re: [PATCH bpf-next v4 05/14] xsk: move queue_id, dev and need_wakeup to buffer pool

2020-07-29 Thread Magnus Karlsson
On Tue, Jul 28, 2020 at 9:10 AM Björn Töpel wrote: > > > > On 2020-07-21 07:03, Magnus Karlsson wrote: > > Move queue_id, dev, and need_wakeup from the umem to the > > buffer pool. This so that we in a later commit can share the umem > > between multiple HW queues. There is one buffer pool per dev

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

2020-07-29 Thread Richard Cochran
On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - ARM Linux admin wrote: > How do we deal with this situation - from what I can see from the > ethtool API, we have to make a choice about which to use. How do we > make that choice? Unfortunately the stack does not implement simultaneous MAC

Re: [PATCH bpf-next v4 05/14] xsk: move queue_id, dev and need_wakeup to buffer pool

2020-07-29 Thread Magnus Karlsson
On Tue, Jul 28, 2020 at 11:22 AM Maxim Mikityanskiy wrote: > > On 2020-07-21 08:03, Magnus Karlsson wrote: > > Move queue_id, dev, and need_wakeup from the umem to the > > buffer pool. This so that we in a later commit can share the umem > > between multiple HW queues. There is one buffer pool per

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Richard Cochran
On Wed, Jul 29, 2020 at 11:02:57AM +0100, Russell King - ARM Linux admin wrote: > in other words, compare pointers, so that whether skb_push() etc has > been used on the skb is irrelevant? +1

Re: [PATCH v1] farsync: use generic power management

2020-07-29 Thread Vaibhav Gupta
On Wed, Jul 29, 2020 at 07:29:54AM -0500, Bjorn Helgaas wrote: > On Wed, Jul 29, 2020 at 03:47:30PM +0530, Vaibhav Gupta wrote: > > > > Agreed. Actually, as their presence only causes PCI core to call > > pci_legacy_suspend/resume() for them, I thought that after removing > > the binding from "stru

Re: [PATCH bpf-next v4 08/14] xsk: enable sharing of dma mappings

2020-07-29 Thread Magnus Karlsson
On Tue, Jul 28, 2020 at 11:00 AM Maxim Mikityanskiy wrote: > > On 2020-07-21 08:04, Magnus Karlsson wrote: > > Enable the sharing of dma mappings by moving them out from the buffer > > pool. Instead we put each dma mapped umem region in a list in the umem > > structure. If dma has already been map

[PATCH net-next v3 1/2] net: openvswitch: add masks cache hit counter

2020-07-29 Thread Eelco Chaudron
Add a counter that counts the number of masks cache hits, and export it through the megaflow netlink statistics. Reviewed-by: Paolo Abeni Reviewed-by: Tonghao Zhang Signed-off-by: Eelco Chaudron --- include/uapi/linux/openvswitch.h |2 +- net/openvswitch/datapath.c |5 - net/

[PATCH net-next v3 0/2] net: openvswitch: masks cache enhancements

2020-07-29 Thread Eelco Chaudron
This patchset adds two enhancements to the Open vSwitch masks cache. Signed-off-by: Eelco Chaudron Changes in v3 [patch 2/2 only]: - Use is_power_of_2() function - Use array_size() function - Fix remaining sparse errors Changes in v2 [patch 2/2 only]: - Fix sparse warnings - Fix netlink po

[PATCH net-next v3 2/2] net: openvswitch: make masks cache size configurable

2020-07-29 Thread Eelco Chaudron
This patch makes the masks cache size configurable, or with a size of 0, disable it. Reviewed-by: Paolo Abeni Signed-off-by: Eelco Chaudron --- Changes in v3: - Use is_power_of_2() function - Use array_size() function - Fix remaining sparse errors Changes in v2: - Fix sparse warnings - Fix

Re: [PATCH RFC net-next] net: phy: add Marvell PHY PTP support

2020-07-29 Thread Russell King - ARM Linux admin
On Wed, Jul 29, 2020 at 06:19:32AM -0700, Richard Cochran wrote: > On Wed, Jul 29, 2020 at 11:58:07AM +0100, Russell King - ARM Linux admin > wrote: > > How do we deal with this situation - from what I can see from the > > ethtool API, we have to make a choice about which to use. How do we > > ma

HFSC latency control

2020-07-29 Thread Santi
If this is not the correct place to ask these questions, please let me know if you know about any forum, mailing list, IRC channel or wherever HFSC questions could be asked and answered. I have read some HFSC theory and some old messages in the archive of this mailing list. I am testing HFSC i

Re: PROBLEM: (DSA/Microchip): 802.1Q-Header lost on KSZ9477-DSA ingress without bridge

2020-07-29 Thread Florian Fainelli
On 7/28/2020 11:05 PM, Gaube, Marvin (THSE-TL1) wrote: > Summary: 802.1Q-Header lost on KSZ9477-DSA ingress without bridge > Keywords: networking, dsa, microchip, 802.1q, vlan > Full description: > > Hello, > we're trying to get 802.1Q-Tagged Ethernet Frames through an KSZ9477 > DSA-enabled sw

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Richard Cochran
On Wed, Jul 29, 2020 at 12:29:08PM +0200, Kurt Kanzenbach wrote: > I'll test it and send v3. But before, I've got another question that > somebody might have an answer to: > > The ptp v1 code always does locate the message type at > > msgtype = data + offset + OFF_PTP_CONTROL > > OFF_PTP_CONTR

[PATCH 1/5] seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g

2020-07-29 Thread Peter Zijlstra
__SEQ_LOCKDEP() is an expression gate for the seqcount_LOCKNAME_t::lock member. Rename it to be about the member, not the gate condition. Later (PREEMPT_RT) patches will make the member available for !LOCKDEP configs. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/seqlock.h | 20

[PATCH 3/5] seqlock: Fold seqcount_LOCKNAME_init() definition

2020-07-29 Thread Peter Zijlstra
Manual repetition is boring and error prone. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/seqlock.h | 61 +++- 1 file changed, 14 insertions(+), 47 deletions(-) --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -143,12 +143,6

[PATCH 0/5] seqlock: Cleanups

2020-07-29 Thread Peter Zijlstra
Hi, These are some minor cleanups that go on top of darwi's seqlock patches: https://lkml.kernel.org/r/20200720155530.1173732-1-a.darw...@linutronix.de It's mostly trimming excessive manual repetition and a few naming niggles. The series has been exposed to 0-day for a while now, so I'm going

[PATCH 5/5] seqcount: More consistent seqprop names

2020-07-29 Thread Peter Zijlstra
Attempt uniformity and brevity. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/seqlock.h | 52 1 file changed, 26 insertions(+), 26 deletions(-) --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -247,9 +247,9 @@ SEQCOUNT_L

[PATCH 2/5] seqlock: Fold seqcount_LOCKNAME_t definition

2020-07-29 Thread Peter Zijlstra
Manual repetition is boring and error prone. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/seqlock.h | 140 +--- 1 file changed, 38 insertions(+), 102 deletions(-) --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -150,21 +150,

[PATCH 4/5] seqcount: Compress SEQCNT_LOCKNAME_ZERO()

2020-07-29 Thread Peter Zijlstra
Less is more. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/seqlock.h | 63 +--- 1 file changed, 18 insertions(+), 45 deletions(-) --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -138,51 +138,6 @@ static inline void seqcount

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Petr Machata
Kurt Kanzenbach writes: > On Wed Jul 29 2020, Russell King - ARM Linux admin wrote: >> Would it make more sense to do: >> >> u8 *data = skb_mac_header(skb); >> u8 *ptr = data; >> >> if (type & PTP_CLASS_VLAN) >> ptr += VLAN_HLEN; >> >> switch (type & PTP_CLASS_P

Re: [PATCH] bpf: Add bpf_ktime_get_real_ns

2020-07-29 Thread David Ahern
On 7/28/20 11:15 PM, Andrii Nakryiko wrote: > On Tue, Jul 28, 2020 at 1:57 PM David Ahern wrote: >> >> On 7/28/20 12:28 PM, Andrii Nakryiko wrote: >>> In some, yes, which also means that in some other they can't. So I'm >>> still worried about misuses of REALCLOCK, within (internal daemons >>> wit

Re: [PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa

2020-07-29 Thread Eli Cohen
OK, we have a mode of operation that does not require driver intervention to manipulate the event queues so I think we're ok with this design. On Wed, Jul 29, 2020 at 06:19:52PM +0800, Jason Wang wrote: > > On 2020/7/29 下午5:55, Eli Cohen wrote: > >On Wed, Jul 29, 2020 at 05:21:53PM +0800, Jason W

Re: [PATCH v2 4/9] mlxsw: spectrum_ptp: Use generic helper function

2020-07-29 Thread Kurt Kanzenbach
On Wed Jul 29 2020, Richard Cochran wrote: > On Wed, Jul 29, 2020 at 12:29:08PM +0200, Kurt Kanzenbach wrote: >> I'll test it and send v3. But before, I've got another question that >> somebody might have an answer to: >> >> The ptp v1 code always does locate the message type at >> >> msgtype =

Re: [PATCH v4 bpf 2/2] selftests/bpf: extend map-in-map selftest to detect memory leaks

2020-07-29 Thread Jakub Sitnicki
On Wed, Jul 29, 2020 at 06:09 AM CEST, Andrii Nakryiko wrote: > Add test validating that all inner maps are released properly after skeleton > is destroyed. To ensure determinism, trigger kernel-side synchronize_rcu() > before checking map existence by their IDs. > > Acked-by: Song Liu > Signed-of

Re: [PATCH 1/5] seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g

2020-07-29 Thread Ahmed S. Darwish
On Wed, Jul 29, 2020 at 03:52:50PM +0200, Peter Zijlstra wrote: > __SEQ_LOCKDEP() is an expression gate for the > seqcount_LOCKNAME_t::lock member. Rename it to be about the member, > not the gate condition. > > Later (PREEMPT_RT) patches will make the member available for !LOCKDEP > configs. > > S

  1   2   3   >