Hi

Thanks for your reply.

>from ryu.app.ofctl.api import get_datapath
>dp = get_datapath(self, datapath.id )

The thing is that this code is giving me the datapath object from
datapath.id but showing the error "unknown error xid"

To execute my program I am using
#ryu-manager --observe-links

But I have also used --verbose to chek EventOFPErrorMsg
but I could not get any EventOFPErrorMsg

BR
Titu

On Thu, Feb 25, 2016 at 3:03 AM, Minoru TAKAHASHI <
[email protected]> wrote:

> Hi,
>
> On 2016年02月24日 01:03, Osman Titu wrote:
> > Hi
> >
> > For getting datapath object from datapath.id <http://datapath.id>
> (which is an integer) I have added this code bellow
> >
> > from ryu.app.ofctl.api import get_datapath
> >
> > dp = get_datapath(self, datapath.id <http://datapath.id>)
>
> Getting the datapath object is successful in my environment.
> My sample code and the execution result is as follows.
>
> <sample code>
>
> from ryu.app.ofctl.api import get_datapath
> ...
>         self.add_flow(datapath, 0, match, actions)
>         print "-----------------------------------------"
>         print "get_datapath(self, datapath.id) start"
>         dp = get_datapath(self, datapath.id)
>         print dp
>         print dp.id
>         print "get_datapath(self, datapath.id) end"
>         print "-----------------------------------------"
>
> <execution result>
>
> $ ryu-manager ./app/sample.py --verbose
> loading app ./app/sample.py
> require_app: ryu.app.ofctl.service is required by sample
> loading app ryu.app.ofctl.service
> loading app ryu.controller.ofp_handler
> instantiating app ryu.app.ofctl.service of OfctlService
> ...snipped...
> connected socket:<eventlet.greenio.GreenSocket object at 0x7f565cbd6d50>
> address:('127.0.0.1', 35091)
> hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f565cbea150>
> move onto config mode
> EVENT ofp_event->SimpleSwitch13 EventOFPSwitchFeatures
> EVENT ofp_event->ofctl_service EventOFPSwitchFeatures
> switch features ev
> version=0x4,msg_type=0x6,msg_len=0x20,xid=0xe126de9,OFPSwitchFeatures(auxiliary_id=0,capabilities=79,datapath_id=1,n_buffers=256,n_tables=254)
> -----------------------------------------
> get_datapath(self, datapath.id) start
> EVENT SimpleSwitch13->ofctl_service GetDatapathRequest
> add dpid 1 datapath <ryu.controller.controller.Datapath object at
> 0x7f565cbd6b10> new_info <ryu.app.ofctl.service._SwitchInfo object at
> 0x7f565cbea690> old_info None
> dpid 1 -> datapath <ryu.controller.controller.Datapath object at
> 0x7f565cbd6b10>
> <ryu.controller.controller.Datapath object at 0x7f565cbd6b10>
> 1
> get_datapath(self, datapath.id) end
> -----------------------------------------
>
> >
> > but I am getting this message "unknown error xid"
>
> Maybe, one of the following was executed.
>
>  https://github.com/osrg/ryu/blob/master/ryu/app/ofctl/service.py#L185
>  or
>  https://github.com/osrg/ryu/blob/master/ryu/app/ofctl/service.py#L194
>
> And, the code is described in the handler which is for receive the
> OFPErrorMsg.
>
>  https://github.com/osrg/ryu/blob/master/ryu/app/ofctl/service.py#L173
>
> There is a possibility that you were receiving some kind of OpenFlow error
> message.
> FYI, it may becomes easier to find out the OFPErrorMsg for using --verbose
> option as follows.
>
>   # ryu-manager [app_name] --verbose
>
> <output example>
>
> EventOFPErrorMsg received.
> version=0x4, msg_type=0x1, msg_len=0x4c, xid=0x55572dbb
>  `-- msg_type: OFPT_ERROR(1)
> OFPErrorMsg(type=0x6, code=0x1,
>
> data=b'\x04\x0f\x00\x40\x55\x57\x2d\xbb\x00\x00\x00\x00\x00\x00\x00\x01\x00\x30\x00\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x19\x00\x10\x80\x00\x16\x04\x0a\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x02\xff\xe5\x00\x00\x00\x00\x00\x00')
>  |-- type: OFPET_GROUP_MOD_FAILED(6)
>  |-- code: OFPGMFC_INVALID_GROUP(1)
>  `-- data: version=0x4, msg_type=0xf, msg_len=0x40, xid=0x55572dbb
>      `-- msg_type: OFPT_GROUP_MOD(15)
>
>
> thanks,
>
> >
> > How can I fix it?
> >
> > BR
> > Titu
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > 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

Reply via email to