[ovs-discuss] openvswitch multipath

张伟 zhangwqh at 126.com
Tue Nov 25 02:09:48 UTC 2014


I test udp client and server.  I wan to give a description about my setting. 
The perfect configuration is that I should have 3 physical servers. My ofportid 4 and ofportid 9 should be vxlan devices and communite to another two vxlan deivces on two physical servers. Each server has a internal type device that has the udp server running on it(there is a flow entry that make the traffic go from vxlan to internal type device). 
Since I only have two physical servers. I have to configure it like this to test multipath:
ofportid 9(internal type) are in the different namespace with the udp client on the same physical server. 
ofportid 4 is vxlan device that communites to another vxlan device on another physical server.


I have configured udp server running on the devices that have the same IP and mac address. Only the first flow entry matches and touches. 
ovs-ofctl add-flow ovs-br0 "table=10, in_port=5, reg0=0, actions=output:9"
ovs-ofctl add-flow ovs-br0 "table=10, in_port=5, reg0=1, actions=output:4"


I have tested this: If actions=output:4 is the first flow entry I inserted. Only ofportid 4 receives the udp packets. Or else reverse. 
I am a little confused. From the prinsiple, only flow meta data and in_port as the key hash for flow matching. Why reg0 as the parameter? From my test phenomenon, only the first flow entry matches. This also represents that reg0 does not affect something. How the system know that reg0 is the  NXM_NX_REG0[0..1]) result? From the source code,  In multipath_algorithm, the final action is just updating some meta data information in the flow according to the selected link value. 
rule_execute()->rule_dpif_execute()->ofproto_dpif_execute_actions()->xlate_actions()->xlate_actions__()->do_xlate_actions()->multipath_execute()->flow_hash_fields()&multipath_algorithm()












At 2014-11-25 02:01:47, "Ben Pfaff" <blp at nicira.com> wrote:
>On Mon, Nov 24, 2014 at 11:39:15PM +0800, ???? wrote:
>> I want to configure openvswitch multipath.  I want the packets from ofport portid 5 can be sent out to ofport portid 4 and ofport portid 9.  From man ovs-ofctl,  multipath as the actions. n_links is a parameter. I have done this:
>> ovs-ofctl add-flow ovs-br0 "in_port=5, priority=100, actions=multipath(symmetric_l4, 1024, modulo_n, 2, 0, NXM_NX_REG0[0..1]), resubmit(,10)"
>> 
>> 
>> The link result is saved to NXM_NX_REG. However, how is the link related to output port? 
>> 
>> 
>> From one google webpage,
>> http://docs.inocybe.com/dev-guide/content/_open_vswitch_rules.html
>> I also did the following two lines:
>> ovs-ofctl add-flow ovs-br0 "table=10, in_port=5, reg0=0, actions=output:9"
>> ovs-ofctl add-flow ovs-br0 "table=10, in_port=5, reg0=1, actions=output:4"'
>> 
>> 
>> However, reg0 did not work. Only the first flow entry is touched. 
>
>Hmm, I'd expect that to work.  What traffic are you using to test?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20141125/1282b1d5/attachment-0002.html>


More information about the discuss mailing list