Hi,

Excuse me for cutting in.


On 2016年05月17日 01:04, Jason Kölker wrote:
> On Mon, May 16, 2016 at 1:20 PM, Ali Volkan Atli
> <volkan.a...@argela.com.tr> wrote:
>> Hi
>>
>> I'm working with RYU controller and trying to understand why transaction ID 
>> (xid) field in PACKET_IN messages is not parsed in ryu-controller? Why can't 
>> we use packet_in with xid as a request for flow-mod (which will be reply for 
>> packet_in request)? I'M trying to match packet-in and flow-mod messages, is 
>> it possible?
>
> Openflow doesn't send an xid with packet_in, it sends a buffer_id:
> http://flowgrammable.org/sdn/openflow/message-layer/packetin/#tab_ofp_1_3

I think xid is included in OpenFlow header in the above link.
You can get xid as follows.
   e.g.)
     @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
     def _packet_in_handler(self, ev):
         msg = ev.msg
         self.logger.info('msg.xid=%s' % hex(msg.xid))


>
> When you send your flow mod back you pass in the buffer_id from the
> packet_in to tell the switch what packet this is in reponse to:
>
> https://github.com/osrg/ryu/blob/a3c8c591d9e6fe1353f7ba54f56a40f09d301f79/ryu/app/simple_switch_13.py#L51-L64

The OpenFlow spec does not clarify how to handle xid in FlowMod message 
responding to Packet-In,
but I think the xid of FlowMod message is not required to be the same of 
corresponding Packet-In message.
If you want to set the same xid into FlowMod message, the following method 
might be useful.
   https://github.com/osrg/ryu/blob/master/ryu/ofproto/ofproto_parser.py#L164

OTOH, with OVS, it does not seem to be set xid in Packet-In message, though...

Thanks,
Iwase

>
> Happy Hacking!
>
> 7-11
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to