[ovs-dev] [PATCH 5/5] ovs-ofctl: Use port description stat to look up ports.

Ben Pfaff blp at nicira.com
Tue May 8 00:08:17 UTC 2012


On Mon, May 07, 2012 at 11:56:52AM -0700, Justin Pettit wrote:
> Not all ports may fit in a Features Reply, so use the new port
> description stat message instead for looking up ports.
> 
> Signed-off-by: Justin Pettit <jpettit at nicira.com>

Unless I'm misreading this (which is possible) it only works with a
switch that supports OFPST_PORT_DESC.  I don't think we should rely on
that, since no deployed OVS or other OpenFlow 1.[012] switch
implements it.  I think we should use OFPST_PORT_DESC as a fallback in
the case where the switch returns the maximum number of ports.

As long as I'm looking at it, though, you can drop the use of n_ports
in fetch_ofputil_phy_port().  ofputil_pull_phy_port() will return EOF
when it's run out of ports to iterate. 



More information about the dev mailing list