I am getting the below compilation errors in memcmp. Source code is pasted below the error:
: error: dereferencing pointer to incomplete type
if((memcmp((const void *)&pci_dev->addr,(const void *)&Input[iLoop].guestpci,sizeof(pci_dev->addr))==0) && (memcmp((const void *)&gBtgData.nic_port[port].mac_addr,(const void *)&Input[iLoop].mac_addr,sizeof(gBtgData.nic_port[port].mac_addr))==0))
^
: error: dereferencing pointer to incomplete type
if((memcmp((const void *)&pci_dev->addr,(const void *)&Input[iLoop].guestpci,sizeof(pci_dev->addr))==0) && (memcmp((const void *)&gBtgData.nic_port[port].mac_addr,(const void *)&Input[iLoop].mac_addr,sizeof(gBtgData.nic_port[port].mac_addr))==0))
^
Code:
struct rte_eth_dev_info dev_info;
const struct rte_pci_device *pci_dev;
rte_eth_dev_info_get(port, &dev_info);
pci_dev = RTE_DEV_TO_PCI(dev_info.device);
memcmp((const void *)&pci_dev->addr,(const void *)&Input[iLoop].guestpci,sizeof(pcii
_dev->addr))==0) && (rte_memcmp((const void *)&gBtgData.nic_port[port].mac_addr,(const void *)&Input[iLoop]..
mac_addr,sizeof(gBtgData.nic_port[port].mac_addr))==0)
Could you please let me know how to fix this error.
Thanks,
I have included the headers , rte_pci.h and rte_dev.h.I am not sure whats the issue.