ethdev: fix comments for offload capabilites
PATCH 1/1 ethdev: fix comments for offload capabilites
Indeed, rx_offload_capa or tx_offload_capa in struct rte_eth_dev_info includes not only per port offloading features but also per queue ones. This patch make its meaning much clearer.
--- lib/librte_ether/rte_ethdev.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_ether/rte_ethdev.h +4 -2
@@ -1006,9 +1006,11 @@ struct rte_eth_dev_info {uint16_t max_vfs;/**< Maximum number of VFs. */ uint16_t max_vmdq_pools;/**< Maximum number of VMDq pools. */ uint64_t rx_offload_capa; -/**< Device per port RX offload capabilities. */ +/**< Rx offload capabilities including all per port ones +and all per queue ones. */ uint64_t tx_offload_capa; -/**< Device per port TX offload capabilities. */ +/**< Tx offload capabilities including all per port ones +and all per queue ones. */ uint64_t rx_queue_offload_capa;/**< Device per queue RX offload capabilities. */ uint64_t tx_queue_offload_capa;
Signature · 1 line
2.7.5
PATCH v2 1/1 ethdev: fix comments for offload capabilities
Indeed, rx_offload_capa or tx_offload_capa in struct rte_eth_dev_info includes not only per port offloading features but also per queue ones. This patch make its meaning much clearer.
---
v2: fix coding style issues
--- lib/librte_ethdev/rte_ethdev.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
lib/librte_ethdev/rte_ethdev.h +6 -2
@@ -1067,9 +1067,13 @@ struct rte_eth_dev_info {uint16_t max_vfs;/**< Maximum number of VFs. */ uint16_t max_vmdq_pools;/**< Maximum number of VMDq pools. */ uint64_t rx_offload_capa; -/**< Device per port RX offload capabilities. */ +/**< Rx offload capabilities including all per port ones +* and all per queue ones. +*/ uint64_t tx_offload_capa; -/**< Device per port TX offload capabilities. */ +/**< Tx offload capabilities including all per port ones +* and all per queue ones. +*/ uint64_t rx_queue_offload_capa;/**< Device per queue RX offload capabilities. */ uint64_t tx_queue_offload_capa;
Signature · 1 line
2.7.5
Re: [PATCH v2] ethdev: fix comments for offload capabilities
Quoted 26 lines · Wei Dai
Indeed,
rx_offload_capaortx_offload_capain structrte_eth_dev_infoincludes not only per port offloading features but also per queue ones. This patch make its meaning much clearer.Fixes ce17eddefc20 ("ethdev: introduce Rx queue offloads API")Fixes cba7f53b717d ("ethdev: introduce Tx queue offloads API")Signed-off-by Wei Dai <[email protected]>---
v2: fix coding style issues--- lib/librte_ethdev/rte_ethdev.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)lib/librte_ethdev/rte_ethdev.h +1
-1@@ -1067,9 +1067,13 @@ struct rte_eth_dev_info {uint16_t max_vfs;/**< Maximum number of VFs. */ uint16_t max_vmdq_pools;/**< Maximum number of VMDq pools. */ uint64_t rx_offload_capa; -/**< Device per port RX offload capabilities. */ +/**< Rx offload capabilities including all per port ones
lib/librte_ethdev/rte_ethdev.h struct rte_eth_dev_info { · line 1079
Quoted 10 lines
lib/librte_ethdev/rte_ethdev.h +5
-1+* and all per queue ones. +*/ uint64_t tx_offload_capa; -/**< Device per port TX offload capabilities. */ +/**< Tx offload capabilities including all per port ones +* and all per queue ones. +*/ uint64_t rx_queue_offload_capa;/**< Device per queue RX offload capabilities. */ uint64_t tx_queue_offload_capa;
Just a minor nit.
May I suggest to put comments before structure member and use /**. Right now it looks very confusing.
Andrew.