* Modify an Rx Hash queue configuration. * * @param dev * Pointer to Ethernet device. * @param hrxq * Hash Rx queue to modify. * @param rss_key * RSS key for the Rx hash queue. * @param hash_fields * Verbs protocol hash field to make the RSS on. * @param[in] ind_tbl * Indirection table for TIR. * * @return * 0 on success, a negative errno value otherwise and rte_errno is
| 977 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 978 | */ |
| 979 | static int |
| 980 | mlx5_devx_hrxq_modify(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq, |
| 981 | const uint8_t *rss_key, |
| 982 | uint64_t hash_fields, |
| 983 | bool symmetric_hash_function, |
| 984 | const struct mlx5_ind_table_obj *ind_tbl) |
| 985 | { |
| 986 | struct mlx5_devx_modify_tir_attr modify_tir = {0}; |
| 987 | |
| 988 | /* |
| 989 | * untested for modification fields: |
| 990 | * - rx_hash_fn set hard-coded in hrxq_new(), |
| 991 | * - lro_xxx not set after rxq setup |
| 992 | */ |
| 993 | if (ind_tbl != hrxq->ind_table) |
| 994 | modify_tir.modify_bitmask |= |
| 995 | MLX5_MODIFY_TIR_IN_MODIFY_BITMASK_INDIRECT_TABLE; |
| 996 | if (hash_fields != hrxq->hash_fields || |
| 997 | symmetric_hash_function != hrxq->symmetric_hash_function || |
| 998 | memcmp(hrxq->rss_key, rss_key, MLX5_RSS_HASH_KEY_LEN)) |
| 999 | modify_tir.modify_bitmask |= |
| 1000 | MLX5_MODIFY_TIR_IN_MODIFY_BITMASK_HASH; |
| 1001 | mlx5_devx_tir_attr_set(dev, rss_key, hash_fields, ind_tbl, |
| 1002 | 0, /* N/A - tunnel modification unsupported */ |
| 1003 | symmetric_hash_function, |
| 1004 | &modify_tir.tir); |
| 1005 | modify_tir.tirn = hrxq->tir->id; |
| 1006 | if (mlx5_devx_cmd_modify_tir(hrxq->tir, &modify_tir)) { |
| 1007 | DRV_LOG(ERR, "port %u cannot modify DevX TIR", |
| 1008 | dev->data->port_id); |
| 1009 | rte_errno = errno; |
| 1010 | return -rte_errno; |
| 1011 | } |
| 1012 | return 0; |
| 1013 | } |
| 1014 | |
| 1015 | /** |
| 1016 | * Create a DevX drop Rx queue. |
nothing calls this directly
no test coverage detected