From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH 05/20] net/bnxt: add support for index opcode constant
Date: Mon, 6 Jul 2020 13:54:47 +0530 [thread overview]
Message-ID: <20200706082502.26935-6-somnath.kotur@broadcom.com> (raw)
In-Reply-To: <20200706082502.26935-1-somnath.kotur@broadcom.com>
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Add support for index opcode constant so that
parif configuration could be constant value.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 11 ++++++++---
drivers/net/bnxt/tf_ulp/ulp_mapper.c | 7 +++++--
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 4 +++-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index 46b558f..b01ad0b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -12,6 +12,8 @@
#include "ulp_flow_db.h"
#include "ulp_mapper.h"
+#define BNXT_ULP_FREE_PARIF_BASE 11
+
struct bnxt_ulp_def_param_handler {
int32_t (*vfr_func)(struct bnxt_ulp_context *ulp_ctx,
struct ulp_tlv_param *param,
@@ -81,12 +83,15 @@ ulp_set_parif_in_comp_fld(struct bnxt_ulp_context *ulp_ctx,
if (rc)
return rc;
- if (parif_type == BNXT_ULP_PHY_PORT_PARIF)
+ if (parif_type == BNXT_ULP_PHY_PORT_PARIF) {
idx = BNXT_ULP_CF_IDX_PHY_PORT_PARIF;
- else if (parif_type == BNXT_ULP_DRV_FUNC_PARIF)
+ } else if (parif_type == BNXT_ULP_DRV_FUNC_PARIF) {
idx = BNXT_ULP_CF_IDX_DRV_FUNC_PARIF;
- else
+ /* Parif needs to be reset to a free partition */
+ parif += BNXT_ULP_FREE_PARIF_BASE;
+ } else {
idx = BNXT_ULP_CF_IDX_VF_FUNC_PARIF;
+ }
ULP_COMP_FLD_IDX_WR(mapper_params, idx, parif);
diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index eb77328..b0d31a8 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -1922,11 +1922,14 @@ ulp_mapper_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,
}
/* Get the index details from computed field */
- if (tbl->index_opcode != BNXT_ULP_INDEX_OPCODE_COMP_FIELD) {
+ if (tbl->index_opcode == BNXT_ULP_INDEX_OPCODE_COMP_FIELD) {
+ idx = ULP_COMP_FLD_IDX_RD(parms, tbl->index_operand);
+ } else if (tbl->index_opcode == BNXT_ULP_INDEX_OPCODE_CONSTANT) {
+ idx = tbl->index_operand;
+ } else {
BNXT_TF_DBG(ERR, "Invalid tbl index opcode\n");
return -EINVAL;
}
- idx = ULP_COMP_FLD_IDX_RD(parms, tbl->index_operand);
/* Perform the tf table set by filling the set params */
iftbl_params.dir = tbl->direction;
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 6d6a734..892d8ea 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
@@ -188,7 +188,8 @@ enum bnxt_ulp_index_opcode {
BNXT_ULP_INDEX_OPCODE_ALLOCATE = 1,
BNXT_ULP_INDEX_OPCODE_GLOBAL = 2,
BNXT_ULP_INDEX_OPCODE_COMP_FIELD = 3,
- BNXT_ULP_INDEX_OPCODE_LAST = 4
+ BNXT_ULP_INDEX_OPCODE_CONSTANT = 4,
+ BNXT_ULP_INDEX_OPCODE_LAST = 5
};
enum bnxt_ulp_mapper_opc {
@@ -511,6 +512,7 @@ enum bnxt_ulp_sym {
BNXT_ULP_SYM_IP_PROTO_IP_IN_IP = 4,
BNXT_ULP_SYM_IP_PROTO_TCP = 6,
BNXT_ULP_SYM_IP_PROTO_UDP = 17,
+ BNXT_ULP_SYM_VF_FUNC_PARIF = 15,
BNXT_ULP_SYM_NO = 0,
BNXT_ULP_SYM_YES = 1
};
--
2.7.4
next prev parent reply other threads:[~2020-07-06 8:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 8:24 [dpdk-dev] [PATCH 00/20] bnxt patches Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 01/20] net/bnxt: vxlan encap and decap with src property enabled Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 02/20] net/bnxt: add support vlan header bitmap Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 03/20] net/bnxt: add support for negative conditional opcodes Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 04/20] net/bnxt: add validations to dpdk port id and phy port parsing Somnath Kotur
2020-07-06 8:24 ` Somnath Kotur [this message]
2020-07-06 8:24 ` [dpdk-dev] [PATCH 06/20] net/bnxt: updated hsi_struct_def_dpdk.h Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 07/20] nxt/bnxt: added HWRM support for global cfg Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 08/20] net/bnxt: cleanup and refactoring Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 09/20] net/bnxt: add support for vlan push and vlan pop actions Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 10/20] net/bnxt: remove vnic and vport act bits from template matching Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 11/20] net/bnxt: fix vxlan outer ip protocol id encapsulation Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 12/20] net/bnxt: add number of vlan tags in the computed field list Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 13/20] net/bnxt: enable support for PF and VF port action items Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 14/20] net/bnxt: port configuration changes to support full offload Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 15/20] net/bnxt: add support for conditional opcodes for mapper result table Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 16/20] net/bnxt: add support for nat rte action items Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 17/20] net/bnxt: add support for tp src/dst " Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 18/20] net/bnxt: use VF vnic when port action is for a VF rep port Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 19/20] net/bnxt: enable flow ctrl ops for the VF-rep device Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 20/20] net/bnxt: use byte/pkt count shift/masks from the device template Somnath Kotur
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=20200706082502.26935-6-somnath.kotur@broadcom.com \
--to=somnath.kotur@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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).