[ovs-dev] [cfm_v2 8/9] cfm: Eight byte MPIDs in extended mode.

Ben Pfaff blp at nicira.com
Fri Sep 9 20:39:02 UTC 2011


On Fri, Sep 09, 2011 at 01:37:42PM -0700, Ethan Jackson wrote:
> > 1 and 2 are both in the range [1, 8191], so they would be allowed.
> >
> > The only disallowed values would be 0 and [8192, UINT16_MAX].
> 
> That still feels a bit arbitrary to me.  However, I realized that I
> should probably restrict "0" as a valid mpid in extended mode.  How
> about I change cfm_is_valid_mpid to something like this:
> 
> static bool
> cfm_is_valid_mpid(bool extended, uint64_t mpid)
> {
>     /* 802.1ag specification requires MPIDs to be within the range [1, 8191].
>      * In extended mode we relax this requirement. */
>     return mpid >= 1 && (extended || mpid <= 8191);
> }

OK.



More information about the dev mailing list