| 323 | } |
| 324 | |
| 325 | int |
| 326 | ionic_dev_set_mac(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mac_addr) |
| 327 | { |
| 328 | struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev); |
| 329 | |
| 330 | IONIC_PRINT_CALL(); |
| 331 | |
| 332 | if (mac_addr == NULL) { |
| 333 | IONIC_PRINT(NOTICE, "New mac is null"); |
| 334 | return -1; |
| 335 | } |
| 336 | |
| 337 | if (!rte_is_zero_ether_addr((struct rte_ether_addr *)lif->mac_addr)) { |
| 338 | IONIC_PRINT(INFO, "Deleting mac addr %pM", |
| 339 | lif->mac_addr); |
| 340 | ionic_lif_addr_del(lif, lif->mac_addr); |
| 341 | memset(lif->mac_addr, 0, RTE_ETHER_ADDR_LEN); |
| 342 | } |
| 343 | |
| 344 | IONIC_PRINT(INFO, "Updating mac addr"); |
| 345 | |
| 346 | rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)lif->mac_addr); |
| 347 | |
| 348 | return ionic_lif_addr_add(lif, (const uint8_t *)mac_addr); |
| 349 | } |
| 350 | |
| 351 | static int |
| 352 | ionic_vlan_rx_add_vid(struct ionic_lif *lif, uint16_t vid) |
nothing calls this directly
no test coverage detected