+static void
+translate_vport_type_to_netdev_type(struct odp_port *port)
+{
+ char *type = port->type;
+
+ if (!strcmp(type, "netdev")) {
+ ovs_strlcpy(type, "system", sizeof port->type);
+ } else if (!strcmp(type, "gre")) {
+ const struct tnl_port_config *config;
+
+ config = (struct tnl_port_config *)port->config;
+ if (config->flags & TNL_F_IPSEC) {
+ ovs_strlcpy(type, "ipsec_gre", sizeof port->type);
+ }
+ }
+}
+
+static void
+translate_netdev_type_to_vport_type(struct odp_port *port)
+{
+ char *type = port->type;
+
+ if (!strcmp(type, "system")) {
+ ovs_strlcpy(type, "netdev", sizeof port->type);
+ } else if (!strcmp(type, "ipsec_gre")) {
+ ovs_strlcpy(type, "gre", sizeof port->type);
+ }
+}
+