[RFC,3/7] drivers/net: add igc make
diff mbox series

Message ID 1578625225-110361-3-git-send-email-alvinx.zhang@intel.com
State Changes Requested
Delegated to: Ferruh Yigit
Headers show
Series
  • [RFC,1/7] net/igc: base driver
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

alvinx.zhang@intel.com Jan. 10, 2020, 3 a.m. UTC
From: Alvin Zhang <alvinx.zhang@intel.com>

Add make files to igc PMD.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/Makefile     |  1 +
 drivers/net/igc/Makefile | 83 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 drivers/net/igc/Makefile

Comments

Ferruh Yigit Jan. 21, 2020, 4:43 p.m. UTC | #1
On 1/10/2020 3:00 AM, alvinx.zhang@intel.com wrote:
> From: Alvin Zhang <alvinx.zhang@intel.com>
> 
> Add make files to igc PMD.
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
>  drivers/net/Makefile     |  1 +
>  drivers/net/igc/Makefile | 83 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 84 insertions(+)
>  create mode 100644 drivers/net/igc/Makefile
> 
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index cee3036..427a757 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -24,6 +24,7 @@ ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
>  DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2
>  endif
>  DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000
> +DIRS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc
>  DIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena
>  DIRS-$(CONFIG_RTE_LIBRTE_ENETC_PMD) += enetc
>  DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic
> diff --git a/drivers/net/igc/Makefile b/drivers/net/igc/Makefile
> new file mode 100644
> index 0000000..a167d73
> --- /dev/null
> +++ b/drivers/net/igc/Makefile
> @@ -0,0 +1,83 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2010-2020 Intel Corporation
> +
> +include $(RTE_SDK)/mk/rte.vars.mk
> +
> +#
> +# library name
> +#
> +LIB = librte_pmd_igc.a
> +
> +CFLAGS += -O3
> +CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
> +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
> +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
> +LDLIBS += -lrte_bus_pci
> +
> +EXPORT_MAP := rte_pmd_igc_version.map
> +
> +LIBABIVER := 0

There shouldn't be LIBABIVER anymore, it is confusing the build system.

Also please start with as empty as possible Makefile and add things as they are
needed, like are all lddibs or clags are required in this stage?

> +
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +#
> +# CFLAGS for icc
> +#
> +CFLAGS_BASE_DRIVER  = -diag-disable 177 -diag-disable 181
> +CFLAGS_BASE_DRIVER += -diag-disable 869 -diag-disable 2259
> +else
> +#
> +# CFLAGS for gcc/clang
> +#
> +CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter
> +CFLAGS_BASE_DRIVER += -Wno-unused-variable
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
> +ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
> +CFLAGS_BASE_DRIVER += -Wno-misleading-indentation
> +ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
> +CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough
> +endif
> +endif
> +endif
> +endif
> +
> +#
> +# Add extra flags for base driver files (also known as shared code)
> +# to disable warnings in them
> +#
> +BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
> +$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
> +
> +VPATH += $(SRCDIR)/base
> +
> +#
> +# all source are stored in SRCS-y
> +#
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_80003es2lan.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82540.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82541.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82542.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82543.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82571.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82575.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_api.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_base.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_i210.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_i225.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_ich8lan.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_impl_guide.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_mac.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_manage.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_mbx.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_nvm.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_osdep.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_phy.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_vf.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_ethdev.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_txrx.c
> +SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_logs.c
> +
> +# install this header file
> +# SYMLINK-$(CONFIG_RTE_LIBRTE_IGC_PMD)-include := rte_pmd_igc.h
> +
> +include $(RTE_SDK)/mk/rte.lib.mk
>

Patch
diff mbox series

diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cee3036..427a757 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -24,6 +24,7 @@  ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
 DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2
 endif
 DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000
+DIRS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc
 DIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena
 DIRS-$(CONFIG_RTE_LIBRTE_ENETC_PMD) += enetc
 DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic
diff --git a/drivers/net/igc/Makefile b/drivers/net/igc/Makefile
new file mode 100644
index 0000000..a167d73
--- /dev/null
+++ b/drivers/net/igc/Makefile
@@ -0,0 +1,83 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2010-2020 Intel Corporation
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_pmd_igc.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_pci
+
+EXPORT_MAP := rte_pmd_igc_version.map
+
+LIBABIVER := 0
+
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+#
+# CFLAGS for icc
+#
+CFLAGS_BASE_DRIVER  = -diag-disable 177 -diag-disable 181
+CFLAGS_BASE_DRIVER += -diag-disable 869 -diag-disable 2259
+else
+#
+# CFLAGS for gcc/clang
+#
+CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter
+CFLAGS_BASE_DRIVER += -Wno-unused-variable
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
+CFLAGS_BASE_DRIVER += -Wno-misleading-indentation
+ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
+CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough
+endif
+endif
+endif
+endif
+
+#
+# Add extra flags for base driver files (also known as shared code)
+# to disable warnings in them
+#
+BASE_DRIVER_OBJS=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
+$(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
+
+VPATH += $(SRCDIR)/base
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_80003es2lan.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82540.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82541.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82542.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82543.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82571.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_82575.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_api.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_base.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_i210.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_i225.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_ich8lan.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_impl_guide.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_mac.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_manage.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_mbx.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_nvm.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_osdep.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_phy.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += e1000_vf.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_txrx.c
+SRCS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc_logs.c
+
+# install this header file
+# SYMLINK-$(CONFIG_RTE_LIBRTE_IGC_PMD)-include := rte_pmd_igc.h
+
+include $(RTE_SDK)/mk/rte.lib.mk