From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15D3445C9F; Thu, 7 Nov 2024 14:47:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E49CE42F3D; Thu, 7 Nov 2024 14:47:02 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 4EE0942EE9 for ; Thu, 7 Nov 2024 14:47:01 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7ee6edc47abso744140a12.3 for ; Thu, 07 Nov 2024 05:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730987220; x=1731592020; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f8T+C3U2KVClKFmn3MNAwjjKq/rPN/BdlQuKNvTgWi8=; b=NYldjKL5ApHiSydY+/HaQfYN+HwhOQNvGxKJQM9MwFNkGQbLQv9ViYmJ5fr4zURYvh 4SOfJ/E53+T8HCPBSw04r9qxPz51v+3nPRN3qjw8UlLWGdFOetBz1M7PRqrCg+P0KomT NHkqyA9VQPcZn+D3kmydHmMl7zm3tjhFrNix0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730987220; x=1731592020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f8T+C3U2KVClKFmn3MNAwjjKq/rPN/BdlQuKNvTgWi8=; b=dvbfiDz2IUWDW+Q/Y+gans2o37s4WWnadz6KcWNq1GXut3ls/Pih/4PKj8RgkXzQr3 rAdQU36vPpGpVHabG1Qg8bMqfyeRN2Wi4+ccVWdrXriVjk2K3d3F1bNskRcsuEPkh8R1 dRnKx2jt2zVTI/HEPUtX5PnDZFt7ZT5YTMRcsWraqTIEzKvJ9+E+dlDt3K1IwTLfcuX6 ud1oSJfHrFzOmokQn+aPgwHrV3WaVDlfAe2jEIjRMM8CHtsNFOIAWBqrR5nHzsZC3xgi 6FA1E/wk1Oqx0KrzIzpZns8Uk1uLGXfexc7p2JUBsvJmVNMqZ28sXJwhbDllbziSg41a NheA== X-Gm-Message-State: AOJu0Yy7qB7qI8QReDj2QCkVeto4zxYBMJ6EcMTF5x3vHHiur4BA7z3f Gln0v5JG6i5Bjyb5W1/OUT0001qk3wOKN3xtQqaSPWpPmgRcrGfqceRPgL4IbxVRh8M+nZP2sU0 O68ycGvU565rXMCShQ3+yr8OERVcdFHa+xZwfq3MsaLRxmZ9/dI5H4fdG6uLMlsxeASuGnQZMjK xBg3lDpGJ/8RaoWc4MV7cg23jK0DmuMEcJCvqJ1CCKPQ== X-Google-Smtp-Source: AGHT+IF27gScYcCcKiFX1HPHWB+yQ+gMxrQMyI9VPzehK0l1cY9Fs9vqmQCvQVg3FMnDHTJKMf/gEg== X-Received: by 2002:a17:90b:4fd1:b0:2e2:a8dd:9bb5 with SMTP id 98e67ed59e1d1-2e94c2aef84mr30361166a91.12.1730987219752; Thu, 07 Nov 2024 05:46:59 -0800 (PST) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9a5f52969sm1409878a91.2.2024.11.07.05.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 05:46:59 -0800 (PST) From: Sriharsha Basavapatna To: dev@dpdk.org Cc: Kishore Padmanabha , Sriharsha Basavapatna , Mike Baucom , Ajit Khaparde Subject: [PATCH v8 41/47] net/bnxt: tf_ulp: support a few generic template items Date: Thu, 7 Nov 2024 19:22:48 +0530 Message-Id: <20241107135254.1611676-42-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> References: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Kishore Padmanabha 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 Signed-off-by: Sriharsha Basavapatna Reviewed-by: Mike Baucom Reviewed-by: Ajit Khaparde --- 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