1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2017 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
9 LIB = librte_pmd_i40e.a
12 CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF
13 CFLAGS += -DX722_A0_SUPPORT
15 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
16 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
17 LDLIBS += -lrte_bus_pci
19 EXPORT_MAP := rte_pmd_i40e_version.map
22 # Add extra flags for base driver files (also known as shared code)
25 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
26 CFLAGS_BASE_DRIVER = -diag-disable 593
27 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
28 CFLAGS_BASE_DRIVER += -Wno-sign-compare
29 CFLAGS_BASE_DRIVER += -Wno-unused-value
30 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
31 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
32 CFLAGS_BASE_DRIVER += -Wno-format
33 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
34 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
35 CFLAGS_BASE_DRIVER += -Wno-unused-variable
37 CFLAGS_BASE_DRIVER = -Wno-sign-compare
38 CFLAGS_BASE_DRIVER += -Wno-unused-value
39 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
40 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
41 CFLAGS_BASE_DRIVER += -Wno-format
42 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
43 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
44 CFLAGS_BASE_DRIVER += -Wno-format-security
45 CFLAGS_BASE_DRIVER += -Wno-unused-variable
47 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
48 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
51 CFLAGS_i40e_lan_hmc.o += -Wno-error
53 OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
54 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
56 VPATH += $(SRCDIR)/base
59 # all source are stored in SRCS-y
60 # base driver is based on the package of dpdk-i40e.2016.04.18.12.tar.gz.
62 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_adminq.c
63 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_common.c
64 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_diag.c
65 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_hmc.c
66 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_lan_hmc.c
67 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_nvm.c
68 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_dcb.c
70 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev.c
71 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_rxtx.c
72 ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
73 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_neon.c
74 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
75 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c
77 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_sse.c
79 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev_vf.c
80 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_pf.c
81 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_fdir.c
82 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_flow.c
83 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += rte_pmd_i40e.c
84 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_tm.c
85 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_vf_representor.c
87 ifeq ($(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR),y)
88 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
92 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
93 grep -q AVX2 && echo 1)
94 ifeq ($(CC_AVX2_SUPPORT), 1)
95 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
96 CFLAGS_i40e_rxtx_vec_avx2.o += -march=core-avx2
98 CFLAGS_i40e_rxtx_vec_avx2.o += -mavx2
104 ifeq ($(CC_AVX2_SUPPORT), 1)
105 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_avx2.c
106 CFLAGS_i40e_rxtx.o += -DCC_AVX2_SUPPORT
109 # install this header file
110 SYMLINK-$(CONFIG_RTE_LIBRTE_I40E_PMD)-include := rte_pmd_i40e.h
112 include $(RTE_SDK)/mk/rte.lib.mk