From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69FC5A00BE; Fri, 12 Jun 2020 14:55:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D24545323; Fri, 12 Jun 2020 14:54:59 +0200 (CEST) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id A74D92F42 for ; Fri, 12 Jun 2020 14:54:57 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 6A89D1BD6DB; Fri, 12 Jun 2020 05:54:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 6A89D1BD6DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1591966498; bh=oYE2E9O/o4zxIcU0gl7h7K99A7N8oy5sbZpHBO3uqFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a50qRPstHpZSYq7l5C5nZMBtHHPyI1K01ew6qnHoRHzYeTlaIKcfOO6UjKVAKlYT7 vPbSHA8HpXoYphkym2M5xl+h4l1B/HEdDplwHFIHsoT9eLVP8ebGzIoyz84pfV1rmT VG4+35b+zl1uRfCDYVSnzW7QZVMjBH1fxhyl7E6c= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 12 Jun 2020 18:19:51 +0530 Message-Id: <20200612125024.15989-4-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200612125024.15989-1-somnath.kotur@broadcom.com> References: <20200612125024.15989-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 03/36] net/bnxt: add vfr flag to the mark manager X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kishore Padmanabha Add support for the vfr flag to the mark manager Signed-off-by: Kishore Padmanabha Reviewed-by: Michael Baucom Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_rxr.c | 3 ++- drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 7 +++++++ drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 91ff729..bd452b7 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -413,6 +413,7 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, uint32_t mark_id; uint32_t flags2; int rc; + uint32_t vfr_flag; cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code); flags2 = rte_le_to_cpu_32(rxcmp1->flags2); @@ -466,7 +467,7 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, } rc = ulp_mark_db_mark_get(bp->ulp_ctx, gfid, - cfa_code, &mark_id); + cfa_code, &vfr_flag, &mark_id); if (!rc) { /* Got the mark, write it to the mbuf and return */ mbuf->hash.fdir.hi = mark_id; diff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c index 9e8b81e..0e13a46 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c @@ -18,6 +18,8 @@ BNXT_ULP_MARK_VALID) #define ULP_MARK_DB_ENTRY_IS_INVALID(mark_info) (!((mark_info)->flags &\ BNXT_ULP_MARK_VALID)) +#define ULP_MARK_DB_ENTRY_IS_VFR_ID(mark_info) ((mark_info)->flags &\ + BNXT_ULP_MARK_VFR_ID) #define ULP_MARK_DB_ENTRY_IS_GLOBAL_HW_FID(mark_info) ((mark_info)->flags &\ BNXT_ULP_MARK_GLOBAL_HW_FID) @@ -153,6 +155,8 @@ ulp_mark_db_deinit(struct bnxt_ulp_context *ctxt) * * fid [in] The flow id that is returned by HW in BD * + * vfr_flag [out].it indicatesif mark is vfr_id or mark id + * * mark [out] The mark that is associated with the FID * */ @@ -160,6 +164,7 @@ int32_t ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, bool is_gfid, uint32_t fid, + uint32_t *vfr_flag, uint32_t *mark) { struct bnxt_ulp_mark_tbl *mtbl; @@ -184,6 +189,7 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, BNXT_TF_DBG(DEBUG, "Get GFID[0x%0x] = 0x%0x\n", idx, mtbl->gfid_tbl[idx].mark_id); + *vfr_flag = ULP_MARK_DB_ENTRY_IS_VFR_ID(&mtbl->gfid_tbl[idx]); *mark = mtbl->gfid_tbl[idx].mark_id; } else { if (idx >= mtbl->lfid_num_entries || @@ -193,6 +199,7 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, BNXT_TF_DBG(DEBUG, "Get LFID[0x%0x] = 0x%0x\n", idx, mtbl->lfid_tbl[idx].mark_id); + *vfr_flag = ULP_MARK_DB_ENTRY_IS_VFR_ID(&mtbl->lfid_tbl[idx]); *mark = mtbl->lfid_tbl[idx].mark_id; } diff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h index fd0d840..9696730 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h +++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h @@ -9,6 +9,7 @@ #include "bnxt_ulp.h" #define BNXT_ULP_MARK_VALID 0x1 +#define BNXT_ULP_MARK_VFR_ID 0x2 #define BNXT_ULP_MARK_GLOBAL_HW_FID 0x4 #define BNXT_ULP_MARK_LOCAL_HW_FID 0x8 @@ -67,6 +68,8 @@ ulp_mark_db_deinit(struct bnxt_ulp_context *ctxt); * * fid [in] The flow id that is returned by HW in BD * + * vfr_flag [out].it indicatesif mark is vfr_id or mark id + * * mark [out] The mark that is associated with the FID * */ @@ -74,6 +77,7 @@ int32_t ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt, bool is_gfid, uint32_t fid, + uint32_t *vfr_flag, uint32_t *mark); /* -- 2.7.4