wdp: Document 'port_set_config' and wdp_port_set_config().
authorBen Pfaff <blp@nicira.com>
Wed, 30 Jun 2010 18:14:18 +0000 (11:14 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 30 Jun 2010 18:14:18 +0000 (11:14 -0700)
Somehow I overlooked these in my documentation effort a while back.

ofproto/ofproto.c
ofproto/wdp-provider.h
ofproto/wdp.c

index 7bb8a50..4dc096e 100644 (file)
@@ -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);
 
index df49230..09c9015 100644 (file)
@@ -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);
 
index 771df96..d67120a 100644 (file)
@@ -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)
 {