On Fri, Jul 20, 2012 at 11:23:02AM +0900, Isaku Yamahata wrote: > This patch adds instruction OF11 apply-actions/goto-table supports. > > I rewrite the patch series based on Ben's suggestion. > Now introduce ofpact_instruction to represent instruction delimiter, > and avoid nesting. > Ben, do you like this approach?
Oh, gosh, I was going to reply to your question from yesterday but didn't get a chance yet. I didn't expect you to work on it before I did. I hope I didn't waste a bunch of your time. The high-level principle I have in mind is to reconcile the various ideas of actions across OpenFlow versions by implementing them as extensions in the protocols that don't support them natively. Joe Stringer has already submitted a patch that implements Write-Metadata almost the way I want it, in the patch here: http://openvswitch.org/pipermail/dev/2012-July/018897.html There's a lot of discussion of approach afterward, ending up here: http://openvswitch.org/pipermail/dev/2012-July/018997.html So, let me describe what I have in mind overall for when we're finished. OpenFlow has the following instructions, which may appear at most once each per set of instructions and which the spec says are executed in the order below: Apply-Actions Clear-Actions Write-Actions Write-Metadata Goto-Table My thought is that each of these instructions should correspond to one or more ofpact types, which will be put into the list of ofpacts in the order above: - Apply-Actions: the existing ofpacts. - Clear-Actions: add a new ofpact_clear_actions. - Write-Actions: see below. - Write-Metadata: add a new ofpact_write_metadata. - Goto-Table: add a new ofpact_goto_table (or possibly reuse ofpact_resubmit if that seems suitable after some thought). I don't think that any of these needs nesting, with the possible exception of Write-Actions. I'm not sure about that one; I could see an argument each way. What do you think? For the string representations, as I told Joe Stringer, I'm leaning toward requiring them to be in the correct order for instructions listed above. Otherwise it seems risky that one could confuse the user. Similarly for the OF1.0 extension representation of OF1.1 instructions. Comments? Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev