DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/nfp: refresh function comment
@ 2023-02-03  3:13 Chaoyong He
  2023-02-14 13:41 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-02-03  3:13 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, niklas.soderlund, Zerun Fu, Chaoyong He

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/nfp: refresh function comment
  2023-02-03  3:13 [PATCH] net/nfp: refresh function comment Chaoyong He
@ 2023-02-14 13:41 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-02-14 13:41 UTC (permalink / raw)
  To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund, Zerun Fu

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-14 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03  3:13 [PATCH] net/nfp: refresh function comment Chaoyong He
2023-02-14 13:41 ` Ferruh Yigit

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).