* [dpdk-stable] [PATCH] app/testpmd: fix flow flush with invalid port
@ 2020-10-15 6:15 Junyu Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Junyu Jiang @ 2020-10-15 6:15 UTC (permalink / raw)
To: shougangx.wang; +Cc: Junyu Jiang, stable
There is no error info displayed when running flow flush
command with invalid port. This patch fixed the issue.
Fixes: 2a449871a12d ("app/testpmd: align behaviour of multi-port detach")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
app/test-pmd/config.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fe31a9d52..cc4527386 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1775,16 +1775,17 @@ port_flow_flush(portid_t port_id)
struct rte_port *port = &ports[port_id];
int ret = 0;
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL)
+ return -EINVAL;
+
if (port->flow_list == NULL)
return ret;
/* Poisoning to make sure PMDs update it in case of error. */
memset(&error, 0x44, sizeof(error));
if (rte_flow_flush(port_id, &error)) {
- ret = port_flow_complain(&error);
- if (port_id_is_invalid(port_id, DISABLED_WARN) ||
- port_id == (portid_t)RTE_PORT_ALL)
- return ret;
+ port_flow_complain(&error);
}
while (port->flow_list) {
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-stable] [PATCH] app/testpmd: fix flow flush with invalid port
@ 2020-10-14 8:30 Junyu Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Junyu Jiang @ 2020-10-14 8:30 UTC (permalink / raw)
To: dev; +Cc: Beilei Xing, Wenzhuo Lu, Junyu Jiang, stable
There is no error info displayed when running flow flush
command with invalid port. This patch fixed the issue.
Fixes: 2a449871a12d ("app/testpmd: align behaviour of multi-port detach")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
app/test-pmd/config.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fe31a9d52..cc4527386 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1775,16 +1775,17 @@ port_flow_flush(portid_t port_id)
struct rte_port *port = &ports[port_id];
int ret = 0;
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL)
+ return -EINVAL;
+
if (port->flow_list == NULL)
return ret;
/* Poisoning to make sure PMDs update it in case of error. */
memset(&error, 0x44, sizeof(error));
if (rte_flow_flush(port_id, &error)) {
- ret = port_flow_complain(&error);
- if (port_id_is_invalid(port_id, DISABLED_WARN) ||
- port_id == (portid_t)RTE_PORT_ALL)
- return ret;
+ port_flow_complain(&error);
}
while (port->flow_list) {
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-15 6:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 6:15 [dpdk-stable] [PATCH] app/testpmd: fix flow flush with invalid port Junyu Jiang
-- strict thread matches above, loose matches on Subject: below --
2020-10-14 8:30 Junyu Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).