diff --git a/build/images/scripts/start_ovs b/build/images/scripts/start_ovs index 006ce7b9ebc..248759325c4 100755 --- a/build/images/scripts/start_ovs +++ b/build/images/scripts/start_ovs @@ -90,6 +90,11 @@ function start_ovs { ovs-vsctl --no-wait set open_vswitch . other_config:flow-restore-wait="true" log_info $CONTAINER_NAME "ovs-vswitchd set hw-offload to $offload" ovs-vsctl --no-wait set open_vswitch . other_config:hw-offload=$offload + # Set max revalidator delay to 200ms to ensure that learned flows are added to the + # datapath flow cache faster, so that Service SessionAffinity "takes effect" + # faster in AntreaProxy. It should not have a significant impact on performance. + # See https://github.com/vmware-tanzu/antrea/issues/1583 + ovs-vsctl --no-wait set open_vswitch . other_config:max-revalidator=200 /usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server --system-id=random start --db-file=$OVS_DB_FILE log_info $CONTAINER_NAME "Started ovs-vswitchd" fi