[30/33] net/bnxt: register tf rte flow ops
diff mbox series

Message ID 1584459511-5353-31-git-send-email-venkatkumar.duvvuru@broadcom.com
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series
  • add support for host based flow table management
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Venkat Duvvuru March 17, 2020, 3:38 p.m. UTC
Register bnxt_ulp_rte_flow_ops when RTE_LIBRTE_BNXT_TRUFLOW is
enabled.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
 2 files changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 3cb8ba3..98dc575 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -734,6 +734,7 @@  extern int bnxt_logtype_driver;
 #define PMD_DRV_LOG(level, fmt, args...) \
 	  PMD_DRV_LOG_RAW(level, fmt, ## args)
 #ifdef RTE_LIBRTE_BNXT_TRUFLOW
+extern const struct rte_flow_ops bnxt_ulp_rte_flow_ops;
 int32_t bnxt_ulp_init(struct bnxt *bp);
 void bnxt_ulp_deinit(struct bnxt *bp);
 #endif
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2064f21..7f73fe6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3300,7 +3300,11 @@  bnxt_filter_ctrl_op(struct rte_eth_dev *dev,
 	case RTE_ETH_FILTER_GENERIC:
 		if (filter_op != RTE_ETH_FILTER_GET)
 			return -EINVAL;
+#ifdef RTE_LIBRTE_BNXT_TRUFLOW
+		*(const void **)arg = &bnxt_ulp_rte_flow_ops;
+#else
 		*(const void **)arg = &bnxt_flow_ops;
+#endif
 		break;
 	default:
 		PMD_DRV_LOG(ERR,