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

Function ixgbe_vf_reset

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

Source from the content-addressed store, hash-verified

432}
433
434static int
435ixgbe_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf)
436{
437 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
438 struct ixgbe_vf_info *vfinfo =
439 *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
440 unsigned char *vf_mac = vfinfo[vf].vf_mac_addresses;
441 int rar_entry = hw->mac.num_rar_entries - (vf + 1);
442 uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
443
444 ixgbe_vf_reset_msg(dev, vf);
445
446 hw->mac.ops.set_rar(hw, rar_entry, vf_mac, vf, IXGBE_RAH_AV);
447
448 /* Disable multicast promiscuous at reset */
449 ixgbe_disable_vf_mc_promisc(dev, vf);
450
451 /* reply to reset with ack and vf mac address */
452 msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK;
453 rte_memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
454 /*
455 * Piggyback the multicast filter type so VF can compute the
456 * correct vectors
457 */
458 msgbuf[3] = hw->mac.mc_filter_type;
459 ixgbe_write_mbx(hw, msgbuf, IXGBE_VF_PERMADDR_MSG_LEN, vf);
460
461 return 0;
462}
463
464static int
465ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)

Callers 1

ixgbe_rcv_msg_from_vfFunction · 0.85

Calls 4

ixgbe_vf_reset_msgFunction · 0.85
ixgbe_write_mbxFunction · 0.85
rte_memcpyFunction · 0.50

Tested by

no test coverage detected