[ovs-dev] [PATCH 3/5] ofp-util: Add ofputil_switch_features_ports_trunc function.
Ben Pfaff
blp at nicira.com
Mon May 7 23:59:10 UTC 2012
On Mon, May 07, 2012 at 11:56:50AM -0700, Justin Pettit wrote:
> Add function to determine whether the max number of ports are contains
> in a Features Reply. If so, it removes the port list, since it may be
> incomplete. This function will be used in a later commit.
>
> Signed-off-by: Justin Pettit <jpettit at nicira.com>
Now we have several bits of code that translate an ofp version into a
struct size. I count three, in ofputil_decode_switch_features(),
max_ports_in_features(), and ofputil_count_phy_ports(). It'd be
better to just have a single helper to do that.
In ofputil_switch_features_ports_trunc() you can just call
update_openflow_length() instead of inlining it as:
> + osf->header.length = htons(sizeof(*osf));
Otherwise this looks good, thank you.
More information about the dev
mailing list