Nice trick, but does that mean we need n_links-1 rules for each source on a switch running multipath routing? for example suppose a switch is connected to four machines: M0 on port 0,M1 on port 1,M2,M3
I define this rules (loose syntax)
ovs-ofctl add-flow br0 action=multipath..,resubmit on table 1

Then for each source I need to add n_links-1 rules
ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=0,nw_src=M0,action=output=1
ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=1,nw_src=M0,action=output=2
ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=2,nw_src=M0,action=output=3


ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=0,nw_src=M1,action=output=0
ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=1,nw_src=M1,action=output=2
ovs-ofctl add-flow br0 table=1,NXM_NX_REG0=2,nw_src=M1,action=output=3
and so on?

Is this correct?

On 3/19/2012 3:31 PM, Ben Pfaff wrote:
A register, such as NXM_NX_REG0[], is one reasonable choice.

You can use "resubmit" along with a special OpenFlow table to map this
value to a destination.

On Mon, Mar 19, 2012 at 03:29:21PM -0700, Masoud Moshref Javadi wrote:
Hum, thanks I have not read that in detail.
OK, still I have question: We store the output of multipath
algorithm in a field defined there, but which field should we use?
how the value of this field relates to the routing to the destination?

On 3/19/2012 3:11 PM, Ben Pfaff wrote:
Did you read nicira-ext.h?

On Mon, Mar 19, 2012 at 03:08:37PM -0700, Masoud Moshref Javadi wrote:
I just want an example that fills the action part in the following rule:
ovs-ofctl add-flow br0 nw_src=10.0.0.1/32,nw_dst=10.0.0.1/32,action=?

The manual page says:

    multipath(fields, basis, algorithm, n_links, arg, dst[start..end])

    Hashes fields using basis as a universal hash parameter, then the
    applies multipath link selection algorithm (with parameter arg) to
    choose one of n_links output links numbered 0 through n_links minus
    1, and stores the link into dst[start..end], which must be an NXM
    field as described above.

    Currently, fields must be either eth_src or symmetric_l4 and
    algorithm must be one of modulo_n, hash_threshold, hrw, and
    iter_hash. Only the iter_hash algorithm uses arg.

"one of n_links output links numbered 0 through n_links minus 1",
which links? Does it mean all ports? If yes, then what if it is the
wrong port that does not lead to the destination? If the algorithm
keeps track of the correct links that will lead to the destination
what is the use of this parameter?
What is dst[start..end]? would you give an example?
what is *symmetric_l4?* there is no definition for it in this manual?

On 3/19/2012 2:56 PM, Ben Pfaff wrote:
On Sat, Mar 17, 2012 at 10:41:05AM -0700, Masoud Moshref Javadi wrote:
Would anyone give an example for a multipath action in openvswitch? How
does the rule look like in ovs-ofctl command? What are the per-requisites?
It's all documented.  Which part is troublesomee?

Thanks,

Ben.

_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to