summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorWan Junjie <wanjunjie@bytedance.com>2022-02-15 17:53:34 +0800
committerIlya Maximets <i.maximets@ovn.org>2022-04-04 20:52:16 +0200
commitefa6f1f2e0c97e058fae0161653aab50168226b5 (patch)
tree856147b769eb6d2b295519ea042bc1288228c107 /ofproto
parentb16270e69b9c72284fe6f0ab186ce17e41d7af7a (diff)
downloadopenvswitch-efa6f1f2e0c97e058fae0161653aab50168226b5.tar.gz
ofproto/ofproto-dpif: Fix dpif_type for userspace tunnels.
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 <wanjunjie@bytedance.com> Acked-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 696957024..6601f2346 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3958,6 +3958,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)) {