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,
	Zerun Fu <zerun.fu@corigine.com>,
	Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH] net/nfp: refresh function comment
Date: Fri,  3 Feb 2023 11:13:53 +0800	[thread overview]
Message-ID: <20230203031353.7749-1-chaoyong.he@corigine.com> (raw)

From: Zerun Fu <zerun.fu@corigine.com>

Fix sections where the documentation have gone out of sync with the
function names. While at it add documentation for functions to
make it clear on what device they operate on.

Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_rxtx.c         | 10 ++++++++++
 drivers/net/nfp/nfp_rxtx.h         | 10 +++++-----
 drivers/net/nfp/nfpcore/nfp_nffw.c |  2 +-
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index b8c874d315..20a5c20975 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -1033,6 +1033,14 @@ nfp_net_nfdk_free_tx_desc(struct nfp_net_txq *txq)
 		(free_desc - NFDK_TX_DESC_STOP_CNT) : 0;
 }
 
+/*
+ * nfp_net_nfdk_txq_full() - Check if the TX queue free descriptors
+ * is below tx_free_threshold for firmware of nfdk
+ *
+ * @txq: TX queue to check
+ *
+ * This function uses the host copy* of read/write pointers.
+ */
 static inline uint32_t
 nfp_net_nfdk_txq_full(struct nfp_net_txq *txq)
 {
@@ -1092,6 +1100,7 @@ nfp_net_nfdk_tx_maybe_close_block(struct nfp_net_txq *txq, struct rte_mbuf *pkt)
 	return nop_slots;
 }
 
+/* nfp_net_nfdk_tx_cksum() - Set TX CSUM offload flags in TX descriptor of nfdk */
 static inline uint64_t
 nfp_net_nfdk_tx_cksum(struct nfp_net_txq *txq, struct rte_mbuf *mb,
 		uint64_t flags)
@@ -1114,6 +1123,7 @@ nfp_net_nfdk_tx_cksum(struct nfp_net_txq *txq, struct rte_mbuf *mb,
 	return flags;
 }
 
+/* nfp_net_nfdk_tx_tso() - Set TX descriptor for TSO of nfdk */
 static inline uint64_t
 nfp_net_nfdk_tx_tso(struct nfp_net_txq *txq, struct rte_mbuf *mb)
 {
diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
index ced05fde90..6dfce090f3 100644
--- a/drivers/net/nfp/nfp_rxtx.h
+++ b/drivers/net/nfp/nfp_rxtx.h
@@ -347,12 +347,12 @@ nfp_net_nfd3_free_tx_desc(struct nfp_net_txq *txq)
 }
 
 /*
- * nfp_net_nfd3_txq_full - Check if the TX queue free descriptors
- * is below tx_free_threshold
+ * nfp_net_nfd3_txq_full() - Check if the TX queue free descriptors
+ * is below tx_free_threshold for firmware of nfd3
  *
  * @txq: TX queue to check
  *
- * This function uses the host copy* of read/write pointers
+ * This function uses the host copy* of read/write pointers.
  */
 static inline uint32_t
 nfp_net_nfd3_txq_full(struct nfp_net_txq *txq)
@@ -388,7 +388,7 @@ nfp_net_rx_cksum(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
 		mb->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
 }
 
-/* Set NFD3 TX descriptor for TSO */
+/* nfp_net_nfd3_tx_tso() - Set NFD3 TX descriptor for TSO */
 static inline void
 nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq,
 		struct nfp_net_nfd3_tx_desc *txd,
@@ -420,7 +420,7 @@ nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq,
 	txd->mss = 0;
 }
 
-/* Set TX CSUM offload flags in NFD3 TX descriptor */
+/* nfp_net_nfd3_tx_cksum() - Set TX CSUM offload flags in NFD3 TX descriptor */
 static inline void
 nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_nfd3_tx_desc *txd,
 		 struct rte_mbuf *mb)
diff --git a/drivers/net/nfp/nfpcore/nfp_nffw.c b/drivers/net/nfp/nfpcore/nfp_nffw.c
index 8bec0e3c9a..9bba8a4459 100644
--- a/drivers/net/nfp/nfpcore/nfp_nffw.c
+++ b/drivers/net/nfp/nfpcore/nfp_nffw.c
@@ -161,7 +161,7 @@ nfp_nffw_info_open(struct nfp_cpp *cpp)
 }
 
 /*
- * nfp_nffw_info_release() - Release the lock on the NFFW table
+ * nfp_nffw_info_close() - Release the lock on the NFFW table
  * @state:	NFP FW info state
  *
  * Return: 0, or -ERRNO
-- 
2.29.3


             reply	other threads:[~2023-02-03  3:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03  3:13 Chaoyong He [this message]
2023-02-14 13:41 ` 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=20230203031353.7749-1-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=zerun.fu@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).