[ovs-dev] [PATCH] dpctl: cleaner dpctl output for tunnel ports.

Pravin B Shelar pshelar at nicira.com
Fri May 1 18:02:02 UTC 2015


Currently dont-fragment and TTL are initialized to zero, but
those are not default config for tunnel ports.  dpctl
does not show default config of a port.  So by setting these
values to default we can get cleaner `dpctl show` output.

% ovs-dpctl show
system at ovs-system:
	port 0: ovs-system (internal)
	port 1: br0 (internal)
	port 4: gre_sys (gre: df_default=false, ttl=0)

% ovs-dpctl show # After initializing default values.
system at ovs-system:
	port 0: ovs-system (internal)
	port 1: br0 (internal)
	port 4: gre_sys (gre)

Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
---
 lib/netdev-vport.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index ff28608..ea9abf9 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -262,6 +262,8 @@ netdev_vport_construct(struct netdev *netdev_)
         dev->tnl_cfg.dst_port = htons(STT_DST_PORT);
     }
 
+    dev->tnl_cfg.dont_fragment = true;
+    dev->tnl_cfg.ttl = DEFAULT_TTL;
     return 0;
 }
 
-- 
1.7.1




More information about the dev mailing list