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

Function pfe_eth_open_cdev

dpdk/drivers/net/pfe/pfe_ethdev.c:331–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331static int
332pfe_eth_open_cdev(struct pfe_eth_priv_s *priv)
333{
334 int pfe_cdev_fd;
335
336 if (priv == NULL)
337 return -1;
338
339 pfe_cdev_fd = open(PFE_CDEV_PATH, O_RDONLY);
340 if (pfe_cdev_fd < 0) {
341 PFE_PMD_WARN("Unable to open PFE device file (%s).",
342 PFE_CDEV_PATH);
343 PFE_PMD_WARN("Link status update will not be available.");
344 priv->link_fd = PFE_CDEV_INVALID_FD;
345 return -1;
346 }
347
348 priv->link_fd = pfe_cdev_fd;
349
350 return 0;
351}
352
353static void
354pfe_eth_close_cdev(struct pfe_eth_priv_s *priv)

Callers 1

pfe_eth_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected