From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
stable@dpdk.org,
Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH v3 6/9] net/bnxt: remove unnecessary structure variable
Date: Tue, 28 Jan 2020 13:01:56 -0800 [thread overview]
Message-ID: <20200128210159.6972-7-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20200128210159.6972-1-ajit.khaparde@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
This change could help in reducing the size of bnxt PMD private
data structure by converting a uint8_t variable to use bit map flag.
Fixes: 5cd0e2889c432 ("net/bnxt: support NIC Partitioning")
Cc: stable@dpdk.org
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 4 ++--
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 95f1f1a20..434ce2829 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -520,12 +520,13 @@ struct bnxt {
#define BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED BIT(18)
#define BNXT_FLAG_EXT_STATS_SUPPORTED BIT(19)
#define BNXT_FLAG_NEW_RM BIT(20)
+#define BNXT_FLAG_NPAR_PF BIT(21)
#define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(22)
#define BNXT_FLAG_ADV_FLOW_MGMT BIT(23)
#define BNXT_FLAG_RX_VECTOR_PKT_MODE BIT(24)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
-#define BNXT_NPAR(bp) ((bp)->port_partition_type)
+#define BNXT_NPAR(bp) ((bp)->flags & BNXT_FLAG_NPAR_PF)
#define BNXT_MH(bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST)
#define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp))
#define BNXT_USE_CHIMP_MB 0 //For non-CFA commands, everything uses Chimp.
@@ -647,7 +648,6 @@ struct bnxt {
#define BNXT_OUTER_TPID_BD_SHFT 16
uint32_t outer_tpid_bd;
struct bnxt_pf_info pf;
- uint8_t port_partition_type;
uint8_t dev_stopped;
uint8_t vxlan_port_cnt;
uint8_t geneve_port_cnt;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 460cc4894..f325aff82 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2952,10 +2952,10 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5:
case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0:
/* FALLTHROUGH */
- bp->port_partition_type = resp->port_partition_type;
+ bp->flags |= BNXT_FLAG_NPAR_PF;
break;
default:
- bp->port_partition_type = 0;
+ bp->flags &= ~BNXT_FLAG_NPAR_PF;
break;
}
--
2.21.0 (Apple Git-122.2)
next prev parent reply other threads:[~2020-01-28 21:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 7:29 [dpdk-dev] [PATCH v2 0/9] bnxt patchset Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 1/9] net/bnxt: fix bnxt_alloc_filter() to use a common routine Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 2/9] net/bnxt: fix bumping of L2 filter reference count Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 3/9] net/bnxt: fix to allow group ID 0 for RSS action Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 4/9] net/bnxt: remove redundant if statement Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 5/9] net/bnxt: remove redundant macro Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 6/9] net/bnxt: remove unnecessary structure variable Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 7/9] net/bnxt: remove a redundant variable Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 8/9] net/bnxt: fix to support zero mark id along with RSS action Somnath Kotur
2020-01-28 7:29 ` [dpdk-dev] [PATCH 9/9] net/bnxt: fix coverity warnings Somnath Kotur
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 0/9] bnxt patch set Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 1/9] net/bnxt: fix alloc filter to use a common routine Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 2/9] net/bnxt: fix bumping of L2 filter reference count Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 3/9] net/bnxt: fix to allow group ID 0 for RSS action Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 4/9] net/bnxt: remove redundant if statement Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 5/9] net/bnxt: remove redundant macro Ajit Khaparde
2020-01-28 21:01 ` Ajit Khaparde [this message]
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 7/9] net/bnxt: remove a redundant variable Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 8/9] net/bnxt: fix to support zero mark id along with RSS action Ajit Khaparde
2020-01-28 21:01 ` [dpdk-dev] [PATCH v3 9/9] net/bnxt: fix coverity warnings Ajit Khaparde
2020-01-29 12:30 ` Ferruh Yigit
2020-01-28 21:07 ` [dpdk-dev] [PATCH v3 0/9] bnxt patch set Ajit Khaparde
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=20200128210159.6972-7-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=santosh.rastapur@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=stable@dpdk.org \
/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).