| 266 | } |
| 267 | |
| 268 | static int |
| 269 | ethdev_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 | |
| 292 | static int |
| 293 | ethdev_prom_mode_config(const char *name, bool enable) |
no test coverage detected