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 761A4B0A8 for ; Tue, 24 Jun 2014 17:32:29 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 24 Jun 2014 08:27:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,538,1400050800"; d="scan'208";a="552598359" Received: from fmsmsx104.amr.corp.intel.com ([10.19.9.35]) by fmsmga001.fm.intel.com with ESMTP; 24 Jun 2014 08:32:46 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX104.amr.corp.intel.com (10.19.9.35) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 24 Jun 2014 08:32:46 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 24 Jun 2014 08:32:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.122]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.81]) with mapi id 14.03.0123.003; Tue, 24 Jun 2014 23:32:44 +0800 From: "Zhang, Helin" To: Thomas Monjalon , "dev@dpdk.org" Thread-Topic: [PATCH] i40e: prefer base driver naming Thread-Index: AQHPj4pV0KdxwpsbWk2Quls28EiPp5uAYkSQ Date: Tue, 24 Jun 2014 15:32:43 +0000 Message-ID: References: <1403600215-9486-1-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1403600215-9486-1-git-send-email-thomas.monjalon@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] i40e: prefer base driver naming 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: Tue, 24 Jun 2014 15:32:30 -0000 -----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]=20 Sent: Tuesday, June 24, 2014 4:57 PM To: dev@dpdk.org Cc: Zhang, Helin Subject: [PATCH] i40e: prefer base driver naming The PMD is built on top of the base driver which is provided by Intel and s= houldn't be modified to allow easy batch upgrade from Intel. The base driver is a "shared code" between many projects. But in DPDK, the = "base driver" naming makes more sense. Signed-off-by: Thomas Monjalon --- lib/librte_pmd_i40e/Makefile | 33 ++++++++++++++++----------------- lib/librte_pmd_i40e/i40e_ethdev.c | 12 ++++++------ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile in= dex 09f2087..3bf2957 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -39,26 +39,25 @@ LIB =3D librte_pmd_i40e.a CFLAGS +=3D -O3 CFLAGS +=3D= $(WERROR_FLAGS) =20 -ifeq ($(CC), icc) -CFLAGS_SHARED_DRIVERS =3D -wd593 -else -CFLAGS_SHARED_DRIVERS =3D -Wno-unused-but-set-variable -CFLAGS_SHARED_DRI= VERS +=3D -Wno-sign-compare -CFLAGS_SHARED_DRIVERS +=3D -Wno-unused-value -= CFLAGS_SHARED_DRIVERS +=3D -Wno-unused-parameter -CFLAGS_SHARED_DRIVERS += =3D -Wno-strict-aliasing -CFLAGS_SHARED_DRIVERS +=3D -Wno-format -CFLAGS_SH= ARED_DRIVERS +=3D -Wno-missing-field-initializers -CFLAGS_SHARED_DRIVERS += =3D -Wno-pointer-to-int-cast -CFLAGS_SHARED_DRIVERS +=3D -Wno-format-nonlit= eral -CFLAGS_SHARED_DRIVERS +=3D -Wno-format-security -endif - # # Add extra flags for ND source files to disable warnings # -SHARED_DRIVE= RS_OBJS=3D$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_= i40e/i40e/*.c))) -$(foreach obj, $(SHARED_DRIVERS_OBJS), $(eval CFLAGS_$(obj)+=3D$(CFLAGS_SH= ARED_DRIVERS))) +ifeq ($(CC), icc) +BASE_DRIVER_CFLAGS =3D -wd593 +else +BASE_DRIVER_CFLAGS =3D -Wno-unused-but-set-variable BASE_DRIVER_CFLAGS=20 ++=3D -Wno-sign-compare BASE_DRIVER_CFLAGS +=3D -Wno-unused-value=20 +BASE_DRIVER_CFLAGS +=3D -Wno-unused-parameter BASE_DRIVER_CFLAGS +=3D=20 +-Wno-strict-aliasing BASE_DRIVER_CFLAGS +=3D -Wno-format=20 +BASE_DRIVER_CFLAGS +=3D -Wno-missing-field-initializers=20 +BASE_DRIVER_CFLAGS +=3D -Wno-pointer-to-int-cast BASE_DRIVER_CFLAGS +=3D=20 +-Wno-format-nonliteral BASE_DRIVER_CFLAGS +=3D -Wno-format-security endif= =20 +BASE_DRIVER_OBJS=3D$(patsubst %.c,%.o,$(notdir $(wildcard=20 +$(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +$(foreach obj, $(BASE_DRIVER_OBJS), $(eval=20 +CFLAGS_$(obj)+=3D$(BASE_DRIVER_CFLAGS))) =20 VPATH +=3D $(RTE_SDK)/lib/librte_pmd_i40e/i40e =20 diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_e= thdev.c index 1b4e822..9cad2d1 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -387,10 +387,10 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth= _drv, return ret; } =20 - /* Initialize the shared code */ + /* Initialize the base driver (shared code) */ ret =3D i40e_init_shared_code(hw); if (ret) { - PMD_INIT_LOG(ERR, "Failed to init shared code: %d", ret); + PMD_INIT_LOG(ERR, "Failed to init base driver: %d", ret); return ret; } =20 @@ -1493,7 +1493,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev *dev, } =20 /** - * i40e_allocate_dma_mem_d - specific memory alloc for shared code + * i40e_allocate_dma_mem_d - specific memory alloc for base driver * @hw: pointer to the HW structure * @mem: pointer to mem struct to fill out * @size: size of memory requested @@ -1527,7 +1527,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struc= t i40e_hw *hw, } =20 /** - * i40e_free_dma_mem_d - specific memory free for shared code + * i40e_free_dma_mem_d - specific memory free for base driver * @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ @@ -1545,7 +1545,7 @@ i40e_free_dma_mem_d(__attribute__((unused)) struct i4= 0e_hw *hw, } =20 /** - * i40e_allocate_virt_mem_d - specific memory alloc for shared code + * i40e_allocate_virt_mem_d - specific memory alloc for base driver * @hw: pointer to the HW structure * @mem: pointer to mem struct to fill out * @size: size of memory requested @@ -1568,7 +1568,7 @@ i40e_allocate_virt_mem_d(__attribute__((unused)) stru= ct i40e_hw *hw, } =20 /** - * i40e_free_virt_mem_d - specific memory free for shared code + * i40e_free_virt_mem_d - specific memory free for base driver * @hw: pointer to the HW structure * @mem: pointer to mem struct to free **/ -- 2.0.0 ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------- Hi Thomas I prefer to keep the name of "shared code", and do not use "base driver". A= s "base driver" is used to indicate the top level of Linux/Windows/FreeBSD = driver by our Network guys who provides us the shared code. If we do this change, that will get us confused during following developmen= t. BTW, the names of "shared code" and "base driver" have been used for specif= ic code part for a long time by our Network guys. Regards, Helin