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 42B60A04B5 for ; Tue, 3 Dec 2019 19:29:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 36E6F1BFB7; Tue, 3 Dec 2019 19:29:33 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 5110C1BFB7 for ; Tue, 3 Dec 2019 19:29:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bcz408LVEjZiLsCMry6VurVk7aOh9x1zCuwifg7MhLY=; b=S4A43APod8xuFa19rS985udwBLQ/nQMqv4XXnR1QvlTGd8iLX6zg+iAcl8hTgUqCJ/Ggi2 nXUXMDcoyis9/t3yCq/vxsikQkT6DBHXFbmDhhge0KT5YRSCbbVIHKCd3DmmYCuJhzhW4h Lh0A65MBDYhu4mfA1kZwwZUR0hVyWKo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-ZtcD3Z_lPCuK386l44RUmQ-1; Tue, 03 Dec 2019 13:29:24 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7376C477; Tue, 3 Dec 2019 18:29:23 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 218515C240; Tue, 3 Dec 2019 18:29:21 +0000 (UTC) From: Kevin Traynor To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Tue, 3 Dec 2019 18:27:14 +0000 Message-Id: <20191203182714.17297-65-ktraynor@redhat.com> In-Reply-To: <20191203182714.17297-1-ktraynor@redhat.com> References: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: ZtcD3Z_lPCuK386l44RUmQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/bnxt: cleanup comments' has been queued to LTS release 18.11.6 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 18.11.6 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/10/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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/ff20bd33b868212daf= 014c66a37d275e12ac5189 Thanks. Kevin. --- >From ff20bd33b868212daf014c66a37d275e12ac5189 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_filter.c | 1 - drivers/net/bnxt/bnxt_hwrm.c | 27 +++++++++------------------ 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 0fd6e51e5..ff8fa04b4 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -22,6 +22,4 @@ void bnxt_handle_async_event(struct bnxt *bp, =09uint16_t event_id =3D rte_le_to_cpu_16(async_cmp->event_id); =20 -=09/* TODO: HWRM async events are not defined yet */ -=09/* Needs to handle: link events, error events, etc. */ =09switch (event_id) { =09case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.= c index f43fe0db0..ca0070852 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -83,5 +83,4 @@ void bnxt_free_all_filters(struct bnxt *bp) =09unsigned int i; =20 -//=09for (i =3D 0; i < MAX_FF_POOLS; i++) { =09for (i =3D 0; i < bp->nr_vnics; i++) { =09=09vnic =3D &bp->vnic_info[i]; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 1bd8d3d9f..74f046c29 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -65,7 +65,7 @@ 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 H= WRM - * 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. */ =20 @@ -151,9 +151,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void= *msg, =20 /* - * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs th= e + * 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 co= des + * releases the spinlock only if it returns. If the regular int return cod= es * 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. @@ -465,5 +465,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp) =09struct bnxt_ptp_cfg *ptp =3D bp->ptp_cfg; =20 -/*=09if (bp->hwrm_spec_code < 0x10801 || ptp) TBD */ =09if (ptp) =09=09return 0; @@ -1800,8 +1799,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_= t fid) } =20 -/* - * HWRM utility functions - */ - int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp) { @@ -1995,4 +1990,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) } =20 +/* + * HWRM utility functions + */ + void bnxt_free_hwrm_resources(struct bnxt *bp) { @@ -2043,6 +2042,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, str= uct bnxt_vnic_info *vnic) =09=09=09rc =3D bnxt_hwrm_clear_l2_filter(bp, filter); =09=09STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next); -=09=09//if (rc) -=09=09=09//break; =09} =09return rc; @@ -2068,6 +2065,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bn= xt_vnic_info *vnic) =09=09STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next); =09=09rte_free(flow); -=09=09//if (rc) -=09=09=09//break; =09} =09return rc; @@ -3809,8 +3804,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, =09=09memcpy(req.src_macaddr, filter->src_macaddr, =09=09 ETHER_ADDR_LEN); -=09//if (enables & -=09 //HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR) -=09=09//memcpy(req.dst_macaddr, filter->dst_macaddr, -=09=09 //ETHER_ADDR_LEN); =09if (enables & =09 HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE) --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:55.499988921 +0000 +++ 0065-net-bnxt-cleanup-comments.patch=092019-12-03 17:29:51.803748849 +0= 000 @@ -1 +1 @@ -From aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 Mon Sep 17 00:00:00 2001 +From ff20bd33b868212daf014c66a37d275e12ac5189 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -21,3 +22,2 @@ - 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_hwrm.c | 27 +++++++++------------------ + 3 files changed, 9 insertions(+), 21 deletions(-) @@ -26 +26 @@ -index 118cf034d..e6f30fecb 100644 +index 0fd6e51e5..ff8fa04b4 100644 @@ -29,2 +29,2 @@ -@@ -59,6 +59,4 @@ void bnxt_handle_async_event(struct bnxt *bp, - =09uint32_t event_data; +@@ -22,6 +22,4 @@ void bnxt_handle_async_event(struct bnxt *bp, + =09uint16_t event_id =3D rte_le_to_cpu_16(async_cmp->event_id); @@ -37 +37 @@ -index e95d47d29..8120b3916 100644 +index f43fe0db0..ca0070852 100644 @@ -46,21 +45,0 @@ -diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c -index 5aeb00140..85d23540f 100644 ---- a/drivers/net/bnxt/bnxt_flow.c -+++ b/drivers/net/bnxt/bnxt_flow.c -@@ -1088,8 +1088,4 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev= , - =09=09=09goto use_vnic; -=20 --=09=09//if (!rxq || --=09=09 //bp->vnic_info[0].fw_grp_ids[act_q->index] !=3D --=09=09 //INVALID_HW_RING_ID || --=09=09 //!rxq->rx_deferred_start) { - =09=09if (!rxq || - =09=09 bp->vnic_info[0].fw_grp_ids[act_q->index] !=3D -@@ -1321,7 +1317,4 @@ use_vnic: - =09=09=09rxq =3D bp->rx_queues[rss->queue[i]]; -=20 --=09=09=09//if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=3D --=09=09=09 //INVALID_HW_RING_ID || --=09=09=09 //!rxq->rx_deferred_start) { - =09=09=09if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=3D - =09=09=09 INVALID_HW_RING_ID) { @@ -68 +47 @@ -index 5b430b941..1a1ea1bde 100644 +index 1bd8d3d9f..74f046c29 100644 @@ -71 +50 @@ -@@ -75,7 +75,7 @@ static void bnxt_hwrm_set_pg_attr(struct bnxt_ring_mem_i= nfo *rmem, +@@ -65,7 +65,7 @@ static int page_roundup(size_t size) @@ -82 +61 @@ -@@ -177,9 +177,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, voi= d *msg, +@@ -151,9 +151,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, voi= d *msg, @@ -94 +73 @@ -@@ -519,5 +519,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp) +@@ -465,5 +465,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp) @@ -100 +79 @@ -@@ -2162,8 +2161,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16= _t fid) +@@ -1800,8 +1799,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16= _t fid) @@ -109 +88 @@ -@@ -2384,4 +2379,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) +@@ -1995,4 +1990,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp) @@ -118 +97,2 @@ -@@ -2433,6 +2432,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, st= ruct bnxt_vnic_info *vnic) +@@ -2043,6 +2042,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, st= ruct bnxt_vnic_info *vnic) + =09=09=09rc =3D bnxt_hwrm_clear_l2_filter(bp, filter); @@ -120 +99,0 @@ - =09=09bnxt_free_filter(bp, filter); @@ -125 +104 @@ -@@ -2459,6 +2456,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct b= nxt_vnic_info *vnic) +@@ -2068,6 +2065,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct b= nxt_vnic_info *vnic) @@ -132,7 +111 @@ -@@ -2515,5 +2510,4 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp) - =09=09struct bnxt_vnic_info *vnic =3D &bp->vnic_info[i]; -=20 --=09=09// If the VNIC ID is invalid we are not currently using the VNIC - =09=09if (vnic->fw_vnic_id =3D=3D INVALID_HW_RING_ID) - =09=09=09continue; -@@ -4227,8 +4221,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, +@@ -3809,8 +3804,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp, @@ -140 +113 @@ - =09=09 RTE_ETHER_ADDR_LEN); + =09=09 ETHER_ADDR_LEN); @@ -144 +117 @@ --=09=09 //RTE_ETHER_ADDR_LEN); +-=09=09 //ETHER_ADDR_LEN);