[ovs-discuss] Is there an easy way to list OVS ports by type?

Numan Siddique numans at ovn.org
Tue Sep 22 18:05:39 UTC 2020


On Tue, Sep 22, 2020 at 11:30 PM Wittling, Mark (CCI-Atlanta) <
Mark.Wittling at cox.com> wrote:

> I have some bash scripts that allow you to do “port plumbing” – like
> adding dpdk PCI ports to bridges, vhost ports (it asks you whether it is
> client or server mode and sets sockets up accordingly).
>
>
>
> I keep forgetting to set the flows up between the PCI ports and the vhost
> ports – and I wanted to make my script a little smarter such that it would
> list the DPDK PCI ports (on your DPDK bridge of choice) and ask you which
> one you wanted to use for your vhost ports.
>
>
>
> I do see that you can dump your ovs-vsctl output into json and get busy
> parsing, but aside of this, does anyone know of a quick/easy way of just
> simply listing interfaces by TYPE?
>
>
>
> i.e. list all interfaces of type dpdk?
>
>
>
> Such that I can grep the name out, and / or the PCI address and present
> them to the user in my script?
>

I think you can do something like

ovs-vsctl find interface type=<TYPE>

This will list all interfaces of type <TYPE>.

Thanks
Numan


>
>
> If I have to get into the json business, I guess I will, but was looking
> for something a bit more simple than that.
>
>
>
> Mark
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20200922/d5a9b987/attachment.html>


More information about the discuss mailing list