[ovs-dev] [PATCH] ofp-util: Fix length field of bundle messages

Jarno Rajahalme jrajahalme at nicira.com
Tue Apr 7 17:16:48 UTC 2015


Yamamoto,

ofconn_send(), which will eventually be called for these, already does ofpmsg_update_length() before passing the message to rconn_send(). Given this, it seems unnecessary to make this change.

  Jarno

> On Apr 6, 2015, at 11:43 PM, YAMAMOTO Takashi <yamamoto at valinux.co.jp> wrote:
> 
> Signed-off-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>
> ---
> lib/ofp-util.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> index a0da289..7035c8c 100644
> --- a/lib/ofp-util.c
> +++ b/lib/ofp-util.c
> @@ -8760,6 +8760,7 @@ ofputil_encode_bundle_ctrl_reply(const struct ofp_header *oh,
>     m->type = htons(msg->type);
>     m->flags = htons(msg->flags);
> 
> +    ofpmsg_update_length(buf);
>     return buf;
> }
> 
> @@ -8906,5 +8907,6 @@ ofputil_encode_bundle_add(enum ofp_version ofp_version,
>     m->flags = htons(msg->flags);
>     ofpbuf_put(request, msg->msg, ntohs(msg->msg->length));
> 
> +    ofpmsg_update_length(request);
>     return request;
> }
> -- 
> 2.1.0
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list