Resending email because ovn mail blocked the first one.
-----Original Message----- From: Alin-Gabriel Serdean <[email protected]> Sent: Tuesday, November 8, 2022 8:08 PM To: 'Wilson Peng' <[email protected]>; '[email protected]' <[email protected]> Subject: RE: [ovs-dev] [PATCH v1 1/1] netdev-windows: Add checking when creating netdev with system type on Windows Hi Wilson, Thank you for the patch. This feels like an error on the datapath, because it feels like the userspace will not be in sync with the datapath. Can you please detail the chain of commands the gets to the port creation error? Thank you, Alin. -----Original Message----- From: dev <[email protected]> On Behalf Of Wilson Peng Sent: Thursday, October 13, 2022 5:51 PM To: [email protected] Subject: [ovs-dev] [PATCH v1 1/1] netdev-windows: Add checking when creating netdev with system type on Windows From: Wilson Peng <[email protected]> In the recent Antrea project testing, some port could not be created on Windows. When doing debug, our team found there is one case happening when multiple ports are waiting for be created with correct port number. Some system type port will be created netdev successfully and it will cause conflict as in the dpif side it will be internal type. So finally the port will be created failed and it could not be easily recovered. With the patch, on Windows the netdev creating will be blocked for system type when the ovs_tyep got on dpif is internal. More detailed case description is in the reported case. Reported-at:https://github.com/openvswitch/ovs-issues/issues/262 Signed-off-by: Wilson Peng <[email protected]> --- lib/netdev-windows.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index 4ad45ffa1..d94be877b 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -156,6 +156,7 @@ netdev_windows_system_construct(struct netdev *netdev_) struct netdev_windows_netdev_info info; struct ofpbuf *buf; int ret; + const char *type = NULL; /* Query the attributes and runtime status of the netdev. */ ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf); @@ -165,8 +166,19 @@ netdev_windows_system_construct(struct netdev *netdev_) if (strcmp(netdev_get_type(&netdev->up), "internal") && ret) { return ret; } + ofpbuf_delete(buf); + /* if ovs-type is "interna"l but the type of netdev->up + * is "system" stop creating netdev. */ + type = netdev_get_type(&netdev->up); + if (type && !strcmp(type, "system") && + (info.ovs_type == OVS_VPORT_TYPE_INTERNAL)) { + VLOG_DBG("construct device %s, ovs_type: %u failed", + netdev_get_name(&netdev->up), info.ovs_type); + return 1; + } + netdev->change_seq = 1; netdev->dev_type = info.ovs_type; netdev->port_no = info.port_no; -- 2.32.1 (Apple Git-133) _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
