| 462 | } |
| 463 | |
| 464 | static int |
| 465 | ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) |
| 466 | { |
| 467 | struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 468 | struct ixgbe_vf_info *vfinfo = |
| 469 | *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private)); |
| 470 | int rar_entry = hw->mac.num_rar_entries - (vf + 1); |
| 471 | uint8_t *new_mac = (uint8_t *)(&msgbuf[1]); |
| 472 | |
| 473 | if (rte_is_valid_assigned_ether_addr( |
| 474 | (struct rte_ether_addr *)new_mac)) { |
| 475 | rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6); |
| 476 | return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV); |
| 477 | } |
| 478 | return -1; |
| 479 | } |
| 480 | |
| 481 | static int |
| 482 | ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) |
no test coverage detected