DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
To: dev@dpdk.org
Cc: Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
	Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
	Michael Baucom <michael.baucom@broadcom.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: [PATCH v6 41/47] net/bnxt: tf_ulp: support a few generic template items
Date: Mon, 21 Oct 2024 13:56:01 +0530	[thread overview]
Message-ID: <20241021082607.232829-42-sriharsha.basavapatna@broadcom.com> (raw)
In-Reply-To: <20241021082607.232829-1-sriharsha.basavapatna@broadcom.com>

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

This patch provides the following changes.

support generic template items
	Add support for jump action, dynamic tunnels and
	flow priority to thor2 platform.

fix generic application template
	The queue action is enabled for Thor2 platform.
	Enabled rejection check for every action template.
	Fixed dynamic vxlan ip tunnel configuration.

fix vxlan ip customer tunnel
	The upar id is not populated correctly to set the
	tunnel id in the tcam table.

fix compiler warnings
	This change fixes several compiler warnings.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c   |  9 +++++++++
 drivers/net/bnxt/tf_ulp/ulp_mapper.c     | 11 +++--------
 drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 12 ++++++++++++
 3 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 3d48f42c1b..d30339393e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -536,6 +536,15 @@ ulp_tfc_cntxt_app_caps_init(struct bnxt *bp, uint8_t app_id, uint32_t dev_id)
 			}
 		}
 		ulp_ctx->cfg_data->feature_bits = info[i].feature_bits;
