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

Function mlx5_regex_dev_remove

dpdk/drivers/regex/mlx5/mlx5_regex.c:135–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static int
136mlx5_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
156static const struct rte_pci_id mlx5_regex_pci_id_map[] = {
157 {

Callers

nothing calls this directly

Calls 5

mlx5_regex_get_nameFunction · 0.85
mlx5_devx_uar_releaseFunction · 0.85
rte_regexdev_unregisterFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected