Hi Fujita,
Thank you so much for the response.
What I am trying to achieve is incrementally pass flow with the combination
of matches. For Example, I first pass a flow with match on ethertype, next
with match on ethertype and source MAC, then with match on ethertype,
source MAC and destination MAC, and so on. I have added this small snipet
of code below:
while (count < 7):
match = parser.OFPMatch(in_port=5097) ----> (creating here)
if (count & 1):
#match = parser.OFPMatch(in_port=5097, vlan_vid=vlan)
match.vlan_vid=vlan -----> (modifying here)
print 'match on vlan = ',vlan
if (count & 2):
#match = parser.OFPMatch(in_port=5097, eth_src=src)
match.eth_src=src
print 'match on Source MAC Address', src
if (count & 4):
#match = parser.OFPMatch(in_port=5097, eth_dst=dst)
match.eth_dst=dst
print 'match on Destination MAC Address', dst
actions = [parser.OFPActionOutput(out_port)]
print 'Flow to be added'
self.add_flow(datapath, 1000, match, actions, table_id)
time.sleep(2)
count+=1
This code only pushes match on in_port=5097 and action as out_port. Is
there no way I can modify the match fields on the object once I have
created other than by passing as parameter to parser.OFPMatch()? It would
be great if you could point out a way of modifying the match object in the
code above. I am sorry if I am ignoring something very obvious.
Regards,
Vinay Pai B.H.
On Thu, Feb 13, 2014 at 5:43 PM, FUJITA Tomonori <
[email protected]> wrote:
> On Thu, 13 Feb 2014 17:15:44 -0800
> vinay pai <[email protected]> wrote:
>
> > mod = parser.OFPFlowMod(datapath=datapath, priority=priority,
> > match = match, instructions=inst)
>
> You can specify table number as table_id argument here like.
>
> mod = parser.OFPFlowMod(datapath=datapath, table_id=1, priority=priority,
> match = match, instructions=inst)
>
> You can find the docs about our API:
>
>
> http://ryu.readthedocs.org/en/latest/ofproto_v1_3_ref.html#modify-state-messages
>
> By default (if you don't specify), table number 0 is used.
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience. Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
--
Vinay Pai B.H.
Grad Student - Computer Science
Viterbi School of Engineering
University of Southern California
Los Angeles, CA, USA
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel