From: Ben Pfaff Date: Wed, 30 Jun 2010 18:14:18 +0000 (-0700) Subject: wdp: Document 'port_set_config' and wdp_port_set_config(). X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3b1fb4c311d9cec248238ec54099e46475daa39e;p=sliver-openvswitch.git wdp: Document 'port_set_config' and wdp_port_set_config(). Somehow I overlooked these in my documentation effort a while back. --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 7bb8a500b..4dc096e4e 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1494,12 +1494,12 @@ handle_port_mod(struct ofproto *p, struct ofconn *ofconn, | OFPPC_NO_PACKET_IN); new_config = (port.opp.config & ~mask) | (ntohl(opm->config) & mask); if (new_config != port.opp.config) { - wdp_port_set_config(p->wdp, ntohs(opm->port_no), new_config); + error = wdp_port_set_config(p->wdp, ntohs(opm->port_no), + new_config); } if (opm->advertise) { netdev_set_advertisements(port.netdev, ntohl(opm->advertise)); } - error = 0; } wdp_port_free(&port); diff --git a/ofproto/wdp-provider.h b/ofproto/wdp-provider.h index df492300b..09c90152b 100644 --- a/ofproto/wdp-provider.h +++ b/ofproto/wdp-provider.h @@ -212,6 +212,10 @@ struct wdp_class { int (*port_list)(const struct wdp *wdp, struct wdp_port **portsp, size_t *n_portsp); + /* Updates the configuration for the port number 'port_no' within 'wdp' to + * 'config', which is a set of OpenFlow OFPPC_* constants in host byte + * order. Returns 0 if successful, otherwise an OpenFlow error code + * constructed with ofp_mkerr(). */ int (*port_set_config)(struct wdp *wdp, uint16_t port_no, uint32_t config); diff --git a/ofproto/wdp.c b/ofproto/wdp.c index 771df9611..d67120a7c 100644 --- a/ofproto/wdp.c +++ b/ofproto/wdp.c @@ -724,6 +724,10 @@ wdp_port_list(const struct wdp *wdp, return error; } +/* Updates the configuration for the port number 'port_no' within 'wdp' to + * 'config', which is a set of OpenFlow OFPPC_* constants in host byte order. + * Returns 0 if successful, otherwise an OpenFlow error code constructed with + * ofp_mkerr(). */ int wdp_port_set_config(struct wdp *wdp, uint16_t port_no, uint32_t config) {