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 8900FA04F3 for ; Thu, 19 Dec 2019 15:37:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E0F81BF96; Thu, 19 Dec 2019 15:37:35 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 822D51BFA1 for ; Thu, 19 Dec 2019 15:37:34 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id d73so5682227wmd.1 for ; Thu, 19 Dec 2019 06:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=akZxwP2GMYn7tcscBZ7SOIr1xZUSmVvpFh2nkaw7Euk=; b=ff8z6cX44f4ISmAMHqT7k3htx5GaJOxgNEVtCR9nzgoMKHP3q2nW9WkcSSweQPnZT4 /d04sBzX3lKPjUXTDsqcqB+PS5Ch2F9ssLhsT7GHQO55MRx2dpYY3DqXXPXW9J/HChxw 1fd63y9DWsgdqBP4cviPThmVnJOS5WBqB8xyt7EZoLTnP8k02GsXHHu/b4N7gsWyaLGz XIwNwt7mKn4K9xJjo1uGLjQm+SdAGe4SVkEIw6MDltQ0sVg/K5VwaUuoK/Wjl8oK16bQ NiN5nHceEJmmU/jVodGUJ0VKauulgxOPByPihCfRleVXSCDfsgAQkrhZtC2n0BvbaJzq 6UOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=akZxwP2GMYn7tcscBZ7SOIr1xZUSmVvpFh2nkaw7Euk=; b=clAfUWfm9HXByWrPZ/pmv5erDi0BEZZIfxDaXmZjAcuvfv+0gHPMLjbm9Ady8RN/sk 5F3E3L79VfQrHuHFuZW7lm1/r3hfVyEkIzB4y1fIBq0whubhoaLX9FaO5QPeywTUDSiB GSGBL1J3m7nWHmUPfmdUs8jhLlkAuGdjB3YOeVjjYDW33rH5feIfndjNgA4ZCjzqRp3Z Gsy8rah5YjPPBBCb67FZfP6vZkryPLebk3VMxeOAeiVSZxVhf068MpSb4dkHNEPJjYFU bvHlaTmJp8xqIg3kcsih90eswGk+Z0UdvdxwQz3q6zU6UqiQCi5zaHbF1LnugS5MLq4Z 8hlQ== X-Gm-Message-State: APjAAAVdDJJy4qs2R7TkVOeK63GhIVu8v6iSiWZd93kk+NFqCMhFylAN 4z4OxJ7Zr/Stl8I9aTEmIn05mLS6tNk= X-Google-Smtp-Source: APXvYqzjTONLI7KBGylWkssA1rmZKbmclP/lQVvjFhGe5PajGPzFdsMFZBYHV6s/MdJO/0yn+a2lxg== X-Received: by 2002:a1c:6308:: with SMTP id x8mr2177022wmb.80.1576766254158; Thu, 19 Dec 2019 06:37:34 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q68sm7457433wme.14.2019.12.19.06.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:37:33 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Thu, 19 Dec 2019 14:33:34 +0000 Message-Id: <20191219143447.21506-67-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: cleanup comments' has been queued to LTS release 17.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From f9d6260f40a154a8a20811efef6d45555278277b Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 10 Oct 2019 14:14:23 +0530 Subject: [PATCH] net/bnxt: cleanup comments [ upstream commit aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 ] - updated one comment for more readability and understanding - fixed typo in comments - moved a comment to right place - removed one out-of-date comment - removed few commented code Fixes: f2a768d4d186 ("net/bnxt: add completion ring") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_cpr.c | 2 -- drivers/net/bnxt/bnxt_hwrm.c | 26 +++++++++----------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index a00fdb4d30..f3f08059ef 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -48,8 +48,6 @@ void bnxt_handle_async_event(struct bnxt *bp, (struct hwrm_async_event_cmpl *)cmp; uint16_t event_id = rte_le_to_cpu_16(async_cmp->event_id); - /* TODO: HWRM async events are not defined yet */ - /* Needs to handle: link events, error events, etc. */ switch (event_id) { case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE: diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 25b392eb4a..0636c66c54 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -86,9 +86,9 @@ static int page_roundup(size_t size) /* * HWRM Functions (sent to HWRM) - * These are named bnxt_hwrm_*() and return -1 if bnxt_hwrm_send_message() - * fails (ie: a timeout), and a positive non-zero HWRM error code if the HWRM - * command was failed by the ChiMP. + * These are named bnxt_hwrm_*() and return 0 on success or -110 if the + * HWRM command times out, or a negative error code if the HWRM + * command was failed by the FW. */ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg, @@ -171,11 +171,11 @@ err_ret: } /* - * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the + * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the * spinlock, and does initial processing. * * HWRM_CHECK_RESULT() returns errors on failure and may not be used. It - * releases the spinlock only if it returns. If the regular int return codes + * releases the spinlock only if it returns. If the regular int return codes * are not used by the function, HWRM_CHECK_RESULT() should not be used * directly, rather it should be copied and modified to suit the function. * @@ -1563,10 +1563,6 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid) return rc; } -/* - * HWRM utility functions - */ - int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp) { unsigned int i; @@ -1768,6 +1764,10 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) return rc; } +/* + * HWRM utility functions + */ + void bnxt_free_hwrm_resources(struct bnxt *bp) { /* Release memzone */ @@ -1816,8 +1816,6 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic) else rc = bnxt_hwrm_clear_l2_filter(bp, filter); STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next); - //if (rc) - //break; } return rc; } @@ -1841,8 +1839,6 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic) STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next); rte_free(flow); - //if (rc) - //break; } return rc; } @@ -3544,10 +3540,6 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR) memcpy(req.src_macaddr, filter->src_macaddr, ETHER_ADDR_LEN); - //if (enables & - //HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR) - //memcpy(req.dst_macaddr, filter->dst_macaddr, - //ETHER_ADDR_LEN); if (enables & HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE) req.ethertype = rte_cpu_to_be_16(filter->ethertype); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:28.985752115 +0000 +++ 0067-net-bnxt-cleanup-comments.patch 2019-12-19 14:32:26.149298698 +0000 @@ -1,8 +1,10 @@ -From aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 Mon Sep 17 00:00:00 2001 +From f9d6260f40a154a8a20811efef6d45555278277b Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 10 Oct 2019 14:14:23 +0530 Subject: [PATCH] net/bnxt: cleanup comments +[ upstream commit aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 ] + - updated one comment for more readability and understanding - fixed typo in comments - moved a comment to right place @@ -10,73 +12,33 @@ - removed few commented code Fixes: f2a768d4d186 ("net/bnxt: add completion ring") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- - drivers/net/bnxt/bnxt_cpr.c | 2 -- - drivers/net/bnxt/bnxt_filter.c | 1 - - drivers/net/bnxt/bnxt_flow.c | 7 ------- - drivers/net/bnxt/bnxt_hwrm.c | 28 +++++++++------------------- - 4 files changed, 9 insertions(+), 29 deletions(-) + drivers/net/bnxt/bnxt_cpr.c | 2 -- + drivers/net/bnxt/bnxt_hwrm.c | 26 +++++++++----------------- + 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c -index 118cf034d2..e6f30fecbf 100644 +index a00fdb4d30..f3f08059ef 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c -@@ -58,8 +58,6 @@ void bnxt_handle_async_event(struct bnxt *bp, - struct bnxt_error_recovery_info *info; - uint32_t event_data; +@@ -48,8 +48,6 @@ void bnxt_handle_async_event(struct bnxt *bp, + (struct hwrm_async_event_cmpl *)cmp; + uint16_t event_id = rte_le_to_cpu_16(async_cmp->event_id); - /* TODO: HWRM async events are not defined yet */ - /* Needs to handle: link events, error events, etc. */ switch (event_id) { case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE: -diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c -index e95d47d296..8120b39165 100644 ---- a/drivers/net/bnxt/bnxt_filter.c -+++ b/drivers/net/bnxt/bnxt_filter.c -@@ -82,7 +82,6 @@ void bnxt_free_all_filters(struct bnxt *bp) - struct bnxt_filter_info *filter, *temp_filter; - unsigned int i; - --// for (i = 0; i < MAX_FF_POOLS; i++) { - for (i = 0; i < bp->nr_vnics; i++) { - vnic = &bp->vnic_info[i]; - filter = STAILQ_FIRST(&vnic->filter); -diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c -index 5aeb001408..85d23540fe 100644 ---- a/drivers/net/bnxt/bnxt_flow.c -+++ b/drivers/net/bnxt/bnxt_flow.c -@@ -1087,10 +1087,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, - vnic->fw_vnic_id != INVALID_HW_RING_ID) - goto use_vnic; - -- //if (!rxq || -- //bp->vnic_info[0].fw_grp_ids[act_q->index] != -- //INVALID_HW_RING_ID || -- //!rxq->rx_deferred_start) { - if (!rxq || - bp->vnic_info[0].fw_grp_ids[act_q->index] != - INVALID_HW_RING_ID) { -@@ -1320,9 +1316,6 @@ use_vnic: - } - rxq = bp->rx_queues[rss->queue[i]]; - -- //if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] != -- //INVALID_HW_RING_ID || -- //!rxq->rx_deferred_start) { - if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] != - INVALID_HW_RING_ID) { - PMD_DRV_LOG(ERR, diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c -index 5b430b9415..1a1ea1bdef 100644 +index 25b392eb4a..0636c66c54 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c -@@ -74,9 +74,9 @@ static void bnxt_hwrm_set_pg_attr(struct bnxt_ring_mem_info *rmem, +@@ -86,9 +86,9 @@ static int page_roundup(size_t size) /* * HWRM Functions (sent to HWRM) @@ -89,7 +51,7 @@ */ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg, -@@ -176,11 +176,11 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg, +@@ -171,11 +171,11 @@ err_ret: } /* @@ -103,15 +65,7 @@ * are not used by the function, HWRM_CHECK_RESULT() should not be used * directly, rather it should be copied and modified to suit the function. * -@@ -518,7 +518,6 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp) - struct hwrm_port_mac_ptp_qcfg_output *resp = bp->hwrm_cmd_resp_addr; - struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; - --/* if (bp->hwrm_spec_code < 0x10801 || ptp) TBD */ - if (ptp) - return 0; - -@@ -2161,10 +2160,6 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid) +@@ -1563,10 +1563,6 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid) return rc; } @@ -122,7 +76,7 @@ int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp) { unsigned int i; -@@ -2383,6 +2378,10 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) +@@ -1768,6 +1764,10 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) return rc; } @@ -133,16 +87,16 @@ void bnxt_free_hwrm_resources(struct bnxt *bp) { /* Release memzone */ -@@ -2432,8 +2431,6 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic) +@@ -1816,8 +1816,6 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic) + else rc = bnxt_hwrm_clear_l2_filter(bp, filter); STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next); - bnxt_free_filter(bp, filter); - //if (rc) - //break; } return rc; } -@@ -2458,8 +2455,6 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic) +@@ -1841,8 +1839,6 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic) STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next); rte_free(flow); @@ -151,22 +105,14 @@ } return rc; } -@@ -2514,7 +2509,6 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp) - for (i = bp->max_vnics - 1; i >= 0; i--) { - struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; - -- // If the VNIC ID is invalid we are not currently using the VNIC - if (vnic->fw_vnic_id == INVALID_HW_RING_ID) - continue; - -@@ -4226,10 +4220,6 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, +@@ -3544,10 +3540,6 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR) memcpy(req.src_macaddr, filter->src_macaddr, - RTE_ETHER_ADDR_LEN); + ETHER_ADDR_LEN); - //if (enables & - //HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR) - //memcpy(req.dst_macaddr, filter->dst_macaddr, -- //RTE_ETHER_ADDR_LEN); +- //ETHER_ADDR_LEN); if (enables & HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE) req.ethertype = rte_cpu_to_be_16(filter->ethertype);