1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2024 NVIDIA Corporation & Affiliates 3 */ 4 5 /** 6 * @file 7 * 8 * mlx5_flow_hw.c source file is included in the build only on Linux. 9 * Functions defined there are compiled if and only if available rdma-core supports DV. 10 * 11 * This file contains stubs for any functions exported from that file. 12 */ 13 14 #include "mlx5_flow.h" 15 16 /* 17 * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: 18 * - PMD is compiled on Windows or 19 * - available rdma-core does not support HWS. 20 */ 21 int 22 mlx5_flow_hw_ctrl_flow_dmac(struct rte_eth_dev *dev __rte_unused, 23 const struct rte_ether_addr *addr __rte_unused) 24 { 25 rte_errno = ENOTSUP; 26 return -rte_errno; 27 } 28 29 /* 30 * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: 31 * - PMD is compiled on Windows or 32 * - available rdma-core does not support HWS. 33 */ 34 int 35 mlx5_flow_hw_ctrl_flow_dmac_destroy(struct rte_eth_dev *dev __rte_unused, 36 const struct rte_ether_addr *addr __rte_unused) 37 { 38 rte_errno = ENOTSUP; 39 return -rte_errno; 40 } 41 42 /* 43 * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: 44 * - PMD is compiled on Windows or 45 * - available rdma-core does not support HWS. 46 */ 47 int 48 mlx5_flow_hw_ctrl_flow_dmac_vlan(struct rte_eth_dev *dev __rte_unused, 49 const struct rte_ether_addr *addr __rte_unused, 50 const uint16_t vlan __rte_unused) 51 { 52 rte_errno = ENOTSUP; 53 return -rte_errno; 54 } 55 56 /* 57 * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: 58 * - PMD is compiled on Windows or 59 * - available rdma-core does not support HWS. 60 */ 61 int 62 mlx5_flow_hw_ctrl_flow_dmac_vlan_destroy(struct rte_eth_dev *dev __rte_unused, 63 const struct rte_ether_addr *addr __rte_unused, 64 const uint16_t vlan __rte_unused) 65 { 66 rte_errno = ENOTSUP; 67 return -rte_errno; 68 } 69 70 /* 71 * This is a stub for the real implementation of this function in mlx5_flow_hw.c in case: 72 * - PMD is compiled on Windows or 73 * - available rdma-core does not support HWS. 74 */ 75 bool 76 mlx5_hw_ctx_validate(__rte_unused const struct rte_eth_dev *dev, 77 __rte_unused struct rte_flow_error *error) 78 { 79 return false; 80 } 81