This seems fine to me.

I don't like the

> +    static const struct bit_name feature_bits[] = {
> +        { OFPPF_10MB_HD,    "10MB-HD" },
> +        { OFPPF_10MB_FD,    "10MB-FD" },
> +        { OFPPF_100MB_HD,   "100MB-HD" },
> +        { OFPPF_100MB_FD,   "100MB-FD" },
> +        { OFPPF_1GB_HD,     "1GB-HD" },
> +        { OFPPF_1GB_FD,     "1GB-FD" },
> +        { OFPPF_10GB_FD,    "10GB-FD" },
> +        { OFPPF_COPPER,     "COPPER" },
> +        { OFPPF_FIBER,      "FIBER" },
> +        { OFPPF_AUTONEG,    "AUTO_NEG" },
> +        { OFPPF_PAUSE,      "AUTO_PAUSE" },
> +        { OFPPF_PAUSE_ASYM, "AUTO_PAUSE_ASYM" },
> +        { 0,                NULL },

I don't like this kind of thing a great deal, because it's hard to
remember to update when a new OFPPF appears.  It's a bigger deal in
the case of nxast_actions[] in the ofp-util code.  It's really easy to
forget to add new actions there, or update their sizes for that
matter.

At any rate, I don't think this patch is the place to fix it, just a thought.

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

Reply via email to