[dpdk-dev] [PATCH] kni: add support for core_id param in single threaded mode
Ferruh Yigit
ferruh.yigit at intel.com
Wed Sep 21 18:49:40 CEST 2016
On 9/20/2016 7:36 PM, Stephen Hemminger wrote:
> On Tue, 20 Sep 2016 21:16:37 +0300
> Vladyslav Buslov <vladyslav.buslov at harmonicinc.com> wrote:
>
>> @@ -123,6 +125,9 @@ static int __net_init kni_init_net(struct net *net)
>> /* Clear the bit of device in use */
>> clear_bit(KNI_DEV_IN_USE_BIT_NUM, &knet->device_in_use);
>>
>> + mutex_init(&knet->kni_kthread_lock);
>> + knet->kni_kthread = NULL;
>> +
>
> Why not just use kzalloc() here? You would still need to init the mutex
> etc, but it would be safer.
>
Hi Vladyslav,
This is good suggestion, if you send a new version for this update,
please keep my Ack.
Thanks,
ferruh
More information about the dev
mailing list