[ovs-dev] [netlink v4 27/52] datapath: Change userspace vport interface to use Netlink attributes.

Ben Pfaff blp at nicira.com
Fri Jan 21 23:13:27 UTC 2011


On Thu, Jan 20, 2011 at 06:54:56PM -0800, Jesse Gross wrote:
> On Thu, Jan 20, 2011 at 6:03 PM, Ben Pfaff <blp at nicira.com> wrote:
> > ? ? ? ?mutable->flags = nla_get_u32(a[TNLAT_FLAGS]);
> > + ? ? ? if (mutable->flags & ~TNL_F_PUBLIC)
> > + ? ? ? ? ? ? ? return -EINVAL;
> 
> This is a little bit different from the Netlink policy of ignoring
> attributes that aren't recognized.  Should we do
> nla_get_u32(a[TNLAT_FLAGS]) & TNL_F_PUBLIC instead?

OK, done.

> Otherwise it looks good.  The capwap key code looks a little strange
> because it is checking for flow based keys when it is not really using
> them.  However, the net result should be right, which is to enforce
> that no key attributes were set.  Maybe the comment could be expanded
> a little bit to explain this.

OK, I changed it to:
	/* CAPWAP has no keys, so check that the configuration for keys is the
	 * default if no key-specific attributes are used.
	 */

Thanks,

Ben.




More information about the dev mailing list