[v3,16/19] app/testpmd: add support for loopback config for dpaa

Message ID 1515581201-29784-17-git-send-email-hemant.agrawal@nxp.com
State New
Headers show
Series
  • DPAA PMD improvements
Related show

Commit Message

Hemant Agrawal Jan. 10, 2018, 10:46 a.m.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 app/test-pmd/Makefile  | 4 ++++
 app/test-pmd/cmdline.c | 7 +++++++
 2 files changed, 11 insertions(+)

-- 
2.7.4

Patch

diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index 82b3481..34125e5 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -43,6 +43,10 @@  ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
 LDLIBS += -lrte_pmd_bond
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_DPAA_PMD),y)
+LDLIBS += -lrte_pmd_dpaa
+endif
+
 ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
 LDLIBS += -lrte_pmd_ixgbe
 endif
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f71d963..32096aa 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -89,6 +89,9 @@ 
 #include <rte_eth_bond.h>
 #include <rte_eth_bond_8023ad.h>
 #endif
+#ifdef RTE_LIBRTE_DPAA_PMD
+#include <rte_pmd_dpaa.h>
+#endif
 #ifdef RTE_LIBRTE_IXGBE_PMD
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -12620,6 +12623,10 @@  cmd_set_tx_loopback_parsed(
 	if (ret == -ENOTSUP)
 		ret = rte_pmd_bnxt_set_tx_loopback(res->port_id, is_on);
 #endif
+#ifdef RTE_LIBRTE_DPAA_PMD
+	if (ret == -ENOTSUP)
+		ret = rte_pmd_dpaa_set_tx_loopback(res->port_id, is_on);
+#endif
 
 	switch (ret) {
 	case 0: