From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbfkord-smmo03.seg.att.com (nbfkord-smmo03.seg.att.com [209.65.160.84]) by dpdk.org (Postfix) with ESMTP id 4DC1B379B for ; Thu, 24 Nov 2016 16:59:23 +0100 (CET) Received: from unknown [193.34.186.16] (EHLO webmail.solarflare.com) by nbfkord-smmo03.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id b5e07385.2b6341274940.41372.00-2452.83813.nbfkord-smmo03.seg.att.com (envelope-from ); Thu, 24 Nov 2016 15:59:23 +0000 (UTC) X-MXL-Hash: 58370e5b03b34c07-eaa128389d0f3ca4ab7752e2c593934317d9b29a Received: from unknown [193.34.186.16] (EHLO webmail.solarflare.com) by nbfkord-smmo03.seg.att.com(mxl_mta-7.2.4-7) over TLS secured channel with ESMTP id 85e07385.0.41370.00-2395.83808.nbfkord-smmo03.seg.att.com (envelope-from ); Thu, 24 Nov 2016 15:59:21 +0000 (UTC) X-MXL-Hash: 58370e594178902d-c14ac2bcb81f594b731ab13affc666e77b961e09 Received: from [192.168.38.17] (84.52.89.52) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 24 Nov 2016 15:59:15 +0000 To: Ferruh Yigit , References: <1479740470-6723-1-git-send-email-arybchenko@solarflare.com> <1479740470-6723-2-git-send-email-arybchenko@solarflare.com> From: Andrew Rybchenko Message-ID: Date: Thu, 24 Nov 2016 18:59:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [84.52.89.52] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22718.003 X-TM-AS-Result: No--12.020400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=HuVwbhnS c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] X-AnalysisOut: [:17 a=RB3BGLmKESwA:10 a=N659UExz7-8A:10 a=L24OOQBejmoA:10 ] X-AnalysisOut: [a=zRKbQ67AAAAA:8 a=Ss5juYD3MEKMawolGvgA:9 a=pILNOxqGKmIA:1] X-AnalysisOut: [0 a=PA03WX8tBzeizutn5_OT:22] X-Spam: [F=0.2438379950; CM=0.500; S=0.243(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [193.34.186.16] Subject: Re: [dpdk-dev] [PATCH 01/56] net/sfc: libefx-based PMD stub sufficient to build and init 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: Thu, 24 Nov 2016 15:59:23 -0000 On 11/23/2016 06:26 PM, Ferruh Yigit wrote: > On 11/21/2016 3:00 PM, Andrew Rybchenko wrote: >> The PMD is put into the sfc/efx subdirectory to have a place for >> the second PMD and library shared by both. >> >> Enable the PMD by default on supported configuratons. >> >> Reviewed-by: Andy Moreton >> Signed-off-by: Andrew Rybchenko >> --- >> MAINTAINERS | 6 ++ >> config/common_base | 6 ++ >> config/defconfig_arm-armv7a-linuxapp-gcc | 1 + >> config/defconfig_arm64-armv8a-linuxapp-gcc | 1 + >> config/defconfig_i686-native-linuxapp-gcc | 5 + >> config/defconfig_i686-native-linuxapp-icc | 5 + >> config/defconfig_ppc_64-power8-linuxapp-gcc | 1 + >> config/defconfig_tile-tilegx-linuxapp-gcc | 1 + >> config/defconfig_x86_64-native-linuxapp-icc | 5 + >> config/defconfig_x86_x32-native-linuxapp-gcc | 5 + >> doc/guides/nics/features/sfc_efx.ini | 10 ++ >> doc/guides/nics/index.rst | 1 + >> doc/guides/nics/sfc_efx.rst | 109 +++++++++++++++++++++ > Can you also update release notes please, to announce new driver. Thanks, will do in v2. > <...> > >> diff --git a/drivers/net/sfc/efx/Makefile b/drivers/net/sfc/efx/Makefile >> new file mode 100644 >> index 0000000..71f07ca >> --- /dev/null >> +++ b/drivers/net/sfc/efx/Makefile >> @@ -0,0 +1,81 @@ > <...> >> + >> +include $(RTE_SDK)/mk/rte.vars.mk >> + >> +# >> +# library name >> +# >> +LIB = librte_pmd_sfc_efx.a >> + >> +CFLAGS += -O3 >> + >> +# Enable basic warnings but disable some which are accepted >> +CFLAGS += -Wall > It is possible to use $(WERROR_FLAGS), which set automatically based on > selected compiler. See mk/toolchain/* . Thanks, will do in v2. > And you can add extra options here, please keep in mind that there are > three compiler supported right now: gcc, clang and icc. You may require > to add compiler and version checks.. I've tried to disable the driver build on ICC since we've never tested it. I've failed to find list of compiler versions which must/should be checked. I've tested versions which come with RHEL 7.2, Debian Jessie and Sid. (In v1 I've lost my fixes for clang which produce warnings because of unsupported -W option) >> +CFLAGS += -Wno-strict-aliasing >> + >> +# Enable extra warnings but disable some which are accepted >> +CFLAGS += -Wextra >> +CFLAGS += -Wno-empty-body >> +CFLAGS += -Wno-sign-compare >> +CFLAGS += -Wno-type-limits >> +CFLAGS += -Wno-unused-parameter > Is there a way to not disable these warnings but fix in the source code? > Or move to CFLAGS_BASE_DRIVER, if the reason is the base driver? Will do in v2. >> + >> +# More warnings not enabled by above aggregators >> +CFLAGS += -Waggregate-return >> +CFLAGS += -Wbad-function-cast >> +CFLAGS += -Wcast-qual >> +CFLAGS += -Wdisabled-optimization >> +CFLAGS += -Wmissing-declarations >> +CFLAGS += -Wmissing-prototypes >> +CFLAGS += -Wnested-externs >> +CFLAGS += -Wold-style-definition >> +CFLAGS += -Wpointer-arith >> +CFLAGS += -Wstrict-prototypes >> +CFLAGS += -Wundef >> +CFLAGS += -Wwrite-strings > If you believe some can be useful for everybody, please feel free to add > to mk/toolchain/* . I'll definitely remove duplicates which are already included in $(WERROR_FLAGS). I'd prefer to keep the rest just here for now. I think that adding it world-wide requires testing on really many compiler versions etc. >> + >> +EXPORT_MAP := rte_pmd_sfc_efx_version.map >> + >> +LIBABIVER := 1 >> + >> +# >> +# all source are stored in SRCS-y >> +# >> +SRCS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += sfc_ethdev.c >> +SRCS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += sfc_kvargs.c >> + >> + >> +# this lib depends upon: >> +DEPDIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += lib/librte_eal >> +DEPDIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += lib/librte_kvargs >> +DEPDIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += lib/librte_ether >> +DEPDIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += lib/librte_mempool >> +DEPDIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += lib/librte_mbuf >> + >> +include $(RTE_SDK)/mk/rte.lib.mk >> diff --git a/drivers/net/sfc/efx/rte_pmd_sfc_efx_version.map b/drivers/net/sfc/efx/rte_pmd_sfc_efx_version.map >> new file mode 100644 >> index 0000000..1901bcb >> --- /dev/null >> +++ b/drivers/net/sfc/efx/rte_pmd_sfc_efx_version.map >> @@ -0,0 +1,4 @@ >> +DPDK_16.07 { > Now this become 17.02 Thanks, will fix in v2. >> + >> + local: *; >> +}; >> diff --git a/drivers/net/sfc/efx/sfc.h b/drivers/net/sfc/efx/sfc.h >> new file mode 100644 >> index 0000000..16fd2bb >> --- /dev/null >> +++ b/drivers/net/sfc/efx/sfc.h >> @@ -0,0 +1,53 @@ > <..> >> + >> +#ifndef _SFC_H >> +#define _SFC_H > s/^I/ / > This also exists in other locations and files.. Will fix in v2. I thought that DPDK prefers TAB after #define as FreeBSD does, but counting shows that space is really preferred. I think that such things should be caught by checkpatch. > <...>