DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix flow list command
@ 2018-10-09 22:51 John Daley
  2018-10-10  8:37 ` Adrien Mazarguil
  0 siblings, 1 reply; 4+ messages in thread
From: John Daley @ 2018-10-09 22:51 UTC (permalink / raw)
  To: adrien.mazarguil; +Cc: dev, John Daley

This patch fixes the 'flow list <port id>' command which caused a
segfault when passing the action or item 'type' field instead
of the action or item struct pointer in the call to rte_flow_conv.

Fixes: 7d94dcedf7ce ("app/testpmd: rely on flow API conversion function")

Signed-off-by: John Daley <johndale@cisco.com>
---
 app/test-pmd/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 86c205806..2ce40f3e1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1354,7 +1354,7 @@ port_flow_list(portid_t port_id, uint32_t n, const uint32_t group[n])
 		while (item->type != RTE_FLOW_ITEM_TYPE_END) {
 			if (rte_flow_conv(RTE_FLOW_CONV_OP_ITEM_NAME_PTR,
 					  &name, sizeof(name),
-					  (void *)(uintptr_t)item->type,
+					  (void *)(uintptr_t)item,
 					  NULL) <= 0)
 				name = "[UNKNOWN]";
 			if (item->type != RTE_FLOW_ITEM_TYPE_VOID)
@@ -1365,7 +1365,7 @@ port_flow_list(portid_t port_id, uint32_t n, const uint32_t group[n])
 		while (action->type != RTE_FLOW_ACTION_TYPE_END) {
 			if (rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR,
 					  &name, sizeof(name),
-					  (void *)(uintptr_t)action->type,
+					  (void *)(uintptr_t)action,
 					  NULL) <= 0)
 				name = "[UNKNOWN]";
 			if (action->type != RTE_FLOW_ACTION_TYPE_VOID)
-- 
2.16.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-10 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 22:51 [dpdk-dev] [PATCH] app/testpmd: fix flow list command John Daley
2018-10-10  8:37 ` Adrien Mazarguil
2018-10-10 16:27   ` Mordechay Haimovsky
2018-10-10 16:35     ` Adrien Mazarguil

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).