Hi,
On 2016年02月12日 09:22, Alan Deikman wrote: > I am working with Broadcom’s OFDPA, and it makes use of Experimenter messages > and match fields. I cannot find any Ryu documentation or examples of how to > do this. I suspect that the OFPExperimenterOxmId class is used but again I > can’t find an example. The Ryu source code doesn’t make it clear either. > > What the OFDPA documentation gives me are the constants to use. > Specifically, I have the following values to use: > > The Experimenter OUI is “00-10-18”. The Experimenter Match field value for > the type OVID is “10” (decimal) and its value is a 16-bit integer. This > value is set in one table and then matched in another table. > > If OVID were part of the OpenFlow specification the parser was using what I > would write would look like this for the match rule. > > match = parser.OFPMatch(in_port = match_in_port, > vlan_vid = vlan_parameter, > ovid = outer_vlan_id > ) > > Obviously that won’t work since “ovid” is not a parameter OFPMatch > understands. So using the vendor-defined constants above, how do I code that > in Ryu? In Ryu, implementing the experimenter defined OFPMatch field is very simple. First, you need to define your OXM class which inherits "_Experimenter" class. https://github.com/osrg/ryu/blob/master/ryu/ofproto/oxm_fields.py#L107-L113 e.g.) in case of OF-DPA, the code would be like: class OFDPAExperimenter(_Experimenter): experimenter_id = ofproto_common.<OF-DPA Experimenter ID> And, please add the OXM type into "ofproto_v1_*.oxm_types". https://github.com/osrg/ryu/blob/master/ryu/ofproto/ofproto_v1_3.py#L1150-L1198 e.g.) in case of "ovid", the code would be like: oxm_types = [ ... oxm_fields.ONFExperimenter('ovid', 10, type_desc.Int2), ... ] + nx_match.oxm_types Then, Ryu will generate "ovid" match field automatically and you can use this field like you described. Thanks, Iwase > > For the set action the question is the same except with a different class. > Again, the nominal code would be: > > action = parser.OFPActionSetField(ovid = action_set_ovid) > > Much thanks for any assistance. > > ---------------------------- > Alan Deikman > ZNYX Networks, Inc. > > > > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > > > > _______________________________________________ > Ryu-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
