[ovs-dev] [Single DP 07/15] tests: Define new ADD_OF_PORTS macro for ofproto tests.
blp at nicira.com
Fri Oct 19 18:05:36 UTC 2012
On Thu, Oct 18, 2012 at 12:51:52PM -0700, Justin Pettit wrote:
> A future commit will break the relation between OpenFlow and datapath
> port numbers. The new ADD_OF_PORTS macro adds an interface to a bridge
> and configures it such that both the OpenFlow and datapath port numbers
> are the same. This is important in tests that deal with both OpenFlow
> and datapath port numbers (e.g., ones that use ofproto/trace).
> Signed-off-by: Justin Pettit <jpettit at nicira.com>
This looks good, but the following definition of ADD_OF_PORTS should
be faster because it will run ovs-vsctl only once regardless of the
number of ports to add:
[ovs-vsctl m4_foreach([of_port], m4_cdr($@),
-- add-port $1 pof_port -- set Interface pof_port type=dummy ofport_request=of_port])])
More information about the dev