Thank you.

On Wed, Jan 11, 2017 at 7:49 PM, Iwase Yusuke <[email protected]>
wrote:

> Hi,
>
>
> On 2017年01月12日 03:39, Garegin Grigoryan wrote:
> > No, the opposite. When switch connects to the controller, the controller
> gets the event message with some information, including datapath ID.
> > Let's say switch will *send *say not only his datapath id but also its
> model name.
> > So the question is how can I modify the event message structure.
>
> First, EventDP is defined at:
>   https://github.com/osrg/ryu/blob/master/ryu/controller/dpset.py#L46
> then, created and sent to applications at:
>   https://github.com/osrg/ryu/blob/master/ryu/controller/
> dpset.py#L199-L205
>
> If you want to add field into EventDP, please refer to the above.
>
>
> OTOH, I think whether you can get those parameter via EventDP is
> depending on which parameter you want.
> If you mean the information contained in the multipart messages
> , dp_desc in OFPMP_DESC message for example, you need to send
> OFPDescStatsRequest message.
> (Ryu does not maintain these information, because these might be
> change when reconnecting to switches and complicated to maintain.)
>   http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#
> ryu.ofproto.ofproto_v1_3_parser.OFPDescStatsRequest
>
>
> Thanks,
> Iwase
>
> >
> > Thanks.
> >
> > On Wed, Jan 11, 2017 at 1:34 PM, Garegin Grigoryan <[email protected]
> <mailto:[email protected]>> wrote:
> >
> >
> >     "some other parameters" mean parameters (modules, classes, static
> definitions or else)
> >     to send messages to switches, right?
> >     ----
> >
> >     No, the opposite. When switch connects to the controller, the
> controller gets the event message with some information, including datapath
> ID.
> >     Let's say switch will say not only his datapath id but also its
> model name.
> >     So the question is how can I modify the event message structure.
> >
> >     Thanks.
> >
> >
> >     On Tue, Jan 10, 2017 at 8:26 PM, Iwase Yusuke <
> [email protected] <mailto:[email protected]>> wrote:
> >
> >         Hi,
> >
> >
> >         On 2017年01月08日 03:25, Garegin Grigoryan wrote:
> >         > Good afternoon and Happy New Year!
> >         >
> >         > I'm using RYU controller. When the OVS switch connects to the
> controller, the controller gets a "switch enter" event message.
> >         >
> >         > I'm handling it with this function
> >         >
> >         > |@set_ev_cls(dpset.EventDP, dpset.DPSET_EV_DISPATCHER) def
> _event_switch_enter_handler(self, ev): dp = ev.dp dpid = dp.id <
> http://dp.id> <http://dp.id> ....... |
> >         >
> >         > Using this event I can get the switch ID (first two lines of
> the function). But what if I want a switch to send some other parameters?
> How can I modify the OVS switch event message and how can I read it on the
> controller?
> >
> >         "some other parameters" mean parameters (modules, classes,
> static definitions or else)
> >         to send messages to switches, right?
> >
> >         You have already got "dp", which is an instance of Datapath,
> then you can send messages
> >         like:
> >             ofp = dp.ofproto
> >             ofp_parser = dp.ofproto_parser
> >             ...
> >             req = ofp_parser.OFPFlowMod(dp, ...)
> >             ...
> >             dp.send_msg(req)
> >
> >         For more details, please refer to the Ryu Documentation.
> >           http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html <
> http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html>
> >         Note: "datapath" instance on this document is corresponding to
> "dp" instance in your code.
> >
> >         Thanks,
> >         Iwase
> >
> >         >
> >         > Thanks a lot.
> >         >
> >         >
> >         >
> >         > --
> >         > Sincerely,
> >         > Garegin Grigoryan
> >         >
> >         >
> >         > ------------------------------------------------------------
> ------------------
> >         > 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
> >         > [email protected] <mailto:Ryu-devel@lists.
> sourceforge.net>
> >         > https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel>
> >         >
> >
> >
> >
> >
> >     --
> >     Sincerely,
> >     Garegin Grigoryan
> >
> >
> >
> >
> > --
> > Sincerely,
> > Garegin Grigoryan
> >
> >
> > ------------------------------------------------------------
> ------------------
> > Developer Access Program for Intel Xeon Phi Processors
> > Access to Intel Xeon Phi processor-based developer platforms.
> > With one year of Intel Parallel Studio XE.
> > Training and support from Colfax.
> > Order your platform today. http://sdm.link/xeonphi
> >
> >
> >
> > _______________________________________________
> > Ryu-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ryu-devel
> >
>



-- 
Sincerely,
Garegin Grigoryan
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to