Hi,

The cause of this problem is on OVS, I guess.
OVS does not seems to support the OpenFlow 1.5 structured Packet-Out messages
Please refer to the working status of OVS.
   
https://github.com/openvswitch/ovs/blob/master/OPENFLOW-1.1%2B.md#openflow-15-only

The following shows that OVS does not support the Packet-Out messages in the 
OpenFlow 1.5 format.
- Enable setting all pipeline fields in packet-out Prototype for OVS was done 
during specification. [EXT-427] [required for OF1.5+]

Thanks,
Iwase


On 2016年10月11日 07:52, Eyal Cidon wrote:
> Some more info.
> When I run in verbose mode I get:
>
> EVENT ofp_event->memcached_cache EventOFPPacketIn
> EventOFPErrorMsg received.
> version=0x6, msg_type=0x1, msg_len=0x4c, xid=0x42301e1e
>  `-- msg_type: OFPT_ERROR(1)
> OFPErrorMsg(type=0x2, code=0x4,
> data=b'\x06\x0d\x00\x7a\x42\x30\x1e\x1e\xff\xff\xff\xff\x00\x10\x00\x00\x00\x01\x00\x0c\x80\x00\x00\x04\xff\xff\xff\xfd\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x0c\xc4\x7a\xb7\x5e\x5c\x08\x00\x27\x7e\x0b\x96\x08\x00\x45\x00')
>  |-- type: OFPET_BAD_ACTION(2)
>  |-- code: OFPBAC_BAD_OUT_PORT(4)
>  `-- data: version=0x6, msg_type=0xd, msg_len=0x7a, xid=0x42301e1e
>      `-- msg_type: OFPT_PACKET_OUT(13)
>
> But the port number I get in parser.OFPActionOutput(port=port) is a valid
> one in my setup (in this test case it's port 1)
>
> Thanks,
>
> Eyal
>
> On Mon, Oct 10, 2016 at 3:27 PM, Eyal Cidon <eci...@stanford.edu> wrote:
>
>> Hi All,
>>
>> I am writing my first non-tutorial controller using Ryu. We are currently
>> writing a program using a Ryu Controller connected to OvS with openflow 1.5.
>> During the program an external client sends a packet to OvS which is then
>> transferred to Ryu for handling. The packet_in interface works fine, the
>> packet is received and the operation is performed correctly, the problem is
>> that the controller needs to send a reply packet at the end of the
>> operation. But when I TCP dump the client computer I don't get the reply
>> packet, and I am not sure what I did wrong. I am pasting the code for the
>> reply operation below. (the reply pkt is created in a different function,
>> and port == in_port of the original request packet that arrived in
>> packet_in)
>>
>> @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
>> def _packet_in_handler(self, ev):
>>                 datapath = ev.msg.datapath
>>                 port = ev.msg.match['in_port']
>>
>>      <... some more code ...>
>>
>>                 reply_pkt = self._handle_delete(eth,ip,
>> udp_p,md_udp,md_bin,key)
>>                 self._send_reply_packet(datapath,port,reply_pkt)
>>
>> def _send_reply_packet(self, datapath, port, pkt):
>>                 ofproto = datapath.ofproto
>>                 parser = datapath.ofproto_parser
>>                 pkt.serialize()
>>                 data = pkt.data
>>                 actions = [parser.OFPActionOutput(port=port)]
>>                 out = parser.OFPPacketOut(datapath=datapath,
>>                                           buffer_id=ofproto.OFP_NO_BUFFER,
>>                                           match=parser.OFPMatch(in_port=
>> ofproto.OFPP_CONTROLLER),
>>                                           actions=actions,
>>                                           data=data)
>>                 datapath.send_msg(out)
>>
>> Thanks,
>>
>> Eyal Cidon
>>
>>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to