Thanks Ben, For my understanding, when a packet matches an entry with 'learn' action, the 'learn' action will insert an entry to the specified flow table, the match fields of the entry can be get from the matched packet and the action of the entry can be specified in 'learn' action. This 'learn' action might be a good reference for my second question.
The question about adding a new BUFFER action (1st question) and the question about how to buffer a packet (3rd question) are independent from the question about the 'learn' action (2nd question). The reason why I need to buffer the following packets is that I want the controller only see one packet (the first packet of a flow) from each flow. The following reason is why the controller could see multiple packets from the same flow. In the case that a switch receives a following packet (the following packet of a flow, whose first packet has already been sent to the controller via packet-in) before the corresponding packet-out or flow-mod message, the following packet will be sent to the controller, since there is still no matching rule in the flow table. To avoid sending multiple packets from the same flow to the controller, we need to buffer the following packets, and hence, the new action BUFFER is required to implement this function. Do you have any suggestion about adding a new OpenFlow action to ovs? More specifically, in the ovs code, where this new action (including the definition of the new action and the processing logic of the new action) should be added to? Thanks! Xiaoye On Mon, Oct 21, 2013 at 3:46 PM, Ben Pfaff <[email protected]> wrote: > On Mon, Oct 21, 2013 at 03:43:22PM -0500, Xiaoye Sun wrote: > > This new function is extension to OpenFlow protocol v1.0.0. > > In OpenFlow, if a packet does not match the flow table on a switch, the > > packet will be sent to the controller via a packet-in message. Then the > > OpenFlow controller will react this packet-in message by sending > packet-out > > or flow-mod message back to the switch. > > > > What I am going to do is to add a new OpenFlow action, namely "BUFFER" > > action, to the OpenFlow1.0 protocol. This BUFFER action buffers packets > > into the OpenFlow buffer by calling pktbuf_save() function described in > > /ofproto/pktbuf.c. In addition, some new logic inserting the BUFFER > entry > > should be added to the switch. For example, when a packet does not match > > with the flow table (cannot find any matched rule), my switch will insert > > an entry to the flow table. The match fields of this entry is a copy of > the > > header of the mismatching packet and the action field of the entry is > > BUFFER. Thus, when the following packets in the same flow come to the > > switch, those packet will match this BUFFER entry and be stored into the > > OpenFlow buffer. > > What's wrong with the existing "learn" action? > > -- Xiaoye (Steven) Sun, Ph.D. Student Department of Electrical and Computer Engineering (ECE) & Department of Computer Science (CS) George R. Brown School of Engineering Rice University, Houston, Texas, USA
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
