From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 983832C8 for ; Thu, 6 Jul 2017 11:25:53 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2017 02:25:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,316,1496127600"; d="scan'208";a="989359778" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 06 Jul 2017 02:25:51 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.187]) by IRSMSX154.ger.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0319.002; Thu, 6 Jul 2017 10:25:15 +0100 From: "Burakov, Anatoly" To: "Yigit, Ferruh" , "dev@dpdk.org" CC: Stephen Hemminger , "Richardson, Bruce" Thread-Topic: [PATCH v10 08/20] unci: add module skeleton Thread-Index: AQHS9OCVZRp25QJ14kSgUD8AaJJQ66JGiV0g Date: Thu, 6 Jul 2017 09:25:14 +0000 Message-ID: References: <20170630165140.59594-1-ferruh.yigit@intel.com> <20170704161337.45926-1-ferruh.yigit@intel.com> <20170704161337.45926-9-ferruh.yigit@intel.com> In-Reply-To: <20170704161337.45926-9-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmEwOTkzNzQtYmZjNi00ZWRiLTliNzktMjY3YTkxZWY4NGM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjhPdHUzQTBWa1R1ck5seWF1SVJHK3kzZXF2Q1pwWUI0Nk9cL3RKUUVjYmd3PSJ9 dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v10 08/20] unci: add module skeleton X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 09:25:54 -0000 > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, July 4, 2017 5:13 PM > To: dev@dpdk.org > Cc: Yigit, Ferruh ; Stephen Hemminger > ; Richardson, Bruce > ; Burakov, Anatoly > > Subject: [PATCH v10 08/20] unci: add module skeleton >=20 > Base files to have a new kernel module, without actual source code. >=20 > Signed-off-by: Ferruh Yigit > --- > MAINTAINERS | 4 +++ > config/common_base | 5 ++++ > config/common_linuxapp | 1 + > lib/librte_eal/linuxapp/Makefile | 4 ++- > lib/librte_eal/linuxapp/unci/Makefile | 52 > +++++++++++++++++++++++++++++++++ > lib/librte_eal/linuxapp/unci/unci_dev.h | 34 +++++++++++++++++++++ > lib/librte_eal/linuxapp/unci/unci_net.c | 42 > ++++++++++++++++++++++++++ > 7 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 > lib/librte_eal/linuxapp/unci/Makefile > create mode 100644 lib/librte_eal/linuxapp/unci/unci_dev.h > create mode 100644 lib/librte_eal/linuxapp/unci/unci_net.c >=20 > diff --git a/MAINTAINERS b/MAINTAINERS > index cae791e21..cfc3d4bf3 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -758,6 +758,10 @@ Ethtool > M: Remy Horton > F: lib/librte_ethtool/ >=20 > +Linux Userspace Network Control Interface (UNCI) > +M: Ferruh Yigit > +F: lib/librte_eal/linuxapp/unci/ > + > Test Applications > ----------------- >=20 > diff --git a/config/common_base b/config/common_base index > 0b86c3431..1582f703e 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -705,6 +705,11 @@ CONFIG_RTE_LIBRTE_PDUMP=3Dy > CONFIG_RTE_LIBRTE_ETHTOOL=3Dn >=20 > # > +# Compile Userspace Network Control Interface (UNCI) kernel module # > +CONFIG_RTE_UNCI_KMOD=3Dn > + > +# > # Compile vhost user library > # > CONFIG_RTE_LIBRTE_VHOST=3Dn > diff --git a/config/common_linuxapp b/config/common_linuxapp index > 9a6bf868c..b400b2c0e 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -42,6 +42,7 @@ CONFIG_RTE_KNI_KMOD=3Dy > CONFIG_RTE_LIBRTE_KNI=3Dy > CONFIG_RTE_LIBRTE_PMD_KNI=3Dy > CONFIG_RTE_LIBRTE_ETHTOOL=3Dy > +CONFIG_RTE_UNCI_KMOD=3Dy > CONFIG_RTE_LIBRTE_VHOST=3Dy > CONFIG_RTE_LIBRTE_VHOST_NUMA=3Dy > CONFIG_RTE_LIBRTE_PMD_VHOST=3Dy > diff --git a/lib/librte_eal/linuxapp/Makefile > b/lib/librte_eal/linuxapp/Makefile > index 4794696b6..2d293f1a6 100644 > --- a/lib/librte_eal/linuxapp/Makefile > +++ b/lib/librte_eal/linuxapp/Makefile > @@ -1,6 +1,6 @@ > # BSD LICENSE > # > -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. > +# Copyright(c) 2010-2017 Intel Corporation. All rights reserved. > # All rights reserved. > # > # Redistribution and use in source and binary forms, with or without > @@ -35,6 +35,8 @@ DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) +=3D eal > DIRS-$(CONFIG_RTE_EAL_IGB_UIO) +=3D igb_uio > DIRS-$(CONFIG_RTE_KNI_KMOD) +=3D kni > DEPDIRS-kni :=3D eal > +DIRS-$(CONFIG_RTE_UNCI_KMOD) +=3D unci > +DEPDIRS-unci :=3D eal > DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) +=3D xen_dom0 > DEPDIRS-xen_dom0 :=3D eal >=20 > diff --git a/lib/librte_eal/linuxapp/unci/Makefile > b/lib/librte_eal/linuxapp/unci/Makefile > new file mode 100644 > index 000000000..02e354814 > --- /dev/null > +++ b/lib/librte_eal/linuxapp/unci/Makefile > @@ -0,0 +1,52 @@ > +# BSD LICENSE > +# > +# Copyright(c) 2017 Intel Corporation. All rights reserved. > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# * Redistributions in binary form must reproduce the above copyrigh= t > +# notice, this list of conditions and the following disclaimer in > +# the documentation and/or other materials provided with the > +# distribution. > +# * Neither the name of Intel Corporation nor the names of its > +# contributors may be used to endorse or promote products derived > +# from this software without specific prior written permission. > +# > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS FOR > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > COPYRIGHT > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > INCIDENTAL, > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > NOT > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS > OF USE, > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED > AND ON ANY > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR > TORT > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF > THE USE > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > DAMAGE. > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# > +# module name and path > +# > +MODULE =3D rte_unci > + > +# > +# CFLAGS > +# > +MODULE_CFLAGS +=3D -I$(SRCDIR) > +MODULE_CFLAGS +=3D -I$(RTE_OUTPUT)/include MODULE_CFLAGS +=3D - > include > +$(RTE_OUTPUT)/include/rte_config.h > +MODULE_CFLAGS +=3D -Wall -Werror > + > +# > +# all source are stored in SRCS-y > +# > +SRCS-$(CONFIG_RTE_UNCI_KMOD) :=3D unci_net.c > + > +include $(RTE_SDK)/mk/rte.module.mk > diff --git a/lib/librte_eal/linuxapp/unci/unci_dev.h > b/lib/librte_eal/linuxapp/unci/unci_dev.h > new file mode 100644 > index 000000000..102409020 > --- /dev/null > +++ b/lib/librte_eal/linuxapp/unci/unci_dev.h > @@ -0,0 +1,34 @@ > +/*- > + * GPL LICENSE SUMMARY > + * > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modif= y > + * it under the terms of version 2 of the GNU General Public License a= s > + * published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but > + * WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > GNU > + * General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; > + * > + * The full GNU General Public License is included in this distributio= n > + * in the file called LICENSE.GPL. > + * > + * Contact Information: > + * Intel Corporation > + */ > + > +#ifndef _UNCI_DEV_H_ > +#define _UNCI_DEV_H_ > + > +#ifdef pr_fmt > +#undef pr_fmt > +#endif > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > + > +#endif /* _UNCI_DEV_H_ */ > diff --git a/lib/librte_eal/linuxapp/unci/unci_net.c > b/lib/librte_eal/linuxapp/unci/unci_net.c > new file mode 100644 > index 000000000..b8ef409d3 > --- /dev/null > +++ b/lib/librte_eal/linuxapp/unci/unci_net.c > @@ -0,0 +1,42 @@ > +/*- > + * GPL LICENSE SUMMARY > + * > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modif= y > + * it under the terms of version 2 of the GNU General Public License a= s > + * published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but > + * WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > GNU > + * General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; > + * > + * The full GNU General Public License is included in this distributio= n > + * in the file called LICENSE.GPL. > + * > + * Contact Information: > + * Intel Corporation > + */ > + > +#include > + > +#include "unci_dev.h" > + > +static int __init unci_init(void) > +{ > + return 0; > +} > +module_init(unci_init); > + > +static void __exit unci_exit(void) > +{ > +} > +module_exit(unci_exit); > + > +MODULE_LICENSE("Dual BSD/GPL"); The module license says it's dual BSD/GPL, but the file only contains a GPL= license. So either make it GPL-only, or add the BSD license header :) igb_= uio is GPL-only, is there any particular reason why this one has to be dual= licensed?=20 > +MODULE_AUTHOR("Intel Corporation"); > +MODULE_DESCRIPTION("Kernel Module for managing unci devices"); > -- > 2.13.0