X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmpipe%2Fmpipe_tilegx.c;h=7bbd168bcb419b0cadd66f9c6e7907b862d1113b;hb=73db5badb042c2ba668cdc096168932c5d5e692d;hp=792ab563d9e5c653a2aae59214586a76d711aea7;hpb=d857736110e507eb3864698bbe271908e2875b95;p=dpdk.git diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 792ab563d9..7bbd168bcb 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -87,7 +87,6 @@ struct mpipe_local { static __thread struct mpipe_local mpipe_local; static struct mpipe_context mpipe_contexts[GXIO_MPIPE_INSTANCE_MAX]; static int mpipe_instances; -static const char *drivername = "MPIPE PMD"; /* Per queue statistics. */ struct mpipe_queue_stats { @@ -1549,7 +1548,7 @@ mpipe_link_mac(const char *ifname, uint8_t *mac) } static int -rte_pmd_mpipe_probe(const char *ifname, +rte_pmd_mpipe_probe_common(struct rte_vdev_driver *drv, const char *ifname, const char *params __rte_unused) { gxio_mpipe_context_t *context; @@ -1605,7 +1604,7 @@ rte_pmd_mpipe_probe(const char *ifname, eth_dev->data->kdrv = RTE_KDRV_NONE; eth_dev->driver = NULL; - eth_dev->data->drv_name = drivername; + eth_dev->data->drv_name = drv->driver.name; eth_dev->data->numa_node = instance; eth_dev->dev_ops = &mpipe_dev_ops; @@ -1622,12 +1621,24 @@ rte_pmd_mpipe_probe(const char *ifname, return 0; } +static int +rte_pmd_mpipe_xgbe_probe(const char *ifname, const char *params __rte_unused) +{ + return rte_pmd_mpipe_probe_common(&pmd_mpipe_xgbe_drv, ifname, params); +} + +static int +rte_pmd_mpipe_gbe_probe(const char *ifname, const char *params __rte_unused) +{ + return rte_pmd_mpipe_probe_common(&pmd_mpipe_gbe_drv, ifname, params); +} + static struct rte_vdev_driver pmd_mpipe_xgbe_drv = { - .probe = rte_pmd_mpipe_probe, + .probe = rte_pmd_mpipe_xgbe_probe, }; static struct rte_vdev_driver pmd_mpipe_gbe_drv = { - .probe = rte_pmd_mpipe_probe, + .probe = rte_pmd_mpipe_gbe_probe, }; RTE_PMD_REGISTER_VDEV(net_mpipe_xgbe, pmd_mpipe_xgbe_drv);