[ovs-dev] [PATCH] ofproto: Correctly compute length of flow stats in multipart flow stats.

Ethan Jackson ethan at nicira.com
Sat Jan 22 00:12:11 UTC 2011


Looks Good.

On Fri, Jan 21, 2011 at 2:49 PM, Ben Pfaff <blp at nicira.com> wrote:
> In a flow table dump, the length of the first nx_flow_stats in the second
> and subsequent OpenFlow messages was being miscalculated, because
> append_nxstats_reply() changed the length of the message in such cases.
> So we need to load the starting length after calling append_nxstats_reply()
> instead of before.
>
> Reported-by: Reid Price <reid at nicira.com>
> Bug #4444.
> ---
>  ofproto/ofproto.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index e081e32..7df8600 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -3549,8 +3549,8 @@ put_nx_flow_stats(struct ofconn *ofconn, struct rule *rule,
>
>     act_len = sizeof *rule->actions * rule->n_actions;
>
> -    start_len = (*replyp)->size;
>     append_nxstats_reply(sizeof *nfs + NXM_MAX_LEN + act_len, ofconn, replyp);
> +    start_len = (*replyp)->size;
>     reply = *replyp;
>
>     nfs = ofpbuf_put_uninit(reply, sizeof *nfs);
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>




More information about the dev mailing list