[v2,1/4] net/bnxt: fix loopback parif for egress flows
diff mbox series

Message ID 20200731172302.5292-2-ajit.khaparde@broadcom.com
State Superseded
Delegated to: Ajit Khaparde
Headers show
Series
  • [v2,1/4] net/bnxt: fix loopback parif for egress flows
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ajit Khaparde July 31, 2020, 5:22 p.m. UTC
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

The full offload egress flows for the VF rep interface should
use loopback parif to offload missed flows.

Fixes: fe82f3e02701 ("net/bnxt: support exact match templates")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c      |  6 ++++++
 .../net/bnxt/tf_ulp/ulp_template_db_class.c   | 20 +++++++++----------
 .../net/bnxt/tf_ulp/ulp_template_db_enum.h    |  3 ++-
 3 files changed, 18 insertions(+), 11 deletions(-)

Comments

Thomas Monjalon Aug. 5, 2020, 8:29 p.m. UTC | #1
31/07/2020 19:22, Ajit Khaparde:
> From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> 
> The full offload egress flows for the VF rep interface should
> use loopback parif to offload missed flows.
> 
> Fixes: fe82f3e02701 ("net/bnxt: support exact match templates")

"should" or "must"?
What was broken?

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 861414da9..fcb7c4430 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -211,6 +211,12 @@  bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params)
 			ULP_COMP_FLD_IDX_WR(params,
 					    BNXT_ULP_CF_IDX_VF_FUNC_PARIF,
 					    parif);
+
+			/* populate the loopback parif */
+			ULP_COMP_FLD_IDX_WR(params,
+					    BNXT_ULP_CF_IDX_LOOPBACK_PARIF,
+					    BNXT_ULP_SYM_VF_FUNC_PARIF);
+
 		} else {
 			/* Set DRV func PARIF */
 			if (ulp_port_db_parif_get(params->ulp_ctx, ifindex,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
index 94160a902..aaa552aeb 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
@@ -16731,8 +16731,8 @@  struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_true = {
-		(BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+		(BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff,
+		BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_false = {
@@ -16933,8 +16933,8 @@  struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_true = {
-		(BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+		(BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff,
+		BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_false = {
@@ -17135,8 +17135,8 @@  struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_true = {
-		(BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+		(BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff,
+		BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_false = {
@@ -17337,8 +17337,8 @@  struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_true = {
-		(BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+		(BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff,
+		BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_false = {
@@ -17530,8 +17530,8 @@  struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = {
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_true = {
-		(BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff,
-		BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff,
+		(BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff,
+		BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
 	.result_operand_false = {
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
index 985591844..4c6c3599d 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
@@ -132,7 +132,8 @@  enum bnxt_ulp_cf_idx {
 	BNXT_ULP_CF_IDX_L3_HDR_CNT = 40,
 	BNXT_ULP_CF_IDX_L4_HDR_CNT = 41,
 	BNXT_ULP_CF_IDX_VFR_MODE = 42,
-	BNXT_ULP_CF_IDX_LAST = 43
+	BNXT_ULP_CF_IDX_LOOPBACK_PARIF = 43,
+	BNXT_ULP_CF_IDX_LAST = 44
 };
 
 enum bnxt_ulp_cond_opcode {