Re: [PATCH net-next 2/5] bnxt_en: Refactor bnxt_get_regs()
From: Michael Chan <michael.chan@broadcom.com>
Date: 2025-08-18 16:56:52
Attachments
- smime.p7s [application/pkcs7-signature] 4196 bytes
From: Michael Chan <michael.chan@broadcom.com>
Date: 2025-08-18 16:56:52
On Mon, Aug 18, 2025 at 1:56 AM Przemek Kitszel [off-list ref] wrote:
On 8/18/25 02:49, Michael Chan wrote:quoted
From: Shruti Parab <redacted> Separate the code that sends the FW message to retrieve pcie stats into a new helper function. This will be useful when adding the support for the larger struct pcie_ctx_hw_stats_v2. Signed-off-by: Shruti Parab <redacted> Signed-off-by: Michael Chan <michael.chan@broadcom.com> --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-)diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 68a4ee9f69b1..2eb7c09a116f 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c@@ -2074,6 +2074,25 @@ static int bnxt_get_regs_len(struct net_device *dev) return reg_len; } +static void * +__bnxt_hwrm_pcie_qstats(struct bnxt *bp, struct hwrm_pcie_qstats_input *req) +{ + struct pcie_ctx_hw_stats_v2 *hw_pcie_stats; + dma_addr_t hw_pcie_stats_addr; + int rc; + + hw_pcie_stats = hwrm_req_dma_slice(bp, req, sizeof(*hw_pcie_stats), + &hw_pcie_stats_addr); + if (!hw_pcie_stats)looks like hwrm_req_drop() is missing If that was intentionall, I would expect commit message to explain the imbalance of old and new code for "refactor".
The caller handles hwrm_req_drop() for the success and error case. We will modify the Changelog to make this clear. Thanks for the review.