From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 1/3] kcp: add kernel control path kernel module Date: Tue, 1 Mar 2016 00:35:03 +0000 Message-ID: <56D4E3B7.8050102@intel.com> References: <1453911849-16562-1-git-send-email-ferruh.yigit@intel.com> <1453911849-16562-2-git-send-email-ferruh.yigit@intel.com> <20160229121158.3ff29ff8@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 106F92BA9 for ; Tue, 1 Mar 2016 01:35:05 +0100 (CET) In-Reply-To: <20160229121158.3ff29ff8@xeon-e3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2/29/2016 8:11 PM, Stephen Hemminger wrote: > On Wed, 27 Jan 2016 16:24:07 +0000 > Ferruh Yigit 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