DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <thomas@monjalon.net>
Subject: [dpdk-dev] [PATCH 1/9] net/hns3: fix the shift of DMA address in Rx/Tx queue
Date: Tue, 2 Nov 2021 11:17:21 +0800	[thread overview]
Message-ID: <20211102031729.35536-2-humin29@huawei.com> (raw)
In-Reply-To: <20211102031729.35536-1-humin29@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

The patch obtains the upper 32 bits of the Rx/Tx queue DMA address in one
step instead of two steps.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ceb98025f8..00af73c850 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -322,7 +322,7 @@ hns3_init_rx_queue_hw(struct hns3_rx_queue *rxq)
 
 	hns3_write_dev(rxq, HNS3_RING_RX_BASEADDR_L_REG, (uint32_t)dma_addr);
 	hns3_write_dev(rxq, HNS3_RING_RX_BASEADDR_H_REG,
-		       (uint32_t)((dma_addr >> 31) >> 1));
+		       (uint32_t)(dma_addr >> 32));
 
 	hns3_write_dev(rxq, HNS3_RING_RX_BD_LEN_REG,
 		       hns3_buf_size2type(rx_buf_len));
@@ -337,7 +337,7 @@ hns3_init_tx_queue_hw(struct hns3_tx_queue *txq)
 
 	hns3_write_dev(txq, HNS3_RING_TX_BASEADDR_L_REG, (uint32_t)dma_addr);
 	hns3_write_dev(txq, HNS3_RING_TX_BASEADDR_H_REG,
-		       (uint32_t)((dma_addr >> 31) >> 1));
+		       (uint32_t)(dma_addr >> 32));
 
 	hns3_write_dev(txq, HNS3_RING_TX_BD_NUM_REG,
 		       HNS3_CFG_DESC_NUM(txq->nb_tx_desc));
-- 
2.33.0


  reply	other threads:[~2021-11-02  3:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02  3:17 [dpdk-dev] [PATCH 0/9] code optimization for hns3 PMD Min Hu (Connor)
2021-11-02  3:17 ` Min Hu (Connor) [this message]
2021-11-02  3:17 ` [dpdk-dev] [PATCH 2/9] net/hns3: remove a redundant function declaration Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 3/9] net/hns3: modifying code alignment Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 4/9] net/hns3: use unsigned integer for bitwise operations Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 5/9] net/hns3: extract a common file Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 6/9] net/hns3: add hns3 flow header file Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 7/9] net/hns3: remove magic numbers Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 8/9] net/hns3: fix the return value of the function Min Hu (Connor)
2021-11-02  3:17 ` [dpdk-dev] [PATCH 9/9] net/hns3: remove PF/VF duplicate code Min Hu (Connor)
2021-11-04 14:55   ` Ferruh Yigit
2021-11-05  2:49     ` Min Hu (Connor)
2021-11-05  2:46 ` [dpdk-dev] [PATCH v2 0/9] code optimization for hns3 PMD Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 1/9] net/hns3: fix the shift of DMA address in Rx/Tx queue Min Hu (Connor)
2021-11-05 17:03     ` Ferruh Yigit
2021-11-05 17:05     ` Ferruh Yigit
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 2/9] net/hns3: remove a redundant function declaration Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 3/9] net/hns3: modifying code alignment Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 4/9] net/hns3: use unsigned integer for bitwise operations Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 5/9] net/hns3: extract a common file Min Hu (Connor)
2021-11-05 17:11     ` Ferruh Yigit
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 6/9] net/hns3: add hns3 flow header file Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 7/9] net/hns3: remove magic numbers Min Hu (Connor)
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 8/9] net/hns3: fix the return value of the function Min Hu (Connor)
2021-11-05 17:04     ` Ferruh Yigit
2021-11-05  2:46   ` [dpdk-dev] [PATCH v2 9/9] net/hns3: remove PF/VF duplicate code Min Hu (Connor)
2021-11-05 17:02     ` Ferruh Yigit
2021-11-06  1:42 ` [dpdk-dev] [PATCH v3 0/9] code optimization for hns3 PMD Min Hu (Connor)
2021-11-06  1:42   ` [dpdk-dev] [PATCH v3 1/9] net/hns3: fix the shift of DMA address in Rx/Tx queue Min Hu (Connor)
2021-11-06  1:42   ` [dpdk-dev] [PATCH v3 2/9] net/hns3: remove a redundant function declaration Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 3/9] net/hns3: modifying code alignment Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 4/9] net/hns3: use unsigned integer for bitwise operations Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 5/9] net/hns3: extract a common file Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 6/9] net/hns3: add hns3 flow header file Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 7/9] net/hns3: remove magic numbers Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 8/9] net/hns3: fix the return value of the function Min Hu (Connor)
2021-11-06  1:43   ` [dpdk-dev] [PATCH v3 9/9] net/hns3: remove PF/VF duplicate code Min Hu (Connor)
2021-11-08 15:13   ` [dpdk-dev] [PATCH v3 0/9] code optimization for hns3 PMD Ferruh Yigit

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=20211102031729.35536-2-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).