From: Ben Pfaff Date: Thu, 8 Jan 2009 22:58:35 +0000 (-0800) Subject: Remove 'wait' parameter from dpif_send_openflow(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b837868afb22d690e74456e31ff3e63e48d11e5;p=openvswitch Remove 'wait' parameter from dpif_send_openflow(). The 'wait' parameter had no effect (it was not implemented) and it was only ever set to false. It's easier to simply remove it than to implement an unneeded feature. Found by -Wunused-parameter. --- diff --git a/lib/dpif.c b/lib/dpif.c index a116bc08..af15f8f1 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -194,17 +194,15 @@ error: * message, and sends it to the OpenFlow local datapath numbered 'dp_idx' via * 'sock'. * - * Returns 0 if successful, otherwise a positive errno value. If - * 'wait' is true, then the send will wait until buffer space is ready; - * otherwise, returns EAGAIN if the 'sock' send buffer is full. + * Returns 0 if successful, otherwise a positive errno value. Returns EAGAIN + * if the 'sock' send buffer is full. * * If the send is successful, then the kernel module will receive it, but there * is no guarantee that any reply will not be dropped (see nl_sock_transact() * for details). */ int -dpif_send_openflow(struct dpif *dp, int dp_idx, struct ofpbuf *buffer, - bool wait) +dpif_send_openflow(struct dpif *dp, int dp_idx, struct ofpbuf *buffer) { struct ofp_header *oh; unsigned int dump_flag; diff --git a/lib/dpif.h b/lib/dpif.h index 794b4df7..12b81b30 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -56,7 +56,7 @@ void dpif_close(struct dpif *); /* OpenFlow. */ int dpif_recv_openflow(struct dpif *, int dp_idx, struct ofpbuf **, bool wait); -int dpif_send_openflow(struct dpif *, int dp_idx, struct ofpbuf *, bool wait); +int dpif_send_openflow(struct dpif *, int dp_idx, struct ofpbuf *); /* Management functions. */ int dpif_add_dp(struct dpif *, int dp_idx, const char *dp_name); diff --git a/lib/vconn-netlink.c b/lib/vconn-netlink.c index 4fc0e9b0..72d12e45 100644 --- a/lib/vconn-netlink.c +++ b/lib/vconn-netlink.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -116,8 +116,7 @@ static int netlink_send(struct vconn *vconn, struct ofpbuf *buffer) { struct netlink_vconn *netlink = netlink_vconn_cast(vconn); - int retval = dpif_send_openflow(&netlink->dp, netlink->dp_idx, - buffer, false); + int retval = dpif_send_openflow(&netlink->dp, netlink->dp_idx, buffer); if (!retval) { ofpbuf_delete(buffer); }