[ovs-dev] [PATCH] Adds parsing of OpenFlow 1.1+ Metadata

Ben Pfaff blp at nicira.com
Wed Jun 20 17:25:04 UTC 2012


On Wed, Jun 20, 2012 at 08:03:43PM +1200, Joe Stringer wrote:
> Signed-off-by: Joe Stringer <joe at wand.net.nz>
> ---
> 
> I've added a metadata field to struct flow, and metadata_mask to struct
> flow_wildcards. This patch updates the tests in ofp-print,ofproto,ofproto-dpif
> to satisfy the new flow output format including "metadata:0" for when metadata
> is not defined. Also added to ovs-ofctl.at's parse-nx-match, parse-ofp11-match
> and parse-oxm tests.
> 
> Let me know if I've missed anything.

I think that we need to add metadata and its mask to struct
flow_metadata, so that we can encode the metadata field into packet_in
messages.  Then it would be a good idea to add a test that metadata
really makes it into those messages.

I'm inclined to not add NXM_OF_METADATA at all and instead use
OXM_OF_METADATA everywhere.  The reason that there are both NXM_ and
OXM_ constants for most fields is that OVS initially defined the NXM_
stuff and then when ONF came along it picked different constants for
all the existing fields.  But I don't know of a reason to have two
different constants for fields already defined by ONF; we might as
well always use their values.

Thanks,

Ben.



More information about the dev mailing list