ethdev: remove telemetry Rx mbuf alloc failed field

Message ID 20230228180230.3066738-1-ferruh.yigit@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: remove telemetry Rx mbuf alloc failed field |

Checks

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

Commit Message

Ferruh Yigit Feb. 28, 2023, 6:02 p.m. UTC
  'eth_dev->data->rx_mbuf_alloc_failed' field is not directly exposed to
user via ethdev APIs but it is used internally to set "stats->rx_nombuf'
which is exposed via ehtdev stat APIs.

But telemetry exposes this field to user via "/ethdev/info",
instead user can get 'rx_nombuf' value from stats via "/ethdev/stats".

Removing 'rx_mbuf_alloc_failed' from telemetry to align with ethdev APIs

Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Cc: gmuthukrishn@marvell.com
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>
---
 lib/ethdev/rte_ethdev.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Thomas Monjalon March 1, 2023, 11:37 a.m. UTC | #1
28/02/2023 19:02, Ferruh Yigit:
> 'eth_dev->data->rx_mbuf_alloc_failed' field is not directly exposed to
> user via ethdev APIs but it is used internally to set "stats->rx_nombuf'
> which is exposed via ehtdev stat APIs.
> 
> But telemetry exposes this field to user via "/ethdev/info",
> instead user can get 'rx_nombuf' value from stats via "/ethdev/stats".
> 
> Removing 'rx_mbuf_alloc_failed' from telemetry to align with ethdev APIs
> 
> Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---
> -	rte_tel_data_add_dict_uint(d, "rx_mbuf_alloc_fail",
> -			eth_dev->data->rx_mbuf_alloc_failed);

Good catch, thanks.

Acked-by: Thomas Monjalon <thomas@monjalon.net>
  
Andrew Rybchenko March 1, 2023, 2:08 p.m. UTC | #2
On 3/1/23 14:37, Thomas Monjalon wrote:
> 28/02/2023 19:02, Ferruh Yigit:
>> 'eth_dev->data->rx_mbuf_alloc_failed' field is not directly exposed to
>> user via ethdev APIs but it is used internally to set "stats->rx_nombuf'
>> which is exposed via ehtdev stat APIs.
>>
>> But telemetry exposes this field to user via "/ethdev/info",
>> instead user can get 'rx_nombuf' value from stats via "/ethdev/stats".
>>
>> Removing 'rx_mbuf_alloc_failed' from telemetry to align with ethdev APIs
>>
>> Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> ---
>> -	rte_tel_data_add_dict_uint(d, "rx_mbuf_alloc_fail",
>> -			eth_dev->data->rx_mbuf_alloc_failed);
> 
> Good catch, thanks.
> 
> Acked-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
  
Ferruh Yigit March 2, 2023, 3:27 p.m. UTC | #3
On 3/1/2023 2:08 PM, Andrew Rybchenko wrote:
> On 3/1/23 14:37, Thomas Monjalon wrote:
>> 28/02/2023 19:02, Ferruh Yigit:
>>> 'eth_dev->data->rx_mbuf_alloc_failed' field is not directly exposed to
>>> user via ethdev APIs but it is used internally to set "stats->rx_nombuf'
>>> which is exposed via ehtdev stat APIs.
>>>
>>> But telemetry exposes this field to user via "/ethdev/info",
>>> instead user can get 'rx_nombuf' value from stats via "/ethdev/stats".
>>>
>>> Removing 'rx_mbuf_alloc_failed' from telemetry to align with ethdev APIs
>>>
>>> Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>>> ---
>>> -    rte_tel_data_add_dict_uint(d, "rx_mbuf_alloc_fail",
>>> -            eth_dev->data->rx_mbuf_alloc_failed);
>>
>> Good catch, thanks.
>>
>> Acked-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 
> 


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

Patch

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 0266cc82acb6..06f2c1ca001f 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6636,8 +6636,6 @@  eth_dev_handle_port_info(const char *cmd __rte_unused,
 	rte_tel_data_add_dict_int(d, "mtu", eth_dev->data->mtu);
 	rte_tel_data_add_dict_uint(d, "rx_mbuf_size_min",
 			eth_dev->data->min_rx_buf_size);
-	rte_tel_data_add_dict_uint(d, "rx_mbuf_alloc_fail",
-			eth_dev->data->rx_mbuf_alloc_failed);
 	rte_ether_format_addr(mac_addr, sizeof(mac_addr),
 			eth_dev->data->mac_addrs);
 	rte_tel_data_add_dict_string(d, "mac_addr", mac_addr);