From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: [dpdk-dev] [PATCH v2 6/7] net/bnxt: move locally used functions to static
Date: Thu, 6 Feb 2020 10:44:31 -0800 [thread overview]
Message-ID: <20200206184432.34360-7-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20200206184432.34360-1-ajit.khaparde@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
bnxt_rss_ctxts() function is declared in header file bnxt.h,
implemented in bnxt_ethdev.c, and called only in bnxt_ethdev.c.
Also many functions are declared in header file bnxt_hwrm.h,
implemented in bnxt_hwrm.c, and called only in bnxt_hwrm.c.
This patch moves these function declarations into bnxt_ethdev.c
and bnxt_hwrm.c, as static functions.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 1 -
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 15 ++++++++++-----
drivers/net/bnxt/bnxt_hwrm.h | 5 -----
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index e8a30fa31..3ae08a2ed 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -686,7 +686,6 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
bool exp_link_status);
int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg);
int is_bnxt_in_error(struct bnxt *bp);
-uint16_t bnxt_rss_ctxts(const struct bnxt *bp);
int bnxt_map_fw_health_status_regs(struct bnxt *bp);
uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3c40f4b59..18aa313fd 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -150,7 +150,7 @@ int is_bnxt_in_error(struct bnxt *bp)
* High level utility functions
*/
-uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
+static uint16_t bnxt_rss_ctxts(const struct bnxt *bp)
{
if (!BNXT_CHIP_THOR(bp))
return 1;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4d99d824e..acecf2784 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2254,7 +2254,8 @@ int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp)
return 0;
}
-int bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
+static int
+bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
{
int rc;
unsigned int i;
@@ -2305,7 +2306,8 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
return rc;
}
-int bnxt_free_all_hwrm_ring_grps(struct bnxt *bp)
+static int
+bnxt_free_all_hwrm_ring_grps(struct bnxt *bp)
{
uint16_t idx;
uint32_t rc = 0;
@@ -2396,7 +2398,8 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
bp->grp_info[queue_index].cp_fw_ring_id = INVALID_HW_RING_ID;
}
-int bnxt_free_all_hwrm_rings(struct bnxt *bp)
+static int
+bnxt_free_all_hwrm_rings(struct bnxt *bp)
{
unsigned int i;
@@ -2485,7 +2488,8 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
return 0;
}
-int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+static int
+bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
{
struct bnxt_filter_info *filter;
int rc = 0;
@@ -2546,7 +2550,8 @@ int bnxt_set_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
return rc;
}
-void bnxt_free_tunnel_ports(struct bnxt *bp)
+static void
+bnxt_free_tunnel_ports(struct bnxt *bp)
{
if (bp->vxlan_port_cnt)
bnxt_hwrm_tunnel_dst_port_free(bp, bp->vxlan_fw_dst_port_id,
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 56a851b8a..5eb2ee883 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -142,14 +142,10 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp);
int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp);
-int bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp);
-int bnxt_free_all_hwrm_rings(struct bnxt *bp);
-int bnxt_free_all_hwrm_ring_grps(struct bnxt *bp);
int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp);
void bnxt_free_cp_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
void bnxt_free_nq_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
int bnxt_set_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic);
-int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic);
void bnxt_free_all_hwrm_resources(struct bnxt *bp);
void bnxt_free_hwrm_resources(struct bnxt *bp);
void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index);
@@ -174,7 +170,6 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
uint8_t tunnel_type);
int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port,
uint8_t tunnel_type);
-void bnxt_free_tunnel_ports(struct bnxt *bp);
int bnxt_hwrm_set_default_vlan(struct bnxt *bp, int vf, uint8_t is_vf);
int bnxt_hwrm_port_qstats(struct bnxt *bp);
int bnxt_hwrm_port_clr_stats(struct bnxt *bp);
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2020-02-06 18:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 16:33 [dpdk-dev] [PATCH 0/7] bnxt patchset with bug fixes Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 1/7] net/bnxt: avoid an unnecessary delay in port stop Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix default timeout for ver_get command Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 3/7] net/bnxt: log firmware debug notifications Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 4/7] net/bnxt: register for debug notification async event from fw Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix to call port stop when error recovery fails Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 6/7] net/bnxt: move locally used functions to static Kalesh A P
2020-02-06 16:33 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix buffer allocation reattempt logic Kalesh A P
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset with bug fixes Ajit Khaparde
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: fix unnecessary delay in port stop Ajit Khaparde
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix default timeout for command to get FW version Ajit Khaparde
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: log firmware debug notifications Ajit Khaparde
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: register for debug notification event from FW Ajit Khaparde
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix to call port stop when error recovery fails Ajit Khaparde
2020-02-06 18:44 ` Ajit Khaparde [this message]
2020-02-06 18:44 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix buffer allocation reattempt logic Ajit Khaparde
2020-02-06 18:50 ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset with bug fixes 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=20200206184432.34360-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 \
/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).