From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B0839C3A4 for ; Thu, 28 Jan 2016 10:50:13 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 28 Jan 2016 01:49:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,358,1449561600"; d="scan'208";a="902848773" Received: from rhorton-mobl.ger.corp.intel.com (HELO [163.33.228.69]) ([163.33.228.69]) by fmsmga002.fm.intel.com with ESMTP; 28 Jan 2016 01:49:49 -0800 Message-ID: <56A9E43D.5000105@intel.com> Date: Thu, 28 Jan 2016 09:49:49 +0000 From: Remy Horton Organization: Intel Shannon Limited User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ferruh Yigit References: <1453911849-16562-1-git-send-email-ferruh.yigit@intel.com> <1453911849-16562-2-git-send-email-ferruh.yigit@intel.com> In-Reply-To: <1453911849-16562-2-git-send-email-ferruh.yigit@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/3] kcp: add kernel control path kernel module X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 09:50:14 -0000 Comments inline ..Remy On 27/01/2016 16:24, Ferruh Yigit wrote: > This kernel module is based on KNI module, but this one is stripped > version of it and only for control messages, no data transfer > functionality provided. > > This Linux kernel module helps userspace application create virtual > interfaces and when a control command issued into that virtual > interface, module pushes the command to the userspace and gets the > response back for the caller application. > > Signed-off-by: Ferruh Yigit > --- > + net_dev = alloc_netdev(sizeof(struct kcp_dev), name, > +#ifdef NET_NAME_UNKNOWN > + NET_NAME_UNKNOWN, > +#endif > + kcp_net_init); Something doesn't feel quite right here. In cases where NET_NAME_UNKNOWN is undefined, is the signature for alloc_netdev different? > +MODULE_LICENSE("Dual BSD/GPL"); > +MODULE_AUTHOR("Intel Corporation"); > +MODULE_DESCRIPTION("Kernel Module for managing kcp devices"); I'm not up to speed on this area, but some of the file headers only mention GPL/LGPL. This correct? > + nlmsg_unicast(nl_sock, skb, pid); > + KCP_DBG("Sent cmd:%d port:%d\n", cmd_id, port_id); > + > + /*nlmsg_free(skb);*/ > + > + return 0; > +} Oops.. :) Possible memory leak, or is *skb statically allocated?