return error;
}
+static int
+dpctl_flush_conntrack(int argc, const char *argv[],
+ struct dpctl_params *dpctl_p)
+{
+ struct dpif *dpif;
+ uint16_t zone, *pzone = NULL;
+ char *name;
+ int error;
+
+ if (argc > 1 && ovs_scan(argv[argc - 1], "zone=%"SCNu16, &zone)) {
+ pzone = &zone;
+ argc--;
+ }
+ name = (argc == 2) ? xstrdup(argv[1]) : get_one_dp(dpctl_p);
+ if (!name) {
+ return EINVAL;
+ }
+ error = parsed_dpif_open(name, false, &dpif);
+ free(name);
+ if (error) {
+ dpctl_error(dpctl_p, error, "opening datapath");
+ return error;
+ }
+
+ error = ct_dpif_flush(dpif, pzone);
+
+ dpif_close(dpif);
+ return error;
+}
\f
/* Undocumented commands for unit testing. */
{ "del-flow", "del-flow [dp] flow", 1, 2, dpctl_del_flow },
{ "del-flows", "[dp]", 0, 1, dpctl_del_flows },
{ "dump-conntrack", "[dp] [zone=N]", 0, 2, dpctl_dump_conntrack },
+ { "flush-conntrack", "[dp] [zone=N]", 0, 2, dpctl_flush_conntrack },
{ "help", "", 0, INT_MAX, dpctl_help },
{ "list-commands", "", 0, INT_MAX, dpctl_list_commands },
in \fBzone\fR. With \fB\-\-more\fR, some implementation specific details
are included. With \fB\-\-statistics\fR timeouts and timestamps are
added to the output.
+.
+.TP
+\*(DX\fBflush\-conntrack [\fIdp\fR] [\fBzone=\fIzone\fR]
+Flushes all the connection entries in the tracker used by \fIdp\fR.
+If \fBzone=\fIzone\fR is specified, only flushes the connections in
+\fBzone\fR.
" del-flow [DP] FLOW delete FLOW from DP\n"
" del-flows [DP] delete all flows from DP\n"
" dump-conntrack [DP] display conntrack entries\n"
+ " flush-conntrack [DP] delete all conntrack entries\n"
"Each IFACE on add-dp, add-if, and set-if may be followed by\n"
"comma-separated options. See ovs-dpctl(8) for syntax, or the\n"
"Interface table in ovs-vswitchd.conf.db(5) for an options list.\n"