> I am going to implement the support for my non-pci DPDK vdev ethernet
> device in openvswitch. A head start will be really appreciated.
>
> So far what I have understood is that I will need to add a new "struct
> netdev_class" for my device in lib/netdev-dpdk.c
>
> just like
>
> static const struct netdev_class dpdk_class =
>     NETDEV_DPDK_CLASS(
>         "dpdk",
>         netdev_dpdk_construct,
>         netdev_dpdk_destruct,
>         netdev_dpdk_set_config,
>         netdev_dpdk_set_tx_multiq,
>         netdev_dpdk_eth_send,
>         netdev_dpdk_get_carrier,
>         netdev_dpdk_get_stats,
>         netdev_dpdk_get_features,
>         netdev_dpdk_get_status,
>         netdev_dpdk_reconfigure,
>         netdev_dpdk_rxq_recv);
>
> will this be sufficient or I will need to change something else also ?
>
> *[Sugesh] Yes, this will take care of adding a new netdev type(in this
> case DPDK vdev). Also the config/control plane has to be changed to manage
> new type.*
>
> *I am really wondering a new netdev is really needed for vdev.*
>
> *vdev is just another type of DPDK eth port. It should be handled
> implicitly either in DPDK or OVS-DPDK init code. This is kind of similar to
> how different vendor NICs are supported under one DPDK type interface. *
>
> *  Have you considered the option to change/append the existing OVS-DPDK
> init implementation to support vdev?*
>
> *Adding a new netdev will make the code less maintainable and I would
> consider it as last option.*
>
> [Devendra] Yes, as you said new netdev is really not needed. I just need
to make sure that my vdev is initialized properly, ovs-DPDK will
automatically designate it as dpdk0 port.

I just used dpdk-extra to initialize my device and then added it as dpdk0
port to bridge.

# ovs-vsctl --no-wait set Open_vSwitch .
other_config:dpdk-extra=--vdev=my_eth_dev

# ovs-vsctl --no-wait add-br br0 -- set bridge br0 datapath_type=netdev

# ovs-vsctl --no-wait add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk

Thanks and Regards,
Devendra
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to