DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com,
	Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 10/13] net/nfp: rename macro name of NFD3 Tx descriptor
Date: Mon, 10 Apr 2023 19:00:12 +0800	[thread overview]
Message-ID: <20230410110015.2973660-11-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20230410110015.2973660-1-chaoyong.he@corigine.com>

Rename the name of the macro of NFD3 TX descriptor from PCIE to NFD3,
keep it same with the kernel driver.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c      |  4 +--
 drivers/net/nfp/flower/nfp_flower_ctrl.c |  2 +-
 drivers/net/nfp/nfd3/nfp_nfd3.h          | 36 ++++++++++++------------
 drivers/net/nfp/nfd3/nfp_nfd3_dp.c       |  4 +--
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 9212e6606b..159f88f5ae 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -550,7 +550,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue,
 
 		if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) &&
 				(hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) {
-			txd.flags |= PCIE_DESC_TX_VLAN;
+			txd.flags |= NFD3_DESC_TX_VLAN;
 			txd.vlan = pkt->vlan_tci;
 		}
 
@@ -596,7 +596,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue,
 			 * the priority
 			 */
 			if (likely(pkt_size == 0))
-				txds->offset_eop = PCIE_DESC_TX_EOP | FLOWER_PKT_DATA_OFFSET;
+				txds->offset_eop = NFD3_DESC_TX_EOP | FLOWER_PKT_DATA_OFFSET;
 			else
 				txds->offset_eop = 0;
 
diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c
index 7f9dc5683b..937829c23c 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
@@ -208,7 +208,7 @@ nfp_flower_ctrl_vnic_xmit(struct nfp_app_fw_flower *app_fw_flower,
 	txds->dma_len = txds->data_len;
 	txds->dma_addr_hi = (dma_addr >> 32) & 0xff;
 	txds->dma_addr_lo = (dma_addr & 0xffffffff);
-	txds->offset_eop = FLOWER_PKT_DATA_OFFSET | PCIE_DESC_TX_EOP;
+	txds->offset_eop = FLOWER_PKT_DATA_OFFSET | NFD3_DESC_TX_EOP;
 
 	txq->wr_p++;
 	if (unlikely(txq->wr_p == txq->tx_count)) /* wrapping?*/
diff --git a/drivers/net/nfp/nfd3/nfp_nfd3.h b/drivers/net/nfp/nfd3/nfp_nfd3.h
index 90dd376f9a..7bf2349904 100644
--- a/drivers/net/nfp/nfd3/nfp_nfd3.h
+++ b/drivers/net/nfp/nfd3/nfp_nfd3.h
@@ -7,18 +7,18 @@
 #define _NFP_NFD3_H_
 
 /* TX descriptor format */
-#define PCIE_DESC_TX_EOP                RTE_BIT32(7)
-#define PCIE_DESC_TX_OFFSET_MASK        (0x7F)        /* [0,6] */
+#define NFD3_DESC_TX_EOP                RTE_BIT32(7)
+#define NFD3_DESC_TX_OFFSET_MASK        (0x7F)        /* [0,6] */
 
 /* Flags in the host TX descriptor */
-#define PCIE_DESC_TX_CSUM               RTE_BIT32(7)
-#define PCIE_DESC_TX_IP4_CSUM           RTE_BIT32(6)
-#define PCIE_DESC_TX_TCP_CSUM           RTE_BIT32(5)
-#define PCIE_DESC_TX_UDP_CSUM           RTE_BIT32(4)
-#define PCIE_DESC_TX_VLAN               RTE_BIT32(3)
-#define PCIE_DESC_TX_LSO                RTE_BIT32(2)
-#define PCIE_DESC_TX_ENCAP              RTE_BIT32(1)
-#define PCIE_DESC_TX_O_IP4_CSUM         RTE_BIT32(0)
+#define NFD3_DESC_TX_CSUM               RTE_BIT32(7)
+#define NFD3_DESC_TX_IP4_CSUM           RTE_BIT32(6)
+#define NFD3_DESC_TX_TCP_CSUM           RTE_BIT32(5)
+#define NFD3_DESC_TX_UDP_CSUM           RTE_BIT32(4)
+#define NFD3_DESC_TX_VLAN               RTE_BIT32(3)
+#define NFD3_DESC_TX_LSO                RTE_BIT32(2)
+#define NFD3_DESC_TX_ENCAP              RTE_BIT32(1)
+#define NFD3_DESC_TX_O_IP4_CSUM         RTE_BIT32(0)
 
 #define NFD3_TX_DESC_PER_PKT     1
 
@@ -33,7 +33,7 @@ struct nfp_net_nfd3_tx_desc {
 
 			uint16_t mss;         /* MSS to be used for LSO */
 			uint8_t lso_hdrlen;   /* LSO, where the data starts */
-			uint8_t flags;        /* TX Flags, see @PCIE_DESC_TX_* */
+			uint8_t flags;        /* TX Flags, see @NFD3_DESC_TX_* */
 
 			union {
 				struct {
@@ -99,7 +99,7 @@ nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq,
 	}
 
 	txd->mss = rte_cpu_to_le_16(mb->tso_segsz);
-	txd->flags = PCIE_DESC_TX_LSO;
+	txd->flags = NFD3_DESC_TX_LSO;
 
 	return;
 
@@ -127,26 +127,26 @@ nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq,
 
 	/* Set TCP csum offload if TSO enabled. */
 	if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) != 0)
-		txd->flags |= PCIE_DESC_TX_TCP_CSUM;
+		txd->flags |= NFD3_DESC_TX_TCP_CSUM;
 
 	/* IPv6 does not need checksum */
 	if ((ol_flags & RTE_MBUF_F_TX_IP_CKSUM) != 0)
-		txd->flags |= PCIE_DESC_TX_IP4_CSUM;
+		txd->flags |= NFD3_DESC_TX_IP4_CSUM;
 
 	if ((ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) != 0)
-		txd->flags |= PCIE_DESC_TX_ENCAP;
+		txd->flags |= NFD3_DESC_TX_ENCAP;
 
 	switch (ol_flags & RTE_MBUF_F_TX_L4_MASK) {
 	case RTE_MBUF_F_TX_UDP_CKSUM:
-		txd->flags |= PCIE_DESC_TX_UDP_CSUM;
+		txd->flags |= NFD3_DESC_TX_UDP_CSUM;
 		break;
 	case RTE_MBUF_F_TX_TCP_CKSUM:
-		txd->flags |= PCIE_DESC_TX_TCP_CSUM;
+		txd->flags |= NFD3_DESC_TX_TCP_CSUM;
 		break;
 	}
 
 	if ((ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK)) != 0)
