@@ -29,6 +29,11 @@ Post-v2.17.0
- Windows:
* Conntrack support for TCPv6, UDPv6, ICMPv6, FTPv6.
* IPv6 Geneve tunnel support.
+ - Userspace datapath:
+ * 'ovs-appctl dpctl/ct-set-maxconns' is deprecated for lack of persistence
+ capabilitiy.
+ * New configuration knob 'other_config:userspace-ct-maxconns' to set
+ maximum number of connection tracker entries for userspace datapath.
v2.17.0 - 17 Feb 2022
@@ -1990,6 +1990,9 @@ dpctl_ct_set_maxconns(int argc, const char *argv[],
struct dpif *dpif;
int error = opt_dpif_open(argc, argv, dpctl_p, 3, &dpif);
if (!error) {
+ dpctl_print(dpctl_p,
+ "Warning: dpctl/ct-set-maxconns is deprecated by "
+ "other_config:userspace-ct-maxconns");
uint32_t maxconns;
if (ovs_scan(argv[argc - 1], "%"SCNu32, &maxconns)) {
error = ct_dpif_set_maxconns(dpif, maxconns);
@@ -343,7 +343,9 @@ system due to connection tracking or simply limiting connection
tracking. If the number of connections is already over the new maximum
limit request then the new maximum limit will be enforced when the
number of connections decreases to that limit, which normally happens
-due to connection expiry. Only supported for userspace datapath.
+due to connection expiry. Only supported for userspace datapath. This
+command is deprecated by ovsdb cfg other_config:userspace-ct-maxconns
+because of persistence capability.
.
.TP
\*(DX\fBct\-get\-maxconns\fR [\fIdp\fR]
@@ -4828,6 +4828,17 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
}
}
+ uint32_t ct_maxconns, cur_maxconns;
+ ct_maxconns = smap_get_int(other_config, "userspace-ct-maxconns",
+ UINT32_MAX);
+ /* Leave runtime value as it is when cfg is removed. */
+ if (ct_maxconns < UINT32_MAX) {
+ conntrack_get_maxconns(dp->conntrack, &cur_maxconns);
+ if (ct_maxconns != cur_maxconns) {
+ conntrack_set_maxconns(dp->conntrack, ct_maxconns);
+ }
+ }
+
bool smc_enable = smap_get_bool(other_config, "smc-enable", false);
bool cur_smc;
atomic_read_relaxed(&dp->smc_enable_db, &cur_smc);
@@ -2305,6 +2305,16 @@ AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
10
])
+AT_CHECK([ovs-vsctl set Open_vswitch . other_config:userspace-ct-maxconns=20], [0])
+AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
+20
+])
+
+AT_CHECK([ovs-vsctl remove Open_vswitch . other_config userspace-ct-maxconns], [0])
+AT_CHECK([ovs-appctl dpctl/ct-get-maxconns], [], [dnl
+20
+])
+
OVS_TRAFFIC_VSWITCHD_STOP
AT_CLEANUP
@@ -183,6 +183,13 @@
</p>
</column>
+ <column name="other_config" key="userspace-ct-maxconns"
+ type='{"type": "integer", "minInteger": 0}'>
+ The maximum number of connection tracker entries allowed in the
+ userspace datapath. This deprecates "ovs-appctl dpctl/ct-set-maxconns"
+ command.
+ </column>
+
<column name="other_config" key="max-idle"
type='{"type": "integer", "minInteger": 500}'>
<p>
Max allowed userspace dp conntrack entries is configurable with 'ovs-appctl dpctl/ct-set-maxconns' command. In real scenarios, this configuration is expected to survive from host reboot, from ovs service restart. Signed-off-by: lic121 <lic121@chinatelecom.cn> --- Notes: v3: - add a warning to dpctl_ct_set_maxconns - add NEWS entry v2: - rename "ct-maxconns" to "userspace-ct-maxconns" NEWS | 5 +++++ lib/dpctl.c | 3 +++ lib/dpctl.man | 4 +++- lib/dpif-netdev.c | 11 +++++++++++ tests/system-traffic.at | 10 ++++++++++ vswitchd/vswitch.xml | 7 +++++++ 6 files changed, 39 insertions(+), 1 deletion(-)