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
14 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
15 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
16 LDLIBS += -lrte_bus_pci
18 EXPORT_MAP := rte_pmd_i40e_version.map
23 # Add extra flags for base driver files (also known as shared code)
26 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
27 CFLAGS_BASE_DRIVER = -wd593 -wd188
28 else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
29 CFLAGS_BASE_DRIVER += -Wno-sign-compare
30 CFLAGS_BASE_DRIVER += -Wno-unused-value
31 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
32 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
33 CFLAGS_BASE_DRIVER += -Wno-format
34 CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
35 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
36 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
37 CFLAGS_BASE_DRIVER += -Wno-unused-variable
39 CFLAGS_BASE_DRIVER = -Wno-sign-compare
40 CFLAGS_BASE_DRIVER += -Wno-unused-value
41 CFLAGS_BASE_DRIVER += -Wno-unused-parameter
42 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
43 CFLAGS_BASE_DRIVER += -Wno-format
44 CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
45 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
46 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
47 CFLAGS_BASE_DRIVER += -Wno-format-security
48 CFLAGS_BASE_DRIVER += -Wno-unused-variable
50 ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
51 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
54 CFLAGS_i40e_lan_hmc.o += -Wno-error
56 OBJS_BASE_DRIVER=$(sort $(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))))
57 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
59 VPATH += $(SRCDIR)/base
62 # all source are stored in SRCS-y
63 # base driver is based on the package of dpdk-i40e.2016.04.18.12.tar.gz.
65 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_adminq.c
66 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_common.c
67 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_diag.c
68 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_hmc.c
69 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_lan_hmc.c
70 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_nvm.c
71 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_dcb.c
73 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev.c
74 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_rxtx.c
75 ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
76 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_neon.c
77 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
78 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c
80 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_sse.c
82 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev_vf.c
83 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_pf.c
84 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_fdir.c
85 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_flow.c
86 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += rte_pmd_i40e.c
87 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_tm.c
89 ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
93 $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
94 grep -q AVX2 && echo 1)
95 ifeq ($(CC_AVX2_SUPPORT), 1)
96 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
97 CFLAGS_i40e_rxtx_vec_avx2.o += -march=core-avx2
99 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
108 # install this header file
109 SYMLINK-$(CONFIG_RTE_LIBRTE_I40E_PMD)-include := rte_pmd_i40e.h
111 include $(RTE_SDK)/mk/rte.lib.mk