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

Function rte_rawdev_configure

dpdk/lib/rawdev/rte_rawdev.c:94–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int
95rte_rawdev_configure(uint16_t dev_id, struct rte_rawdev_info *dev_conf,
96 size_t dev_private_size)
97{
98 struct rte_rawdev *dev;
99 int diag;
100
101 RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
102 if (dev_conf == NULL)
103 return -EINVAL;
104
105 dev = &rte_rawdevs[dev_id];
106
107 if (*dev->dev_ops->dev_configure == NULL)
108 return -ENOTSUP;
109
110 if (dev->started) {
111 RTE_RDEV_ERR(
112 "device %d must be stopped to allow configuration", dev_id);
113 return -EBUSY;
114 }
115
116 /* Configure the device */
117 diag = (*dev->dev_ops->dev_configure)(dev, dev_conf->dev_private,
118 dev_private_size);
119 if (diag != 0)
120 RTE_RDEV_ERR("dev%d dev_configure = %d", dev_id, diag);
121 else
122 dev->attached = 1;
123
124 return diag;
125}
126
127int
128rte_rawdev_queue_conf_get(uint16_t dev_id,

Callers 2

test_rawdev_configureFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_rawdev_configureFunction · 0.68