Attempted to answer your question inline. As a side note: I'm quite not sure what you mean by "br0.10 and br0.20 are two interfaces with vlan 10 and 20", but is it possible that you are just double-tagging your packets (once in the flow rule action, once on the port), or not even hitting your rules because of the dl_vlan? This should be easy to verify with tcpdump or dpctl dump-flows
On Thu, Feb 10, 2011 at 2:11 AM, Ramana Reddy <[email protected]> wrote: > Adding some more stuff to my previous thread (Regarding the add-flow rules > in OVS). > Now the rules does not take effect, and I am unable to ping one external > machine to other > external machine through OVS as bridge. > > On Thu, Feb 10, 2011 at 3:29 PM, Ramana Reddy <[email protected]> wrote: > >> Here is my datapath dp0 contains 4 ports: >> $sudo ovs-dpctl show br0 >> system@dp0: >> flows: cur:15, soft-max:1024, hard-max:1048576 >> ports: cur:5, max:1024 >> groups: max:16 >> lookups: frags:0, hit:2034975, missed:136958, lost:0 >> queues: max-miss:100, max-action:100 >> port 0: br0 (internal) >> port 1: eth0 >> port 2: br0.10 >> port 3: br0.20 >> >> Here br0.10 and br0.20 are two interfaces with vlan 10 and 20 >> respectively. >> When I ping to br0.10 from outside vlan tag 10 interface, its pinging and >> the default action is stripping the vlan (10), >> and send to output port no 2. Now after stripping the packet, it becomes >> normal packet with out vlan, so I want to add vlan 20 >> to this and send to port no 3. >> >> The rules I added like this: >> >> ovs-ofctl add-flow br0 "in_port=2 dl_vlan=0xffff idle_timeout=0 >> actions=mod_vlan_vid:20, output:3" >> ovs-ofctl add-flow br0 "in_port=3 dl_vlan=0xffff idle_timeout=0 >> actions=mod_vlan_vid:10, output:2" >> >> (I have taken dl_vlan=0xffff, because it is non vlan packet once it >> receives to port 2 or 3). >> >> > My Question is, can we take the output port of one action becomes the input >> port of another action in side the OVS? >> if yes, what is the execution order of actions, if more than one match >> occurs. >> > Is it accurate to restate your question as the below? (1) "When a flow rule sets an output action (e.g.: port X), can/will it match other flows (including those with in_port=X)?" (2) "If not (1), is there a way to change what rules will be matched, or match multiple flows?" (3) "If yes, how are actions from multiple flows applied?" If so, I would answer it as follows: (1) Not in the way stated, for two reasons. (a) There is no out_port field (or whatever it would have to be) for the rule to match on (b) More importantly, any given packet will match exactly one rule, execute that rule's actions, and stop. The rules are traversed in order of priority (or in arbitrary order when the flows have the same priority) (2) Somewhat. The 'resubmit:<new in_port>' action can be powerful if used appropriately (man ovs-ofctl) This will process the packet an additional time with whatever changes that have been applied, including the in_port change from resubmit. Note that the resubmit port does not need to be a valid outport. (3) n/a. See (1b)/(2), the packet will finish being processed after applying the actions of the first rule it matches, but that first match might resubmit and match another rule, applying its actions (possibly including more resubmits) in the process. >> Thanks, >> Ramana Reddy. >> > Hope this helps. -Reid > > > _______________________________________________ > discuss mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org > >
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org
