[dpdk-dev] [PATCH 07/13] pci: replace probe and remove handlers with rte_driver

Ferruh Yigit ferruh.yigit at intel.com
Thu Dec 8 18:50:30 CET 2016


Hi Shreyansh,

On 12/4/2016 10:11 AM, Shreyansh Jain wrote:
> rte_pci_driver probe/remove callback are replaced with the rte_driver
> based probe/remove. This patch changes all the PCI drivers which reference
> rte_pci_driver->probe/remove.
> 
> rte_pci_driver continues to have probe/remove callback which would be used
> once eth_driver is removed in later patches.
> 
> Only changes to PCI are done. VDEV changes require a different
> model because of arguments being passed to vdev->probe/remove.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
> ---
>  drivers/net/bnx2x/bnx2x_ethdev.c        | 12 ++++++++----
>  drivers/net/bnxt/bnxt_ethdev.c          |  6 ++++--
>  drivers/net/cxgbe/cxgbe_ethdev.c        |  6 ++++--
>  drivers/net/e1000/em_ethdev.c           |  6 ++++--
>  drivers/net/e1000/igb_ethdev.c          | 12 ++++++++----
>  drivers/net/ena/ena_ethdev.c            |  6 ++++--
>  drivers/net/enic/enic_ethdev.c          |  6 ++++--
>  drivers/net/fm10k/fm10k_ethdev.c        |  6 ++++--
>  drivers/net/i40e/i40e_ethdev.c          |  6 ++++--
>  drivers/net/i40e/i40e_ethdev_vf.c       |  6 ++++--
>  drivers/net/ixgbe/ixgbe_ethdev.c        | 12 ++++++++----
>  drivers/net/mlx4/mlx4.c                 |  6 ++++--

Generating compile error:
.../net/mlx4/mlx4.c:5913:13: error: subobject initialization overrides
initialization of other fields within its enclosing subobject
[-Werror,-Winitializer-overrides]
                .driver = {
                          ^
.../net/mlx4/mlx4.c:5909:13: note: previous initialization is here
                .driver = {
                          ^


>  drivers/net/mlx5/mlx5.c                 |  4 +++-

.../net/mlx5/mlx5.c:736:13: error: subobject initialization overrides
initialization of other fields within its enclosing subobject
[-Werror,-Winitializer-overrides]
                .driver = {
                          ^
.../net/mlx5/mlx5.c:732:13: note: previous initialization is here
                .driver = {
                          ^


>  drivers/net/nfp/nfp_net.c               |  6 ++++--
>  drivers/net/qede/qede_ethdev.c          | 16 ++++++++++------
>  drivers/net/szedata2/rte_eth_szedata2.c |  6 ++++--
>  drivers/net/virtio/virtio_ethdev.c      |  4 ++--
>  drivers/net/vmxnet3/vmxnet3_ethdev.c    |  6 ++++--

Following drivers seems missing:
drivers/net/thunderx/nicvf_ethdev.c

Also new added drivers/net/sfc/sfc_ethdev.c, but since sfc is not merged
to main branch yet, perhaps fix may wait your patches to be applied first.

>  lib/librte_eal/common/eal_common_pci.c  | 10 ++++++++--
>  lib/librte_eal/common/include/rte_dev.h | 12 ++++++++++++
>  lib/librte_ether/rte_ethdev.c           | 16 ++++++++++++----
>  lib/librte_ether/rte_ethdev.h           |  6 +++---
>  22 files changed, 122 insertions(+), 54 deletions(-)
> 

Also getting following with mlx5:

In file included from
.../x86_64-native-linuxapp-gcc/include/rte_mbuf.h:57:0,
                 from .../x86_64-native-linuxapp-gcc/include/rte_ether.h:52,
                 from .../drivers/net/mlx5/mlx5_trigger.c:38:
/usr/include/infiniband/verbs.h: In function ‘verbs_get_device’:
.../x86_64-native-linuxapp-gcc/include/rte_common.h:350:40: error:
initialization discards ‘const’ qualifier from pointer target type
[-Werror=discarded-qualifiers]
    typeof(((type *)0)->member) *_ptr = (ptr); \


<...>


More information about the dev mailing list