On Wed, Jun 27, 2012 at 01:27:05PM +0900, Isaku Yamahata wrote:
> Now OFPACT_SET_xxx actions are consolidated into OFPACT_SET_FIELDS.
> So they can be dropped.
> 
> Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>

In the OF1.0 and OF1.1 cases, I'm concerned that this approach will
change the format of some actions.  Consider an NXAST_REG_LOAD action
that sets, for example, the IP destination.  On output to OF1.0, it's
tempting to translate this into OFPAT_SET_NW_DST, but that would report
a different action to the controller than what it set up originally.

I've barely even skimmed your code so I don't know whether it would do
that, but I want to check that you're aware of the potential issue.

Here's the test from DESIGN that's in my series, that represents my
current thoughts on how much fidelity we need in reproducing actions:



Action Reproduction
===================

It seems likely that many controllers, at least at startup, use the
OpenFlow "flow statistics" request to obtain existing flows, then
compare the flows' actions against the actions that they expect to
find.  Before version 1.8.0, Open vSwitch always returned exact,
byte-for-byte copies of the actions that had been added to the flow
table.  The current version of Open vSwitch does not always do this in
some exceptional cases.  This section lists the exceptions that
controller authors must keep in mind if they compare actual actions
against desired actions in a bytewise fashion:

        - Open vSwitch zeros padding bytes in action structures,
          regardless of their values when the flows were added.

        - Open vSwitch "normalizes" the instructions in OpenFlow 1.1
          (and later) in the following way:

              * OVS sorts the instructions into the following order:
                Apply-Actions, Clear-Actions, Write-Actions,
                Write-Metadata, Goto-Table.

              * OVS drops Apply-Actions instructions that have empty
                action lists.

              * OVS drops Write-Actions instructions that have empty
                action sets.

Please report other discrepancies, if you notice any, so that we can
fix or document them.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to