From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id 4CA32AFCF for ; Wed, 25 Jun 2014 14:22:31 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id u56so1974135wes.7 for ; Wed, 25 Jun 2014 05:22:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aC81DBYG+lwKsc0tFq1CDk80f2ym5etagQ9KxnRpACE=; b=Tn/jPjDTkI4VrreYdme1JfxDhKtHKOAmaHAD8kc4kumzmjCwuKkJkXc24h3bOew8Ng kdzkCN0aqbp5ITjKswVvlw3NsMpujyMaXOO5nEhowguwAbCoBHQzRDoIgfNdyvvkGhYj VLgLZkQYaEnakIogA8/efPLxmAVc3NK3K+5nqWHNNGPxQswnWFlcdwNfn4QjAOHi5Ii3 VD328pcsv84pbL3s6Niisnlyt88uY1zIWYgMQXtJngj6ekBJNk8jG3cGO2seLEfIwC2h xvPo0TJtzf2jrvcUlEJ40I1zPO80j7fImoHCXzZozn9kD9CmZrqUc+U5+M3z87t7uDaw YmXg== X-Gm-Message-State: ALoCoQkJNNhGK0ivKEpHB5l+56z2UqYKdfAqRmFMRtWijJ20gQHd4dp7xtOzWe4/i9VjcHoATeGG X-Received: by 10.194.186.178 with SMTP id fl18mr9092202wjc.83.1403698969026; Wed, 25 Jun 2014 05:22:49 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id w5sm53250748wif.3.2014.06.25.05.22.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jun 2014 05:22:48 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 25 Jun 2014 14:22:15 +0200 Message-Id: <1403698937-30407-2-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403698937-30407-1-git-send-email-thomas.monjalon@6wind.com> References: <1403698937-30407-1-git-send-email-thomas.monjalon@6wind.com> Subject: [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 12:22:31 -0000 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. 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 index 09f2087..77d08fb 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -39,26 +39,25 @@ LIB = librte_pmd_i40e.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -ifeq ($(CC), icc) -CFLAGS_SHARED_DRIVERS = -wd593 -else -CFLAGS_SHARED_DRIVERS = -Wno-unused-but-set-variable -CFLAGS_SHARED_DRIVERS += -Wno-sign-compare -CFLAGS_SHARED_DRIVERS += -Wno-unused-value -CFLAGS_SHARED_DRIVERS += -Wno-unused-parameter -CFLAGS_SHARED_DRIVERS += -Wno-strict-aliasing -CFLAGS_SHARED_DRIVERS += -Wno-format -CFLAGS_SHARED_DRIVERS += -Wno-missing-field-initializers -CFLAGS_SHARED_DRIVERS += -Wno-pointer-to-int-cast -CFLAGS_SHARED_DRIVERS += -Wno-format-nonliteral -CFLAGS_SHARED_DRIVERS += -Wno-format-security -endif - # # Add extra flags for ND source files to disable warnings # -SHARED_DRIVERS_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) -$(foreach obj, $(SHARED_DRIVERS_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_SHARED_DRIVERS))) +ifeq ($(CC), icc) +CFLAGS_BASE_DRIVER = -wd593 +else +CFLAGS_BASE_DRIVER = -Wno-unused-but-set-variable +CFLAGS_BASE_DRIVER += -Wno-sign-compare +CFLAGS_BASE_DRIVER += -Wno-unused-value +CFLAGS_BASE_DRIVER += -Wno-unused-parameter +CFLAGS_BASE_DRIVER += -Wno-strict-aliasing +CFLAGS_BASE_DRIVER += -Wno-format +CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers +CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast +CFLAGS_BASE_DRIVER += -Wno-format-nonliteral +CFLAGS_BASE_DRIVER += -Wno-format-security +endif +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +$(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e 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; } - /* Initialize the shared code */ + /* Initialize the shared code (base driver) */ ret = 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; } @@ -1497,7 +1497,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev *dev, } /** - * 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, } /** - * 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, } /** - * 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, } /** - * 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