net/nfp: refresh function comment
Checks
Commit Message
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
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.
@@ -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)
{
@@ -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)
@@ -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