summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-10-25 17:11:15 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commit86fa5de1d8f34f0d5849d16edb33f7633c604367 (patch)
tree44f6f4abe150b42be76949c748d204fe13d60326 /app
parent4f1de450c90d1873652a4fa3c03370741a5ec55b (diff)
downloaddpdk-86fa5de1d8f34f0d5849d16edb33f7633c604367.zip
dpdk-86fa5de1d8f34f0d5849d16edb33f7633c604367.tar.gz
dpdk-86fa5de1d8f34f0d5849d16edb33f7633c604367.tar.xz
app/testpmd: check not configuring port twice
It is possible to request probing of a device twice, and possibly get new ports for this device. However, the ports which were already probed and setup must not be setup again. That's why it is checked whether the port is already part of fwd_ports_ids array at the beginning of the function setup_attached_port(). Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pmd/testpmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index dd6e6ea..5706686 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2300,8 +2300,11 @@ attach_port(char *identifier)
return;
}
- RTE_ETH_FOREACH_MATCHING_DEV(pi, identifier, &iterator)
+ RTE_ETH_FOREACH_MATCHING_DEV(pi, identifier, &iterator) {
+ if (port_is_forwarding(pi))
+ continue; /* port was already attached before */
setup_attached_port(pi);
+ }
}
static void