| 133 | } |
| 134 | |
| 135 | static int |
| 136 | mlx5_regex_dev_remove(struct mlx5_common_device *cdev) |
| 137 | { |
| 138 | char name[RTE_REGEXDEV_NAME_MAX_LEN]; |
| 139 | struct rte_regexdev *dev; |
| 140 | struct mlx5_regex_priv *priv = NULL; |
| 141 | |
| 142 | mlx5_regex_get_name(name, cdev->dev); |
| 143 | dev = rte_regexdev_get_device_by_name(name); |
| 144 | if (!dev) |
| 145 | return 0; |
| 146 | priv = dev->data->dev_private; |
| 147 | if (priv) { |
| 148 | mlx5_devx_uar_release(&priv->uar); |
| 149 | if (priv->regexdev) |
| 150 | rte_regexdev_unregister(priv->regexdev); |
| 151 | rte_free(priv); |
| 152 | } |
| 153 | return 0; |
| 154 | } |
| 155 | |
| 156 | static const struct rte_pci_id mlx5_regex_pci_id_map[] = { |
| 157 | { |
nothing calls this directly
no test coverage detected