diff options
author | Chris Mi <cmi@nvidia.com> | 2021-11-05 18:21:57 +0800 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-12-03 18:53:56 +0100 |
commit | e4098246842f829d26959ec371353e8518c10ee5 (patch) | |
tree | e967bc7e0ed57cd741004b3563e6f116652d8a67 /lib/dpif-netlink.c | |
parent | 4490792dd3f6156c6b70a5afc9feff7822f3a9d9 (diff) | |
download | openvswitch-e4098246842f829d26959ec371353e8518c10ee5.tar.gz |
dpif-netlink: Improve feature negotiation for older kernels.
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 <cmi@nvidia.com>
Acked-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/dpif-netlink.c')
-rw-r--r-- | lib/dpif-netlink.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index 18cdfe6e5..424a28401 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -412,11 +412,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); |