[ovs-dev] [PATCH 1/6] ofproto-dpif: New function ofproto_receive().

Ethan Jackson ethan at nicira.com
Thu Jan 3 01:00:05 UTC 2013


Sounds good.  I've applied the following minor changes to the patch which I
think is good enough for now.  Let me know if there's anthing else that needs
to change before we do the appropriate refactoring.

Ethan

---
 ofproto/ofproto-dpif.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 41f230b..b024c4f 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3447,7 +3447,7 @@ ofproto_receive(const struct dpif_backer *backer, struct ofpbuf *packet,
         *ofproto = ofproto_dpif_cast(port->up.ofproto);
     }
 
-    flow->in_port = (port)->up.ofp_port;
+    flow->in_port = port->up.ofp_port;
     if (vsp_adjust_flow(ofproto_dpif_cast(port->up.ofproto), flow)) {
         if (packet) {
             /* Make the packet resemble the flow, so that it gets sent to an
@@ -7191,6 +7191,10 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, int argc, const char *argv[],
                 goto exit;
             }
 
+            /* XXX: Since we allow the user to specify an ofproto, it's
+             * possible they will specify a different ofproto than the one the
+             * port actually belongs too.  Ideally we should simply remove the
+             * ability to specify the ofproto. */
             fitness = ofproto_receive(ofproto->backer, NULL, odp_key.data,
                                       odp_key.size, &flow, NULL, NULL,
                                       &initial_tci);
-- 
1.7.9.5




More information about the dev mailing list