From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D95BAAF81 for ; Wed, 25 Jun 2014 16:43:49 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 25 Jun 2014 07:38:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,546,1400050800"; d="scan'208";a="563249585" Received: from fmsmsx103.amr.corp.intel.com ([10.19.9.34]) by orsmga002.jf.intel.com with ESMTP; 25 Jun 2014 07:43:48 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.19.9.34) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 25 Jun 2014 07:43:48 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 25 Jun 2014 07:43:48 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.21]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.210]) with mapi id 14.03.0123.003; Wed, 25 Jun 2014 22:43:46 +0800 From: "Chen, Jing D" To: Thomas Monjalon , "dev@dpdk.org" Thread-Topic: [PATCH 1/3] i40e: explicit shared code naming as base driver Thread-Index: AQHPkHA7bAxZrJgdhki6Hp6HWO2kl5uB5N9Q Date: Wed, 25 Jun 2014 14:43:45 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D0159689B@shsmsx102.ccr.corp.intel.com> References: <1403698937-30407-1-git-send-email-thomas.monjalon@6wind.com> <1403698937-30407-2-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1403698937-30407-2-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 1/3] i40e: explicit shared code naming as base driver 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: Wed, 25 Jun 2014 14:43:51 -0000 Hi Thomas, > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, June 25, 2014 8:22 PM > To: dev@dpdk.org > Cc: Chen, Jing D; Zhang, Helin; Ananyev, Konstantin; De Lara Guarch, Pabl= o > Subject: [PATCH 1/3] i40e: explicit shared code naming as base driver >=20 > The PMD is built on top of the base driver which is provided by Intel and > shouldn't be modified to allow easy batch upgrade from Intel. >=20 > The base driver is a "shared code" between many projects. But in DPDK, th= e > "base driver" naming makes more sense. >=20 > 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(-) >=20 > diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile > index 09f2087..77d08fb 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_DRIVERS +=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_SHARED_DRIVERS +=3D > -Wno-missing-field-initializers -CFLAGS_SHARED_DRIVERS +=3D > -Wno-pointer-to-int-cast -CFLAGS_SHARED_DRIVERS +=3D > -Wno-format-nonliteral -CFLAGS_SHARED_DRIVERS +=3D > -Wno-format-security -endif > - > # > # Add extra flags for ND source files to disable warnings # > -SHARED_DRIVERS_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_SHARED_DRIVERS))) > +ifeq ($(CC), icc) > +CFLAGS_BASE_DRIVER =3D -wd593 > +else > +CFLAGS_BASE_DRIVER =3D -Wno-unused-but-set-variable > CFLAGS_BASE_DRIVER > ++=3D -Wno-sign-compare CFLAGS_BASE_DRIVER +=3D -Wno-unused-value > +CFLAGS_BASE_DRIVER +=3D -Wno-unused-parameter CFLAGS_BASE_DRIVER > +=3D > +-Wno-strict-aliasing CFLAGS_BASE_DRIVER +=3D -Wno-format > +CFLAGS_BASE_DRIVER +=3D -Wno-missing-field-initializers > +CFLAGS_BASE_DRIVER +=3D -Wno-pointer-to-int-cast CFLAGS_BASE_DRIVER > +=3D > +-Wno-format-nonliteral CFLAGS_BASE_DRIVER +=3D -Wno-format-security > endif > +OBJS_BASE_DRIVER=3D$(patsubst %.c,%.o,$(notdir $(wildcard > +$(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) > +$(foreach obj, $(OBJS_BASE_DRIVER), $(eval > +CFLAGS_$(obj)+=3D$(CFLAGS_BASE_DRIVER))) >=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_ethdev.c > index 3311d73..6bc3998 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 shared code (base driver) */ > 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 shared code (base driver): %d", > +ret); > return ret; > } >=20 > @@ -1497,7 +1497,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 shared code > + (base driver) > * @hw: pointer to the HW structure > * @mem: pointer to mem struct to fill out > * @size: size of memory requested > @@ -1531,7 +1531,7 @@ > i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw, } >=20 > /** > - * i40e_free_dma_mem_d - specific memory free for shared code > + * i40e_free_dma_mem_d - specific memory free for shared code (base > + driver) > * @hw: pointer to the HW structure > * @mem: ptr to mem struct to free > **/ > @@ -1549,7 +1549,7 @@ i40e_free_dma_mem_d(__attribute__((unused)) > struct i40e_hw *hw, } >=20 > /** > - * i40e_allocate_virt_mem_d - specific memory alloc for shared code > + * i40e_allocate_virt_mem_d - specific memory alloc for shared code > + (base driver) > * @hw: pointer to the HW structure > * @mem: pointer to mem struct to fill out > * @size: size of memory requested > @@ -1572,7 +1572,7 @@ > i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw, } >=20 > /** > - * i40e_free_virt_mem_d - specific memory free for shared code > + * i40e_free_virt_mem_d - specific memory free for shared code (base > + driver) > * @hw: pointer to the HW structure > * @mem: pointer to mem struct to free > **/ > -- > 2.0.0 I don't object the name change. But I don't see anything good. As some of t= he API indicates (i40e_init_shared_code), we can call it shared code as wha= t we've done in old PMD drivers.=20 BTW, won't this patch overwrite previous one that fix GCC 32bits warning?