diff options
Diffstat (limited to 'hw/rdma/rdma_utils.h')
-rw-r--r-- | hw/rdma/rdma_utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h index 062e2cd688..4490ea0b94 100644 --- a/hw/rdma/rdma_utils.h +++ b/hw/rdma/rdma_utils.h @@ -63,4 +63,13 @@ extern unsigned long pr_dbg_cnt; void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen); void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len); +static inline void addrconf_addr_eui48(uint8_t *eui, const char *addr) +{ + memcpy(eui, addr, 3); + eui[3] = 0xFF; + eui[4] = 0xFE; + memcpy(eui + 5, addr + 3, 3); + eui[0] ^= 2; +} + #endif |