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

Wittling, Mark (CCI-Atlanta) Mark.Wittling at cox.com
Mon Sep 28 14:10:32 UTC 2020


Thanks Numan!

From: Numan Siddique <numans at ovn.org>
Date: Tuesday, September 22, 2020 at 2:05 PM
To: "Wittling, Mark (CCI-Atlanta)" <Mark.Wittling at cox.com>
Cc: "ovs-discuss at openvswitch.org" <ovs-discuss at openvswitch.org>
Subject: [EXTERNAL] Re: [ovs-discuss] Is there an easy way to list OVS ports by type?



On Tue, Sep 22, 2020 at 11:30 PM Wittling, Mark (CCI-Atlanta) <Mark.Wittling at cox.com<mailto: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<mailto:discuss at openvswitch.org>
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss<https://urldefense.com/v3/__https:/mail.openvswitch.org/mailman/listinfo/ovs-discuss__;!!Hit2Ag!khAiJf31-Mm2gbQIOwHZM5_QWQOcLw732VYCMjpMV3VRLS3s_OCCny01u4pIIQ_sOg$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20200928/6ce3d896/attachment.html>


More information about the discuss mailing list