MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_devx_drop_action_create

Function mlx5_devx_drop_action_create

dpdk/drivers/net/mlx5/mlx5_devx.c:1166–1195  ·  view source on GitHub ↗

* Create a DevX drop action for Rx Hash queue. * * @param dev * Pointer to Ethernet device. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

1164 * 0 on success, a negative errno value otherwise and rte_errno is set.
1165 */
1166static int
1167mlx5_devx_drop_action_create(struct rte_eth_dev *dev)
1168{
1169 struct mlx5_priv *priv = dev->data->dev_private;
1170 struct mlx5_hrxq *hrxq = priv->drop_queue.hrxq;
1171 int ret;
1172
1173 ret = mlx5_rxq_devx_obj_drop_create(dev);
1174 if (ret != 0) {
1175 DRV_LOG(ERR, "Cannot create drop RX queue");
1176 return ret;
1177 }
1178 if (priv->sh->config.dv_flow_en == 2)
1179 return 0;
1180 /* hrxq->ind_table queues are NULL, drop RX queue ID will be used */
1181 ret = mlx5_devx_ind_table_new(dev, 0, hrxq->ind_table);
1182 if (ret != 0) {
1183 DRV_LOG(ERR, "Cannot create drop hash RX queue indirection table");
1184 goto error;
1185 }
1186 ret = mlx5_devx_hrxq_new(dev, hrxq, /* tunnel */ false);
1187 if (ret != 0) {
1188 DRV_LOG(ERR, "Cannot create drop hash RX queue");
1189 goto error;
1190 }
1191 return 0;
1192error:
1193 mlx5_devx_drop_action_destroy(dev);
1194 return ret;
1195}
1196
1197/**
1198 * Select TXQ TIS number.

Callers

nothing calls this directly

Calls 4

mlx5_devx_ind_table_newFunction · 0.85
mlx5_devx_hrxq_newFunction · 0.85

Tested by

no test coverage detected