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 88FE3A04DD; Thu, 5 Nov 2020 15:24:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A1062C8D0; Thu, 5 Nov 2020 15:23:07 +0100 (CET) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 8B645C868 for ; Thu, 5 Nov 2020 15:23:02 +0100 (CET) Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CRm2Q60h2zhb7L for ; Thu, 5 Nov 2020 22:22:54 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 5 Nov 2020 22:22:47 +0800 From: Lijun Ou To: CC: , Date: Thu, 5 Nov 2020 22:23:11 +0800 Message-ID: <1604586194-29523-3-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604586194-29523-1-git-send-email-oulijun@huawei.com> References: <1604586194-29523-1-git-send-email-oulijun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 2/5] net/hns3: use unsigned types for bit operator X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hongbo Zheng According to bit operator reliability style, variables in the right expression participating int bit operation cannot be of unsigned type. Signed-off-by: Hongbo Zheng Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/hns3/hns3_rxtx_vec_neon.h | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 6f71cd6..2e9bfda 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1331,7 +1331,7 @@ hns3vf_get_tc_info(struct hns3_hw *hw) { uint8_t resp_msg; int ret; - int i; + uint32_t i; ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_TCINFO, 0, NULL, 0, true, &resp_msg, sizeof(resp_msg)); diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h index 8d7721b..fe525de 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_neon.h +++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h @@ -89,13 +89,12 @@ hns3_desc_parse_field(struct hns3_rx_queue *rxq, struct hns3_desc *rxdp, uint32_t bd_vld_num) { - uint32_t l234_info, ol_info, bd_base_info; + uint32_t l234_info, ol_info, bd_base_info, cksum_err, i; struct rte_mbuf *pkt; uint32_t retcode = 0; - uint32_t cksum_err; - int ret, i; + int ret; - for (i = 0; i < (int)bd_vld_num; i++) { + for (i = 0; i < bd_vld_num; i++) { pkt = sw_ring[i].mbuf; /* init rte_mbuf.rearm_data last 64-bit */ @@ -129,9 +128,9 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq, uint16_t rx_id = rxq->next_to_use; struct hns3_entry *sw_ring = &rxq->sw_ring[rx_id]; struct hns3_desc *rxdp = &rxq->rx_ring[rx_id]; - uint32_t bd_valid_num, parse_retcode; + uint32_t bd_valid_num, parse_retcode, pos; uint16_t nb_rx = 0; - int pos, offset; + int offset; /* mask to shuffle from desc to mbuf's rx_descriptor_fields1 */ uint8x16_t shuf_desc_fields_msk = { -- 2.7.4