OVS_DP_F_UNALIGNED is already set, no need to set again. If restarting ovs,
dp is already created. So dpif_netlink_dp_transact() will return EEXIST.
No need to probe again.

Signed-off-by: Chris Mi <[email protected]>
---
 lib/dpif-netlink.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 5f4b60c5a..baa8e4d2a 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -411,11 +411,10 @@ dpif_netlink_open(const struct dpif_class *class 
OVS_UNUSED, const char *name,
          * dispatching, we fall back to the per-vport dispatch mode.
          */
         dp_request.user_features &= ~OVS_DP_F_UNSUPPORTED;
-        dp_request.user_features |= OVS_DP_F_UNALIGNED;
         dp_request.user_features &= ~OVS_DP_F_VPORT_PIDS;
         dp_request.user_features |= OVS_DP_F_DISPATCH_UPCALL_PER_CPU;
         error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);
-        if (error) {
+        if (error == EOPNOTSUPP) {
             dp_request.user_features &= ~OVS_DP_F_DISPATCH_UPCALL_PER_CPU;
             dp_request.user_features |= OVS_DP_F_VPORT_PIDS;
             error = dpif_netlink_dp_transact(&dp_request, &dp, &buf);
-- 
2.30.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to