[dpdk-dev] [PATCH 1/3] kcp: add kernel control path kernel module
Ferruh Yigit
ferruh.yigit at intel.com
Tue Mar 1 01:35:03 CET 2016
On 2/29/2016 8:11 PM, Stephen Hemminger wrote:
> On Wed, 27 Jan 2016 16:24:07 +0000
> Ferruh Yigit <ferruh.yigit at intel.com> wrote:
>
>> +static int
>> +kcp_ioctl_release(unsigned int ioctl_num, unsigned long ioctl_param)
>> +{
>> + int ret = -EINVAL;
>> + struct kcp_dev *dev;
>> + struct kcp_dev *n;
>> + char name[RTE_KCP_NAMESIZE];
>> + unsigned int instance = ioctl_param;
>> +
>> + snprintf(name, RTE_KCP_NAMESIZE, "dpdk%u", instance);
>> +
>> + down_write(&kcp_list_lock);
>
>
> Some observations about how acceptable this will to upstream
> kernel developers.
>
> ioctl's are the lease favored form of API.
>
This is from v1 of patch, v3 is out and it removed ioctl, replacing it
with rtnetlink.
v3:
http://dpdk.org/dev/patchwork/patch/10872/
> You chose the worst possible mutual exclusion read/write semaphores.
> Read/write is slower than simpler primtives, and semaphores were
> replaced for almost all usage models by mutexes (about 4 years ago).
>
> Looks like you copied the out of date kernel API's used
> by KNI.
>
But still using same locks, and as you have guessed these are from
legacy code. I will replace them with newer, faster lock APIs happily.
If only problem is using slow lock APIs, it seems code is in pretty good
shape J Please check the v3, it is in better shape now. With more review
from reviewers and after a few more versions, we can have something
upstreamable.
Thanks,
ferruh
More information about the dev
mailing list