[ovs-dev] [PATCH] ofproto-dpif: Eliminate unneeded call to ofproto_dpif_cast().
Ben Pfaff
blp at nicira.com
Wed Jan 9 18:31:44 UTC 2013
I noticed this was unneeded while looking over commit 7c33b18807804f
(ofproto-dpif: More efficient implementation of get_odp_port().).
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
ofproto/ofproto-dpif.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 5b86d46..4d8540e 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -7889,7 +7889,7 @@ odp_port_to_ofp_port(const struct ofproto_dpif *ofproto, uint32_t odp_port)
struct ofport_dpif *port;
port = odp_port_to_ofport(ofproto->backer, odp_port);
- if (port && ofproto == ofproto_dpif_cast(port->up.ofproto)) {
+ if (port && &ofproto->up == port->up.ofproto) {
return port->up.ofp_port;
} else {
return OFPP_NONE;
--
1.7.2.5
More information about the dev
mailing list