allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
Acked-by: Elad Nachman
---
.../net/ethernet/marvell/prestera/prestera_rxtx.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a
-off-by: Breno Leitao
Tested-by: Kalle Valo
---
drivers/net/wireless/ath/ath11k/ahb.c | 9 +++--
drivers/net/wireless/ath/ath11k/core.h | 2 +-
drivers/net/wireless/ath/ath11k/pcic.c | 21 +
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 9 +++--
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
t;)
Signed-off-by: Breno Leitao
---
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index f8f55db2f454..f66eb43094d4 10
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/ibm/emac/mal.c | 14 +++---
drivers/net/ethernet/ibm/emac/mal.h | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 +
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
2 files changed, 14 insertions(+), 5
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ipa/gsi.c | 12
drivers/net/ipa/gsi.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b
my devices, by allocating and
initializing it. Freeing the device continue to be done through
free_netdev()
Suggested-by: Jakub Kicinski
Signed-off-by: Breno Leitao
Reviewed-by: Ido Schimmel
---
include/linux/netdevice.h | 3 +++
net/core/dev.c| 56 ++--
ay to identify that this is a dummy device. Also, this
device do not need the final put_device(), since dummy devices are not
registered (through register_netdevice()), where the device reference is
increased (at netdev_register_kobject()/device_add()).
Suggested-by: Jakub Kicinski
Signed-off-by:
Fix bad grammar in description of init_dummy_netdev() function. This
topic showed up in the review of the "allocate dummy device dynamically"
patch set.
Suggested-by: Ido Schimmel
Signed-off-by: Breno Leitao
Reviewed-by: Ido Schimmel
---
net/core/dev.c | 4 ++--
1 file changed, 2
net_devices.
* Patch 2-5: Added users for the new helper.
v1:
* https://lore.kernel.org/all/20240327200809.512867-1-lei...@debian.org/
Breno Leitao (10):
net: core: Fix documentation
net: free_netdev: exit earlier if dummy
net: create a dummy net_device allocator
net: ma
-off-by: Breno Leitao
Tested-by: Kalle Valo
---
drivers/net/wireless/ath/ath11k/ahb.c | 9 +++--
drivers/net/wireless/ath/ath11k/core.h | 2 +-
drivers/net/wireless/ath/ath11k/pcic.c | 21 +
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/ibm/emac/mal.c | 14 +++---
drivers/net/ethernet/ibm/emac/mal.h | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 9 +++--
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 +
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
2 files changed, 14 insertions(+), 5
t;)
Signed-off-by: Breno Leitao
---
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index f8f55db2f454..f66eb43094d4 10
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
Acked-by: Elad Nachman
---
.../net/ethernet/marvell/prestera/prestera_rxtx.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ipa/gsi.c | 12
drivers/net/ipa/gsi.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b
my devices, by allocating and
initializing it. Freeing the device continue to be done through
free_netdev()
Suggested-by: Jakub Kicinski
Signed-off-by: Breno Leitao
Reviewed-by: Ido Schimmel
---
include/linux/netdevice.h | 3 +++
net/core/dev.c| 54 ++--
ay to identify that this is a dummy device. Also, this
device do not need the final put_device(), since dummy devices are not
registered (through register_netdevice()), where the device reference is
increased (at netdev_register_kobject()/device_add()).
Suggested-by: Jakub Kicinski
Signed-off-by:
Fix bad grammar in description of init_dummy_netdev() function. This
topic showed up in the review of the "allocate dummy device dynamically"
patch set.
Suggested-by: Ido Schimmel
Signed-off-by: Breno Leitao
Reviewed-by: Ido Schimmel
---
net/core/dev.c | 4 ++--
1 file changed, 2
the new helper.
v1:
* https://lore.kernel.org/all/20240327200809.512867-1-lei...@debian.org/
Breno Leitao (10):
net: core: Fix documentation
net: free_netdev: exit earlier if dummy
net: create a dummy net_device allocator
net: marvell: prestera: allocate dummy net_device dynamically
On Thu, Apr 11, 2024 at 06:09:26AM -0700, Jakub Kicinski wrote:
> On Wed, 10 Apr 2024 06:13:41 -0700 Breno Leitao wrote:
> > wifi: ath11k: allocate dummy net_device dynamically
>
> Sorry Breno, I didn't notice earlier, patch 10 didn't make it
> to the list. The seri
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/ibm/emac/mal.c | 14 +++---
drivers/net/ethernet/ibm/emac/mal.h | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff
t;)
Signed-off-by: Breno Leitao
---
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index f8f55db2f454..f66eb43094d4 10
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 9 +++--
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 +
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
2 files changed, 14 insertions(+), 5
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ipa/gsi.c | 12
drivers/net/ipa/gsi.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
Acked-by: Elad Nachman
---
.../net/ethernet/marvell/prestera/prestera_rxtx.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a
Fix bad grammer in description of init_dummy_netdev() functio. This
topic showed up in the review of the "allocate dummy device dynamically"
patchset.
Suggested-by: Ido Schimmel
Signed-off-by: Breno Leitao
---
net/core/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletion
my devices, by allocating and
initializing it. Freeing the device continue to be done through
free_netdev()
Suggested-by: Jakub Kicinski
Signed-off-by: Breno Leitao
Reviewed-by: Ido Schimmel
---
include/linux/netdevice.h | 3 +++
net/core/dev.c| 54 ++--
ay to identify that this is a dummy device. Also, this
device do not need the final put_device(), since dummy devices are not
registered (through register_netdevice()), where the device reference is
increased (at netdev_register_kobject()/device_add()).
Suggested-by: Jakub Kicinski
Signed-off-by:
uggested by Ido.
* Rebased to net-net/main
Breno Leitao (10):
net: core: Fix documentation
net: free_netdev: exit earlier if dummy
net: create a dummy net_device allocator
net: marvell: prestera: allocate dummy net_device dynamically
net: mediatek: mtk_eth_sock: allocate dummy net_device dynamic
On Wed, Apr 10, 2024 at 02:10:04PM +0300, Ido Schimmel wrote:
> On Tue, Apr 09, 2024 at 05:57:16AM -0700, Breno Leitao wrote:
> > It is impossible to use init_dummy_netdev together with alloc_netdev()
> > as the 'setup' argument.
> >
> > This is because allo
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/ibm/emac/mal.c | 14 +++---
drivers/net/ethernet/ibm/emac/mal.h | 2 +-
2 files changed, 12 insertions(+), 4 deletions(-)
diff
t;)
Signed-off-by: Breno Leitao
---
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index f8f55db2f454..f66eb43094d4 10
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 9 +++--
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
-off-by: Breno Leitao
Tested-by: Kalle Valo
---
drivers/net/wireless/ath/ath11k/ahb.c | 9 +++--
drivers/net/wireless/ath/ath11k/core.h | 2 +-
drivers/net/wireless/ath/ath11k/pcic.c | 21 +
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ipa/gsi.c | 12
drivers/net/ipa/gsi.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 +
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
2 files changed, 14 insertions(+), 5
my devices, by allocating and
initializing it. Freeing the device continue to be done through
free_netdev()
Suggested-by: Jakub Kicinski
Signed-off-by: Breno Leitao
---
include/linux/netdevice.h | 3 +++
net/core/dev.c| 54 ++-
2 files changed, 39
imon Horman.
v4:
* Added a new patch to add dummy device at free_netdev(), as suggested
by Jakub.
* Added support for some wireless driver.
* Added some Acked-by and Reviewed-by.
Breno Leitao (9):
net: free_netdev: exit earlier if dummy
net: create a dummy net_device
allocate and initialize dummy devices.
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
Acked-by: Elad Nachman
---
.../net/ethernet/marvell/prestera/prestera_rxtx.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a
Kicinski
Signed-off-by: Breno Leitao
---
net/core/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 92f5bddbc2de..bf0a335781aa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -11051,7 +11051,8 @@ void free_netdev(struct net_dev
On Tue, Apr 09, 2024 at 01:03:21PM +0300, Kalle Valo wrote:
> Breno Leitao writes:
>
> >> > Reading the issue, I am afraid that freeing netdev explicitly
> >> > (free_netdev()) might not be the best approach at the exit path.
> >> >
> >> > I
On Mon, Apr 08, 2024 at 07:43:42PM +0300, Kalle Valo wrote:
> Breno Leitao writes:
> > On Fri, Apr 05, 2024 at 06:15:05PM +0300, Kalle Valo wrote:
> >> Breno Leitao writes:
> >>
> >> > struct net_device shouldn't be embedded into any structure, inst
Hello Kalle,
On Fri, Apr 05, 2024 at 06:15:05PM +0300, Kalle Valo wrote:
> Breno Leitao writes:
>
> > struct net_device shouldn't be embedded into any structure, instead,
> > the owner should use the private space to embed their state into
> > net_device.
>
-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath11k/ahb.c | 9 +++--
drivers/net/wireless/ath/ath11k/core.h | 2 +-
drivers/net/wireless/ath/ath11k/pcic.c | 21 +
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 9 +++--
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
ested only.
Breno Leitao (3):
wifi: qtnfmac: Use netdev dummy allocator helper
wifi: ath10k: allocate dummy net_device dynamically
wifi: ath11k: allocate dummy net_device dynamically
drivers/net/wireless/ath/ath10k/core.c| 9 ++--
drivers/net/wireless/ath/ath10k/core.h| 2 +
t;)
Signed-off-by: Breno Leitao
---
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index f8f55db2f454..f66eb43094d4 10
7;ve been working on it,
and this is what I came up with. This is compile-tested by now, and, if
this is what you had in mind, I will do more extensive testing.
commit db794d99950f68731884a67d911094d94179c522
Author: Breno Leitao
Date: Wed Mar 27 07:20:03 2024 -0700
net: Create
Hello Jakub,
On Thu, Mar 21, 2024 at 03:17:44PM -0700, Jakub Kicinski wrote:
> On Thu, 21 Mar 2024 15:02:39 -0700 Jeff Johnson wrote:
> > >> As suggested there we should just use kmalloc/kfree to match the
> > >> existing logic.
> > >
> > > Please no. There is no magic here. alloc + free must
On Wed, Mar 20, 2024 at 05:25:52PM +0200, Kalle Valo wrote:
> Jeff Johnson writes:
>
> > On 3/19/2024 3:47 AM, Breno Leitao wrote:
> >> Embedding net_device into structures prohibits the usage of flexible
> >> arrays in the net_device structure. For more details,
On Tue, Mar 19, 2024 at 09:05:24AM -0700, Jeff Johnson wrote:
> On 3/19/2024 3:47 AM, Breno Leitao wrote:
> > @@ -3687,6 +3690,8 @@ struct ath10k *ath10k_core_create(size_t priv_size,
> > struct device *dev,
> >
> > err_free_coredump:
> > ath10k_coredump_
at ath10k_core_create(). The free of the device occurs
at ath10k_core_destroy().
[1] https://lore.kernel.org/all/20240229225910.79e22...@kernel.org/
Signed-off-by: Breno Leitao
---
drivers/net/wireless/ath/ath10k/core.c | 10 --
drivers/net/wireless/ath/ath10k/core.h | 2 +-
drivers/net
56 matches
Mail list logo