[PATCH net-next 1/3] net: ethernet: mtk_eth_soc: fix undefined reference to `dsa_port_from_netdev'

2021-04-18 Thread Pablo Neira Ayuso
Caused by: CONFIG_NET_DSA=m CONFIG_NET_MEDIATEK_SOC=y mtk_ppe_offload.c:undefined reference to `dsa_port_from_netdev' Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Reported-by: kernel test robot Signed-off-by: Pablo Neira Ayuso --- drive

[PATCH AUTOSEL 5.11 17/51] bpf: Take module reference for trampoline in module

2021-04-12 Thread Sasha Levin
mod; sleep 0.5; done Taking the module reference in case the trampoline's ip is within the module code. Releasing it when the trampoline's ip is unregistered. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210326105900.151466-1-jo...@kern

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Cong Wang
On Thu, Apr 8, 2021 at 4:59 AM Jamal Hadi Salim wrote: > > On 2021-04-07 7:50 p.m., Cong Wang wrote: > > On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: > >> > >> Action init code increments reference counter when it changes an action. > >> This is the d

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Cong Wang
On Thu, Apr 8, 2021 at 12:50 AM Vlad Buslov wrote: > > > On Thu 08 Apr 2021 at 02:50, Cong Wang wrote: > > In my last comments, I actually meant whether we can avoid this > > 'init_res[]' array. Since here you want to check whether an action > > returned by tcf_action_init_1() is a new one or an

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Jamal Hadi Salim
On 2021-04-08 3:50 a.m., Vlad Buslov wrote: On Thu 08 Apr 2021 at 02:50, Cong Wang wrote: Origins of setting ovr based on NLM_F_REPLACE are lost since this code goes back to Linus' Linux-2.6.12-rc2 commit. Jamal, do you know if this is the expected behavior or just something unintended? Se

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Jamal Hadi Salim
On 2021-04-07 7:50 p.m., Cong Wang wrote: On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: Action init code increments reference counter when it changes an action. This is the desired behavior for cls API which needs to obtain action reference for every classifier that points to action

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Vlad Buslov
On Thu 08 Apr 2021 at 02:50, Cong Wang wrote: > On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: >> >> Action init code increments reference counter when it changes an action. >> This is the desired behavior for cls API which needs to obtain action >> referenc

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-07 Thread Cong Wang
On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: > > Action init code increments reference counter when it changes an action. > This is the desired behavior for cls API which needs to obtain action > reference for every classifier that points to action. However, act API just >

[PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-07 Thread Vlad Buslov
Action init code increments reference counter when it changes an action. This is the desired behavior for cls API which needs to obtain action reference for every classifier that points to action. However, act API just needs to change the action and releases the reference before returning. This

Re: [PATCH RFC 1/4] net: sched: fix action overwrite reference counting

2021-04-03 Thread Vlad Buslov
On Sat 03 Apr 2021 at 01:13, Cong Wang wrote: > On Wed, Mar 31, 2021 at 9:41 AM Vlad Buslov wrote: >> >> Action init code increments reference counter when it changes an action. >> This is the desired behavior for cls API which needs to obtain action >> referenc

Re: [PATCH RFC 1/4] net: sched: fix action overwrite reference counting

2021-04-02 Thread Cong Wang
On Wed, Mar 31, 2021 at 9:41 AM Vlad Buslov wrote: > > Action init code increments reference counter when it changes an action. > This is the desired behavior for cls API which needs to obtain action > reference for every classifier that points to action. However, act API just >

[PATCH rdma-next v2 3/5] RDMA/bnxt_re: Get rid of custom module reference counting

2021-03-31 Thread Leon Romanovsky
From: Leon Romanovsky Instead of manually messing with parent driver module reference counting rely on export symbol mechanism to ensure that proper probe/remove chain is performed. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/bnxt_re/main.c | 16 ++-- 1 file changed

[PATCH RFC 1/4] net: sched: fix action overwrite reference counting

2021-03-31 Thread Vlad Buslov
Action init code increments reference counter when it changes an action. This is the desired behavior for cls API which needs to obtain action reference for every classifier that points to action. However, act API just needs to change the action and releases the reference before returning. This

[PATCH rdma-next v1 3/5] RDMA/bnxt_re: Get rid of custom module reference counting

2021-03-29 Thread Leon Romanovsky
From: Leon Romanovsky Instead of manually messing with parent driver module reference counting rely on export symbol mechanism to ensure that proper probe/remove chain is performed. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/bnxt_re/main.c | 16 ++-- 1 file changed

[PATCH net-next v2] net: netcp: fix PM reference leak in netcp_probe()

2021-03-27 Thread Huang Guobin
From: Guobin Huang pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Guobin Huang

Re: [PATCHv3 bpf] bpf: Take module reference for trampoline in module

2021-03-26 Thread Alexei Starovoitov
_testmod; sleep 0.5; done > > Taking the module reference in case the trampoline's ip is > within the module code. Releasing it when the trampoline's > ip is unregistered. > > Signed-off-by: Jiri Olsa > --- > v3 changes: >- store module pointer under bpf_trampoline struct Applied.

[PATCHv3 bpf] bpf: Take module reference for trampoline in module

2021-03-26 Thread Jiri Olsa
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 -t module_attach; done # while :; do rmmod bpf_testmod; sleep 0.5; done Taking the module reference in case the trampoline'

Re: [PATCHv2] bpf: Take module reference for trampoline in module

2021-03-25 Thread Jiri Olsa
o ./test_progs -t module_attach; done > ># while :; do rmmod bpf_testmod; sleep 0.5; done > > > > Taking the module reference in case the trampoline's ip is > > within the module code. Releasing it when the trampoline's > > ip is unregistered. > >

Re: [PATCHv2] bpf: Take module reference for trampoline in module

2021-03-25 Thread Daniel Borkmann
On 3/24/21 6:40 PM, 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 -t module_attach; done # while :; do rmmod bpf_testmod; sleep 0.5; done Taking the module

[PATCHv2] bpf: Take module reference for trampoline in module

2021-03-24 Thread Jiri Olsa
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 -t module_attach; done # while :; do rmmod bpf_testmod; sleep 0.5; done Taking the module reference in case the trampoline'

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

2021-03-24 Thread Jiri Olsa
> register in it. It's easily reproduced by running in parallel: > > > > > > # while :; do ./test_progs -t module_attach; done > > > # while :; do ./test_progs -t fentry_test; done > > > > > > Taking the module reference in case the trampoline&#x

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

2021-03-24 Thread Jiri Olsa
> > > > # while :; do ./test_progs -t module_attach; done > > # while :; do ./test_progs -t fentry_test; done > > > > Taking the module reference in case the trampoline's ip is > > within the module code. Releasing it when the trampoline's > > i

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

2021-03-23 Thread Alexei Starovoitov
rogs -t fentry_test; done > > Taking the module reference in case the trampoline's ip is > within the module code. Releasing it when the trampoline's > ip is unregistered. > > Signed-off-by: Jiri Olsa > --- > kernel/bpf/trampoline.c | 32 +

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

2021-03-23 Thread Jiri Olsa
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 -t module_attach; done # while :; do ./test_progs -t fentry_test; done Taking the module reference in case the trampoline's i

[PATCH net-next 3/7] ionic: fix unchecked reference

2021-03-18 Thread Shannon Nelson
We can get to the counter without going through the pointer that the robot complained about. Reported-by: kernel test robot Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/

Re: [PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread patchwork-bot+netdevbpf
table config item, all references to it > are stale. Remove them. > > Signed-off-by: Christophe Leroy > > [...] Here is the summary with links: - net: marvell: Remove reference to CONFIG_MV64X60 https://git.kernel.org/netdev/net/c/600cc3c9c62d You are awesome, thank you

[PATCH] net: marvell: Remove reference to CONFIG_MV64X60

2021-03-18 Thread Christophe Leroy
Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed last selector of CONFIG_MV64X60. As it is not a user selectable config item, all references to it are stale. Remove them. Signed-off-by: Christophe Leroy --- drivers/net/ethernet/marvell/Kconfig | 4 ++-- driver

Re: [RFC PATCH v2 net-next 01/17] net: dsa: reference count the host mdb addresses

2021-02-26 Thread Tobias Waldekranz
On Wed, Feb 24, 2021 at 13:43, Vladimir Oltean wrote: > From: Vladimir Oltean > > Currently any DSA switch that is strict when implementing the mdb > operations prints these benign errors after the addresses expire, with > at least 2 ports bridged: > > [ 286.013814] mscc_felix :00:00.5 swp3:

[RFC PATCH v2 net-next 02/17] net: dsa: reference count the host fdb addresses

2021-02-24 Thread Vladimir Oltean
if we do that, there is a risk that we might delete an address when it was still used, if we just listen to the deletion event emitted by the bridge through switchdev. And that is where the requirement for reference counting comes from. Similar to host MDB entries, we should create a new notifier

[RFC PATCH v2 net-next 01/17] net: dsa: reference count the host mdb addresses

2021-02-24 Thread Vladimir Oltean
s leave a multicast group, DSA tries to remove it N times from the CPU port. We should be reference-counting these addresses. Otherwise, the first port on which the MDB expires will cause an entry removal from the CPU port, which will break the host MDB for the remaining ports. There is more. In expec

MIPS: net: mscc: ocelot: undefined reference to `packing'

2021-02-17 Thread Naresh Kamboju
drivers/net/ethernet/mscc/ocelot.o: in function `ocelot_xtr_poll_frame': drivers/net/ethernet/mscc/ocelot.c:(.text+0x1c08): undefined reference to `packing' Reported-by: Naresh Kamboju build link, https://builds.tuxbuild.com/1obrU4klh0OkIctHBFbxIwHO0Gd/build.log -- Linaro LKFT https://lkft.linaro.org

[PATCH bpf-next 16/17] docs/bpf: Add bpf() syscall command reference

2021-02-16 Thread Joe Stringer
From: Joe Stringer Generate the syscall command reference from the UAPI header file and include it in the main bpf docs page. Reviewed-by: Quentin Monnet Signed-off-by: Joe Stringer --- Documentation/Makefile | 2 ++ Documentation/bpf/Makefile | 28

Re: [net-next v2] octeontx2-af: cn10k: Fixes CN10K RPM reference issue

2021-02-16 Thread patchwork-bot+netdevbpf
x2-af: cn10k: MAC internal loopback support"). > Signed-off-by: Geetha sowjanya > Signed-off-by: Sunil Goutham > > [...] Here is the summary with links: - [net-next,v2] octeontx2-af: cn10k: Fixes CN10K RPM reference issue https://git.kernel.org/netdev/net-next/c/786621

Re: [net-next v2] octeontx2-af: cn10k: Fixes CN10K RPM reference issue

2021-02-16 Thread Leon Romanovsky
On Tue, Feb 16, 2021 at 05:09:36PM +0530, Geetha sowjanya wrote: > This patch fixes references to uninitialized variables and > debugfs entry name for CN10K platform and HW_TSO flag check. > > Fixes: 3ad3f8f93c81 ("octeontx2-af: cn10k: MAC internal loopback support"). > Signed-off-by: Geetha sowjan

[net-next v2] octeontx2-af: cn10k: Fixes CN10K RPM reference issue

2021-02-16 Thread Geetha sowjanya
This patch fixes references to uninitialized variables and debugfs entry name for CN10K platform and HW_TSO flag check. Fixes: 3ad3f8f93c81 ("octeontx2-af: cn10k: MAC internal loopback support"). Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham v1-v2 - Clear HW_TSO flag for 96xx B0 v

Re: [net-next PATCH] octeontx2-af: cn10k: Fixes CN10K RPM reference issue

2021-02-15 Thread Sunil Kovvuri
On Mon, Feb 15, 2021 at 11:27 PM Geetha sowjanya wrote: > > This patch fixes references to uninitialized variables and > debugfs entry name for CN10K platform and HW_TSO flag check. > > Signed-off-by: Geetha sowjanya > Signed-off-by: Sunil Goutham > > This patch fixes the bug introduced by the c

[net-next PATCH] octeontx2-af: cn10k: Fixes CN10K RPM reference issue

2021-02-15 Thread Geetha sowjanya
This patch fixes references to uninitialized variables and debugfs entry name for CN10K platform and HW_TSO flag check. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham This patch fixes the bug introduced by the commit 3ad3f8f93c81 ("octeontx2-af: cn10k: MAC internal loopback suppor

Re: [PATCH] net/mlx5: docs: correct section reference in table of contents

2021-02-09 Thread Saeed Mahameed
; instead. > > Hence, make htmldocs warns: > >   mlx5.rst:16: WARNING: Unknown target name: "mlx5 port function". > > Correct the section reference in table of contents to the actual name > of > section in the documentation. > > Also, tune another

RE: [PATCH] net/mlx5: docs: correct section reference in table of contents

2021-02-05 Thread Parav Pandit
ction attributes' instead. > > Hence, make htmldocs warns: > > mlx5.rst:16: WARNING: Unknown target name: "mlx5 port function". > > Correct the section reference in table of contents to the actual name of > section in the documentation. > > Also, t

[PATCH] net/mlx5: docs: correct section reference in table of contents

2021-02-05 Thread Lukas Bulwahn
rget name: "mlx5 port function". Correct the section reference in table of contents to the actual name of section in the documentation. Also, tune another section underline while visiting this document. Signed-off-by: Lukas Bulwahn --- Saeed, please pick this patch for yo

Re: [PATCH] Bluetooth: drop HCI device reference before return

2021-01-25 Thread Marcel Holtmann
Hi Pan, > Call hci_dev_put() to decrement reference count of HCI device hdev if > fails to duplicate memory. > > Fixes: 0b26ab9dce74 ("Bluetooth: AMP: Handle Accept phylink command status > evt") > Signed-off-by: Pan Bian > --- > net/bluetooth/a2mp.c |

[PATCH] Bluetooth: drop HCI device reference before return

2021-01-21 Thread Pan Bian
Call hci_dev_put() to decrement reference count of HCI device hdev if fails to duplicate memory. Fixes: 0b26ab9dce74 ("Bluetooth: AMP: Handle Accept phylink command status evt") Signed-off-by: Pan Bian --- net/bluetooth/a2mp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 18:10:59 -0800 Florian Fainelli wrote: > On 1/20/2021 5:51 PM, Marek Vasut wrote: > > On 1/21/21 2:31 AM, Jakub Kicinski wrote: > >> On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: > >>> KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > >>> circuit

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Florian Fainelli
On 1/20/2021 5:51 PM, Marek Vasut wrote: > On 1/21/21 2:31 AM, Jakub Kicinski wrote: >> On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: >>> KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended >>> circuit for interfacing with CPU/FPGA reset consisting of 10k pullup >>> resi

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Marek Vasut
On 1/21/21 2:31 AM, Jakub Kicinski wrote: On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended circuit for interfacing with CPU/FPGA reset consisting of 10k pullup resistor and 10uF capacitor to ground. This circuit takes ~100

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Jakub Kicinski
On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote: > KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > circuit for interfacing with CPU/FPGA reset consisting of 10k pullup > resistor and 10uF capacitor to ground. This circuit takes ~100 ms to > rise enough to release the res

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Andrew Lunn
On Wed, Jan 20, 2021 at 04:05:02AM +0100, Marek Vasut wrote: > KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > circuit for interfacing with CPU/FPGA reset consisting of 10k pullup > resistor and 10uF capacitor to ground. This circuit takes ~100 ms to > rise enough to release

Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-20 Thread Paul Barker
and then the > original 100us for the switch itself to come out of reset. Simply > msleep() for 100 ms which fits the constraint with a bit of extra > space. This makes sense if someone is using that device and following the reference circuit exactly. Working with the ksz9477 I can te

[PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-19 Thread Marek Vasut
KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended circuit for interfacing with CPU/FPGA reset consisting of 10k pullup resistor and 10uF capacitor to ground. This circuit takes ~100 ms to rise enough to release the reset. For maximum supply voltage VDDIO=3.3V VIH=2.0V R=10kR C=1

Re: [PATCH net-next] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-19 Thread Florian Fainelli
On 1/19/2021 6:01 PM, Marek Vasut wrote: > KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > circuit for interfacing with CPU/FPGA reset consisting of 10k pullup > resistor and 10uF capacitor to ground. This circuit takes ~100 mS to > rise enough to release the reset. > > F

[PATCH net-next] net: dsa: microchip: Adjust reset release timing to match reference reset circuit

2021-01-19 Thread Marek Vasut
KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended circuit for interfacing with CPU/FPGA reset consisting of 10k pullup resistor and 10uF capacitor to ground. This circuit takes ~100 mS to rise enough to release the reset. For maximum supply voltage VDDIO=3.3V VIH=2.0V R=10kR C=1

Re: [PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference

2020-12-30 Thread Baruch Siach
requires two if you want to get packet's timestamp (like libpcap always does). I think libpcap still reads packets timestamps, though it most likely uses the newer interface for that. Maybe we should just drop the libpcap reference here? Thanks for reviewing the patch, baruch > On

[PATCH v2 2/2] docs: networking: packet_mmap: fix old config reference

2020-12-29 Thread Baruch Siach
Before commit 889b8f964f2f ("packet: Kill CONFIG_PACKET_MMAP.") there used to be a CONFIG_PACKET_MMAP config symbol that depended on CONFIG_PACKET. The text still implies that PACKET_MMAP can be disabled. Remove that from the text, as well as reference to old kernel versions. Also, drop

[PATCH v5 02/11] dt-bindings: net: btusb: change reference file name

2020-12-24 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v5: add Acked-by Rob v2~v4: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v4 02/11] dt-bindings: net: btusb: change reference file name

2020-12-21 Thread Rob Herring
On Wed, 16 Dec 2020 17:30:03 +0800, Chunfeng Yun wrote: > Due to usb-device.txt is converted into usb-device.yaml, > so modify reference file names at the same time. > > Signed-off-by: Chunfeng Yun > --- > v2~v4: no changes > --- > Documentation/devicetree/bindings/n

[PATCH v4 02/11] dt-bindings: net: btusb: change reference file name

2020-12-16 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Florian Fainelli
On 12/12/2020 4:49 PM, Vladimir Oltean wrote: > On Sun, Dec 13, 2020 at 01:34:10AM +0100, Andrew Lunn wrote: >> On Sun, Dec 13, 2020 at 12:14:19AM +, Vladimir Oltean wrote: >>> On Sun, Dec 13, 2020 at 01:08:55AM +0100, Andrew Lunn wrote: >> And you need some way to cleanup the allocated

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Vladimir Oltean
On Sun, Dec 13, 2020 at 01:34:10AM +0100, Andrew Lunn wrote: > On Sun, Dec 13, 2020 at 12:14:19AM +, Vladimir Oltean wrote: > > On Sun, Dec 13, 2020 at 01:08:55AM +0100, Andrew Lunn wrote: > > > > > And you need some way to cleanup the allocated memory when the commit > > > > > never happens be

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Andrew Lunn
On Sun, Dec 13, 2020 at 12:14:19AM +, Vladimir Oltean wrote: > On Sun, Dec 13, 2020 at 01:08:55AM +0100, Andrew Lunn wrote: > > > > And you need some way to cleanup the allocated memory when the commit > > > > never happens because some other layer has said No! > > > > > > So this would be a fa

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Vladimir Oltean
On Sun, Dec 13, 2020 at 01:08:55AM +0100, Andrew Lunn wrote: > > > And you need some way to cleanup the allocated memory when the commit > > > never happens because some other layer has said No! > > > > So this would be a fatal problem with the switchdev transactional model > > if I am not misunder

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Andrew Lunn
On Sat, Dec 12, 2020 at 10:18:59PM +, Vladimir Oltean wrote: > On Sat, Dec 12, 2020 at 11:06:41PM +0100, Andrew Lunn wrote: > > > + /* Complication created by the fact that addition has two phases, but > > > + * deletion only has one phase, and we need reference cou

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Vladimir Oltean
On Sat, Dec 12, 2020 at 11:06:41PM +0100, Andrew Lunn wrote: > > + /* Complication created by the fact that addition has two phases, but > > +* deletion only has one phase, and we need reference counting. > > +* The strategy is to do the memory allocation in

Re: [PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Andrew Lunn
> + /* Complication created by the fact that addition has two phases, but > + * deletion only has one phase, and we need reference counting. > + * The strategy is to do the memory allocation in the prepare phase, > + * but initialize the refcount in the

[PATCH v3 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Vladimir Oltean
move it N times from the CPU port. We should be reference-counting these addresses. Otherwise, the first port on which the MDB expires will cause an entry removal from the CPU port, which will break the host MDB for the remaining ports. Signed-off-by: Vladimir Oltean --- Changes in v3: - Allocating m

Re: [PATCH v2 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Andrew Lunn
> +/* DSA can directly translate this to a normal MDB add, but on the CPU port. > + * But because multiple user ports can join the same multicast group and the > + * bridge will emit a notification for each port, we need to add/delete the > + * entry towards the host only once, so

[PATCH v2 net-next] net: dsa: reference count the host mdb addresses

2020-12-12 Thread Vladimir Oltean
move it N times from the CPU port. We should be reference-counting these addresses. Otherwise, the first port on which the MDB expires will cause an entry removal from the CPU port, which will break the host MDB for the remaining ports. Signed-off-by: Vladimir Oltean --- Changes in v2: - Re-targete

[PATCH net-next 2/7] selftests: mlxsw: Test RIF's reference count when joining a LAG

2020-12-06 Thread Ido Schimmel
From: Ido Schimmel Test that the reference count of a router interface (RIF) configured for a LAG is incremented / decremented when ports join / leave the LAG. Use the offload indication on routes configured on the RIF to understand if it was created / destroyed. The test fails without the

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-11-28 Thread Tobias Waldekranz
On Sat, Nov 28, 2020 at 00:27, Vladimir Oltean wrote: > On Sat, Nov 28, 2020 at 12:58:10AM +0100, Tobias Waldekranz wrote: >> That sounds like a good idea. We have run into another issue with the >> MDB that maybe could be worked into this changeset. This is what we have >> observed on 4.19, but f

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-11-27 Thread Vladimir Oltean
On Sat, Nov 28, 2020 at 12:58:10AM +0100, Tobias Waldekranz wrote: > That sounds like a good idea. We have run into another issue with the > MDB that maybe could be worked into this changeset. This is what we have > observed on 4.19, but from looking at the source it does not look like > anything h

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-11-27 Thread Tobias Waldekranz
pe. So, because DSA > translates a host MDB to a normal MDB on the CPU port, this means that > when all user ports leave a multicast group, DSA tries to remove it N > times from the CPU port. > > We should be reference-counting these addresses. That sounds like a good idea. We have r

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-11-27 Thread Vladimir Oltean
rrect. It tells each switchdev port that the > > host can leave that multicast group. But in the case of DSA, all user > > ports are connected to the host through the same pipe. So, because DSA > > translates a host MDB to a normal MDB on the CPU port, this means that > >

Re: [PATCH net-next] mptcp: put reference in mptcp timeout timer

2020-11-25 Thread Jakub Kicinski
On Tue, 24 Nov 2020 17:42:21 +0100 Paolo Abeni wrote: > On Tue, 2020-11-24 at 17:24 +0100, Florian Westphal wrote: > > On close this timer might be scheduled. mptcp uses sk_reset_timer for > > this, so the a reference on the mptcp socket is taken. > > > > This causes a

Re: [PATCH net-next] mptcp: put reference in mptcp timeout timer

2020-11-24 Thread Paolo Abeni
On Tue, 2020-11-24 at 17:24 +0100, Florian Westphal wrote: > On close this timer might be scheduled. mptcp uses sk_reset_timer for > this, so the a reference on the mptcp socket is taken. > > This causes a refcount leak which can for example be reproduced > with 'mp_join_ser

[PATCH net-next] mptcp: put reference in mptcp timeout timer

2020-11-24 Thread Florian Westphal
On close this timer might be scheduled. mptcp uses sk_reset_timer for this, so the a reference on the mptcp socket is taken. This causes a refcount leak which can for example be reproduced with 'mp_join_server_v4.pkt' from the mptcp-packetdrill repo. The leak has nothing to do with joi

Re: [PATCH bpf] xsk: fix incorrect netdev reference count

2020-11-23 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Fri, 20 Nov 2020 16:14:43 +0100 you wrote: > From: Marek Majtyka > > Fix incorrect netdev reference count in xsk_bind operation. Incorrect > reference count of the device appears when a user calls bind with the &g

Re: [PATCH bpf] xsk: fix incorrect netdev reference count

2020-11-23 Thread Magnus Karlsson
On Fri, Nov 20, 2020 at 4:17 PM wrote: > > From: Marek Majtyka > > Fix incorrect netdev reference count in xsk_bind operation. Incorrect > reference count of the device appears when a user calls bind with the > XDP_ZEROCOPY flag on an interface which does not support zero-copy

[PATCH bpf] xsk: fix incorrect netdev reference count

2020-11-20 Thread alardam
From: Marek Majtyka Fix incorrect netdev reference count in xsk_bind operation. Incorrect reference count of the device appears when a user calls bind with the XDP_ZEROCOPY flag on an interface which does not support zero-copy. In such a case, an error is returned but the reference count is not

[net-next 12/25] dt-bindings: can: fsl,flexcan: add uint32 reference to clock-frequency property

2020-11-20 Thread Marc Kleine-Budde
This patch adds the missing reference to the clock-frequency property. The driver uses a of_property_read_u32() to read the property to mark it as uint32. Fixes: e5ab9aa7e49b ("dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml") Link: https://lore.ke

[PATCH v3 02/11] dt-bindings: net: btusb: change reference file name

2020-11-18 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation

Re: [PATCH v2] can: flexcan: fix reference count leak in flexcan ops

2020-11-11 Thread Marc Kleine-Budde
operation to > decrease the reference, it will result in reference leak in > the two function(flexcan_get_berr_counter and flexcan_open). > Moreover, this device cannot enter the idle state and always > stay busy or other non-idle state later. So we should fix it > through adding pm_run

[PATCH v3 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-10 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

[PATCH v2 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

答复: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread zhangqilong
ter. If runtime of the device has error or > > > > device is in inaccessible state(or other error state), resume > > > > operation will fail. If we do not call put operation to decrease > > > > the reference, it will result in > > > reference count lea

[PATCH 2/2] net: fec: Fix reference count leak in fec series ops

2020-11-09 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

RE: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Andy Duan
gt; > > device is in inaccessible state(or other error state), resume > > > operation will fail. If we do not call put operation to decrease the > > > reference, it will result in > > reference count leak. > > > Moreover, this device cannot enter the idle sta

答复: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread zhangqilong
ion will > > fail. If we do not call put operation to decrease the reference, it will > > result in > reference count leak. > > Moreover, this device cannot enter the idle state and always stay busy > > or other non-idle state later. So we fixed it through adding > pm_

RE: [PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Andy Duan
not call put > operation to decrease the reference, it will result in reference count leak. > Moreover, this device cannot enter the idle state and always stay busy or > other > non-idle state later. So we fixed it through adding pm_runtime_put_noidle. > > Fixes: 8fff755e9f8d0 (&

[PATCH] net: fec: Fix reference count leak in fec series ops

2020-11-08 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

[PATCH v2] can: flexcan: fix reference count leak in flexcan ops

2020-11-08 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

Re: [PATCH] can: flexcan: fix reference count leak in flexcan ops

2020-11-07 Thread Jakub Kicinski
On Sat, 7 Nov 2020 19:04:14 +0800 Zhang Qilong wrote: > Fixes: ca10989632d88 ("can: flexcan: implement can Runtime PM") > > Signed-off-by: Zhang Qilong No empty lines between tags, please.

[PATCH] can: flexcan: fix reference count leak in flexcan ops

2020-11-07 Thread Zhang Qilong
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Florian Fainelli
ser ports leave a multicast group, DSA tries to remove it N times from the CPU port. We should be reference-counting these addresses. Fixes: 5f4dbc50ce4d ("net: dsa: slave: Handle switchdev host mdb add/del") Signed-off-by: Vladimir Oltean This looks good to me, just one possible pr

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Vladimir Oltean
On Tue, Oct 20, 2020 at 02:06:32AM +0200, Andrew Lunn wrote: > I agree with the analysis. This is how i designed it! [...] > So i decided to keep it KISS and not bother with reference counting. Well, I can't argue with that then... > The other part of the argument is that DSA is

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Jakub Kicinski
On Tue, 20 Oct 2020 02:07:46 +0200 Andrew Lunn wrote: > On Mon, Oct 19, 2020 at 04:55:14PM -0700, Jakub Kicinski wrote: > > On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > > > Currently any DSA switch that implements the multicast ops (properly, > > > that is) gets these errors after

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 04:55:14PM -0700, Jakub Kicinski wrote: > On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > > Currently any DSA switch that implements the multicast ops (properly, > > that is) gets these errors after just sitting for a while, with at least > > 2 ports bridged: > >

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Andrew Lunn
mber, none of the switches at the time would report an error when asked to delete an MDB which did not exist. They also would not give an error when adding an MDB which already exists. So i decided to keep it KISS and not bother with reference counting. > +static int dsa_host_mdb_add(st

Re: [PATCH net] net: dsa: reference count the host mdb addresses

2020-10-19 Thread Jakub Kicinski
On Fri, 16 Oct 2020 00:27:11 +0300 Vladimir Oltean wrote: > Currently any DSA switch that implements the multicast ops (properly, > that is) gets these errors after just sitting for a while, with at least > 2 ports bridged: > > [ 286.013814] mscc_felix :00:00.5 swp3: failed (err=-2) to del ob

[PATCH net] net: dsa: reference count the host mdb addresses

2020-10-15 Thread Vladimir Oltean
t N times from the CPU port. We should be reference-counting these addresses. Fixes: 5f4dbc50ce4d ("net: dsa: slave: Handle switchdev host mdb add/del") Signed-off-by: Vladimir Oltean --- include/net/dsa.h | 9 + net/dsa/dsa2.c| 2 ++ net

[PATCH v2 3/4] dt-bindings: net: btusb: change reference file name

2020-10-10 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun --- v2: new patch --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation

[net-next V2 11/15] net/mlx5e: Keep direct reference to mlx5_core_dev in tc ct

2020-09-23 Thread saeed
From: Ariel Levkovich Keep and use a direct reference to the mlx5 core device in all of tc_ct code instead of accessing it via a pointer to mlx5 eswitch in order to support nic mode ct offload for VF devices that don't have a valid eswitch pointer set. Signed-off-by: Ariel Levkovich Rev

  1   2   3   4   5   6   7   8   9   10   >