Embedding net_device into structures prohibits the usage of flexible
arrays in the net_device structure. For more details, see the discussion
at [1].
Un-embed the net_device from struct ath10k by converting it
into a pointer. Then use the leverage alloc_netdev() to allocate the
net_device object a
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, see the discussion
> at [1].
>
> Un-embed the net_device from struct ath10k by converting it
> into a pointer. Then use the lever
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_destroy(ar);
> > +err_free_netdev:
>
On 3/19/2024 10:15 AM, Breno Leitao wrote:
> 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
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, see the discussion
> at [1].
>
> Un-embed the net_device from struct ath10k by converting it
> into a pointer. Then use the lever
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, see the discussion
>> at [1].
>>
>> Un-embed the net_device from struct ath10k by converting it
>> int
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, see the discussion
> >> at [1].
>
On Wed, 20 Mar 2024 08:12:46 -0700 Jeff Johnson wrote:
> NAK this based upon the ath11k patch results.
The ath11 patch is much more complex, I'd wager this one is fine.
> As suggested there we should just use kmalloc/kfree to match the existing
> logic.
Please no. There is no magic here. alloc
On 3/21/2024 7:28 AM, Jakub Kicinski wrote:
> On Wed, 20 Mar 2024 08:12:46 -0700 Jeff Johnson wrote:
>> NAK this based upon the ath11k patch results.
>
> The ath11 patch is much more complex, I'd wager this one is fine.
>
>> As suggested there we should just use kmalloc/kfree to match the existin
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 match whether
> > you're using magic object alloc wrapper (alloc_netdev()) or straight
>
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 Fri, 22 Mar 2024 07:58:02 -0700 Breno Leitao wrote:
> > Looks like init_dummy_netdev wipes the netdev structure clean, so I
> > don't think we can use it directly as the setup function, Breno :(
>
> Before my patch, init_dummy_netdev was being also used. The patch was
> basically replacing t
Hello Jakub,
On Fri, Mar 22, 2024 at 08:23:36AM -0700, Jakub Kicinski wrote:
> > > Maybe we should add a new helper to "alloc dummy netdev" which can
> > > call alloc_netdev() with right arguments and do necessary init?
> >
> > What are the right arguments in this case?
>
> I'm not sure we hav
On Wed, 27 Mar 2024 07:38:05 -0700 Breno Leitao wrote:
> -void init_dummy_netdev(struct net_device *dev)
> +void init_dummy_netdev_core(struct net_device *dev)
Can init_dummy_netdev_core() be a static function (and no export)?
alloc_netdev_dummy() is probably going to be the only user.
I'd al
Jakub Kicinski writes:
> On Fri, 22 Mar 2024 07:58:02 -0700 Breno Leitao wrote:
>> > Looks like init_dummy_netdev wipes the netdev structure clean, so I
>> > don't think we can use it directly as the setup function, Breno :(
>>
>> Before my patch, init_dummy_netdev was being also used. The pa
On Wed, 27 Mar 2024 08:42:55 -0700 Jeff Johnson wrote:
> On 3/27/2024 7:45 AM, Jakub Kicinski wrote:
> > On Wed, 27 Mar 2024 07:38:05 -0700 Breno Leitao wrote:
> >> -void init_dummy_netdev(struct net_device *dev)
> >> +void init_dummy_netdev_core(struct net_device *dev)
> >
> > Can init_du
On 3/27/2024 7:45 AM, Jakub Kicinski wrote:
> On Wed, 27 Mar 2024 07:38:05 -0700 Breno Leitao wrote:
>> -void init_dummy_netdev(struct net_device *dev)
>> +void init_dummy_netdev_core(struct net_device *dev)
>
> Can init_dummy_netdev_core() be a static function (and no export)?
> alloc_netdev_
17 matches
Mail list logo