net/nfp: refresh function comment

Message ID 20230203031353.7749-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: refresh function comment |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/loongarch-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Chaoyong He Feb. 3, 2023, 3:13 a.m. UTC
  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(-)
  

Comments

Ferruh Yigit Feb. 14, 2023, 1:41 p.m. UTC | #1
On 2/3/2023 3:13 AM, Chaoyong He wrote:
> 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>

Applied to dpdk-next-net/main, thanks.
  

Patch

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