From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 27B465907 for ; Tue, 24 Jun 2014 10:56:50 +0200 (CEST) Received: by mail-wi0-f176.google.com with SMTP id n3so5576892wiv.15 for ; Tue, 24 Jun 2014 01:57:08 -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; bh=gqUAg5wZvdCzvA2ebYPwj8rdNW0wW/r626GvJl3OTNE=; b=bvIAFPyirmm3rPiOV6m5i+N/m56viI3FhFwCj7AxXOR7xAgF58swmBYnYm1e1ealfp XGvWAc1dFySOvnig91h6QsB1j+8bNBXs+t0OWY3GEdhDEbZMwCtwRPNpMT0Ie12cD4Rd +O9lsrc/jWZXIJsmqHoZQPn4/6GChWWm8WWmEL+U19FJNvsphpOAN+qSUbqvRV6sKD2Q iiIadyzKI83cm97qL+q/Rv0f1m4YUq0d9FUdJaDmw/T+7JvlSC8Sp7Ns0RwXJySYap2G loXWAOR9FILXyyzvpWLqhfxjsRLVXerNZDx71m7/dtsipVKay0C3zcyffCKduZ84hyE3 ApSQ== X-Gm-Message-State: ALoCoQnn2TQZKKllyBAV7Ev+haGey03XgzY30Iuj3/NrXpQjahh4mPZZGWLV9G+k3v7C+tZkvBiX X-Received: by 10.180.24.66 with SMTP id s2mr12923608wif.33.1403600228478; Tue, 24 Jun 2014 01:57:08 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id gi8sm41298551wib.8.2014.06.24.01.57.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jun 2014 01:57:07 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 24 Jun 2014 10:56:55 +0200 Message-Id: <1403600215-9486-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.0.0 Subject: [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 08:56:50 -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..3bf2957 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) +BASE_DRIVER_CFLAGS = -wd593 +else +BASE_DRIVER_CFLAGS = -Wno-unused-but-set-variable +BASE_DRIVER_CFLAGS += -Wno-sign-compare +BASE_DRIVER_CFLAGS += -Wno-unused-value +BASE_DRIVER_CFLAGS += -Wno-unused-parameter +BASE_DRIVER_CFLAGS += -Wno-strict-aliasing +BASE_DRIVER_CFLAGS += -Wno-format +BASE_DRIVER_CFLAGS += -Wno-missing-field-initializers +BASE_DRIVER_CFLAGS += -Wno-pointer-to-int-cast +BASE_DRIVER_CFLAGS += -Wno-format-nonliteral +BASE_DRIVER_CFLAGS += -Wno-format-security +endif +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(BASE_DRIVER_CFLAGS))) 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 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; } - /* Initialize the shared code */ + /* Initialize the base driver (shared code) */ 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 base driver: %d", ret); return ret; } @@ -1493,7 +1493,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 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)) struct i40e_hw *hw, } /** - * 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 i40e_hw *hw, } /** - * 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)) struct i40e_hw *hw, } /** - * 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