MLX5_ASSERT(priv);
MLX5_ASSERT(priv->if_index);
- ifindex = priv->if_index;
+ ifindex = priv->bond_ifindex > 0 ? priv->bond_ifindex : priv->if_index;
if (!ifindex)
rte_errno = ENXIO;
return ifindex;
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
- struct rte_eth_hairpin_cap *cap)
+mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
{
struct mlx5_priv *priv = dev->data->dev_private;
+ struct mlx5_dev_config *config = &priv->config;
- if (priv->sh->devx == 0) {
+ if (!priv->sh->devx || !config->dest_tir || !config->dv_flow_en) {
rte_errno = ENOTSUP;
return -rte_errno;
}