[ovs-dev] [PATCH 1/5] lib/ofp-actions: use mf_subvalue in struct ofpact_reg_load.

Simon Horman horms at verge.net.au
Wed Sep 12 07:22:50 UTC 2012


On Tue, Sep 11, 2012 at 10:37:48PM -0700, Ben Pfaff wrote:
> On Tue, Sep 11, 2012 at 01:30:04PM +0900, Simon Horman wrote:
> > From: Isaku Yamahata <yamahata at valinux.co.jp>
> > 
> > Use a uninion mf_subvalue instead of a uint64_t for
> > the value member of struct ofpact_reg_load.
> > 
> > set_field action needs to hold values wider than 64 bits.
> > This is preparation for set_field action.
> > 
> > Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> > 
> > ---
> > 
> > v4 [Simon Horman]
> > * Use union mf_subfield instead of union mf_value
> >   as suggested by Ben Pfaff
> 
> Thank you.  This is much closer to what I had in mind.

Phew, it was quite a bit of work.

> One remaining nit is that nxm_format_reg_load() is going to drop
> significant bits if it ever formats a subvalue wider than 64 bits.  I
> suggest moving format_subvalue() from lib/learn.c into meta-flow.[ch]
> (renaming appropriately) and then using that in nxm_format_reg_load().  

Thanks, I'll look into that.



More information about the dev mailing list