[dpdk-dev] [PATCH 1/5] eal: make enum rte_kernel_driver non-PCI specific

Shreyansh Jain shreyansh.jain at nxp.com
Mon Sep 12 07:10:26 CEST 2016


Hi,

On Sunday 11 September 2016 05:45 PM, Yuanhan Liu wrote:
> On Thu, Sep 01, 2016 at 10:11:51AM +0530, Shreyansh Jain wrote:
>> From: Jan Viktorin <viktorin at rehivetech.com>
>>
>> From: Jan Viktorin <viktorin at rehivetech.com>
>>
>> Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
>> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
>
> Hi,
>
> FYI, my testrobot caught some errors when this patch is applied.
>
>         --yliu
>
> ---
> i686-native-linuxapp-gcc: config-all-yes
> ========================================
> In file included from lib/librte_eal/linuxapp/eal/eal_pci.c:38:0:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> In file included from lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c:52:0:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> In file included from lib/librte_eal/common/eal_private.h:38:0,
>                  from lib/librte_eal/linuxapp/eal/eal_thread.c:55:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> make[7]: *** [eal_thread.o] Error 1
> make[7]: *** Waiting for unfinished jobs....
> In file included from lib/librte_eal/linuxapp/eal/eal.c:72:0:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> In file included from lib/librte_eal/common/eal_private.h:38:0,
>                  from lib/librte_eal/linuxapp/eal/eal_memory.c:97:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> In file included from lib/librte_eal/common/eal_private.h:38:0,
>                  from lib/librte_eal/linuxapp/eal/eal_log.c:50:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> make[7]: *** [eal_log.o] Error 1
> make[7]: *** [eal_vfio_mp_sync.o] Error 1
> In file included from lib/librte_eal/common/eal_private.h:38:0,
>                  from lib/librte_eal/linuxapp/eal/eal_vfio.c:45:
> i686-native-linuxapp-gcc/include/rte_pci.h:157:25: error: field 'kdrv' has incomplete type
>   enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
>                          ^
> make[7]: *** [eal.o] Error 1
> make[7]: *** [eal_memory.o] Error 1
> make[7]: *** [eal_vfio.o] Error 1
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_map_device':
> lib/librte_eal/linuxapp/eal/eal_pci.c:133:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:133:7: note: each undeclared identifier is reported only once for each function it appears in
> lib/librte_eal/linuxapp/eal/eal_pci.c:139:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:140:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_unmap_device':
> lib/librte_eal/linuxapp/eal/eal_pci.c:160:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:163:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:164:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'pci_scan_one':
> lib/librte_eal/linuxapp/eal/eal_pci.c:381:16: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>     dev->kdrv = RTE_KDRV_VFIO;
>                 ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:383:16: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>     dev->kdrv = RTE_KDRV_IGB_UIO;
>                 ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:385:16: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>     dev->kdrv = RTE_KDRV_UIO_GENERIC;
>                 ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:387:16: error: 'RTE_KDRV_UNKNOWN' undeclared (first use in this function)
>     dev->kdrv = RTE_KDRV_UNKNOWN;
>                 ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:389:15: error: 'RTE_KDRV_NONE' undeclared (first use in this function)
>    dev->kdrv = RTE_KDRV_NONE;
>                ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_ioport_map':
> lib/librte_eal/linuxapp/eal/eal_pci.c:626:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:631:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:634:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:641:7: error: 'RTE_KDRV_NONE' undeclared (first use in this function)
>   case RTE_KDRV_NONE:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_ioport_read':
> lib/librte_eal/linuxapp/eal/eal_pci.c:662:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:666:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:669:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:672:7: error: 'RTE_KDRV_NONE' undeclared (first use in this function)
>   case RTE_KDRV_NONE:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_ioport_write':
> lib/librte_eal/linuxapp/eal/eal_pci.c:688:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:692:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:695:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:698:7: error: 'RTE_KDRV_NONE' undeclared (first use in this function)
>   case RTE_KDRV_NONE:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c: In function 'rte_eal_pci_ioport_unmap':
> lib/librte_eal/linuxapp/eal/eal_pci.c:715:7: error: 'RTE_KDRV_VFIO' undeclared (first use in this function)
>   case RTE_KDRV_VFIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:720:7: error: 'RTE_KDRV_IGB_UIO' undeclared (first use in this function)
>   case RTE_KDRV_IGB_UIO:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:723:7: error: 'RTE_KDRV_UIO_GENERIC' undeclared (first use in this function)
>   case RTE_KDRV_UIO_GENERIC:
>        ^
> lib/librte_eal/linuxapp/eal/eal_pci.c:730:7: error: 'RTE_KDRV_NONE' undeclared (first use in this function)
>   case RTE_KDRV_NONE:
>        ^
> make[7]: *** [eal_pci.o] Error 1
> make[6]: *** [eal] Error 2
> make[5]: *** [linuxapp] Error 2
> make[4]: *** [librte_eal] Error 2
> make[3]: *** [lib] Error 2
> make[2]: *** [all] Error 2
> make[1]: *** [pre_install] Error 2
> make: *** [install] Error 2
> error: build failed
>

Thanks for highlighting.
That is my mistake.
While sending the patch my intention was to highlight that these are 
more as a RFC than direct patches. I forgot to add that and didn't 
notice it after posting either.

Problem is that this patch moves 'enum rte_kernel_driver' to rte_dev.h 
from rte_pci.h. All the above errors are reported by files which still 
include rte_dev.h.

I was hoping that if these patches look fine to all, I will update all 
the headers and send again.

--
Shreyansh


More information about the dev mailing list