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

Function ethdev_ip6_addr_add

dpdk/app/graph/ethdev.c:268–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268static int
269ethdev_ip6_addr_add(const char *name, struct ipv6_addr_config *config)
270{
271 struct ethdev *eth_hdl;
272 uint16_t portid = 0;
273 int rc, i;
274
275 rc = rte_eth_dev_get_port_by_name(name, &portid);
276 if (rc < 0)
277 return rc;
278
279 eth_hdl = ethdev_port_by_id(portid);
280
281 if (eth_hdl) {
282 for (i = 0; i < ETHDEV_IPV6_ADDR_LEN; i++) {
283 eth_hdl->ip6_addr.ip[i] = config->ip[i];
284 eth_hdl->ip6_addr.mask[i] = config->mask[i];
285 }
286 return 0;
287 }
288 rc = -EINVAL;
289 return rc;
290}
291
292static int
293ethdev_prom_mode_config(const char *name, bool enable)

Callers 1

cli_ip6_addrFunction · 0.85

Calls 2

ethdev_port_by_idFunction · 0.85

Tested by

no test coverage detected