简体   繁体   English

错误:使用dpdk 18.08取消引用不完整类型的指针

[英]error : dereferencing pointer to incomplete type using dpdk 18.08

I am getting the below compilation errors in memcmp. 我在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, 谢谢,

DPDK in version 18.08 doesn't have the rte_pci_device struct: https://doc.dpdk.org/api-18.08/rte__pci_8h.html 版本18.08中的DPDK没有rte_pci_device结构: https ://doc.dpdk.org/api-18.08/rte__pci_8h.html

You were probably using a wrong documentation version. 您可能使用了错误的文档版本。

我已经包含了头文件rte_pci.h和rte_dev.h我不确定是什么问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:取消引用不完整类型的指针 - error: dereferencing pointer to incomplete type C将指针解引用为不完整类型时出错 - C Error for dereferencing pointer to incomplete type png 1.6.25 的 plotutils 编译错误:取消引用指向不完整类型的指针 - plotutils compilation error with png 1.6.25: dereferencing pointer to incomplete type phpbrew 5.3.10 build error:取消引用指向不完整类型的指针 - phpbrew 5.3.10 build error: dereferencing pointer to incomplete type 如何在不取消引用的情况下将指向不完整类型的指针转​​换为对不完整类型的引用 - How to convert a pointer to an incomplete type to a reference to an incomplete type with no dereferencing 解除引用指针算术后输入错误? - type error after dereferencing pointer arithmetic? 共享指针解除引用错误 - Shared pointer dereferencing error 错误:不允许指向不完整类类型的指针 - error: pointer to incomplete class type is not allowed 假设的不完整类型错误:object 与指针 - Hypothetical incomplete type error: object versus pointer 我怎么知道是什么原因导致错误的不完整类型不完整:对指向不完整类型的指针进行算术运算 - How can I know what makes an incomplete type incomplete for error: arithmetic on a pointer to an incomplete type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM