The exact behavior of the switch is not specified in the OpenFlow spec, but basically it says that after some switch-specified time, buffers can be reused. When the switch runs out of buffer space, it is required to send the entire packet data to the controller with a bufid of -1.
So you're right -- it could theoretically lead to running out of buffers (I have personally never seen this, but that doesn't necessarily indicate much). One way to kill the buffer should be to send it, but send it somewhere that doesn't work. For example, have the output port be OFPP_NONE. This strikes me as kind of hacky, though. Alternatively... send_openflow_packet() is actually overloaded. All the overloads result in sending an ofp_packet_out message, which takes a list of actions. The form you mention where action is a port number (e.g., OFPP_FLOOD in your example) is a shortcut -- this just creates an OFPAT_OUTPUT action. So you should just use one of the other forms of send_openflow_packet() which takes an explicit list of actions (or maybe it's an array -- I don't remember) and give it an empty action list. I think this should have the desired result. Hope that helps. -- Murphy On Sep 22, 2011, at 3:02 AM, sachin sharma wrote: > Hi Murphy, > > If i do not send any reply to openflow switch then what would happen to the > packet which is waiting in openflow switch buffer id () for controller > response. I guess that the packets which are not completely send to > controller, just wait for controller reply. > > May be after some timeout, openflow switch may drop the packet (from buffer) > by default but this may give chance to buffer becoming full. > > Is this true in this context? > > thanks, > > > > > --- On Thu, 22/9/11, Murphy McCauley <jam...@nau.edu> wrote: > > From: Murphy McCauley <jam...@nau.edu> > Subject: Re: [nox-dev] command to drop the packet > To: "sachin sharma" <sharon_sac...@yahoo.co.in> > Cc: nox-dev@noxrepo.org > Date: Thursday, 22 September, 2011, 3:18 PM > > OpenFlow switches do not forward by default, so to drop a packet, you simply > don't forward it -- don't call send_openflow_packet() at all. > > Of course, this assumes you don't have a flow table entry that says to > forward it already installed. If you do have such a rule, there's nothing > you can do to stop an individual packet from being forwarded -- you'd have to > uninstall the entry. > > -- Murphy > > On Sep 22, 2011, at 1:47 AM, sachin sharma wrote: > >> Hi, >> >> I am interested to drop the packet from a particular buffer id. I found >> calling of following function from nox could help me in sending a command to >> openflow switch. >> >> send_openflow_packet(pi.datapath_id, buffer_id, action, pi.in_port, true); >> >> I do not know what to write in place of action, I know in case of flooding i >> should write "action = OFPP_FLOOD". Can anyone please suggest me in this >> regards? >> >> Thanks & Regards, >> Sachin Sharma >> >> _______________________________________________ >> nox-dev mailing list >> nox-dev@noxrepo.org >> http://noxrepo.org/mailman/listinfo/nox-dev >
_______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev