| 860 | } |
| 861 | |
| 862 | void |
| 863 | idpf_set_tx_function(struct rte_eth_dev *dev) |
| 864 | { |
| 865 | struct idpf_vport *vport = dev->data->dev_private; |
| 866 | #ifdef RTE_ARCH_X86 |
| 867 | #ifdef CC_AVX512_SUPPORT |
| 868 | struct idpf_tx_queue *txq; |
| 869 | int i; |
| 870 | #endif /* CC_AVX512_SUPPORT */ |
| 871 | |
| 872 | if (idpf_tx_vec_dev_check_default(dev) == IDPF_VECTOR_PATH && |
| 873 | rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) { |
| 874 | vport->tx_vec_allowed = true; |
| 875 | if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512) |
| 876 | #ifdef CC_AVX512_SUPPORT |
| 877 | { |
| 878 | if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 && |
| 879 | rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1) |
| 880 | vport->tx_use_avx512 = true; |
| 881 | if (vport->tx_use_avx512) { |
| 882 | for (i = 0; i < dev->data->nb_tx_queues; i++) { |
| 883 | txq = dev->data->tx_queues[i]; |
| 884 | idpf_qc_tx_vec_avx512_setup(txq); |
| 885 | } |
| 886 | } |
| 887 | } |
| 888 | #else |
| 889 | PMD_DRV_LOG(NOTICE, |
| 890 | "AVX512 is not supported in build env"); |
| 891 | #endif /* CC_AVX512_SUPPORT */ |
| 892 | } else { |
| 893 | vport->tx_vec_allowed = false; |
| 894 | } |
| 895 | #endif /* RTE_ARCH_X86 */ |
| 896 | |
| 897 | #ifdef RTE_ARCH_X86 |
| 898 | if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) { |
| 899 | if (vport->tx_vec_allowed) { |
| 900 | #ifdef CC_AVX512_SUPPORT |
| 901 | if (vport->tx_use_avx512) { |
| 902 | PMD_DRV_LOG(NOTICE, |
| 903 | "Using Split AVX512 Vector Tx (port %d).", |
| 904 | dev->data->port_id); |
| 905 | dev->tx_pkt_burst = idpf_dp_splitq_xmit_pkts_avx512; |
| 906 | dev->tx_pkt_prepare = idpf_dp_prep_pkts; |
| 907 | return; |
| 908 | } |
| 909 | #endif /* CC_AVX512_SUPPORT */ |
| 910 | } |
| 911 | PMD_DRV_LOG(NOTICE, |
| 912 | "Using Split Scalar Tx (port %d).", |
| 913 | dev->data->port_id); |
| 914 | dev->tx_pkt_burst = idpf_dp_splitq_xmit_pkts; |
| 915 | dev->tx_pkt_prepare = idpf_dp_prep_pkts; |
| 916 | } else { |
| 917 | if (vport->tx_vec_allowed) { |
| 918 | #ifdef CC_AVX512_SUPPORT |
| 919 | if (vport->tx_use_avx512) { |
no test coverage detected