| 359 | } |
| 360 | |
| 361 | static int |
| 362 | ngbe_vf_set_mac_addr(struct rte_eth_dev *eth_dev, |
| 363 | uint32_t vf, uint32_t *msgbuf) |
| 364 | { |
| 365 | struct ngbe_hw *hw = ngbe_dev_hw(eth_dev); |
| 366 | struct ngbe_vf_info *vfinfo = *(NGBE_DEV_VFDATA(eth_dev)); |
| 367 | int rar_entry = hw->mac.num_rar_entries - (vf + 1); |
| 368 | uint8_t *new_mac = (uint8_t *)(&msgbuf[1]); |
| 369 | struct rte_ether_addr *ea = (struct rte_ether_addr *)new_mac; |
| 370 | |
| 371 | if (rte_is_valid_assigned_ether_addr(ea)) { |
| 372 | rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6); |
| 373 | return hw->mac.set_rar(hw, rar_entry, new_mac, vf, true); |
| 374 | } |
| 375 | return -1; |
| 376 | } |
| 377 | |
| 378 | static int |
| 379 | ngbe_vf_set_multicast(struct rte_eth_dev *eth_dev, |
no test coverage detected