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

Function mlx4_dev_configure

dpdk/drivers/net/mlx4/mlx4.c:246–276  ·  view source on GitHub ↗

* DPDK callback for Ethernet device configuration. * * @param dev * Pointer to Ethernet device structure. * * @return * 0 on success, negative errno value otherwise and rte_errno is set. */

Source from the content-addressed store, hash-verified

244 * 0 on success, negative errno value otherwise and rte_errno is set.
245 */
246static int
247mlx4_dev_configure(struct rte_eth_dev *dev)
248{
249 struct mlx4_priv *priv = dev->data->dev_private;
250 struct rte_flow_error error;
251 int ret;
252
253 /* Prepare internal flow rules. */
254 ret = mlx4_flow_sync(priv, &error);
255 if (ret) {
256 ERROR("cannot set up internal flow rules (code %d, \"%s\"),"
257 " flow error type %d, cause %p, message: %s",
258 -ret, strerror(-ret), error.type, error.cause,
259 error.message ? error.message : "(unspecified)");
260 goto exit;
261 }
262 ret = mlx4_intr_install(priv);
263 if (ret) {
264 ERROR("%p: interrupt handler installation failed",
265 (void *)dev);
266 goto exit;
267 }
268 ret = mlx4_proc_priv_init(dev);
269 if (ret) {
270 ERROR("%p: process private data allocation failed",
271 (void *)dev);
272 goto exit;
273 }
274exit:
275 return ret;
276}
277
278/**
279 * DPDK callback to start the device.

Callers

nothing calls this directly

Calls 3

mlx4_flow_syncFunction · 0.85
mlx4_intr_installFunction · 0.85
mlx4_proc_priv_initFunction · 0.85

Tested by

no test coverage detected