+		bnxt_ulp_default_app_priority_set(ulp_ctx,
+						  info[i].default_priority);
+		bnxt_ulp_max_def_priority_set(ulp_ctx,
+					      info[i].max_def_priority);
+		bnxt_ulp_min_flow_priority_set(ulp_ctx,
+					       info[i].min_flow_priority);
+		bnxt_ulp_max_flow_priority_set(ulp_ctx,
+					       info[i].max_flow_priority);
+
 		bnxt_ulp_cntxt_ptr2_default_class_bits_set(ulp_ctx,
 							   info[i].default_class_bits);
 		bnxt_ulp_cntxt_ptr2_default_act_bits_set(ulp_ctx,
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index f0d715d369..5dfe72df17 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -872,7 +872,7 @@ ulp_mapper_field_src_process(struct bnxt_ulp_mapper_parms *parms,
 	struct bnxt_ulp_mapper_data *m;
 	uint8_t bit;
 	uint32_t port_id, val_size, field_size;
-	uint16_t idx, size_idx, offset;
+	uint16_t idx = 0, size_idx = 0, offset = 0;
 	uint32_t bytelen = ULP_BITS_2_BYTE(bitlen);
 	uint8_t *buffer;
 	uint64_t lregval;
@@ -1291,7 +1291,7 @@ ulp_mapper_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 			  const char *name)
 {
 	struct bnxt_ulp_mapper_field_info *field_info;
-	uint16_t idx;
+	uint16_t idx = 0;
 
 	/* read the cond table index and count */
 	if (unlikely(ulp_operand_read(field_opr,
@@ -1594,7 +1594,7 @@ ulp_mapper_key_recipe_field_opc_next(struct bnxt_ulp_mapper_parms *parms,
 				     struct bnxt_ulp_mapper_field_info *ofld)
 {
 	struct bnxt_ulp_mapper_field_info *field_info;
-	uint16_t idx;
+	uint16_t idx = 0;
 
 	/* read the cond table index and count */
 	if (unlikely(ulp_operand_read(field_opr,
@@ -3777,11 +3777,6 @@ ulp_mapper_cond_reject_list_process(struct bnxt_ulp_mapper_parms *parms,
 	/* set the rejection result to accept */
 	*res = 0;
 
-	/* If act rej cond is not enabled then skip reject cond processing */
-	if (parms->tmpl_type == BNXT_ULP_TEMPLATE_TYPE_ACTION &&
-	    !ULP_COMP_FLD_IDX_RD(parms, BNXT_ULP_CF_IDX_ACT_REJ_COND_EN))
-		return rc;
-
 	/* get the reject condition list */
 	reject_info = ulp_mapper_tmpl_reject_list_get(parms, tid);
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
index 72d3514647..dbd8a118df 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
@@ -1298,6 +1298,7 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 			     enum bnxt_ulp_hdr_bit hdr_bit)
 {
 	uint16_t stat_port = 0;
+	struct bnxt *bp;
 
 	switch (hdr_bit) {
 	case BNXT_ULP_HDR_BIT_I_UDP:
@@ -1364,10 +1365,21 @@ ulp_rte_l4_proto_type_update(struct ulp_rte_parser_params *params,
 
 		/* if udp and equal to static vxlan port then set tunnel bits*/
 		if (stat_port && dst_port == tfp_cpu_to_be_16(stat_port)) {
+			bp = bnxt_pmd_get_bp(params->port_id);
+			if (bp == NULL) {
+				BNXT_DRV_DBG(ERR, "Invalid bp\n");
+				return;
+			}
 			ULP_BITMAP_SET(params->hdr_fp_bit.bits,
 				       BNXT_ULP_HDR_BIT_T_VXLAN);
 			ULP_BITMAP_SET(params->cf_bitmap,
 				       BNXT_ULP_CF_BIT_IS_TUNNEL);
+			if (bp->vxlan_ip_upar_in_use &
+			    HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0) {
+				ULP_COMP_FLD_IDX_WR(params,
+						    BNXT_ULP_CF_IDX_VXLAN_IP_UPAR_ID,
+						    ULP_WP_SYM_TUN_HDR_TYPE_UPAR1);
+			}
 		}
 	} else {
 		/* if dynamic Vxlan is enabled then skip dport checks */
-- 
2.39.3


  parent reply	other threads:[~2024-10-21  8:20 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  8:25 [PATCH v6 00/47] TruFlow update for Thor2 Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 01/47] net/bnxt: tf_core: fix wc tcam multi slice delete issue Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 02/47] net/bnxt: tf_core: tcam manager data corruption Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 03/47] net/bnxt: tf_core: External EM support cleanup Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 04/47] net/bnxt: tf_core: Thor TF EM key size check Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 05/47] net/bnxt: tf_core: flow scale improvement Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 06/47] net/bnxt: tf_core: TF support flow scale query Sriharsha Basavapatna
2024-10-21 16:09   ` Stephen Hemminger
2024-10-22 16:12     ` Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 07/47] net/bnxt: tf_core: fix slice count in case of HA entry move Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 08/47] net/bnxt: tf_core: convert priority based TCAM manager to dynamic allocation Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 09/47] net/bnxt: tf_core: remove dead AFM code from session-based priority TCAM mgr Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 10/47] net/bnxt: tf_core: remove dead " Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 11/47] net/bnxt: tfc: support tf-core for Thor2 Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 12/47] net/bnxt: tf_ulp: add vxlan-gpe base support Sriharsha Basavapatna
2024-10-21 15:54   ` Stephen Hemminger
2024-10-22 16:07     ` Sriharsha Basavapatna
2024-10-22 21:32       ` Ajit Khaparde
2024-10-23  0:44         ` Stephen Hemminger
2024-10-21  8:25 ` [PATCH v6 13/47] net/bnxt: tf_ulp: add custom l2 etype tunnel support Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 14/47] net/bnxt: tf_ulp: add support for vf to vf flow offload Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 15/47] net/bnxt: tf_ulp: Wh+ mirroring support Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 16/47] net/bnxt: tf_ulp: miscellaneous fixes Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 17/47] net/bnxt: tf_ulp: support for Thor2 ulp layer Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 18/47] net/bnxt: tf_ulp: add support for overlapping flows Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 19/47] net/bnxt: tf_ulp: convert recipe table to dynamic memory Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 20/47] net/bnxt: tf_ulp: add feature bit support Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 21/47] net/bnxt: tf_ulp: add action read and clear support Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 22/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 23/47] net/bnxt: tf_ulp: VFR updates for Thor 2 Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 24/47] net/bnxt: tf_ulp: add support for tunnel flow stats Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 25/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 26/47] net/bnxt: tf_ulp: enable recipe id generation Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 27/47] net/bnxt: tf_ulp: fixed parent child db counters Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 28/47] net/bnxt: tf_ulp: modify return values to adhere to C coding standard Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 29/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 30/47] net/bnxt: tf_ulp: add mask defaults when mask is not specified Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 31/47] net/bnxt: tf_ulp: add jump action support Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 32/47] net/bnxt: tf_ulp: add support for flow priority Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 33/47] net/bnxt: tf_ulp: support for dynamic tunnel ports Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 34/47] net/bnxt: tf_ulp: add rte_mtr support for Thor2 Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 35/47] net/bnxt: tf_ulp: TF support flow scale query Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 36/47] net/bnxt: tf_ulp: add support for rss flow query to ULP Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 37/47] net/bnxt: tf_ulp: add track type feature to tables Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 38/47] net/bnxt: tf_ulp: inline utility functions and use likely/unlikely Sriharsha Basavapatna
2024-10-21  8:25 ` [PATCH v6 39/47] net/bnxt: tf_ulp: switch ulp to use rte crc32 hash Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 40/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:26 ` Sriharsha Basavapatna [this message]
2024-10-21  8:26 ` [PATCH v6 42/47] net/bnxt: tf_ulp: TFC support flow scale query for Thor2 Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 43/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 44/47] net/bnxt: tf_ulp: enable support for truflow feature configuration Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 45/47] net/bnxt: tf_ulp: support a few feature extensions Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 46/47] net/bnxt: tf_ulp: update template files Sriharsha Basavapatna
2024-10-21  8:26 ` [PATCH v6 47/47] net/bnxt: tf_ulp: add stats cache for thor2 Sriharsha Basavapatna
2024-10-24  5:26 ` [PATCH v6 00/47] TruFlow update for Thor2 Ajit Khaparde
2024-10-28 12:58   ` Thomas Monjalon
2024-10-28 16:32     ` Sriharsha Basavapatna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241021082607.232829-42-sriharsha.basavapatna@broadcom.com \
    --to=sriharsha.basavapatna@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=michael.baucom@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).