[ovs-dev,3/6] ofproto-dpif: Use peer port as a generic netdev property

Message ID 20190402145712.7290-4-elibr@mellanox.com
State New
Headers show
Series
  • Accelerate peer port forwarding by bypassing DP processing
Related show

Commit Message

Eli Britstein April 2, 2019, 2:57 p.m.
Use peer port as a generic netdev property instead of a specific
patch-port property.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
---
 ofproto/ofproto-dpif.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 5eddc507c..cad7f6dda 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1856,6 +1856,7 @@  port_construct(struct ofport *port_)
     port->qdscp = NULL;
     port->n_qdscp = 0;
     port->carrier_seq = netdev_get_carrier_resets(netdev);
+    ofport_update_peer(port);
 
     if (netdev_vport_is_patch(netdev)) {
         /* By bailing out here, we don't submit the port to the sFlow module
@@ -1864,7 +1865,6 @@  port_construct(struct ofport *port_)
          * to be "internal" to the switch as a whole, and therefore not a
          * candidate for counter polling. */
         port->odp_port = ODPP_NONE;
-        ofport_update_peer(port);
         return 0;
     }
 
@@ -3514,10 +3514,6 @@  ofport_update_peer(struct ofport_dpif *ofport)
     struct dpif_backer *backer;
     char *peer_name;
 
-    if (!netdev_vport_is_patch(ofport->up.netdev)) {
-        return;
-    }
-
     backer = ofproto_dpif_cast(ofport->up.ofproto)->backer;
     backer->need_revalidate = REV_RECONFIGURE;