On Thu, Mar 08, 2012 at 11:26:46AM -0800, Ethan Jackson wrote:
> The unixctl library had used the vde2 management protocol since the
> early days of Open vSwitch. As Open vSwitch has matured, several
> Python daemons have been added to the code base which would benefit
> from a unixctl implementations. Instead of implementing the old
> unixctl protocol in Python, this patch changes unixctl to use JSON
> RPC for which we already have an implementation in both Python and
> C. Future patches will need to implement a unixctl library in
> Python on top of JSON RPC.
>
> Signed-off-by: Ethan Jackson <[email protected]>
The deletion of the timespec_add() line below looks wrong to me:
> @@ -589,15 +589,14 @@ timeval_warp_cb(struct unixctl_conn *conn,
>
> msecs = atoi(argv[1]);
> if (msecs <= 0) {
> - unixctl_command_reply(conn, 501, "invalid MSECS");
> + unixctl_command_reply_error(conn, "invalid MSECS");
> return;
> }
>
> ts.tv_sec = msecs / 1000;
> ts.tv_nsec = (msecs % 1000) * 1000 * 1000;
> timespec_add(&warp_offset, &warp_offset, &ts);
> - timespec_add(&monotonic_time, &monotonic_time, &ts);
> - unixctl_command_reply(conn, 200, "warped");
> + unixctl_command_reply(conn, "warped");
> }
Otherwise this looks fine.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev