app/testpmd: add --flow-isolate-all option
[dpdk.git] / app / test-pmd / testpmd.c
index e09b803..e754d12 100644 (file)
@@ -271,6 +271,11 @@ uint16_t port_topology = PORT_TOPOLOGY_PAIRED; /* Ports are paired by default */
  */
 uint8_t no_flush_rx = 0; /* flush by default */
 
+/*
+ * Flow API isolated mode.
+ */
+uint8_t flow_isolate_all;
+
 /*
  * Avoids to check link status when starting/stopping a port.
  */
@@ -1429,6 +1434,15 @@ start_port(portid_t pid)
                if (port->need_reconfig > 0) {
                        port->need_reconfig = 0;
 
+                       if (flow_isolate_all) {
+                               int ret = port_flow_isolate(pi, 1);
+                               if (ret) {
+                                       printf("Failed to apply isolated"
+                                              " mode on port %d\n", pi);
+                                       return -1;
+                               }
+                       }
+
                        printf("Configuring Port %d (socket %u)\n", pi,
                                        port->socket_id);
                        /* configure port */