1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2018 Intel Corporation 3# Copyright(c) 2023 Broadcom 4 5if is_windows 6 build = false 7 reason = 'not supported on Windows' 8 subdir_done() 9endif 10 11if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 12 subdir_done() 13endif 14 15headers = files('rte_pmd_bnxt.h') 16cflags_options = [ 17 '-DSUPPORT_CFA_HW_P70=1', 18] 19 20foreach option:cflags_options 21 if cc.has_argument(option) 22 cflags += option 23 endif 24endforeach 25 26headers = files('rte_pmd_bnxt.h') 27 28deps += ['hash'] 29 30sources = files( 31 'bnxt_cpr.c', 32 'bnxt_ethdev.c', 33 'bnxt_filter.c', 34 'bnxt_flow.c', 35 'bnxt_hwrm.c', 36 'bnxt_irq.c', 37 'bnxt_mpc.c', 38 'bnxt_ring.c', 39 'bnxt_rxq.c', 40 'bnxt_rxr.c', 41 'bnxt_stats.c', 42 'bnxt_txq.c', 43 'bnxt_txr.c', 44 'bnxt_util.c', 45 'bnxt_vnic.c', 46 'bnxt_reps.c', 47 'rte_pmd_bnxt.c', 48) 49 50#Add the subdirectories that need to be compiled 51subdir('tf_ulp') 52subdir('tf_core') 53subdir('tf_core/v3') 54subdir('hcapi/cfa') 55subdir('hcapi/cfa_v3') 56 57if arch_subdir == 'x86' 58 sources += files('bnxt_rxtx_vec_sse.c') 59 # build AVX2 code with instruction set explicitly enabled for runtime selection 60 bnxt_avx2_lib = static_library('bnxt_avx2_lib', 61 'bnxt_rxtx_vec_avx2.c', 62 dependencies: [static_rte_ethdev, 63 static_rte_bus_pci, 64 static_rte_kvargs, static_rte_hash], 65 include_directories: includes, 66 c_args: [cflags, '-mavx2']) 67 objs += bnxt_avx2_lib.extract_objects('bnxt_rxtx_vec_avx2.c') 68elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64') 69 sources += files('bnxt_rxtx_vec_neon.c') 70endif 71 72annotate_locks = false 73