On Tue, Apr 30, 2013 at 03:53:46PM -0700, Ben Pfaff wrote:
> On Tue, Apr 30, 2013 at 12:04:40PM -0700, Neil Mckee wrote:
> > git seemed to want to make this a series of 2 patches, and I don't
> > know how to argue with git.  Hope that's OK.
> 
> This patch changes dpif_sflow_add_port() in kind of an awkward way
> relative to the 'ifindex' variable.  This variable's value comes from
> netdev_get_ifindex(), which returns an int.  The type I'd expect
> 'ifindex' to have, then, is also "int".  I think that would fit in
> practice better than using uint32_t and then casting to int32_t to check
> whether netdev_get_ifindex() returned a negative value.
> 
> dpif_sflow_received() has a couple of minor violations of common OVS
> coding style:
> 
> +    if(!sampler) {
> should be
> +    if (!sampler) {
> and similarly late on.
> 
> and:
> 
> +    /* look up the input ifIndex if this port has one. Otherwise just
> +       leave it as 0 (meaning 'unknown') and continue */
> should be
> +    /* Look up the input ifIndex if this port has one. Otherwise just
> +       leave it as 0 (meaning 'unknown') and continue. */
> that is, use an initial capital and end with a period.

Oh also one space on each side of the "="s here please:

+  SFL_DSCLASS_IFINDEX=0,
+  SFL_DSCLASS_VLAN=1,
+  SFL_DSCLASS_PHYSICAL_ENTITY=2,
+  SFL_DSCLASS_LOGICAL_ENTITY=3

Thanks,

Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to