When we create two or more tunnels with the same type, only the first
tunnel will be added by dpif since they share the same datapath port.
Set the dpif_type here will clear the ioctl error logs.
Fixes: 4f19a78 ("netdev-vport: Fix userspace tunnel ioctl(SIOCGIFINDEX) info
logs.")
Signed-off-by: Wan Junjie <[email protected]>
---
ofproto/ofproto-dpif.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 8143dd965..938967d19 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3963,6 +3963,10 @@ port_add(struct ofproto *ofproto_, struct netdev *netdev)
simap_put(&ofproto->backer->tnl_backers,
dp_port_name, odp_to_u32(port_no));
}
+ } else {
+ struct dpif *dpif = ofproto->backer->dpif;
+ const char *dpif_type_str = dpif_normalize_type(dpif_type(dpif));
+ netdev_set_dpif_type(netdev, dpif_type_str);
}
if (netdev_get_tunnel_config(netdev)) {
--
2.33.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev