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

Function avp_dev_migration_pending

dpdk/drivers/net/avp/avp_ethdev.c:792–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792static int
793avp_dev_migration_pending(struct rte_eth_dev *eth_dev)
794{
795 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
796 void *registers = pci_dev->mem_resource[RTE_AVP_PCI_MMIO_BAR].addr;
797 uint32_t value;
798
799 if (registers == NULL)
800 return 0;
801
802 value = AVP_READ32(RTE_PTR_ADD(registers,
803 RTE_AVP_MIGRATION_STATUS_OFFSET));
804 if (value == RTE_AVP_MIGRATION_DETACHED) {
805 /* migration is in progress; ack it if we have not already */
806 AVP_WRITE32(value,
807 RTE_PTR_ADD(registers,
808 RTE_AVP_MIGRATION_ACK_OFFSET));
809 return 1;
810 }
811 return 0;
812}
813
814/*
815 * create a AVP device using the supplied device info by first translating it

Callers 1

eth_avp_dev_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected