MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ixgbe_vf_set_mac_addr

Function ixgbe_vf_set_mac_addr

dpdk/drivers/net/ixgbe/ixgbe_pf.c:464–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464static int
465ixgbe_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
481static int
482ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)

Callers 1

ixgbe_rcv_msg_from_vfFunction · 0.85

Calls 2

rte_memcpyFunction · 0.50

Tested by

no test coverage detected