| 792 | } |
| 793 | |
| 794 | static int |
| 795 | ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) |
| 796 | { |
| 797 | struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 798 | struct ixgbe_vf_info *vf_info = |
| 799 | *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private)); |
| 800 | uint8_t *new_mac = (uint8_t *)(&msgbuf[1]); |
| 801 | int index = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> |
| 802 | IXGBE_VT_MSGINFO_SHIFT; |
| 803 | |
| 804 | if (index) { |
| 805 | if (!rte_is_valid_assigned_ether_addr( |
| 806 | (struct rte_ether_addr *)new_mac)) { |
| 807 | PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf); |
| 808 | return -1; |
| 809 | } |
| 810 | |
| 811 | vf_info[vf].mac_count++; |
| 812 | |
| 813 | hw->mac.ops.set_rar(hw, vf_info[vf].mac_count, |
| 814 | new_mac, vf, IXGBE_RAH_AV); |
| 815 | } else { |
| 816 | if (vf_info[vf].mac_count) { |
| 817 | hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count); |
| 818 | vf_info[vf].mac_count = 0; |
| 819 | } |
| 820 | } |
| 821 | return 0; |
| 822 | } |
| 823 | |
| 824 | static int |
| 825 | ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) |
no test coverage detected