196d7c62aSNelio Laranjeiro# SPDX-License-Identifier: BSD-3-Clause 296d7c62aSNelio Laranjeiro# Copyright 2018 6WIND S.A. 396d7c62aSNelio Laranjeiro# Copyright 2018 Mellanox Technologies, Ltd 496d7c62aSNelio Laranjeiro 5f44b09f9SOphir Munkif not (is_linux or is_windows) 63dee3f1bSThomas Monjalon build = false 7f44b09f9SOphir Munk reason = 'only supported on Linux and Windows' 83dee3f1bSThomas Monjalon subdir_done() 93dee3f1bSThomas Monjalonendif 103dee3f1bSThomas Monjalon 117b4f1e6bSMatan Azraddeps += ['hash', 'common_mlx5'] 12e9cc7c7aSThomas Monjalonif not dpdk_conf.has('RTE_COMMON_MLX5') 133df380f6SThomas Monjalon # avoid referencing undefined variables from common/mlx5 143df380f6SThomas Monjalon subdir_done() 153df380f6SThomas Monjalonendif 163df380f6SThomas Monjalon 17da7a5c14SLiang Maheaders = files('rte_pmd_mlx5.h') 1896d7c62aSNelio Laranjeirosources = files( 1996d7c62aSNelio Laranjeiro 'mlx5.c', 2096d7c62aSNelio Laranjeiro 'mlx5_ethdev.c', 2196d7c62aSNelio Laranjeiro 'mlx5_flow.c', 22d740eb50SSuanming Mou 'mlx5_flow_meter.c', 233d694341SOri Kam 'mlx5_flow_dv.c', 2429efa63aSLi Zhang 'mlx5_flow_aso.c', 25db25cadcSViacheslav Ovsiienko 'mlx5_flow_flex.c', 2696d7c62aSNelio Laranjeiro 'mlx5_mac.c', 2796d7c62aSNelio Laranjeiro 'mlx5_rss.c', 28a96102c8SMichael Baum 'mlx5_rx.c', 2996d7c62aSNelio Laranjeiro 'mlx5_rxmode.c', 3096d7c62aSNelio Laranjeiro 'mlx5_rxq.c', 3196d7c62aSNelio Laranjeiro 'mlx5_rxtx.c', 3296d7c62aSNelio Laranjeiro 'mlx5_stats.c', 3396d7c62aSNelio Laranjeiro 'mlx5_trigger.c', 34a1e910f5SViacheslav Ovsiienko 'mlx5_trace.c', 3579a876e3SMichael Baum 'mlx5_tx.c', 364ac9ad07SMichael Baum 'mlx5_tx_empw.c', 374ac9ad07SMichael Baum 'mlx5_tx_mpw.c', 384ac9ad07SMichael Baum 'mlx5_tx_nompw.c', 394ac9ad07SMichael Baum 'mlx5_tx_txpp.c', 4096d7c62aSNelio Laranjeiro 'mlx5_txq.c', 41d133f4cdSViacheslav Ovsiienko 'mlx5_txpp.c', 4296d7c62aSNelio Laranjeiro 'mlx5_vlan.c', 4346287eacSBing Zhao 'mlx5_utils.c', 446deb19e1SMichael Baum 'mlx5_devx.c', 45ae67e3c4SGregory Etelson 'mlx5_nta_rss.c', 4696d7c62aSNelio Laranjeiro) 47ed7f6255SOphir Munk 48ed7f6255SOphir Munkif is_linux 49ed7f6255SOphir Munk sources += files( 50f5177bdcSMichael Baum 'mlx5_flow_geneve.c', 5122681deeSAlex Vesker 'mlx5_flow_hw.c', 524d368e1dSXiaoyu Min 'mlx5_hws_cnt.c', 5315896eafSGregory Etelson 'mlx5_flow_quota.c', 54ed7f6255SOphir Munk 'mlx5_flow_verbs.c', 55821a6a5cSBing Zhao 'mlx5_nta_split.c', 56ed7f6255SOphir Munk ) 571fd97344SThomas Monjalonendif 581fd97344SThomas Monjalon 59*da7f82b0SDariusz Sosnowskiif is_windows or (mlx5_config.get('HAVE_INFINIBAND_VERBS_H', false) and 60*da7f82b0SDariusz Sosnowski not mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false)) 61*da7f82b0SDariusz Sosnowski sources += files( 62*da7f82b0SDariusz Sosnowski 'mlx5_flow_hw_stubs.c', 63*da7f82b0SDariusz Sosnowski ) 64*da7f82b0SDariusz Sosnowskiendif 65*da7f82b0SDariusz Sosnowski 661fd97344SThomas Monjalonif is_linux and (dpdk_conf.has('RTE_ARCH_X86_64') 672e542da7SDavid Christensen or dpdk_conf.has('RTE_ARCH_ARM64') 682e542da7SDavid Christensen or dpdk_conf.has('RTE_ARCH_PPC_64')) 6996d7c62aSNelio Laranjeiro sources += files('mlx5_rxtx_vec.c') 701fd97344SThomas Monjalonelse 711fd97344SThomas Monjalon sources += files('mlx5_rxtx_vec_null.c') 72ed7f6255SOphir Munkendif 73ed7f6255SOphir Munk 7496d7c62aSNelio Laranjeirocflags_options = [ 7596d7c62aSNelio Laranjeiro '-std=c11', 7696d7c62aSNelio Laranjeiro '-Wno-strict-prototypes', 7796d7c62aSNelio Laranjeiro '-D_BSD_SOURCE', 7896d7c62aSNelio Laranjeiro '-D_DEFAULT_SOURCE', 794ad4b20aSBruce Richardson '-D_XOPEN_SOURCE=600', 8096d7c62aSNelio Laranjeiro] 8196d7c62aSNelio Laranjeiroforeach option:cflags_options 8296d7c62aSNelio Laranjeiro if cc.has_argument(option) 8396d7c62aSNelio Laranjeiro cflags += option 8496d7c62aSNelio Laranjeiro endif 8596d7c62aSNelio Laranjeiroendforeach 8696d7c62aSNelio Laranjeiroif get_option('buildtype').contains('debug') 870afacb04SAlexander Kozyrev cflags += [ '-pedantic', '-DPEDANTIC' ] 8896d7c62aSNelio Laranjeiroelse 890afacb04SAlexander Kozyrev cflags += [ '-UPEDANTIC' ] 9096d7c62aSNelio Laranjeiroendif 91f41a5092SSpike Du 92b6883b9cSViacheslav Ovsiienkorequire_iova_in_mbuf = false 93b6883b9cSViacheslav Ovsiienko 94f41a5092SSpike Dutestpmd_sources += files('mlx5_testpmd.c') 95f41a5092SSpike Du 96f44b09f9SOphir Munksubdir(exec_env) 9722681deeSAlex Vesker 9822681deeSAlex Veskersubdir('hws') 9970cc4e1fSDavid Marchand 10070cc4e1fSDavid Marchandannotate_locks = false 101