From: Jin Liu <jin.liu@corigine.com>
To: dev@dpdk.org
Cc: niklas.soderlund@corigine.com, Jin Liu <jin.liu@corigine.com>,
Diana Wang <na.wang@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>,
Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH v4 05/13] net/nfp: rename function and struct
Date: Thu, 23 Jun 2022 04:26:07 +0200 [thread overview]
Message-ID: <20220623022615.3628093-6-jin.liu@corigine.com> (raw)
In-Reply-To: <20220623022615.3628093-1-jin.liu@corigine.com>
Add 'nfd3' into the firmware with NFD3 eth driver function name,
preparation for the next work, as we will support another version
firmware with NFDk.
Signed-off-by: Jin Liu <jin.liu@corigine.com>
Signed-off-by: Diana Wang <na.wang@corigine.com>
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 12 ++++++------
drivers/net/nfp/nfp_ethdev_vf.c | 8 ++++----
drivers/net/nfp/nfp_rxtx.c | 30 +++++++++++++++---------------
drivers/net/nfp/nfp_rxtx.h | 8 ++++----
4 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index b80109ec37..ae6cb5943f 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -329,7 +329,7 @@ nfp_net_close(struct rte_eth_dev *dev)
}
/* Initialise and register driver with DPDK Application */
-static const struct eth_dev_ops nfp_net_eth_dev_ops = {
+static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = {
.dev_configure = nfp_net_configure,
.dev_start = nfp_net_start,
.dev_stop = nfp_net_stop,
@@ -352,7 +352,7 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
.rss_hash_conf_get = nfp_net_rss_hash_conf_get,
.rx_queue_setup = nfp_net_rx_queue_setup,
.rx_queue_release = nfp_net_rx_queue_release,
- .tx_queue_setup = nfp_net_tx_queue_setup,
+ .tx_queue_setup = nfp_net_nfd3_tx_queue_setup,
.tx_queue_release = nfp_net_tx_queue_release,
.rx_queue_intr_enable = nfp_rx_queue_intr_enable,
.rx_queue_intr_disable = nfp_rx_queue_intr_disable,
@@ -402,10 +402,10 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
"NFP internal port number: %d", port, hw->nfp_idx);
- eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+ eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
eth_dev->rx_queue_count = nfp_net_rx_queue_count;
eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
- eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+ eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
/* For secondary processes, the primary has done all the work */
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -971,10 +971,10 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
return -ENODEV;
}
eth_dev->process_private = cpp;
- eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+ eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
eth_dev->rx_queue_count = nfp_net_rx_queue_count;
eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
- eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+ eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
rte_eth_dev_probing_finish(eth_dev);
}
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 08077632c6..d0fa1df24d 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -236,7 +236,7 @@ nfp_netvf_close(struct rte_eth_dev *dev)
}
/* Initialise and register VF driver with DPDK Application */
-static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
+static const struct eth_dev_ops nfp_netvf_nfd3_eth_dev_ops = {
.dev_configure = nfp_net_configure,
.dev_start = nfp_netvf_start,
.dev_stop = nfp_netvf_stop,
@@ -259,7 +259,7 @@ static const struct eth_dev_ops nfp_netvf_eth_dev_ops = {
.rss_hash_conf_get = nfp_net_rss_hash_conf_get,
.rx_queue_setup = nfp_net_rx_queue_setup,
.rx_queue_release = nfp_net_rx_queue_release,
- .tx_queue_setup = nfp_net_tx_queue_setup,
+ .tx_queue_setup = nfp_net_nfd3_tx_queue_setup,
.tx_queue_release = nfp_net_tx_queue_release,
.rx_queue_intr_enable = nfp_rx_queue_intr_enable,
.rx_queue_intr_disable = nfp_rx_queue_intr_disable,
@@ -292,10 +292,10 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
- eth_dev->dev_ops = &nfp_netvf_eth_dev_ops;
+ eth_dev->dev_ops = &nfp_netvf_nfd3_eth_dev_ops;
eth_dev->rx_queue_count = nfp_net_rx_queue_count;
eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
- eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
+ eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
/* For secondary processes, the primary has done all the work */
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index cd7faa2c58..9b769c9775 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -655,7 +655,7 @@ nfp_net_reset_tx_queue(struct nfp_net_txq *txq)
}
int
-nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
uint16_t nb_desc, unsigned int socket_id,
const struct rte_eth_txconf *tx_conf)
{
@@ -670,7 +670,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
PMD_INIT_FUNC_TRACE();
/* Validating number of descriptors */
- tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc);
+ tx_desc_sz = nb_desc * sizeof(struct nfp_net_nfd3_tx_desc);
if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 ||
nb_desc > NFP_NET_MAX_TX_DESC ||
nb_desc < NFP_NET_MIN_TX_DESC) {
@@ -718,7 +718,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
* resizing in later calls to the queue setup function.
*/
tz = rte_eth_dma_zone_reserve(dev, "tx_ring", queue_idx,
- sizeof(struct nfp_net_tx_desc) *
+ sizeof(struct nfp_net_nfd3_tx_desc) *
NFP_NET_MAX_TX_DESC, NFP_MEMZONE_ALIGN,
socket_id);
if (tz == NULL) {
@@ -743,7 +743,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
/* Saving physical and virtual addresses for the TX ring */
txq->dma = (uint64_t)tz->iova;
- txq->txds = (struct nfp_net_tx_desc *)tz->addr;
+ txq->txds = (struct nfp_net_nfd3_tx_desc *)tz->addr;
/* mbuf pointers array for referencing mbufs linked to TX descriptors */
txq->txbufs = rte_zmalloc_socket("txq->txbufs",
@@ -773,7 +773,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
/* Leaving always free descriptors for avoiding wrapping confusion */
static inline
-uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq)
+uint32_t nfp_net_nfd3_free_tx_desc(struct nfp_net_txq *txq)
{
if (txq->wr_p >= txq->rd_p)
return txq->tx_count - (txq->wr_p - txq->rd_p) - 8;
@@ -790,14 +790,14 @@ uint32_t nfp_free_tx_desc(struct nfp_net_txq *txq)
* This function uses the host copy* of read/write pointers
*/
static inline
-uint32_t nfp_net_txq_full(struct nfp_net_txq *txq)
+uint32_t nfp_net_nfd3_txq_full(struct nfp_net_txq *txq)
{
- return (nfp_free_tx_desc(txq) < txq->tx_free_thresh);
+ return (nfp_net_nfd3_free_tx_desc(txq) < txq->tx_free_thresh);
}
/* nfp_net_tx_tso - Set TX descriptor for TSO */
static inline void
-nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
+nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd,
struct rte_mbuf *mb)
{
uint64_t ol_flags;
@@ -828,7 +828,7 @@ nfp_net_tx_tso(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
/* nfp_net_tx_cksum - Set TX CSUM offload flags in TX descriptor */
static inline void
-nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
+nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd,
struct rte_mbuf *mb)
{
uint64_t ol_flags;
@@ -857,11 +857,11 @@ nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
}
uint16_t
-nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
{
struct nfp_net_txq *txq;
struct nfp_net_hw *hw;
- struct nfp_net_tx_desc *txds, txd;
+ struct nfp_net_nfd3_tx_desc *txds, txd;
struct rte_mbuf *pkt;
uint64_t dma_addr;
int pkt_size, dma_size;
@@ -876,10 +876,10 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
PMD_TX_LOG(DEBUG, "working for queue %u at pos %d and %u packets",
txq->qidx, txq->wr_p, nb_pkts);
- if ((nfp_free_tx_desc(txq) < nb_pkts) || (nfp_net_txq_full(txq)))
+ if ((nfp_net_nfd3_free_tx_desc(txq) < nb_pkts) || (nfp_net_nfd3_txq_full(txq)))
nfp_net_tx_free_bufs(txq);
- free_descs = (uint16_t)nfp_free_tx_desc(txq);
+ free_descs = (uint16_t)nfp_net_nfd3_free_tx_desc(txq);
if (unlikely(free_descs == 0))
return 0;
@@ -913,8 +913,8 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
* multisegment packet, but TSO info needs to be in all of them.
*/
txd.data_len = pkt->pkt_len;
- nfp_net_tx_tso(txq, &txd, pkt);
- nfp_net_tx_cksum(txq, &txd, pkt);
+ nfp_net_nfd3_tx_tso(txq, &txd, pkt);
+ nfp_net_nfd3_tx_cksum(txq, &txd, pkt);
if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) &&
(hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) {
diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
index dec1857da3..d784f52b66 100644
--- a/drivers/net/nfp/nfp_rxtx.h
+++ b/drivers/net/nfp/nfp_rxtx.h
@@ -53,7 +53,7 @@
#define PCIE_DESC_TX_ENCAP_VXLAN (1 << 1)
#define PCIE_DESC_TX_ENCAP_GRE (1 << 0)
-struct nfp_net_tx_desc {
+struct nfp_net_nfd3_tx_desc {
union {
struct {
uint8_t dma_addr_hi; /* High bits of host buf address */
@@ -124,7 +124,7 @@ struct nfp_net_txq {
* of the queue and @size is the size in bytes for the queue
* (needed for free)
*/
- struct nfp_net_tx_desc *txds;
+ struct nfp_net_nfd3_tx_desc *txds;
/*
* At this point 48 bytes have been used for all the fields in the
@@ -286,10 +286,10 @@ int nfp_net_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
struct rte_mempool *mp);
void nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
void nfp_net_reset_tx_queue(struct nfp_net_txq *txq);
-int nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+int nfp_net_nfd3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
uint16_t nb_desc, unsigned int socket_id,
const struct rte_eth_txconf *tx_conf);
-uint16_t nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+uint16_t nfp_net_nfd3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
#endif /* _NFP_RXTX_H_ */
--
2.27.0
next prev parent reply other threads:[~2022-06-23 2:27 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 1:52 [PATCH 00/14] Add support of NFP3800 chip and firmware with NFDk Jin Liu
2022-06-02 1:52 ` [PATCH 01/14] net/nfp: change the coding style Jin Liu
2022-06-02 22:52 ` Ferruh Yigit
2022-06-14 8:50 ` Kevin Liu
2022-06-02 1:52 ` [PATCH 02/14] net/nfp: remove unnecessary forward function declaration Jin Liu
2022-06-02 1:52 ` [PATCH 03/14] net/nfp: remove pessimistic limit Jin Liu
2022-06-02 1:52 ` [PATCH 04/14] net/nfp: rename set MAC function Jin Liu
2022-06-02 1:52 ` [PATCH 05/14] net/nfp: rename function and struct Jin Liu
2022-06-02 1:52 ` [PATCH 06/14] net/nfp: support NFP3800 card Jin Liu
2022-06-02 22:52 ` Ferruh Yigit
2022-06-14 8:50 ` Kevin Liu
2022-06-02 1:52 ` [PATCH 07/14] net/nfp: support NFDK firmware Jin Liu
2022-06-02 22:53 ` Ferruh Yigit
2022-06-14 8:49 ` Kevin Liu
2022-06-14 9:21 ` Ferruh Yigit
2022-06-14 9:30 ` Kevin Liu
2022-06-02 1:52 ` [PATCH 08/14] net/nfp: structure adjustment Jin Liu
2022-06-02 22:54 ` Ferruh Yigit
2022-06-14 8:49 ` Kevin Liu
2022-06-02 1:52 ` [PATCH 09/14] net/nfp: nfdk netdev option and queue function Jin Liu
2022-06-02 1:53 ` [PATCH 10/14] net/nfp: add queue stop and close helper function Jin Liu
2022-06-02 1:53 ` [PATCH 11/14] net/nfp: nfdk stop and close function Jin Liu
2022-06-02 1:53 ` [PATCH 12/14] net/nfp: move macro from C file to head file Jin Liu
2022-06-02 1:53 ` [PATCH 13/14] net/nfp: nfdk packet xmit function Jin Liu
2022-06-02 1:53 ` [PATCH 14/14] net/nfp: modify RSS logic Jin Liu
2022-06-02 22:56 ` Ferruh Yigit
2022-06-14 8:50 ` Kevin Liu
2022-06-02 22:51 ` [PATCH 00/14] Add support of NFP3800 chip and firmware with NFDk Ferruh Yigit
2022-06-14 8:48 ` Kevin Liu
2022-06-16 2:39 ` [PATCH v2 00/15] " Jin Liu
2022-06-16 2:39 ` [PATCH v2 01/15] doc: update release note Jin Liu
2022-06-16 15:04 ` Ferruh Yigit
2022-06-16 2:39 ` [PATCH v2 02/15] doc: update nfp documentation Jin Liu
2022-06-16 15:04 ` Ferruh Yigit
2022-06-16 2:39 ` [PATCH v2 03/15] net/nfp: change the coding style Jin Liu
2022-06-16 2:39 ` [PATCH v2 04/15] net/nfp: remove unnecessary forward function declaration Jin Liu
2022-06-16 2:39 ` [PATCH v2 05/15] net/nfp: remove pessimistic limit Jin Liu
2022-06-16 2:39 ` [PATCH v2 06/15] net/nfp: rename set MAC function Jin Liu
2022-06-16 2:39 ` [PATCH v2 07/15] net/nfp: rename function and struct Jin Liu
2022-06-16 2:39 ` [PATCH v2 08/15] net/nfp: support NFP3800 card Jin Liu
2022-06-16 15:04 ` Ferruh Yigit
2022-06-16 2:39 ` [PATCH v2 09/15] net/nfp: support firmware with NFDk Jin Liu
2022-06-16 2:39 ` [PATCH v2 10/15] net/nfp: structure adjustment Jin Liu
2022-06-16 2:39 ` [PATCH v2 11/15] net/nfp: nfdk netdev option and queue function Jin Liu
2022-06-16 2:39 ` [PATCH v2 12/15] net/nfp: add queue stop and close helper function Jin Liu
2022-06-16 2:39 ` [PATCH v2 13/15] net/nfp: move macro from C file to head file Jin Liu
2022-06-16 2:39 ` [PATCH v2 14/15] net/nfp: nfdk packet xmit function Jin Liu
2022-06-16 2:39 ` [PATCH v2 15/15] net/nfp: modify RSS logic Jin Liu
2022-06-16 15:06 ` [PATCH v2 00/15] Add support of NFP3800 chip and firmware with NFDk Ferruh Yigit
2022-06-17 9:34 ` [PATCH v3 00/13] " Jin Liu
2022-06-17 9:34 ` [PATCH v3 01/13] net/nfp: change the coding style Jin Liu
2022-06-17 9:34 ` [PATCH v3 02/13] net/nfp: remove unnecessary forward function declaration Jin Liu
2022-06-17 9:34 ` [PATCH v3 03/13] net/nfp: remove pessimistic limit Jin Liu
2022-06-17 9:34 ` [PATCH v3 04/13] net/nfp: rename set MAC function Jin Liu
2022-06-17 9:34 ` [PATCH v3 05/13] net/nfp: rename function and struct Jin Liu
2022-06-17 9:34 ` [PATCH v3 06/13] net/nfp: support NFP3800 card Jin Liu
2022-06-17 9:34 ` [PATCH v3 07/13] net/nfp: support firmware with NFDk Jin Liu
2022-06-17 9:34 ` [PATCH v3 08/13] net/nfp: structure adjustment Jin Liu
2022-06-17 9:34 ` [PATCH v3 09/13] net/nfp: nfdk netdev option and queue function Jin Liu
2022-06-17 9:34 ` [PATCH v3 10/13] net/nfp: add queue stop and close helper function Jin Liu
2022-06-17 9:34 ` [PATCH v3 11/13] net/nfp: move macro from C file to head file Jin Liu
2022-06-17 9:34 ` [PATCH v3 12/13] net/nfp: nfdk packet xmit function Jin Liu
2022-06-22 16:03 ` Thomas Monjalon
2022-06-22 16:29 ` Ferruh Yigit
2022-06-17 9:34 ` [PATCH v3 13/13] net/nfp: modify RSS logic Jin Liu
2022-06-17 13:33 ` [PATCH v3 00/13] Add support of NFP3800 chip and firmware with NFDk Ferruh Yigit
2022-06-23 2:26 ` [PATCH v4 " Jin Liu
2022-06-23 2:26 ` [PATCH v4 01/13] net/nfp: change the coding style Jin Liu
2022-06-23 2:26 ` [PATCH v4 02/13] net/nfp: remove unnecessary forward function declaration Jin Liu
2022-06-23 2:26 ` [PATCH v4 03/13] net/nfp: remove pessimistic limit Jin Liu
2022-06-23 2:26 ` [PATCH v4 04/13] net/nfp: rename set MAC function Jin Liu
2022-06-23 2:26 ` Jin Liu [this message]
2022-06-23 2:26 ` [PATCH v4 06/13] net/nfp: support NFP3800 card Jin Liu
2022-06-23 2:26 ` [PATCH v4 07/13] net/nfp: support firmware with NFDk Jin Liu
2022-06-23 2:26 ` [PATCH v4 08/13] net/nfp: structure adjustment Jin Liu
2022-06-23 2:26 ` [PATCH v4 09/13] net/nfp: nfdk netdev option and queue function Jin Liu
2022-06-23 2:26 ` [PATCH v4 10/13] net/nfp: add queue stop and close helper function Jin Liu
2022-06-23 2:26 ` [PATCH v4 11/13] net/nfp: move macro from C file to head file Jin Liu
2022-06-23 2:26 ` [PATCH v4 12/13] net/nfp: nfdk packet xmit function Jin Liu
2022-06-23 2:26 ` [PATCH v4 13/13] net/nfp: modify RSS logic Jin Liu
2022-06-23 9:11 ` [PATCH v4 00/13] Add support of NFP3800 chip and firmware with NFDk 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=20220623022615.3628093-6-jin.liu@corigine.com \
--to=jin.liu@corigine.com \
--cc=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=na.wang@corigine.com \
--cc=niklas.soderlund@corigine.com \
--cc=peng.zhang@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).