[ovs-dev] [PATCH 2/4] netdev-dpdk: Consistent naming for vhost functions
Daniele Di Proietto
diproiettod at ovn.org
Mon Jul 25 23:46:21 UTC 2016
Looks like every caller of NETDEV_DPDK_CLASS() passes NULL as INIT param.
Maybe we can remove that?
Acked-by: Daniele Di Proietto <diproiettod at vmware.com>
2016-07-15 7:26 GMT-07:00 Ciara Loftus <ciara.loftus at intel.com>:
> A mix of vhost_user_ and vhost_ is used when naming vhost functions. The
> 'user_' has been dropped for consistency. Also remove empty
> 'vhost_user_class_init' function.
>
> Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
> ---
> lib/netdev-dpdk.c | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index faf93e0..b4f82af 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -811,7 +811,7 @@ dpdk_dev_parse_name(const char dev_name[], const char
> prefix[],
> }
>
> static int
> -netdev_dpdk_vhost_user_construct(struct netdev *netdev)
> +netdev_dpdk_vhost_construct(struct netdev *netdev)
> {
> struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
> const char *name = netdev->name;
> @@ -2408,12 +2408,6 @@ dpdk_vhost_class_init(void)
> return 0;
> }
>
> -static int
> -dpdk_vhost_user_class_init(void)
> -{
> - return 0;
> -}
> -
> static void
> dpdk_common_init(void)
> {
> @@ -2809,7 +2803,7 @@ out:
> }
>
> static int
> -netdev_dpdk_vhost_user_reconfigure(struct netdev *netdev)
> +netdev_dpdk_vhost_reconfigure(struct netdev *netdev)
> {
> struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
> struct virtio_net *virtio_dev = netdev_dpdk_get_virtio(dev);
> @@ -3326,11 +3320,11 @@ static const struct netdev_class dpdk_ring_class =
> netdev_dpdk_reconfigure,
> netdev_dpdk_rxq_recv);
>
> -static const struct netdev_class OVS_UNUSED dpdk_vhost_user_class =
> +static const struct netdev_class OVS_UNUSED dpdk_vhost_class =
> NETDEV_DPDK_CLASS(
> "dpdkvhostuser",
> - dpdk_vhost_user_class_init,
> - netdev_dpdk_vhost_user_construct,
> + NULL,
> + netdev_dpdk_vhost_construct,
> netdev_dpdk_vhost_destruct,
> NULL,
> NULL,
> @@ -3339,7 +3333,7 @@ static const struct netdev_class OVS_UNUSED
> dpdk_vhost_user_class =
> netdev_dpdk_vhost_get_stats,
> NULL,
> NULL,
> - netdev_dpdk_vhost_user_reconfigure,
> + netdev_dpdk_vhost_reconfigure,
> netdev_dpdk_vhost_rxq_recv);
>
> void
> @@ -3348,7 +3342,7 @@ netdev_dpdk_register(void)
> dpdk_common_init();
> netdev_register_provider(&dpdk_class);
> netdev_register_provider(&dpdk_ring_class);
> - netdev_register_provider(&dpdk_vhost_user_class);
> + netdev_register_provider(&dpdk_vhost_class);
> }
>
> void
> --
> 2.4.3
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list