-		txd->flags |= PCIE_DESC_TX_CSUM;
+		txd->flags |= NFD3_DESC_TX_CSUM;
 }
 
 uint16_t nfp_net_nfd3_xmit_pkts(void *tx_queue,
diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
index 509d5b0c88..909156d69c 100644
--- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
+++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c
@@ -34,7 +34,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq,
 		return;
 
 	if ((mb->ol_flags & RTE_MBUF_F_TX_VLAN) != 0) {
-		txd->flags |= PCIE_DESC_TX_VLAN;
+		txd->flags |= NFD3_DESC_TX_VLAN;
 		txd->vlan = mb->vlan_tci;
 	}
 }
@@ -201,7 +201,7 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue,
 			 * the priority
 			 */
 			if (likely(pkt_size == 0))
-				txds->offset_eop = PCIE_DESC_TX_EOP;
+				txds->offset_eop = NFD3_DESC_TX_EOP;
 			else
 				txds->offset_eop = 0;
 
-- 
2.39.1


  parent reply	other threads:[~2023-04-10 11:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 11:00 [PATCH 00/13] Sync the kernel driver logic Chaoyong He
2023-04-10 11:00 ` [PATCH 01/13] net/nfp: define correct size for configuration BAR Chaoyong He
2023-04-10 11:00 ` [PATCH 02/13] net/nfp: move shared target logic to own source file Chaoyong He
2023-04-10 11:00 ` [PATCH 03/13] net/nfp: remove the redundant macro about CPP target Chaoyong He
2023-04-10 11:00 ` [PATCH 04/13] net/nfp: drop usage of return error helpers Chaoyong He
2023-04-10 11:00 ` [PATCH 05/13] net/nfp: use generic macros for array size and to set bits Chaoyong He
2023-04-10 11:00 ` [PATCH 06/13] net/nfp: remove dead code related to CPP Chaoyong He
2023-04-10 11:00 ` [PATCH 07/13] net/nfp: remove duplicated nffw defines Chaoyong He
2023-04-10 11:00 ` [PATCH 08/13] net/nfp: move NFD3 logic to own source file Chaoyong He
2023-04-10 11:00 ` [PATCH 09/13] net/nfp: adjust the coding style for NFD3 Chaoyong He
2023-04-10 11:00 ` Chaoyong He [this message]
2023-04-10 11:00 ` [PATCH 11/13] net/nfp: move NFDk logic to own source file Chaoyong He
2023-04-10 11:00 ` [PATCH 12/13] net/nfp: adjust the coding style for NFDk Chaoyong He
2023-04-10 11:00 ` [PATCH 13/13] net/nfp: modify the logic of some NFDk function Chaoyong He
2023-05-11 14:47 ` [PATCH 00/13] Sync the kernel driver logic Niklas Söderlund
2023-05-12 14:37 ` 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=20230410110015.2973660-11-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.com \
    /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).