Thanks Murphy! So can it be said - the difference is in how the flow table is affected. ofp_flow_mod() alters the flowtable entries, where as ofp_packet_out() message instructs the switch to do - rather than installing/modifying the flows in the flow table. If yes, it does clear up few things!
Cheers! Durga On Wed, Oct 23, 2013 at 7:38 AM, Murphy McCauley <murphy.mccau...@gmail.com>wrote: > On Oct 22, 2013, at 1:23 PM, durga <c.vijaya.du...@gmail.com> wrote: > > Can anyone help me understand in what scenarios which of the openflow > messages have to be used? I understand ofp_flow_mod() is to modify flow > table entries on the switch ( I have been using this message all along) and > ofp_packet_out()(which I don't know why to use) is when the controller > wants the switch to send a packet, which can also be achieved by modifying > the flow table entries using ofp_flow_mod() message. Are there any other > factors which decide which message to be sent when? > > > ofp_flow_mod is meant to install table entries. It has sort of a special > shortcut which allows sending a packet which has been buffered at the > switch, since this was expected to be a common case (for reactive > controllers which install table entries in response to packet_ins). > > ofp_packet_out is meant to cause a switch to send a packet. This may be > one which has been buffered at a switch or one that hasn't been. It may > have originally come from a switch, or it may be generated by the > controller. For example, the LLDP packets sent by discovery couldn't be > sent via an ofp_flow_mod, since they were never on the wire. Even when a > packet comes via a packet_in, you may want to resend it without installing > a table entry for it, which would make ofp_flow_mod unsuitable. l2_pairs > does this, for example, when it doesn't know the destination -- it uses a > packet_out to flood the packet. It doesn't want to do this permanently, so > it doesn't install a table entry that does it -- it just does it the once. > > (POX confuses matters slightly because libopenflow's ofp_flow_mod may > actually generate an ofp_packet_out too in order to simplify a particular > case, but this can largely be ignored.) > > Also,a note to admin.is there a way I can scna through previous queries > posted by other members? > > > This page has a link to the mailing list archive: > http://www.noxrepo.org/community/mailing-lists/ > >