I am new in DPDK,so i get some doubt when read code. code as below in DPDK in kni_misc.c
...
switch (dev_info.device_id) {
**#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
#include <rte_pci_dev_ids.h>**
ret = igb_kni_probe(found_pci, &lad_dev);
break;
#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \
case (dev):
#include <rte_pci_dev_ids.h>
ret = ixgbe_kni_probe(found_pci, &lad_dev);
break;
default:
ret = -1;
break;
}
...
after switch , define a macro RTE_PCI_DEV_ID_DECL_IGB(how to use it ?) after case, include rte_pci_dev_ids.h, and i also find this macro in the h file.
**
A not complete Macro definition between switch and case, and the Macro which find in the h file included after case. i can not understand it.
**
Could anyone help me to understand this code.
The syntax of this code? Compilation process ? Working process ?
Thanks.