add trace points in ethdev library
cover add trace points in ethdev library
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr, tm and ethdev_driver files.
Apart from the tracepoints, check-trace-func function is added in checkpatch script. The function checks if any new api is added in ethdev library, then it must have a tracepoint. Otherwise an error will be returned by checkpatch.
Adding the ethdev library maintainers and all networking driver maintainers in the cc list of this patch series, for review.
Ankur Dwivedi (6):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tm
ethdev: add trace points for driver
devtools: add trace function check in checkpatch
devtools/check-symbol-change.sh | 76 +- devtools/check-trace-func.py | 52 + devtools/check-trace-func.sh | 50 + devtools/checkpatches.sh | 9 + devtools/common-func.sh | 77 + lib/ethdev/ethdev_driver.c | 29 + lib/ethdev/ethdev_private.c | 5 + lib/ethdev/ethdev_trace_points.c | 768 ++++++++++ lib/ethdev/rte_ethdev.c | 150 ++ lib/ethdev/rte_ethdev_trace.h | 2246 ++++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 257 ++++ 14 files changed, 3766 insertions(+), 74 deletions(-) create mode 100755 devtools/check-trace-func.py create mode 100755 devtools/check-trace-func.sh create mode 100644 devtools/common-func.sh
Signature · 1 line
2.28.0
PATCH 1/6 ethdev: add trace points
Add trace points for ethdev functions.
--- lib/ethdev/ethdev_private.c | 5 + lib/ethdev/ethdev_trace_points.c | 438 +++++++++++ lib/ethdev/rte_ethdev.c | 150 ++++ lib/ethdev/rte_ethdev_trace.h | 1182 ++++++++++++++++++++++++++++++ lib/ethdev/version.map | 147 ++++ 5 files changed, 1922 insertions(+)
lib/ethdev/ethdev_private.c +5 -0
@@ -5,6 +5,7 @@#include <rte_debug.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h"
@@ -291,6 +292,8 @@ rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id, {const struct rte_eth_rxtx_callback *cb = opaque; +rte_eth_trace_call_rx_callbacks (port_id, queue_id, rx_pkts, nb_rx, + nb_pkts, opaque);while (cb !=NULL ) { nb_rx = cb->fn.rx (port_id, queue_id, rx_pkts, nb_rx, nb_pkts, cb->param);
@@ -306,6 +309,8 @@ rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id, {const struct rte_eth_rxtx_callback *cb = opaque; +rte_eth_trace_call_tx_callbacks (port_id, queue_id, tx_pkts, nb_pkts, + opaque);while (cb !=NULL ) { nb_pkts = cb->fn.tx (port_id, queue_id, tx_pkts, nb_pkts, cb->param);
lib/ethdev/ethdev_trace_points.c +438 -0
441 lines not on this page · raw message
lib/ethdev/rte_ethdev.c +150 -0
1,008 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace.h +1182 -0
1,188 lines not on this page · raw message
lib/ethdev/version.map +147 -0
153 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [PATCH 1/6] ethdev: add trace points
Quoted 4 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0
[snip]
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t owner_id) · line 539
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_delete (owner_id, ret);
I'm wondering why trace is sometimes added in the middle of the function, but in the majority of cases it is added as the first or the last action. Is there any logical/guidelines behind it?
Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0return ret; }
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +0
-0
[snip]
Quoted 1 line
+RTE_TRACE_POINT(
Shouldn't it be RTE_TRACE_POINT_FP? Isn't it fast path?
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 152
Quoted 13 lines
lib/ethdev/rte_ethdev_trace.h +13
-0+ rte_eth_trace_call_rx_callbacks, +RTE_TRACE_POINT_ARGS (uint16_t port_id,uint16_t queue_id, +struct rte_mbuf **rx_pkts,uint16_t nb_rx, +uint16_t nb_pkts,void *opaque), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (rx_pkts); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +rte_trace_point_emit_ptr (opaque); +) + +RTE_TRACE_POINT(
same here
Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+ rte_eth_trace_call_tx_callbacks, +RTE_TRACE_POINT_ARGS (uint16_t port_id,uint16_t queue_id, +struct rte_mbuf **tx_pkts,uint16_t nb_pkts, +void *opaque), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (tx_pkts); +rte_trace_point_emit_u16 (nb_pkts); +rte_trace_point_emit_ptr (opaque); +) +
[snip]
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 337
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen); +rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa); +rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size); +rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues);
How to make a choice which information should be included above?
Quoted 2 lines
lib/ethdev/rte_ethdev_trace.h +2
-0+) +
[snip]
RE: [EXT] Re: [PATCH 1/6] ethdev: add trace points
Hi Andrew,
Quoted 64 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Monday, September 12, 2022 4:30 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH 1/6] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 4 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev.c index renamed from lib/ethdev/rte_ethdev.c +0
-0
1979dc0850..a6fb370b22100644lib/ethdev/rte_ethdev.c +0
-0[snip]
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t
Quoted 1 line
lib/ethdev/rte_ethdev.c +0
-0@@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t
owner_id)Quoted 1 line
Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t owner_id) · line 539
Quoted 3 lines
rte_spinlock_unlock(ð_dev_shared_data->ownership_lock);lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_owner_delete (owner_id, ret);I'm wondering why trace is sometimes added in the middle of the function, but in the majority of cases it is added as the first or the last action. Is there any logical/guidelines behind it?
In this case for printing the return value the trace was added at the end. I can change it if not required.
The logic which I used was to log at least the input arguments of a function and in some cases also log important information(according to me) if possible.For example in rte_eth_tx_buffer_count_callback() I was also logging the count at the end. Similar logic in rte_eth_link_get_nowait(). Please let me know your views.
Quoted 14 lines
Quoted 4 lines
return ret; }[snip]
Quoted 4 lines
(quoted diff) +0
-0
b/lib/ethdev/rte_ethdev_trace.hindex1491c815c3..de728d355d100644lib/ethdev/rte_ethdev_trace.h +0
-0[snip]
Quoted 3 lines
Quoted 1 line
+RTE_TRACE_POINT(
Shouldn't it be
RTE_TRACE_POINT_FP? Isn't it fast path?
Yes it is fastpath. Will make it as fastpath in v2.
Quoted 16 lines
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+ rte_eth_trace_call_rx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_mbuf **rx_pkts, uint16_t nb_rx,lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 152
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+ uint16_t nb_pkts, void *opaque), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (rx_pkts); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +rte_trace_point_emit_ptr (opaque); +) + +RTE_TRACE_POINT(same here
Yes it is fastpath. Will make it as fastpath in v2.
Quoted 28 lines
Quoted 12 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+ rte_eth_trace_call_tx_callbacks, +RTE_TRACE_POINT_ARGS (uint16_t port_id,uint16_t queue_id, +struct rte_mbuf **tx_pkts,uint16_t nb_pkts, +void *opaque), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (tx_pkts); +rte_trace_point_emit_u16 (nb_pkts); +rte_trace_point_emit_ptr (opaque); +) +[snip]
Quoted 13 lines
lib/ethdev/rte_ethdev_trace.h +13
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu); +rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen); +rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa);
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 337
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size); +rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues);How to make a choice which information should be included above?
In this case dev_info information is logged which might be of interest.
Quoted 5 lines
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +2
-0+) +[snip]
Re: [EXT] Re: [PATCH 1/6] ethdev: add trace points
Quoted 68 lines · Ankur Dwivedi
Hi Andrew,
Quoted 66 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Monday, September 12, 2022 4:30 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH 1/6] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 4 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev.c index renamed from lib/ethdev/rte_ethdev.c +0
-0
1979dc0850..a6fb370b22100644lib/ethdev/rte_ethdev.c +0
-0[snip]
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t
Quoted 1 line
lib/ethdev/rte_ethdev.c +0
-0@@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t
owner_id)Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0rte_spinlock_unlock (ð_dev_shared_data->ownership_lock);
Quoted 8 lines
Quoted 5 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t owner_id) · line 539
Quoted 1 line
lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_owner_delete (owner_id, ret);I'm wondering why trace is sometimes added in the middle of the function, but in the majority of cases it is added as the first or the last action. Is there any logical/guidelines behind it?
In this case for printing the return value the trace was added at the end. I can change it if not required.
The logic which I used was to log at least the input arguments of a function and in some cases also log important information(according to me) if possible.For example inrte_eth_tx_buffer_count_callback()I was also logging the count at the end. Similar logic inrte_eth_link_get_nowait(). Please let me know your views.
The answer depends on purposes of tracing. I guess that the main goal is to understand what the application does. So, tracing without logging the result does not sound really useful. What's the point to see that application has tried to enable promiscuous mode without knowing the result if the attempt is successful or not? If failures are critical for the application functionality, hopefully it will result in error logging which could be used together with tracing to understand what happens.
If so, it drives us to tracing nearby the end of the function when the function really has tried to do something. If there is no branching there we'll have some tracing of failures as well, but we definitely need to see the result in the trace point.
I almost have no experience with tracing, so my thoughts could be wrong.
Re: [EXT] Re: [PATCH 1/6] ethdev: add trace points
@Jerin, I'd like to know what do you think about my question/thoughts below.
Quoted 88 lines · Andrew Rybchenko
Quoted 68 lines · Ankur Dwivedi
Hi Andrew,
Quoted 66 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Monday, September 12, 2022 4:30 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH 1/6] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 4 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev.c index renamed from lib/ethdev/rte_ethdev.c +0
-0
1979dc0850..a6fb370b22100644lib/ethdev/rte_ethdev.c +0
-0[snip]
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t
Quoted 1 line
lib/ethdev/rte_ethdev.c +0
-0@@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t
owner_id)Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0rte_spinlock_unlock(ð_dev_shared_data->ownership_lock);Quoted 8 lines
Quoted 5 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t owner_id) · line 539
Quoted 1 line
lib/ethdev/rte_ethdev.c +1
-0+ rte_ethdev_trace_owner_delete(owner_id, ret);I'm wondering why trace is sometimes added in the middle of the function, but in the majority of cases it is added as the first or the last action. Is there any logical/guidelines behind it?
In this case for printing the return value the trace was added at the end. I can change it if not required.
The logic which I used was to log at least the input arguments of a function and in some cases also log important information(according to me) if possible.For example inrte_eth_tx_buffer_count_callback()I was also logging the count at the end. Similar logic inrte_eth_link_get_nowait(). Please let me know your views.The answer depends on purposes of tracing. I guess that the main goal is to understand what the application does. So, tracing without logging the result does not sound really useful. What's the point to see that application has tried to enable promiscuous mode without knowing the result if the attempt is successful or not? If failures are critical for the application functionality, hopefully it will result in error logging which could be used together with tracing to understand what happens.
Quoted 7 lines
If so, it drives us to tracing nearby the end of the function when the function really has tried to do something. If there is no branching there we'll have some tracing of failures as well, but we definitely need to see the result in the trace point.
I almost have no experience with tracing, so my thoughts could be wrong.
Meanwhile I've updated the patch series as "Requested Changes" since some fixes were promissed in v2.
Re: [EXT] Re: [PATCH 1/6] ethdev: add trace points
Quoted 1 line
@Jerin, I'd like to know what do you think about my question/thoughts below
@Andrew Rybchenko see below.
Quoted 97 lines · Andrew Rybchenko
Quoted 95 lines · Ankur Dwivedi
Quoted 75 lines
Hi Andrew,
Quoted 66 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Monday, September 12, 2022 4:30 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH 1/6] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 4 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
[snip]
Quoted 4 lines
lib/ethdev/rte_ethdev.c index renamed from lib/ethdev/rte_ethdev.c +0
-0
1979dc0850..a6fb370b22100644lib/ethdev/rte_ethdev.c +0
-0[snip]
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t
Quoted 1 line
lib/ethdev/rte_ethdev.c +0
-0@@ -525,6 +536,7 @@ rte_eth_dev_owner_delete(const uint64_t
owner_id)Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0rte_spinlock_unlock (ð_dev_shared_data->ownership_lock);Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_owner_delete(const uint64_t owner_id) · line 539
Quoted 1 line
lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_owner_delete (owner_id, ret);I'm wondering why trace is sometimes added in the middle of the function,
but in the majority of cases it is added as the first or the last action. Is there
any logical/guidelines behind it?Quoted 8 lines
In this case for printing the return value the trace was added at the end. I can change it if not required.
The logic which I used was to log at least the input arguments of a function and in some cases also log important information(according to me) if possible.For example inrte_eth_tx_buffer_count_callback()I was also logging the count at the end. Similar logic inrte_eth_link_get_nowait().
Please let me know your views.The answer depends on purposes of tracing. I guess that the main goal is to understand what the application does. So, tracing without logging the result does not sound really useful. What's the point to see that application has tried to enable promiscuous mode without knowing the result if the attempt is successful or not? If failures are critical for the application functionality, hopefully it will result in error logging which could be used together with tracing to understand what happens.
Quoted 4 lines
Quoted 4 lines
If so, it drives us to tracing nearby the end of the function when the function really has tried to do something. If there is no branching there we'll have some tracing of failures as well, but we definitely need to see the result in the trace point.
Yes. It make sense to include the result. For example, rte_malloc etc we are already adding the result so the consumer of trace can get better view.
Quoted 6 lines
Quoted 3 lines
I almost have no experience with tracing, so my thoughts could be wrong.
Meanwhile I've updated the patch series as "Requested Changes" since some fixes were promissed in v2.
PATCH 2/6 ethdev: add trace points for flow
In reply to Ankur DwivediAdds trace points for rte_flow specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 117 +++++++++ lib/ethdev/rte_ethdev_trace.h | 405 +++++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 54 +++++ lib/ethdev/version.map | 39 +++ 4 files changed, 615 insertions(+)
lib/ethdev/ethdev_trace_points.c +117 -0
@@ -467,3 +467,120 @@ RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query,RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_avail_thresh_set, lib.ethdev.rx_avail_thresh_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_copy, + lib.ethdev.flow.copy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_create, + lib.ethdev.flow.create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_destroy, + lib.ethdev.flow.destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_error_set, + lib.ethdev.flow.error_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flush, + lib.ethdev.flow.flush) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_isolate, + lib.ethdev.flow.isolate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_query, + lib.ethdev.flow.query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_validate, + lib.ethdev.flow.validate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_conv, + lib.ethdev.flow.conv) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dynf_metadata_register, + lib.ethdev.dynf_metadata_register) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dev_dump, + lib.ethdev.flow.dev_dump) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_aged_flows, + lib.ethdev.flow.get_aged_flows) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_decap_set, + lib.ethdev.flow.tunnel_decap_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_match, + lib.ethdev.flow.tunnel_match) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_restore_info, + lib.ethdev.flow.get_restore_info) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_action_decap_release, + lib.ethdev.flow.tunnel_action_decap_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_item_release, + lib.ethdev.flow.tunnel_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_create, + lib.ethdev.flow.action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_destroy, + lib.ethdev.flow.action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_update, + lib.ethdev.flow.action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_query, + lib.ethdev.flow.action_handle_query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_create, + lib.ethdev.flow.flex_item_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_release, + lib.ethdev.flow.flex_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pick_transfer_proxy, + lib.ethdev.flow.pick_transfer_proxy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_info_get, + lib.ethdev.flow.info_get) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_configure, + lib.ethdev.flow.configure) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_create, + lib.ethdev.flow.pattern_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_destroy, + lib.ethdev.flow.pattern_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_create, + lib.ethdev.flow.actions_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_destroy, + lib.ethdev.flow.actions_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_create, + lib.ethdev.flow.template_table_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_destroy, + lib.ethdev.flow.template_table_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_create, + lib.ethdev.flow.async_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_destroy, + lib.ethdev.flow.async_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_push, + lib.ethdev.flow.push) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pull, + lib.ethdev.flow.pull) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_create, + lib.ethdev.flow.async_action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_destroy, + lib.ethdev.flow.async_action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, + lib.ethdev.flow.async_action_handle_update)
lib/ethdev/rte_ethdev_trace.h +405 -0
411 lines not on this page · raw message
lib/ethdev/rte_flow.c +54 -0
294 lines not on this page · raw message
lib/ethdev/version.map +39 -0
@@ -432,6 +432,45 @@ EXPERIMENTAL { __rte_eth_trace_ip_reassembly_conf_set; __rte_eth_trace_rx_avail_thresh_query; __rte_eth_trace_rx_avail_thresh_set; + __rte_flow_trace_action_handle_create; + __rte_flow_trace_action_handle_destroy; + __rte_flow_trace_action_handle_query; + __rte_flow_trace_action_handle_update; + __rte_flow_trace_actions_template_create; + __rte_flow_trace_actions_template_destroy; + __rte_flow_trace_async_action_handle_create; + __rte_flow_trace_async_action_handle_destroy; + __rte_flow_trace_async_action_handle_update; + __rte_flow_trace_async_create; + __rte_flow_trace_async_destroy; + __rte_flow_trace_conv; + __rte_flow_trace_configure; + __rte_flow_trace_copy; + __rte_flow_trace_create; + __rte_flow_trace_destroy; + __rte_flow_trace_dev_dump; + __rte_flow_trace_dynf_metadata_register; + __rte_flow_trace_error_set; + __rte_flow_trace_flex_item_create; + __rte_flow_trace_flex_item_release; + __rte_flow_trace_flush; + __rte_flow_trace_get_aged_flows; + __rte_flow_trace_get_restore_info; + __rte_flow_trace_info_get; + __rte_flow_trace_isolate; + __rte_flow_trace_pattern_template_create; + __rte_flow_trace_pattern_template_destroy; + __rte_flow_trace_pick_transfer_proxy; + __rte_flow_trace_push; + __rte_flow_trace_pull; + __rte_flow_trace_query; + __rte_flow_trace_template_table_create; + __rte_flow_trace_template_table_destroy; + __rte_flow_trace_tunnel_action_decap_release; + __rte_flow_trace_tunnel_decap_set; + __rte_flow_trace_tunnel_item_release; + __rte_flow_trace_tunnel_match; + __rte_flow_trace_validate; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH 3/6 ethdev: add trace points for mtr
In reply to Ankur DwivediAdds trace points for rte_mtr specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 57 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 176 +++++++++++++++++++++++++++++++ lib/ethdev/rte_mtr.c | 27 +++++ lib/ethdev/version.map | 19 ++++ 4 files changed, 279 insertions(+)
lib/ethdev/ethdev_trace_points.c +57 -0
@@ -584,3 +584,60 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_handle_destroy,RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, lib.ethdev.flow.async_action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_capabilities_get, + lib.ethdev.mtr.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_create, + lib.ethdev.mtr.create) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_destroy, + lib.ethdev.mtr.destroy) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_disable, + lib.ethdev.mtr.meter_disable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_dscp_table_update, + lib.ethdev.mtr.meter_dscp_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_enable, + lib.ethdev.mtr.meter_enable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_add, + lib.ethdev.mtr.meter_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_delete, + lib.ethdev.mtr.meter_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_update, + lib.ethdev.mtr.meter_profile_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_read, + lib.ethdev.mtr.stats_read) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_update, + lib.ethdev.mtr.stats_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_add, + lib.ethdev.mtr.meter_policy_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_delete, + lib.ethdev.mtr.meter_policy_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_update, + lib.ethdev.mtr.meter_policy_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_validate, + lib.ethdev.mtr.meter_policy_validate) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_vlan_table_update, + lib.ethdev.mtr.meter_vlan_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_get, + lib.ethdev.mtr.color_in_protocol_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_priority_get, + lib.ethdev.mtr.color_in_protocol_priority_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, + lib.ethdev.mtr.color_in_protocol_set)
lib/ethdev/rte_ethdev_trace.h +176 -0
188 lines not on this page · raw message
lib/ethdev/rte_mtr.c +27 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_mtr_driver.h" #include "rte_mtr.h"
@@ -63,6 +64,7 @@ rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_capabilities_get (port_id, cap);return RTE_MTR_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -75,6 +77,7 @@ rte_mtr_meter_profile_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_add (port_id, meter_profile_id, profile);return RTE_MTR_FUNC (port_id, meter_profile_add)(dev, meter_profile_id, profile, error); }
@@ -86,6 +89,7 @@ rte_mtr_meter_profile_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_delete (port_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_delete)(dev, meter_profile_id, error); }
@@ -97,6 +101,10 @@ rte_mtr_meter_policy_validate(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_validate (port_id, policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_validate)(dev, policy, error); }
@@ -109,6 +117,11 @@ rte_mtr_meter_policy_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_add (port_id, policy_id, + policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_add)(dev, policy_id, policy, error); }
@@ -120,6 +133,7 @@ rte_mtr_meter_policy_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_delete (port_id, policy_id);return RTE_MTR_FUNC (port_id, meter_policy_delete)(dev, policy_id, error); }
@@ -133,6 +147,7 @@ rte_mtr_create(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_create (port_id, mtr_id, params, shared);return RTE_MTR_FUNC (port_id, create)(dev, mtr_id, params, shared, error); }
@@ -144,6 +159,7 @@ rte_mtr_destroy(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_destroy (port_id, mtr_id);return RTE_MTR_FUNC (port_id, destroy)(dev, mtr_id, error); }
@@ -155,6 +171,7 @@ rte_mtr_meter_enable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_enable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_enable)(dev, mtr_id, error); }
@@ -166,6 +183,7 @@ rte_mtr_meter_disable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_disable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_disable)(dev, mtr_id, error); }
@@ -178,6 +196,7 @@ rte_mtr_meter_profile_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_update (port_id, mtr_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_update)(dev, mtr_id, meter_profile_id, error); }
@@ -190,6 +209,7 @@ rte_mtr_meter_policy_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_update (port_id, mtr_id, meter_policy_id);return RTE_MTR_FUNC (port_id, meter_policy_update)(dev, mtr_id, meter_policy_id, error); }
@@ -202,6 +222,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_dscp_table_update (port_id, mtr_id, dscp_table);return RTE_MTR_FUNC (port_id, meter_dscp_table_update)(dev, mtr_id, dscp_table, error); }
@@ -214,6 +235,7 @@ rte_mtr_meter_vlan_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_vlan_table_update (port_id, mtr_id, vlan_table);return RTE_MTR_FUNC (port_id, meter_vlan_table_update)(dev, mtr_id, vlan_table, error); }
@@ -227,6 +249,7 @@ rte_mtr_color_in_protocol_set(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_set (port_id, mtr_id, proto, priority);return RTE_MTR_FUNC (port_id, in_proto_set)(dev, mtr_id, proto, priority, error); }
@@ -239,6 +262,7 @@ rte_mtr_color_in_protocol_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_get (port_id, mtr_id);return RTE_MTR_FUNC (port_id, in_proto_get)(dev, mtr_id, proto_mask, error); }
@@ -252,6 +276,7 @@ rte_mtr_color_in_protocol_priority_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_priority_get (port_id, mtr_id, proto);return RTE_MTR_FUNC (port_id, in_proto_prio_get)(dev, mtr_id, proto, priority, error); }
@@ -264,6 +289,7 @@ rte_mtr_stats_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_update (port_id, mtr_id, stats_mask);return RTE_MTR_FUNC (port_id, stats_update)(dev, mtr_id, stats_mask, error); }
@@ -278,6 +304,7 @@ rte_mtr_stats_read(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_read (port_id, mtr_id, stats, stats_mask, clear);return RTE_MTR_FUNC (port_id, stats_read)(dev, mtr_id, stats, stats_mask, clear, error); }
lib/ethdev/version.map +19 -0
@@ -471,6 +471,25 @@ EXPERIMENTAL { __rte_flow_trace_tunnel_item_release; __rte_flow_trace_tunnel_match; __rte_flow_trace_validate; + __rte_mtr_trace_capabilities_get; + __rte_mtr_trace_color_in_protocol_get; + __rte_mtr_trace_color_in_protocol_priority_get; + __rte_mtr_trace_color_in_protocol_set; + __rte_mtr_trace_create; + __rte_mtr_trace_destroy; + __rte_mtr_trace_meter_disable; + __rte_mtr_trace_meter_dscp_table_update; + __rte_mtr_trace_meter_enable; + __rte_mtr_trace_meter_policy_add; + __rte_mtr_trace_meter_policy_delete; + __rte_mtr_trace_meter_policy_update; + __rte_mtr_trace_meter_policy_validate; + __rte_mtr_trace_meter_profile_add; + __rte_mtr_trace_meter_profile_delete; + __rte_mtr_trace_meter_profile_update; + __rte_mtr_trace_meter_vlan_table_update; + __rte_mtr_trace_stats_read; + __rte_mtr_trace_stats_update; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH 4/6 ethdev: add trace points for tm
In reply to Ankur DwivediAdds trace points for rte_tm specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 90 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 283 +++++++++++++++++++++++++++++++ lib/ethdev/rte_tm.c | 40 +++++ lib/ethdev/version.map | 30 ++++ 4 files changed, 443 insertions(+)
lib/ethdev/ethdev_trace_points.c +90 -0
@@ -641,3 +641,93 @@ RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_priority_get,RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, lib.ethdev.mtr.color_in_protocol_set) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_capabilities_get, + lib.ethdev.tm.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_get_number_of_leaf_nodes, + lib.ethdev.tm.get_number_of_leaf_nodes) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_hierarchy_commit, + lib.ethdev.tm.hierarchy_commit) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_level_capabilities_get, + lib.ethdev.tm.level_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_dscp, + lib.ethdev.tm.mark_ip_dscp) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_ecn, + lib.ethdev.tm.mark_ip_ecn) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_vlan_dei, + lib.ethdev.tm.mark_vlan_dei) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_add, + lib.ethdev.tm.node_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_capabilities_get, + lib.ethdev.tm.node_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_cman_update, + lib.ethdev.tm.node_cman_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_delete, + lib.ethdev.tm.node_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_parent_update, + lib.ethdev.tm.node_parent_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_resume, + lib.ethdev.tm.node_resume) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shaper_update, + lib.ethdev.tm.node_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_shaper_update, + lib.ethdev.tm.node_shared_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_wred_context_update, + lib.ethdev.tm.node_shared_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_read, + lib.ethdev.tm.node_stats_read) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_update, + lib.ethdev.tm.node_stats_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_suspend, + lib.ethdev.tm.node_suspend) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_type_get, + lib.ethdev.tm.node_type_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wfq_weight_mode_update, + lib.ethdev.tm.node_wfq_weight_mode_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wred_context_update, + lib.ethdev.tm.node_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_add, + lib.ethdev.tm.shaper_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_delete, + lib.ethdev.tm.shaper_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_add_update, + lib.ethdev.tm.shared_shaper_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_delete, + lib.ethdev.tm.shared_shaper_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_add_update, + lib.ethdev.tm.shared_wred_context_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_delete, + lib.ethdev.tm.shared_wred_context_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_add, + lib.ethdev.tm.wred_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_delete, + lib.ethdev.tm.wred_profile_delete)
lib/ethdev/rte_ethdev_trace.h +283 -0
295 lines not on this page · raw message
lib/ethdev/rte_tm.c +40 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_tm_driver.h" #include "rte_tm.h"
@@ -79,6 +80,7 @@ rte_tm_get_number_of_leaf_nodes(uint16_t port_id, } *n_leaf_nodes = dev->data->nb_tx_queues; +rte_tm_trace_get_number_of_leaf_nodes (port_id, *n_leaf_nodes, error);return 0 ; }
@@ -90,6 +92,7 @@ rte_tm_node_type_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_type_get (port_id, node_id, is_leaf);return RTE_TM_FUNC (port_id, node_type_get)(dev, node_id, is_leaf, error); }
@@ -100,6 +103,7 @@ int rte_tm_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_capabilities_get (port_id, cap);return RTE_TM_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -111,6 +115,7 @@ int rte_tm_level_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_level_capabilities_get (port_id, level_id, cap);return RTE_TM_FUNC (port_id, level_capabilities_get)(dev, level_id, cap, error); }
@@ -122,6 +127,7 @@ int rte_tm_node_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_capabilities_get (port_id, node_id, cap);return RTE_TM_FUNC (port_id, node_capabilities_get)(dev, node_id, cap, error); }
@@ -133,6 +139,7 @@ int rte_tm_wred_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_add (port_id, wred_profile_id, profile);return RTE_TM_FUNC (port_id, wred_profile_add)(dev, wred_profile_id, profile, error); }
@@ -143,6 +150,7 @@ int rte_tm_wred_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_delete (port_id, wred_profile_id);return RTE_TM_FUNC (port_id, wred_profile_delete)(dev, wred_profile_id, error); }
@@ -154,6 +162,8 @@ int rte_tm_shared_wred_context_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_add_update (port_id, shared_wred_context_id, + wred_profile_id);return RTE_TM_FUNC (port_id, shared_wred_context_add_update)(dev, shared_wred_context_id, wred_profile_id, error); }
@@ -164,6 +174,7 @@ int rte_tm_shared_wred_context_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_delete (port_id, shared_wred_context_id);return RTE_TM_FUNC (port_id, shared_wred_context_delete)(dev, shared_wred_context_id, error); }
@@ -175,6 +186,7 @@ int rte_tm_shaper_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_add (port_id, shaper_profile_id, profile);return RTE_TM_FUNC (port_id, shaper_profile_add)(dev, shaper_profile_id, profile, error); }
@@ -185,6 +197,7 @@ int rte_tm_shaper_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_delete (port_id, shaper_profile_id);return RTE_TM_FUNC (port_id, shaper_profile_delete)(dev, shaper_profile_id, error); }
@@ -196,6 +209,8 @@ int rte_tm_shared_shaper_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_add_update (port_id, shared_shaper_id, + shaper_profile_id);return RTE_TM_FUNC (port_id, shared_shaper_add_update)(dev, shared_shaper_id, shaper_profile_id, error); }
@@ -206,6 +221,7 @@ int rte_tm_shared_shaper_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_delete (port_id, shared_shaper_id);return RTE_TM_FUNC (port_id, shared_shaper_delete)(dev, shared_shaper_id, error); }
@@ -221,6 +237,8 @@ int rte_tm_node_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_add (port_id, node_id, parent_node_id, priority, + weight, level_id, params);return RTE_TM_FUNC (port_id, node_add)(dev, node_id, parent_node_id, priority, weight, level_id, params, error);
@@ -232,6 +250,7 @@ int rte_tm_node_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_delete (port_id, node_id);return RTE_TM_FUNC (port_id, node_delete)(dev, node_id, error); }
@@ -242,6 +261,7 @@ int rte_tm_node_suspend(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_suspend (port_id, node_id);return RTE_TM_FUNC (port_id, node_suspend)(dev, node_id, error); }
@@ -252,6 +272,7 @@ int rte_tm_node_resume(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_resume (port_id, node_id);return RTE_TM_FUNC (port_id, node_resume)(dev, node_id, error); }
@@ -262,6 +283,7 @@ int rte_tm_hierarchy_commit(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_hierarchy_commit (port_id, clear_on_fail);return RTE_TM_FUNC (port_id, hierarchy_commit)(dev, clear_on_fail, error); }
@@ -275,6 +297,8 @@ int rte_tm_node_parent_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_parent_update (port_id, node_id, parent_node_id, + priority, weight);return RTE_TM_FUNC (port_id, node_parent_update)(dev, node_id, parent_node_id, priority, weight, error); }
@@ -286,6 +310,7 @@ int rte_tm_node_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shaper_update (port_id, node_id, shaper_profile_id);return RTE_TM_FUNC (port_id, node_shaper_update)(dev, node_id, shaper_profile_id, error); }
@@ -298,6 +323,8 @@ int rte_tm_node_shared_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_shaper_update (port_id, node_id, shared_shaper_id, + add);return RTE_TM_FUNC (port_id, node_shared_shaper_update)(dev, node_id, shared_shaper_id, add, error); }
@@ -309,6 +336,7 @@ int rte_tm_node_stats_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_update (port_id, node_id, stats_mask);return RTE_TM_FUNC (port_id, node_stats_update)(dev, node_id, stats_mask, error); }
@@ -321,6 +349,8 @@ int rte_tm_node_wfq_weight_mode_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wfq_weight_mode_update (port_id, node_id, wfq_weight_mode, + n_sp_priorities);return RTE_TM_FUNC (port_id, node_wfq_weight_mode_update)(dev, node_id, wfq_weight_mode, n_sp_priorities, error); }
@@ -332,6 +362,7 @@ int rte_tm_node_cman_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_cman_update (port_id, node_id, cman);return RTE_TM_FUNC (port_id, node_cman_update)(dev, node_id, cman, error); }
@@ -343,6 +374,7 @@ int rte_tm_node_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wred_context_update (port_id, node_id, wred_profile_id);return RTE_TM_FUNC (port_id, node_wred_context_update)(dev, node_id, wred_profile_id, error); }
@@ -355,6 +387,9 @@ int rte_tm_node_shared_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_wred_context_update (port_id, node_id, + shared_wred_context_id, + add);return RTE_TM_FUNC (port_id, node_shared_wred_context_update)(dev, node_id, shared_wred_context_id, add, error); }
@@ -368,6 +403,8 @@ int rte_tm_node_stats_read(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_read (port_id, node_id, stats, stats_mask, + clear);return RTE_TM_FUNC (port_id, node_stats_read)(dev, node_id, stats, stats_mask, clear, error); }
@@ -380,6 +417,7 @@ int rte_tm_mark_vlan_dei(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_vlan_dei (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_vlan_dei)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -392,6 +430,7 @@ int rte_tm_mark_ip_ecn(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_ecn (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_ecn)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -404,6 +443,7 @@ int rte_tm_mark_ip_dscp(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_dscp (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_dscp)(dev, mark_green, mark_yellow, mark_red, error); }
lib/ethdev/version.map +30 -0
@@ -490,6 +490,36 @@ EXPERIMENTAL { __rte_mtr_trace_meter_vlan_table_update; __rte_mtr_trace_stats_read; __rte_mtr_trace_stats_update; + __rte_tm_trace_capabilities_get; + __rte_tm_trace_get_number_of_leaf_nodes; + __rte_tm_trace_hierarchy_commit; + __rte_tm_trace_level_capabilities_get; + __rte_tm_trace_mark_ip_dscp; + __rte_tm_trace_mark_ip_ecn; + __rte_tm_trace_mark_vlan_dei; + __rte_tm_trace_node_add; + __rte_tm_trace_node_capabilities_get; + __rte_tm_trace_node_cman_update; + __rte_tm_trace_node_delete; + __rte_tm_trace_node_parent_update; + __rte_tm_trace_node_resume; + __rte_tm_trace_node_shaper_update; + __rte_tm_trace_node_shared_shaper_update; + __rte_tm_trace_node_shared_wred_context_update; + __rte_tm_trace_node_stats_read; + __rte_tm_trace_node_stats_update; + __rte_tm_trace_node_suspend; + __rte_tm_trace_node_type_get; + __rte_tm_trace_node_wfq_weight_mode_update; + __rte_tm_trace_node_wred_context_update; + __rte_tm_trace_shaper_profile_add; + __rte_tm_trace_shaper_profile_delete; + __rte_tm_trace_shared_shaper_add_update; + __rte_tm_trace_shared_shaper_delete; + __rte_tm_trace_shared_wred_context_add_update; + __rte_tm_trace_shared_wred_context_delete; + __rte_tm_trace_wred_profile_add; + __rte_tm_trace_wred_profile_delete; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH 5/6 ethdev: add trace points for driver
In reply to Ankur DwivediAdds trace points for ethdev driver specific functions in ethdev lib.
--- lib/ethdev/ethdev_driver.c | 29 +++++ lib/ethdev/ethdev_trace_points.c | 66 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 200 +++++++++++++++++++++++++++++++ lib/ethdev/version.map | 22 ++++ 4 files changed, 317 insertions(+)
lib/ethdev/ethdev_driver.c +29 -0
@@ -5,6 +5,7 @@#include <rte_kvargs.h> #include <rte_malloc.h> +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h"
@@ -113,6 +114,7 @@ rte_eth_dev_allocate(const char *name) unlock:rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_allocate (name, eth_dev);return eth_dev; }
@@ -121,6 +123,7 @@ rte_eth_dev_allocated(const char *name) {struct rte_eth_dev *ethdev; +rte_ethdev_trace_allocated (name);eth_dev_shared_data_prepare ();rte_spinlock_lock (ð_dev_shared_data->ownership_lock);
@@ -162,6 +165,7 @@ rte_eth_dev_attach_secondary(const char *name) }rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_attach_secondary (name, eth_dev);return eth_dev; }
@@ -173,6 +177,7 @@ rte_eth_dev_callback_process(struct rte_eth_dev *dev,struct rte_eth_dev_callback dev_cb;int rc =0 ; +rte_ethdev_trace_callback_process (dev, event, ret_param);rte_spinlock_lock (ð_dev_cb_lock); TAILQ_FOREACH(cb_lst, &(dev->link_intr_cbs), next) {if (cb_lst->cb_fn ==NULL || cb_lst->event != event)
@@ -195,6 +200,7 @@ rte_eth_dev_callback_process(struct rte_eth_dev *dev,void rte_eth_dev_probing_finish (struct rte_eth_dev *dev) { +rte_ethdev_trace_probing_finish (dev);if (dev ==NULL )return ;
@@ -214,6 +220,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)int rte_eth_dev_release_port (struct rte_eth_dev *eth_dev) { +rte_ethdev_trace_release_port (eth_dev);if (eth_dev ==NULL )return -EINVAL ;
@@ -264,6 +271,9 @@ rte_eth_dev_create(struct rte_device *device, const char *name,struct rte_eth_dev *ethdev;int retval; +rte_ethdev_trace_create (device, name, priv_data_size, + ethdev_bus_specific_init, bus_init_params, + ethdev_init, init_params);RTE_FUNC_PTR_OR_ERR_RET (*ethdev_init, -EINVAL );if (rte_eal_process_type () ==RTE_PROC_PRIMARY ) {
@@ -324,6 +334,7 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev, {int ret; +rte_ethdev_trace_destroy (ethdev, ethdev_uninit); ethdev =rte_eth_dev_allocated (ethdev->data->name);if (!ethdev)return -ENODEV ;
@@ -342,6 +353,7 @@ rte_eth_dev_get_by_name(const char *name) {uint16_t pid; +rte_ethdev_trace_get_by_name (name);if (rte_eth_dev_get_port_by_name (name, &pid))return NULL ;
@@ -351,6 +363,7 @@ rte_eth_dev_get_by_name(const char *name)int rte_eth_dev_is_rx_hairpin_queue (struct rte_eth_dev *dev,uint16_t queue_id) { +rte_ethdev_trace_is_rx_hairpin_queue (dev, queue_id);if (dev->data->rx_queue_state[queue_id] ==RTE_ETH_QUEUE_STATE_HAIRPIN )return 1 ;return 0 ;
@@ -359,6 +372,7 @@ rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id)int rte_eth_dev_is_tx_hairpin_queue (struct rte_eth_dev *dev,uint16_t queue_id) { +rte_ethdev_trace_is_tx_hairpin_queue (dev, queue_id);if (dev->data->tx_queue_state[queue_id] ==RTE_ETH_QUEUE_STATE_HAIRPIN )return 1 ;return 0 ;
@@ -367,6 +381,7 @@ rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id)void rte_eth_dev_internal_reset (struct rte_eth_dev *dev) { +rte_ethdev_trace_internal_reset (dev, dev->data->dev_started);if (dev->data->dev_started) {RTE_ETHDEV_LOG (ERR ,"Port %u must be stopped to allow reset\n" , dev->data->port_id);
@@ -451,6 +466,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da)unsigned int i;int result =0 ; +rte_eth_trace_devargs_parse (dargs, eth_da);memset (eth_da,0 ,sizeof (*eth_da)); result =eth_dev_devargs_tokenise (&args, dargs);
@@ -495,6 +511,7 @@ rte_eth_dma_zone_free(const struct rte_eth_dev *dev, const char *ring_name,const struct rte_memzone *mz;int rc =0 ; +rte_eth_trace_dma_zone_free (dev, ring_name, queue_id); rc =eth_dev_dma_mzone_name (z_name,sizeof (z_name), dev->data->port_id, queue_id, ring_name);if (rc >=RTE_MEMZONE_NAMESIZE ) {
@@ -520,6 +537,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,const struct rte_memzone *mz;int rc; +rte_eth_trace_dma_zone_reserve (dev, ring_name, queue_id, size, align, socket_id); rc =eth_dev_dma_mzone_name (z_name,sizeof (z_name), dev->data->port_id, queue_id, ring_name);if (rc >=RTE_MEMZONE_NAMESIZE ) {
@@ -553,6 +571,8 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue, {struct rte_eth_dev *dev; +rte_eth_trace_hairpin_queue_peer_bind (cur_port, cur_queue, peer_info, + direction);if (peer_info ==NULL )return -EINVAL ;
@@ -571,6 +591,7 @@ rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t cur_queue, {struct rte_eth_dev *dev; +rte_eth_trace_hairpin_queue_peer_unbind (cur_port, cur_queue, direction);/* No need to check the validity again. */ dev = &rte_eth_devices[cur_port]; RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->hairpin_queue_peer_unbind,
@@ -588,6 +609,8 @@ rte_eth_hairpin_queue_peer_update(uint16_t peer_port, uint16_t peer_queue, {struct rte_eth_dev *dev; +rte_eth_trace_hairpin_queue_peer_update (peer_port, peer_queue, cur_info, + peer_info, direction);/* Current queue information is not mandatory. */ if (peer_info ==NULL )return -EINVAL ;
@@ -626,6 +649,8 @@ rte_eth_ip_reassembly_dynfield_register(int *field_offset, int *flag_offset)if (flag_offset !=NULL ) *flag_offset = offset; +rte_eth_trace_ip_reassembly_dynfield_register (*field_offset, + *flag_offset);return 0 ; }
@@ -729,6 +754,8 @@ rte_eth_representor_id_get(uint16_t port_id, } out:free (info); +rte_eth_trace_representor_id_get (port_id, type, controller, pf, + representor_port, *repr_id);return ret; }
@@ -745,6 +772,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id) eth_dev_switch_domains[i].state =RTE_ETH_SWITCH_DOMAIN_ALLOCATED ; *domain_id = i; +rte_eth_trace_switch_domain_alloc (*domain_id);return 0 ; } }
@@ -755,6 +783,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id)int rte_eth_switch_domain_free (uint16_t domain_id) { +rte_eth_trace_switch_domain_free (domain_id);if (domain_id ==RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID || domain_id >=RTE_MAX_ETHPORTS )return -EINVAL ;
lib/ethdev/ethdev_trace_points.c +66 -0
69 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace.h +200 -0
212 lines not on this page · raw message
lib/ethdev/version.map +22 -0
@@ -520,6 +520,28 @@ EXPERIMENTAL { __rte_tm_trace_shared_wred_context_delete; __rte_tm_trace_wred_profile_add; __rte_tm_trace_wred_profile_delete; + __rte_ethdev_trace_allocate; + __rte_ethdev_trace_allocated; + __rte_ethdev_trace_attach_secondary; + __rte_ethdev_trace_callback_process; + __rte_ethdev_trace_create; + __rte_ethdev_trace_destroy; + __rte_ethdev_trace_get_by_name; + __rte_ethdev_trace_is_rx_hairpin_queue; + __rte_ethdev_trace_is_tx_hairpin_queue; + __rte_ethdev_trace_probing_finish; + __rte_ethdev_trace_release_port; + __rte_ethdev_trace_internal_reset; + __rte_eth_trace_devargs_parse; + __rte_eth_trace_dma_zone_free; + __rte_eth_trace_dma_zone_reserve; + __rte_eth_trace_hairpin_queue_peer_bind; + __rte_eth_trace_hairpin_queue_peer_unbind; + __rte_eth_trace_hairpin_queue_peer_update; + __rte_eth_trace_ip_reassembly_dynfield_register; + __rte_eth_trace_representor_id_get; + __rte_eth_trace_switch_domain_alloc; + __rte_eth_trace_switch_domain_free; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH 6/6 devtools: add trace function check in checkpatch
In reply to Ankur DwivediThis patch adds a check in checkpatch tool, to check if trace function is added in any new function added in ethdev library.
It uses the existing build_map_changes() function and version.map file to create a list of newly added functions. The definition of these functions are checked if they contain trace calls or not. The checkpatch return error if the trace calls are not present.
--- devtools/check-symbol-change.sh | 76 +------------------------------- devtools/check-trace-func.py | 52 ++++++++++++++++++++++ devtools/check-trace-func.sh | 50 +++++++++++++++++++++ devtools/checkpatches.sh | 9 ++++ devtools/common-func.sh | 77 +++++++++++++++++++++++++++++++++ 5 files changed, 190 insertions(+), 74 deletions(-) create mode 100755 devtools/check-trace-func.py create mode 100755 devtools/check-trace-func.sh create mode 100644 devtools/common-func.sh
devtools/check-symbol-change.sh +2 -74
@@ -2,80 +2,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Neil Horman <[email protected]> -build_map_changes() -{ - local fname="$1" - local mapdb="$2" - - cat "$fname" | awk ' - # Initialize our variables - BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0} - - # Anything that starts with + or -, followed by an a - # and ends in the string .map is the name of our map file - # This may appear multiple times in a patch if multiple - # map files are altered, and all section/symbol names - # appearing between a triggering of this rule and the - # next trigger of this rule are associated with this file - /[-+] [ab]\/.*\.map/ {map=$2; in_map=1; next} - - # The previous rule catches all .map files, anything else - # indicates we left the map chunk. - /[-+] [ab]\// {in_map=0} - - # Triggering this rule, which starts a line and ends it - # with a { identifies a versioned section. The section name is - # the rest of the line with the + and { symbols removed. - # Triggering this rule sets in_sec to 1, which actives the - # symbol rule below - /^.*{/ { - gsub("+", ""); - if (in_map == 1) { - sec=$(NF-1); in_sec=1; - } - } - - # This rule identifies the end of a section, and disables the - # symbol rule - /.*}/ {in_sec=0} - - # This rule matches on a + followed by any characters except a : - # (which denotes a global vs local segment), and ends with a ;. - # The semicolon is removed and the symbol is printed with its - # association file name and version section, along with an - # indicator that the symbol is a new addition. Note this rule - # only works if we have found a version section in the rule - # above (hence the in_sec check) And found a map file (the - # in_map check). If we are not in a map chunk, do nothing. If - # we are in a map chunk but not a section chunk, record it as - # unknown. - /^+[^}].*[^:*];/ {gsub(";","");sym=$2; - if (in_map == 1) { - if (in_sec == 1) { - print map " " sym " " sec " add" - } else { - print map " " sym " unknown add" - } - } - } - - # This is the same rule as above, but the rule matches on a - # leading - rather than a +, denoting that the symbol is being - # removed. - /^-[^}].*[^:*];/ {gsub(";","");sym=$2; - if (in_map == 1) { - if (in_sec == 1) { - print map " " sym " " sec " del" - } else { - print map " " sym " unknown del" - } - } - }' > "$mapdb" - - sort -u "$mapdb" > "$mapdb.2" - mv -f "$mapdb.2" "$mapdb" - -} +selfdir=$(dirname $(readlink -f $0)) +. $selfdir/common-func.sh is_stable_section() { [ "$1" != 'EXPERIMENTAL' ] && [ "$1" != 'INTERNAL' ]
devtools/check-trace-func.py new file +52 -0
52 lines not on this page · raw message
devtools/check-trace-func.sh new file +50 -0
50 lines not on this page · raw message
devtools/checkpatches.sh +9 -0
@@ -10,6 +10,7 @@ . $(dirname $(readlink -f $0))/load-devel-config VALIDATE_NEW_API=$(dirname $(readlink -f $0))/check-symbol-change.sh +VALIDATE_TRACE_FUNC=$(dirname $(readlink -f $0))/check-trace-func.sh # Enable codespell by default. This can be overwritten from a config file. # Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path
@@ -338,6 +339,14 @@ check () { # <patch> <commit> <title> ret=1 fi + ! $verbose || printf '\nChecking API additions with trace function call :\n' + report=$($VALIDATE_TRACE_FUNC "$tmpinput") + if [ $? -ne 0 ] ; then + $headline_printed || print_headline "$3" + printf '%s\n' "$report" + ret=1 + fi + if [ "$tmpinput" != "$1" ]; then rm -f "$tmpinput" trap - INT
devtools/common-func.sh new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.28.0
v2 cover add trace points in ethdev library
In reply to Ankur DwivediThis series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v2:
- Made rte_eth_trace_call_rx_callbacks and rte_eth_trace_call_tx_callbacks as fastpath trace functions.
- Moved some trace functions call to the end to capture return value and data.
- Removed rte_eth_trace_tx_queue_setup as it is not required. rte_ethdev_trace_txq_setup() is already present in rte_eth_tx_queue_setup().
- Removed trace in ethdev_driver.c
- Removed trace function check patch.
Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tm
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
Signature · 1 line
2.28.0
PATCH v2 1/4 ethdev: add trace points
Add trace points for ethdev functions.
--- lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 435 +++++++++++ lib/ethdev/rte_ethdev.c | 148 ++++ lib/ethdev/rte_ethdev_trace.h | 1185 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/version.map | 144 ++++ 6 files changed, 1934 insertions(+)
lib/ethdev/ethdev_private.c +3 -0
@@ -5,6 +5,7 @@#include <rte_debug.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h"
@@ -297,6 +298,7 @@ rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_rx_callbacks (port_id, queue_id, nb_rx, nb_pkts);return nb_rx; }
@@ -312,6 +314,7 @@ rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_tx_callbacks (port_id, queue_id, nb_pkts);return nb_pkts; }
lib/ethdev/ethdev_trace_points.c +435 -0
438 lines not on this page · raw message
lib/ethdev/rte_ethdev.c +148 -0
1,000 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace.h +1185 -0
1,191 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace_fp.h +19 -0
@@ -37,6 +37,25 @@ RTE_TRACE_POINT_FP(rte_trace_point_emit_u16 (nb_pkts); ) +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_rx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_rx, uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +) + +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_tx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_pkts); +) + #ifdef __cplusplus }#endif
lib/ethdev/version.map +144 -0
150 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 3 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>
[snip]
lib/ethdev/rte_ethdev.c rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) · line 6013
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -5867,6 +6010,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) {struct rte_eth_dev *dev; +rte_eth_trace_rx_metadata_negotiate (port_id, features);
features are in/out, so it would be interesting to values, not just pointer and both values: input and output.
Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id];
[snip]
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 9 lines
lib/ethdev/version.map +1
-0@@ -288,6 +288,150 @@ EXPERIMENTAL { # added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;
Why is it in EXPERIMENTAL section, but not INTERNAL?
[snip]
Quoted 1 line
lib/ethdev/version.map +0
-0INTERNAL
RE: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Hi Andrew,
Quoted 55 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 3 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>[snip]
Review rte_eth_rx_metadata_negotiate(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -5867,6 +6010,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id,
uint64_t*features)
Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) · line 6013
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0{struct rte_eth_dev *dev; +rte_eth_trace_rx_metadata_negotiate (port_id, features);features are in/out, so it would be interesting to values, not just pointer and both values: input and output.
[Ankur] Will add a emit line to display the uint64_t input value of features.
Quoted 13 lines
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id];[snip]
Quoted 6 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +0
-0@@ -288,6 +288,150 @@ EXPERIMENTAL {
Quoted 5 lines
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 3 lines
lib/ethdev/version.map +1
-0# added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
[Ankur] Because the functions for which trace is added are not internal functions.
Quoted 4 lines
[snip]
Quoted 1 line
INTERNAL
Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 57 lines · Ankur Dwivedi
Hi Andrew,
Quoted 55 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsExternal Email
----------------------------------------------------------------------
Quoted 3 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>[snip]
Review rte_eth_rx_metadata_negotiate(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -5867,6 +6010,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id,
uint64_t*features)
Quoted 8 lines
Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) · line 6013
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0{struct rte_eth_dev *dev; +rte_eth_trace_rx_metadata_negotiate (port_id, features);features are in/out, so it would be interesting to values, not just pointer and both values: input and output.
[Ankur] Will add a emit line to display the
uint64_tinput value of features.
What about output?
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id];[snip]
Quoted 6 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +0
-0@@ -288,6 +288,150 @@ EXPERIMENTAL {
Quoted 6 lines
Quoted 5 lines
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 3 lines
lib/ethdev/version.map +1
-0# added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
[Ankur] Because the functions for which trace is added are not internal functions.
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
Quoted 4 lines
Quoted 4 lines
[snip]
Quoted 1 line
INTERNAL
RE: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 111 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:58 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsQuoted 11 lines · Ankur Dwivedi
Hi Andrew,
Quoted 9 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; IgorRusskikh
Quoted 3 lines
Quoted 3 lines
<[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin
Jacob
Quoted 12 lines
Quoted 12 lines
Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori
Quoted 8 lines
Quoted 8 lines
<[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
Quoted 28 lines
Quoted 28 lines
[email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsExternal Email
---------------------------------------------------------------------
Quoted 3 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>[snip]
Review rte_eth_rx_metadata_negotiate(uint16_t · line 6010
Quoted 2 lines
(quoted diff) +0
-0@@ -5867,6 +6010,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id,
uint64_t*features)Quoted 3 lines
lib/ethdev/rte_ethdev.c +0
-0{struct rte_eth_dev *dev;
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
lib/ethdev/rte_ethdev.c rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) · line 6013
Quoted 1 line
lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_rx_metadata_negotiate (port_id, features);features are in/out, so it would be interesting to values, not just pointer and both values: input and output.
[Ankur] Will add a emit line to display the
uint64_tinput value of features.What about output?
[Ankur] The output is not captured because it calls a callback in the return:
return eth_err(port_id, (*dev->dev_ops->rx_metadata_negotiate)(dev, features));
I do not wanted to modify the existing code/logic for trace.
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 5 lines
(quoted diff) +0
-0RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id];[snip]
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 9 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +1
-0@@ -288,6 +288,150 @@ EXPERIMENTAL { # added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
Quoted 5 lines
Quoted 1 line
[Ankur] Because the functions for which trace is added are not internal
functions.
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
[Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like __rte_ethdev_trace_configure, __rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.
But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
[snip]
Quoted 1 line
INTERNAL
Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
@David, see small question below.
@Thomas, @Ferruh, @Jerin see question below as well.
Quoted 115 lines · Ankur Dwivedi
Quoted 115 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:58 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsQuoted 11 lines · Ankur Dwivedi
Hi Andrew,
Quoted 9 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; IgorRusskikh
Quoted 3 lines
Quoted 3 lines
<[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin
Jacob
Quoted 12 lines
Quoted 12 lines
Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori
Quoted 8 lines
Quoted 8 lines
<[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
Quoted 32 lines
Quoted 32 lines
[email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 1/4] ethdev: add trace pointsExternal Email
---------------------------------------------------------------------
Quoted 3 lines · Ankur Dwivedi
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>[snip]
Review rte_eth_rx_metadata_negotiate(uint16_t · line 6010
Quoted 2 lines
(quoted diff) +0
-0@@ -5867,6 +6010,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id,
uint64_t*features)lib/ethdev/rte_ethdev.c rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features) · line 6013
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0{struct rte_eth_dev *dev; +rte_eth_trace_rx_metadata_negotiate (port_id, features);features are in/out, so it would be interesting to values, not just pointer and both values: input and output.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
[Ankur] Will add a emit line to display the
uint64_tinput value of features.What about output?
[Ankur] The output is not captured because it calls a callback in the return:
return
eth_err(port_id, (*dev->dev_ops->rx_metadata_negotiate)(dev, features));I do not wanted to modify the existing code/logic for trace.
OK, I see the reason now. I'd like to hear opinion of other ethdev maintainers (@Thomas and @Ferruh) and @Jerin. Thoughts?
It is just one example from many-many cases.
The question is how pedantic should we be with added tracing?
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 5 lines
(quoted diff) +0
-0RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); dev = &rte_eth_devices[port_id];[snip]
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 9 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +1
-0@@ -288,6 +288,150 @@ EXPERIMENTAL { # added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
[Ankur] Because the functions for which trace is added are not internal
functions.
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
[Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like
__rte_ethdev_trace_configure,__rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
@David, do I understand correctly that trace points in EXPERIMENTAL is a mistake in majority of cases?
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
[snip]
Quoted 1 line
INTERNAL
Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 14 lines · Andrew Rybchenko
Quoted 14 lines
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +0
-0@@ -288,6 +288,150 @@ EXPERIMENTAL {Quoted 6 lines
Quoted 5 lines
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 3 lines
lib/ethdev/version.map +1
-0# added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
[Ankur] Because the functions for which trace is added are not internal
functions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
[Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like
__rte_ethdev_trace_configure,__rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
@David, do I understand correctly that trace points in EXPERIMENTAL is a mistake in majority of cases?
The trace point global variables (__rte_trace_foo) are only exposed for inline helpers that might call their associated trace point helper (rte_trace_foo()).
An application is not supposed to directly manipulate them. Any tp manipulation should be through the rte_trace_point_* API.
Jerin, do you see any other uses for them?
If not, I agree we can mark all those INTERNAL.
I can send a cleanup post rc1.
Signature · 1 line
David Marchand
Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 26 lines · David Marchand
Quoted 14 lines · Andrew Rybchenko
Quoted 14 lines
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +0
-0@@ -288,6 +288,150 @@ EXPERIMENTAL {Quoted 6 lines
Quoted 5 lines
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 3 lines
lib/ethdev/version.map +1
-0# added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
[Ankur] Because the functions for which trace is added are not internal
functions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
[Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like
__rte_ethdev_trace_configure,__rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
@David, do I understand correctly that trace points in EXPERIMENTAL is a mistake in majority of cases?
Quoted 7 lines
The trace point global variables (
__rte_trace_foo) are only exposed for inline helpers that might call their associated trace point helper (rte_trace_foo()).
An application is not supposed to directly manipulate them. Any tp manipulation should be through the rte_trace_point_* API.Jerin, do you see any other uses for them?
No. Expect the following ones, which can be used by application directly.
__rte_eal_trace_generic_float;
__rte_eal_trace_generic_func;
__rte_eal_trace_generic_i16;
__rte_eal_trace_generic_i32;
__rte_eal_trace_generic_i64;
__rte_eal_trace_generic_i8;
__rte_eal_trace_generic_int;
__rte_eal_trace_generic_long;
__rte_eal_trace_generic_ptr;
__rte_eal_trace_generic_str;
__rte_eal_trace_generic_u16;
__rte_eal_trace_generic_u32;
__rte_eal_trace_generic_u64;
__rte_eal_trace_generic_u8;Quoted 3 lines
If not, I agree we can mark all those INTERNAL.
I can send a cleanup post rc1.
Thanks
Quoted 5 lines
--
David Marchand
Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
Quoted 36 lines · Jerin Jacob
Quoted 25 lines · David Marchand
Quoted 14 lines · Andrew Rybchenko
Quoted 14 lines
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
lib/ethdev/version.map index renamed from lib/ethdev/version.map +0
-0
3def7bfd24..e3d603cc9a100644lib/ethdev/version.map +0
-0@@ -288,6 +288,150 @@ EXPERIMENTAL {Quoted 6 lines
Quoted 5 lines
lib/ethdev/version.map EXPERIMENTAL { · line 291
Quoted 3 lines
lib/ethdev/version.map +1
-0# added in 22.11 rte_flow_async_action_handle_query; + __rte_eth_trace_add_first_rx_callback;Why is it in EXPERIMENTAL section, but not INTERNAL?
[Ankur] Because the functions for which trace is added are not internal
functions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Sorry, but I don't understand. I agree that tracing of public inline functions must be part of ABI, but why everything else should be a part of ABI?
[Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like
__rte_ethdev_trace_configure,__rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
@David, do I understand correctly that trace points in EXPERIMENTAL is a mistake in majority of cases?
Quoted 7 lines
The trace point global variables (
__rte_trace_foo) are only exposed for inline helpers that might call their associated trace point helper (rte_trace_foo()).
An application is not supposed to directly manipulate them. Any tp manipulation should be through the rte_trace_point_* API.Jerin, do you see any other uses for them?
No. Expect the following ones, which can be used by application directly.
Quoted 14 lines
__rte_eal_trace_generic_float;
__rte_eal_trace_generic_func;
__rte_eal_trace_generic_i16;
__rte_eal_trace_generic_i32;
__rte_eal_trace_generic_i64;
__rte_eal_trace_generic_i8;
__rte_eal_trace_generic_int;
__rte_eal_trace_generic_long;
__rte_eal_trace_generic_ptr;
__rte_eal_trace_generic_str;
__rte_eal_trace_generic_u16;
__rte_eal_trace_generic_u32;
__rte_eal_trace_generic_u64;
__rte_eal_trace_generic_u8;Indeed, that's something I discussed offlist after with Andrew but forgot to put back on the mailing list.
As long as the trace point is called from a helper in a header exposed to applications, we can't mark the trace point variable internal.
Signature · 1 line
David Marchand
PATCH v2 2/4 ethdev: add trace points for flow
In reply to Ankur DwivediAdds trace points for rte_flow specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 117 +++++++++ lib/ethdev/rte_ethdev_trace.h | 418 +++++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 54 ++++ lib/ethdev/version.map | 39 +++ 4 files changed, 628 insertions(+)
lib/ethdev/ethdev_trace_points.c +117 -0
@@ -464,3 +464,120 @@ RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query,RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_avail_thresh_set, lib.ethdev.rx_avail_thresh_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_copy, + lib.ethdev.flow.copy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_create, + lib.ethdev.flow.create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_destroy, + lib.ethdev.flow.destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_error_set, + lib.ethdev.flow.error_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flush, + lib.ethdev.flow.flush) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_isolate, + lib.ethdev.flow.isolate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_query, + lib.ethdev.flow.query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_validate, + lib.ethdev.flow.validate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_conv, + lib.ethdev.flow.conv) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dynf_metadata_register, + lib.ethdev.dynf_metadata_register) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dev_dump, + lib.ethdev.flow.dev_dump) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_aged_flows, + lib.ethdev.flow.get_aged_flows) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_decap_set, + lib.ethdev.flow.tunnel_decap_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_match, + lib.ethdev.flow.tunnel_match) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_restore_info, + lib.ethdev.flow.get_restore_info) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_action_decap_release, + lib.ethdev.flow.tunnel_action_decap_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_item_release, + lib.ethdev.flow.tunnel_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_create, + lib.ethdev.flow.action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_destroy, + lib.ethdev.flow.action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_update, + lib.ethdev.flow.action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_query, + lib.ethdev.flow.action_handle_query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_create, + lib.ethdev.flow.flex_item_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_release, + lib.ethdev.flow.flex_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pick_transfer_proxy, + lib.ethdev.flow.pick_transfer_proxy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_info_get, + lib.ethdev.flow.info_get) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_configure, + lib.ethdev.flow.configure) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_create, + lib.ethdev.flow.pattern_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_destroy, + lib.ethdev.flow.pattern_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_create, + lib.ethdev.flow.actions_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_destroy, + lib.ethdev.flow.actions_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_create, + lib.ethdev.flow.template_table_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_destroy, + lib.ethdev.flow.template_table_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_create, + lib.ethdev.flow.async_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_destroy, + lib.ethdev.flow.async_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_push, + lib.ethdev.flow.push) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pull, + lib.ethdev.flow.pull) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_create, + lib.ethdev.flow.async_action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_destroy, + lib.ethdev.flow.async_action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, + lib.ethdev.flow.async_action_handle_update)
lib/ethdev/rte_ethdev_trace.h +418 -0
424 lines not on this page · raw message
lib/ethdev/rte_flow.c +54 -0
294 lines not on this page · raw message
lib/ethdev/version.map +39 -0
@@ -432,6 +432,45 @@ EXPERIMENTAL { __rte_eth_trace_ip_reassembly_conf_set; __rte_eth_trace_rx_avail_thresh_query; __rte_eth_trace_rx_avail_thresh_set; + __rte_flow_trace_action_handle_create; + __rte_flow_trace_action_handle_destroy; + __rte_flow_trace_action_handle_query; + __rte_flow_trace_action_handle_update; + __rte_flow_trace_actions_template_create; + __rte_flow_trace_actions_template_destroy; + __rte_flow_trace_async_action_handle_create; + __rte_flow_trace_async_action_handle_destroy; + __rte_flow_trace_async_action_handle_update; + __rte_flow_trace_async_create; + __rte_flow_trace_async_destroy; + __rte_flow_trace_conv; + __rte_flow_trace_configure; + __rte_flow_trace_copy; + __rte_flow_trace_create; + __rte_flow_trace_destroy; + __rte_flow_trace_dev_dump; + __rte_flow_trace_dynf_metadata_register; + __rte_flow_trace_error_set; + __rte_flow_trace_flex_item_create; + __rte_flow_trace_flex_item_release; + __rte_flow_trace_flush; + __rte_flow_trace_get_aged_flows; + __rte_flow_trace_get_restore_info; + __rte_flow_trace_info_get; + __rte_flow_trace_isolate; + __rte_flow_trace_pattern_template_create; + __rte_flow_trace_pattern_template_destroy; + __rte_flow_trace_pick_transfer_proxy; + __rte_flow_trace_push; + __rte_flow_trace_pull; + __rte_flow_trace_query; + __rte_flow_trace_template_table_create; + __rte_flow_trace_template_table_destroy; + __rte_flow_trace_tunnel_action_decap_release; + __rte_flow_trace_tunnel_decap_set; + __rte_flow_trace_tunnel_item_release; + __rte_flow_trace_tunnel_match; + __rte_flow_trace_validate; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH v2 3/4 ethdev: add trace points for mtr
In reply to Ankur DwivediAdds trace points for rte_mtr specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 57 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 176 +++++++++++++++++++++++++++++++ lib/ethdev/rte_mtr.c | 27 +++++ lib/ethdev/version.map | 19 ++++ 4 files changed, 279 insertions(+)
lib/ethdev/ethdev_trace_points.c +57 -0
@@ -581,3 +581,60 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_handle_destroy,RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, lib.ethdev.flow.async_action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_capabilities_get, + lib.ethdev.mtr.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_create, + lib.ethdev.mtr.create) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_destroy, + lib.ethdev.mtr.destroy) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_disable, + lib.ethdev.mtr.meter_disable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_dscp_table_update, + lib.ethdev.mtr.meter_dscp_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_enable, + lib.ethdev.mtr.meter_enable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_add, + lib.ethdev.mtr.meter_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_delete, + lib.ethdev.mtr.meter_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_update, + lib.ethdev.mtr.meter_profile_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_read, + lib.ethdev.mtr.stats_read) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_update, + lib.ethdev.mtr.stats_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_add, + lib.ethdev.mtr.meter_policy_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_delete, + lib.ethdev.mtr.meter_policy_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_update, + lib.ethdev.mtr.meter_policy_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_validate, + lib.ethdev.mtr.meter_policy_validate) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_vlan_table_update, + lib.ethdev.mtr.meter_vlan_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_get, + lib.ethdev.mtr.color_in_protocol_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_priority_get, + lib.ethdev.mtr.color_in_protocol_priority_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, + lib.ethdev.mtr.color_in_protocol_set)
lib/ethdev/rte_ethdev_trace.h +176 -0
188 lines not on this page · raw message
lib/ethdev/rte_mtr.c +27 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_mtr_driver.h" #include "rte_mtr.h"
@@ -63,6 +64,7 @@ rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_capabilities_get (port_id, cap);return RTE_MTR_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -75,6 +77,7 @@ rte_mtr_meter_profile_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_add (port_id, meter_profile_id, profile);return RTE_MTR_FUNC (port_id, meter_profile_add)(dev, meter_profile_id, profile, error); }
@@ -86,6 +89,7 @@ rte_mtr_meter_profile_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_delete (port_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_delete)(dev, meter_profile_id, error); }
@@ -97,6 +101,10 @@ rte_mtr_meter_policy_validate(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_validate (port_id, policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_validate)(dev, policy, error); }
@@ -109,6 +117,11 @@ rte_mtr_meter_policy_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_add (port_id, policy_id, + policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_add)(dev, policy_id, policy, error); }
@@ -120,6 +133,7 @@ rte_mtr_meter_policy_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_delete (port_id, policy_id);return RTE_MTR_FUNC (port_id, meter_policy_delete)(dev, policy_id, error); }
@@ -133,6 +147,7 @@ rte_mtr_create(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_create (port_id, mtr_id, params, shared);return RTE_MTR_FUNC (port_id, create)(dev, mtr_id, params, shared, error); }
@@ -144,6 +159,7 @@ rte_mtr_destroy(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_destroy (port_id, mtr_id);return RTE_MTR_FUNC (port_id, destroy)(dev, mtr_id, error); }
@@ -155,6 +171,7 @@ rte_mtr_meter_enable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_enable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_enable)(dev, mtr_id, error); }
@@ -166,6 +183,7 @@ rte_mtr_meter_disable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_disable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_disable)(dev, mtr_id, error); }
@@ -178,6 +196,7 @@ rte_mtr_meter_profile_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_update (port_id, mtr_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_update)(dev, mtr_id, meter_profile_id, error); }
@@ -190,6 +209,7 @@ rte_mtr_meter_policy_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_update (port_id, mtr_id, meter_policy_id);return RTE_MTR_FUNC (port_id, meter_policy_update)(dev, mtr_id, meter_policy_id, error); }
@@ -202,6 +222,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_dscp_table_update (port_id, mtr_id, dscp_table);return RTE_MTR_FUNC (port_id, meter_dscp_table_update)(dev, mtr_id, dscp_table, error); }
@@ -214,6 +235,7 @@ rte_mtr_meter_vlan_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_vlan_table_update (port_id, mtr_id, vlan_table);return RTE_MTR_FUNC (port_id, meter_vlan_table_update)(dev, mtr_id, vlan_table, error); }
@@ -227,6 +249,7 @@ rte_mtr_color_in_protocol_set(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_set (port_id, mtr_id, proto, priority);return RTE_MTR_FUNC (port_id, in_proto_set)(dev, mtr_id, proto, priority, error); }
@@ -239,6 +262,7 @@ rte_mtr_color_in_protocol_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_get (port_id, mtr_id);return RTE_MTR_FUNC (port_id, in_proto_get)(dev, mtr_id, proto_mask, error); }
@@ -252,6 +276,7 @@ rte_mtr_color_in_protocol_priority_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_priority_get (port_id, mtr_id, proto);return RTE_MTR_FUNC (port_id, in_proto_prio_get)(dev, mtr_id, proto, priority, error); }
@@ -264,6 +289,7 @@ rte_mtr_stats_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_update (port_id, mtr_id, stats_mask);return RTE_MTR_FUNC (port_id, stats_update)(dev, mtr_id, stats_mask, error); }
@@ -278,6 +304,7 @@ rte_mtr_stats_read(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_read (port_id, mtr_id, stats, stats_mask, clear);return RTE_MTR_FUNC (port_id, stats_read)(dev, mtr_id, stats, stats_mask, clear, error); }
lib/ethdev/version.map +19 -0
@@ -471,6 +471,25 @@ EXPERIMENTAL { __rte_flow_trace_tunnel_item_release; __rte_flow_trace_tunnel_match; __rte_flow_trace_validate; + __rte_mtr_trace_capabilities_get; + __rte_mtr_trace_color_in_protocol_get; + __rte_mtr_trace_color_in_protocol_priority_get; + __rte_mtr_trace_color_in_protocol_set; + __rte_mtr_trace_create; + __rte_mtr_trace_destroy; + __rte_mtr_trace_meter_disable; + __rte_mtr_trace_meter_dscp_table_update; + __rte_mtr_trace_meter_enable; + __rte_mtr_trace_meter_policy_add; + __rte_mtr_trace_meter_policy_delete; + __rte_mtr_trace_meter_policy_update; + __rte_mtr_trace_meter_policy_validate; + __rte_mtr_trace_meter_profile_add; + __rte_mtr_trace_meter_profile_delete; + __rte_mtr_trace_meter_profile_update; + __rte_mtr_trace_meter_vlan_table_update; + __rte_mtr_trace_stats_read; + __rte_mtr_trace_stats_update; }; INTERNAL {
Signature · 1 line
2.28.0
PATCH v2 4/4 ethdev: add trace points for tm
In reply to Ankur DwivediAdds trace points for rte_tm specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 90 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 283 +++++++++++++++++++++++++++++++ lib/ethdev/rte_tm.c | 40 +++++ lib/ethdev/version.map | 30 ++++ 4 files changed, 443 insertions(+)
lib/ethdev/ethdev_trace_points.c +90 -0
@@ -638,3 +638,93 @@ RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_priority_get,RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, lib.ethdev.mtr.color_in_protocol_set) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_capabilities_get, + lib.ethdev.tm.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_get_number_of_leaf_nodes, + lib.ethdev.tm.get_number_of_leaf_nodes) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_hierarchy_commit, + lib.ethdev.tm.hierarchy_commit) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_level_capabilities_get, + lib.ethdev.tm.level_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_dscp, + lib.ethdev.tm.mark_ip_dscp) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_ecn, + lib.ethdev.tm.mark_ip_ecn) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_vlan_dei, + lib.ethdev.tm.mark_vlan_dei) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_add, + lib.ethdev.tm.node_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_capabilities_get, + lib.ethdev.tm.node_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_cman_update, + lib.ethdev.tm.node_cman_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_delete, + lib.ethdev.tm.node_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_parent_update, + lib.ethdev.tm.node_parent_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_resume, + lib.ethdev.tm.node_resume) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shaper_update, + lib.ethdev.tm.node_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_shaper_update, + lib.ethdev.tm.node_shared_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_wred_context_update, + lib.ethdev.tm.node_shared_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_read, + lib.ethdev.tm.node_stats_read) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_update, + lib.ethdev.tm.node_stats_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_suspend, + lib.ethdev.tm.node_suspend) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_type_get, + lib.ethdev.tm.node_type_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wfq_weight_mode_update, + lib.ethdev.tm.node_wfq_weight_mode_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wred_context_update, + lib.ethdev.tm.node_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_add, + lib.ethdev.tm.shaper_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_delete, + lib.ethdev.tm.shaper_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_add_update, + lib.ethdev.tm.shared_shaper_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_delete, + lib.ethdev.tm.shared_shaper_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_add_update, + lib.ethdev.tm.shared_wred_context_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_delete, + lib.ethdev.tm.shared_wred_context_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_add, + lib.ethdev.tm.wred_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_delete, + lib.ethdev.tm.wred_profile_delete)
lib/ethdev/rte_ethdev_trace.h +283 -0
295 lines not on this page · raw message
lib/ethdev/rte_tm.c +40 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_tm_driver.h" #include "rte_tm.h"
@@ -79,6 +80,7 @@ rte_tm_get_number_of_leaf_nodes(uint16_t port_id, } *n_leaf_nodes = dev->data->nb_tx_queues; +rte_tm_trace_get_number_of_leaf_nodes (port_id, *n_leaf_nodes, error);return 0 ; }
@@ -90,6 +92,7 @@ rte_tm_node_type_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_type_get (port_id, node_id, is_leaf);return RTE_TM_FUNC (port_id, node_type_get)(dev, node_id, is_leaf, error); }
@@ -100,6 +103,7 @@ int rte_tm_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_capabilities_get (port_id, cap);return RTE_TM_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -111,6 +115,7 @@ int rte_tm_level_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_level_capabilities_get (port_id, level_id, cap);return RTE_TM_FUNC (port_id, level_capabilities_get)(dev, level_id, cap, error); }
@@ -122,6 +127,7 @@ int rte_tm_node_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_capabilities_get (port_id, node_id, cap);return RTE_TM_FUNC (port_id, node_capabilities_get)(dev, node_id, cap, error); }
@@ -133,6 +139,7 @@ int rte_tm_wred_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_add (port_id, wred_profile_id, profile);return RTE_TM_FUNC (port_id, wred_profile_add)(dev, wred_profile_id, profile, error); }
@@ -143,6 +150,7 @@ int rte_tm_wred_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_delete (port_id, wred_profile_id);return RTE_TM_FUNC (port_id, wred_profile_delete)(dev, wred_profile_id, error); }
@@ -154,6 +162,8 @@ int rte_tm_shared_wred_context_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_add_update (port_id, shared_wred_context_id, + wred_profile_id);return RTE_TM_FUNC (port_id, shared_wred_context_add_update)(dev, shared_wred_context_id, wred_profile_id, error); }
@@ -164,6 +174,7 @@ int rte_tm_shared_wred_context_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_delete (port_id, shared_wred_context_id);return RTE_TM_FUNC (port_id, shared_wred_context_delete)(dev, shared_wred_context_id, error); }
@@ -175,6 +186,7 @@ int rte_tm_shaper_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_add (port_id, shaper_profile_id, profile);return RTE_TM_FUNC (port_id, shaper_profile_add)(dev, shaper_profile_id, profile, error); }
@@ -185,6 +197,7 @@ int rte_tm_shaper_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_delete (port_id, shaper_profile_id);return RTE_TM_FUNC (port_id, shaper_profile_delete)(dev, shaper_profile_id, error); }
@@ -196,6 +209,8 @@ int rte_tm_shared_shaper_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_add_update (port_id, shared_shaper_id, + shaper_profile_id);return RTE_TM_FUNC (port_id, shared_shaper_add_update)(dev, shared_shaper_id, shaper_profile_id, error); }
@@ -206,6 +221,7 @@ int rte_tm_shared_shaper_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_delete (port_id, shared_shaper_id);return RTE_TM_FUNC (port_id, shared_shaper_delete)(dev, shared_shaper_id, error); }
@@ -221,6 +237,8 @@ int rte_tm_node_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_add (port_id, node_id, parent_node_id, priority, + weight, level_id, params);return RTE_TM_FUNC (port_id, node_add)(dev, node_id, parent_node_id, priority, weight, level_id, params, error);
@@ -232,6 +250,7 @@ int rte_tm_node_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_delete (port_id, node_id);return RTE_TM_FUNC (port_id, node_delete)(dev, node_id, error); }
@@ -242,6 +261,7 @@ int rte_tm_node_suspend(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_suspend (port_id, node_id);return RTE_TM_FUNC (port_id, node_suspend)(dev, node_id, error); }
@@ -252,6 +272,7 @@ int rte_tm_node_resume(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_resume (port_id, node_id);return RTE_TM_FUNC (port_id, node_resume)(dev, node_id, error); }
@@ -262,6 +283,7 @@ int rte_tm_hierarchy_commit(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_hierarchy_commit (port_id, clear_on_fail);return RTE_TM_FUNC (port_id, hierarchy_commit)(dev, clear_on_fail, error); }
@@ -275,6 +297,8 @@ int rte_tm_node_parent_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_parent_update (port_id, node_id, parent_node_id, + priority, weight);return RTE_TM_FUNC (port_id, node_parent_update)(dev, node_id, parent_node_id, priority, weight, error); }
@@ -286,6 +310,7 @@ int rte_tm_node_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shaper_update (port_id, node_id, shaper_profile_id);return RTE_TM_FUNC (port_id, node_shaper_update)(dev, node_id, shaper_profile_id, error); }
@@ -298,6 +323,8 @@ int rte_tm_node_shared_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_shaper_update (port_id, node_id, shared_shaper_id, + add);return RTE_TM_FUNC (port_id, node_shared_shaper_update)(dev, node_id, shared_shaper_id, add, error); }
@@ -309,6 +336,7 @@ int rte_tm_node_stats_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_update (port_id, node_id, stats_mask);return RTE_TM_FUNC (port_id, node_stats_update)(dev, node_id, stats_mask, error); }
@@ -321,6 +349,8 @@ int rte_tm_node_wfq_weight_mode_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wfq_weight_mode_update (port_id, node_id, wfq_weight_mode, + n_sp_priorities);return RTE_TM_FUNC (port_id, node_wfq_weight_mode_update)(dev, node_id, wfq_weight_mode, n_sp_priorities, error); }
@@ -332,6 +362,7 @@ int rte_tm_node_cman_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_cman_update (port_id, node_id, cman);return RTE_TM_FUNC (port_id, node_cman_update)(dev, node_id, cman, error); }
@@ -343,6 +374,7 @@ int rte_tm_node_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wred_context_update (port_id, node_id, wred_profile_id);return RTE_TM_FUNC (port_id, node_wred_context_update)(dev, node_id, wred_profile_id, error); }
@@ -355,6 +387,9 @@ int rte_tm_node_shared_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_wred_context_update (port_id, node_id, + shared_wred_context_id, + add);return RTE_TM_FUNC (port_id, node_shared_wred_context_update)(dev, node_id, shared_wred_context_id, add, error); }
@@ -368,6 +403,8 @@ int rte_tm_node_stats_read(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_read (port_id, node_id, stats, stats_mask, + clear);return RTE_TM_FUNC (port_id, node_stats_read)(dev, node_id, stats, stats_mask, clear, error); }
@@ -380,6 +417,7 @@ int rte_tm_mark_vlan_dei(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_vlan_dei (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_vlan_dei)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -392,6 +430,7 @@ int rte_tm_mark_ip_ecn(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_ecn (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_ecn)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -404,6 +443,7 @@ int rte_tm_mark_ip_dscp(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_dscp (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_dscp)(dev, mark_green, mark_yellow, mark_red, error); }
lib/ethdev/version.map +30 -0
@@ -490,6 +490,36 @@ EXPERIMENTAL { __rte_mtr_trace_meter_vlan_table_update; __rte_mtr_trace_stats_read; __rte_mtr_trace_stats_update; + __rte_tm_trace_capabilities_get; + __rte_tm_trace_get_number_of_leaf_nodes; + __rte_tm_trace_hierarchy_commit; + __rte_tm_trace_level_capabilities_get; + __rte_tm_trace_mark_ip_dscp; + __rte_tm_trace_mark_ip_ecn; + __rte_tm_trace_mark_vlan_dei; + __rte_tm_trace_node_add; + __rte_tm_trace_node_capabilities_get; + __rte_tm_trace_node_cman_update; + __rte_tm_trace_node_delete; + __rte_tm_trace_node_parent_update; + __rte_tm_trace_node_resume; + __rte_tm_trace_node_shaper_update; + __rte_tm_trace_node_shared_shaper_update; + __rte_tm_trace_node_shared_wred_context_update; + __rte_tm_trace_node_stats_read; + __rte_tm_trace_node_stats_update; + __rte_tm_trace_node_suspend; + __rte_tm_trace_node_type_get; + __rte_tm_trace_node_wfq_weight_mode_update; + __rte_tm_trace_node_wred_context_update; + __rte_tm_trace_shaper_profile_add; + __rte_tm_trace_shaper_profile_delete; + __rte_tm_trace_shared_shaper_add_update; + __rte_tm_trace_shared_shaper_delete; + __rte_tm_trace_shared_wred_context_add_update; + __rte_tm_trace_shared_wred_context_delete; + __rte_tm_trace_wred_profile_add; + __rte_tm_trace_wred_profile_delete; }; INTERNAL {
Signature · 1 line
2.28.0
Quoted 8 lines · Ankur Dwivedi
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v2:
- Maderte_eth_trace_call_rx_callbacksandrte_eth_trace_call_tx_callbacksas fastpath trace functions.
- Moved some trace functions call to the end to capture return value and data.
Looking at the patch series I still see many-many places where tracing happens on entry point. Intentional?
Quoted 23 lines
- Removed
rte_eth_trace_tx_queue_setupas it is not required.rte_ethdev_trace_txq_setup()is already present inrte_eth_tx_queue_setup().
- Removed trace inethdev_driver.c
- Removed trace function check patch.Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tmlib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
Hi Andrew,
Quoted 50 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryExternal Email
----------------------------------------------------------------------
Quoted 3 lines · Ankur Dwivedi
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
Quoted 8 lines
Quoted 5 lines
v2:
- Maderte_eth_trace_call_rx_callbacksandrte_eth_trace_call_tx_callbacksas fastpath trace functions.
- Moved some trace functions call to the end to capture return value and data.Looking at the patch series I still see many-many places where tracing happens on entry point. Intentional?
Yes , because the return values are not there to be captured.
Quoted 25 lines
Quoted 13 lines
- Removed
rte_eth_trace_tx_queue_setupas it is not required.rte_ethdev_trace_txq_setup()is already present inrte_eth_tx_queue_setup().
- Removed trace inethdev_driver.c
- Removed trace function check patch.Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tmQuoted 4 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062++++++++++++++++++++++++++++++
Quoted 7 lines
lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
Quoted 58 lines · Ankur Dwivedi
Hi Andrew,
Quoted 56 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryExternal Email
----------------------------------------------------------------------
Quoted 8 lines · Ankur Dwivedi
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v2:
- Maderte_eth_trace_call_rx_callbacksandrte_eth_trace_call_tx_callbacksas fastpath trace functions.
- Moved some trace functions call to the end to capture return value and data.
Quoted 3 lines
Quoted 2 lines
Looking at the patch series I still see many-many places where tracing happens on entry point. Intentional?
Yes , because the return values are not there to be captured.
Isn't it the reason to move trace point to have return value there and capture it?
Quoted 26 lines
Quoted 25 lines
Quoted 13 lines
- Removed
rte_eth_trace_tx_queue_setupas it is not required.rte_ethdev_trace_txq_setup()is already present inrte_eth_tx_queue_setup().
- Removed trace inethdev_driver.c
- Removed trace function check patch.Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tmQuoted 4 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062++++++++++++++++++++++++++++++
Quoted 7 lines
lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
Quoted 109 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:59 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryQuoted 11 lines · Ankur Dwivedi
Hi Andrew,
Quoted 9 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; IgorRusskikh
Quoted 3 lines
Quoted 3 lines
<[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin
Jacob
Quoted 12 lines
Quoted 12 lines
Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori
Quoted 8 lines
Quoted 8 lines
<[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
Quoted 14 lines
Quoted 14 lines
[email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryExternal Email
Quoted 7 lines
Quoted 7 lines
---------------------------------------------------------------------
Quoted 5 lines · Ankur Dwivedi
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v2:
- Maderte_eth_trace_call_rx_callbacksand
rte_eth_trace_call_tx_callbacksQuoted 4 lines
Quoted 4 lines
Quoted 3 lines
as fastpath trace functions.
- Moved some trace functions call to the end to capture return value and data.
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Looking at the patch series I still see many-many places where tracing happens on entry point. Intentional?
Yes , because the return values are not there to be captured.
Isn't it the reason to move trace point to have return value there and capture it?
[Ankur] For some function the return value was there to be captured. But for some functions the return values are not possible to get unless some more changes are made in code, like the rte_eth_rx_metadata_negotiate() you mentioned in earlier mail. I have not modified the existing code of library, just added trace to capture what can be captured.
Quoted 27 lines
Quoted 27 lines
Quoted 26 lines
Quoted 14 lines
- Removed
rte_eth_trace_tx_queue_setupas it is not required.rte_ethdev_trace_txq_setup()is already present inrte_eth_tx_queue_setup().
- Removed trace inethdev_driver.c
- Removed trace function check patch.Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tmQuoted 4 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062++++++++++++++++++++++++++++++
Quoted 7 lines
lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
Hi Andrew,
Quoted 167 lines
-----Original Message-----
From: Ankur Dwivedi
Sent: Thursday, October 6, 2022 1:18 PM
To: Andrew Rybchenko <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryQuoted 9 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:59 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; IgorRusskikh
Quoted 7 lines
<[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected];
Quoted 1 line
Quoted 5 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram
Quoted 11 lines
Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh
Quoted 2 lines
Devendra Singh Rawat <[email protected]>;
[email protected]; [email protected];Quoted 47 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryQuoted 12 lines · Ankur Dwivedi
Hi Andrew,
Quoted 10 lines
-----Original Message-----
From: Andrew Rybchenko <[email protected]>
Sent: Thursday, October 6, 2022 12:40 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; IgorRusskikh
Quoted 3 lines
Quoted 3 lines
<[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin
Jacob
Quoted 13 lines
Quoted 13 lines
Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>;
Quoted 8 lines
Quoted 8 lines
Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [PATCH v2 0/4] add trace points in ethdev libraryExternal Email
--------------------------------------------------------------------
-
- On 9/29/22 13:29, Ankur Dwivedi wrote:Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
This series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v2:
- Maderte_eth_trace_call_rx_callbacksand
rte_eth_trace_call_tx_callbacksQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
as fastpath trace functions.
- Moved some trace functions call to the end to capture return valueand
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
data.
Looking at the patch series I still see many-many places where tracing happens on entry point. Intentional?
Yes , because the return values are not there to be captured.
Quoted 7 lines
Quoted 2 lines
Isn't it the reason to move trace point to have return value there and capture it?
[Ankur] For some function the return value was there to be captured. But for some functions the return values are not possible to get unless some more changes are made in code, like the
rte_eth_rx_metadata_negotiate()you mentioned in earlier mail. I have not modified the existing code of library, just added trace to capture what can be captured.
[Ankur] Identified few more functions for which trace can be shift towards the end of a function. Will send the changes in v3.
Quoted 27 lines
Quoted 27 lines
Quoted 27 lines
Quoted 26 lines
Quoted 14 lines
- Removed
rte_eth_trace_tx_queue_setupas it is not required.rte_ethdev_trace_txq_setup()is already present inrte_eth_tx_queue_setup().
- Removed trace inethdev_driver.c
- Removed trace function check patch.Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tmQuoted 4 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 148 +++ lib/ethdev/rte_ethdev_trace.h | 2062++++++++++++++++++++++++++++++
Quoted 7 lines
lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3284 insertions(+)
v3 cover add trace points in ethdev library
In reply to Ankur DwivediThis series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v3:
- Moved the trace functions from EXPERIMENTAL to INTERNAL in version.map.
- Moved trace functions call to the end, in ethdev and flow trace.
- Added code to print the input value of features in rte_eth_trace_rx_metadata_negotiate().
- Added code to capture return value in flow trace.
Ankur Dwivedi (4):
ethdev: add trace points
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tm
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 699 ++++++++++ lib/ethdev/rte_ethdev.c | 152 +++ lib/ethdev/rte_ethdev_trace.h | 2087 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/rte_flow.c | 54 + lib/ethdev/rte_mtr.c | 27 + lib/ethdev/rte_tm.c | 40 + lib/ethdev/version.map | 232 ++++ 9 files changed, 3313 insertions(+)
Signature · 1 line
2.28.0
PATCH v3 1/4 ethdev: add trace points
Add trace points for ethdev functions.
--- lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 435 +++++++++++ lib/ethdev/rte_ethdev.c | 152 ++++ lib/ethdev/rte_ethdev_trace.h | 1194 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/version.map | 144 ++++ 6 files changed, 1947 insertions(+)
lib/ethdev/ethdev_private.c +3 -0
@@ -5,6 +5,7 @@#include <rte_debug.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h"
@@ -297,6 +298,7 @@ rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_rx_callbacks (port_id, queue_id, nb_rx, nb_pkts);return nb_rx; }
@@ -312,6 +314,7 @@ rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_tx_callbacks (port_id, queue_id, nb_pkts);return nb_pkts; }
lib/ethdev/ethdev_trace_points.c +435 -0
438 lines not on this page · raw message
lib/ethdev/rte_ethdev.c +152 -0
1,004 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace.h +1194 -0
1,200 lines not on this page · raw message
lib/ethdev/rte_ethdev_trace_fp.h +19 -0
@@ -37,6 +37,25 @@ RTE_TRACE_POINT_FP(rte_trace_point_emit_u16 (nb_pkts); ) +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_rx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_rx, uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +) + +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_tx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_pkts); +) + #ifdef __cplusplus }#endif
lib/ethdev/version.map +144 -0
148 lines not on this page · raw message
Signature · 1 line
2.28.0
RE: [PATCH v3 1/4] ethdev: add trace points
Quoted 7 lines
From: Ankur Dwivedi [mailto:[email protected]]
Sent: Thursday, 6 October 2022 17.19Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
I did my best, but this series needs review by people with direct knowledge about the affected functions.
rte_eth_call_rx/tx_callbacks() are treated as fast path functions, but I think more functions should be too:
rte_eth_tx_buffer_drop_callback() and rte_eth_tx_buffer_count_callback() are certainly fast path functions.
rte_eth_tx_done_cleanup()probably is too.
rte_eth_macaddr_get() could be, but probably isn't. If treated as slow path, it could be noted in its documentation.
I don't know about rte_eth_timesync_read_rx/tx_timestamp(), rte_eth_timesync_adjust/read/write_time() and rte_eth_read_clock().
RE: [PATCH v3 1/4] ethdev: add trace points
In reply to Ankur DwivediHi Morten,
Quoted 44 lines
-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Thursday, October 6, 2022 8:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH v3 1/4] ethdev: add trace points
Quoted 4 lines
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
Yes the functions you mentioned in previous comment are called in while loop in worker core. So I think they are fastpath. rte_eth_stats_get() is called in fastpath. Similar to rte_eth_macaddr_get(), I think functions like rte_eth_pro miscuous_get(), rte_eth_allmulticast_get() can also be called in fastpath.
I am not sure which other functions can be fastpath. Is there a guideline/theme which can be used to determine this?
Quoted 3,207 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 435 +++++++++++ lib/ethdev/rte_ethdev.c | 152 ++++ lib/ethdev/rte_ethdev_trace.h | 1194 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/version.map | 144 ++++ 6 files changed, 1947 insertions(+)lib/ethdev/ethdev_private.c +3
-0@@ -5,6 +5,7 @@#include <rte_debug.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h" @@ -297,6 +298,7 @@ rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_rx_callbacks (port_id, queue_id, nb_rx, nb_pkts);return nb_rx; }@@ -312,6 +314,7 @@ rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_tx_callbacks (port_id, queue_id, nb_pkts);return nb_pkts; }lib/ethdev/ethdev_trace_points.c +0
-0@@ -29,3 +29,438 @@ RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_burst,lib.ethdev.tx.burst)
lib/ethdev/ethdev_trace_points.c +161
-0+ +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_first_rx_callback, + lib.ethdev.add_first_rx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_rx_callback, + lib.ethdev.add_rx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_tx_callback, + lib.ethdev.add_tx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_disable, + lib.ethdev.allmulticast_disable) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_enable, + lib.ethdev.allmulticast_enable) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_get, + lib.ethdev.allmulticast_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_call_rx_callbacks, + lib.ethdev.call_rx_callbacks) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_call_tx_callbacks, + lib.ethdev.call_tx_callbacks) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_mtu, + lib.ethdev.set_mtu) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_adjust_nb_rx_tx_desc, + lib.ethdev.adjust_nb_rx_tx_desc) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_callback_register, + lib.ethdev.callback_register) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_callback_unregister, + lib.ethdev.callback_unregister) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_default_mac_addr_set, + lib.ethdev.default_mac_addr_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_flow_ctrl_get, + lib.ethdev.flow_ctrl_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_flow_ctrl_set, + lib.ethdev.flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_fw_version_get, + lib.ethdev.fw_version_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_dcb_info, + lib.ethdev.get_dcb_info) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_eeprom, + lib.ethdev.get_eeprom) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_eeprom_length, + lib.ethdev.get_eeprom_length) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_mtu, + lib.ethdev.get_mtu) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_count_avail, + lib.ethdev.count_avail) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_count_total, + lib.ethdev.count_total) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_name_by_port, + lib.ethdev.get_name_by_port) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_port_by_name, + lib.ethdev.get_port_by_name) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_reg_info, + lib.ethdev.get_reg_info) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_sec_ctx, + lib.ethdev.get_sec_ctx) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_supported_ptypes, + lib.ethdev.get_supported_ptypes) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_vlan_offload, + lib.ethdev.get_vlan_offload) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_info_get, + lib.ethdev.info_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_is_removed, + lib.ethdev.is_removed) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_is_valid_port, + lib.ethdev.is_valid_port) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_mac_addr_add, + lib.ethdev.mac_addr_add) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_mac_addr_remove, + lib.ethdev.mac_addr_remove) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_pool_ops_supported, + lib.ethdev.pool_ops_supported) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_priority_flow_ctrl_set, + lib.ethdev.priority_flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_reset, + lib.ethdev.reset) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_hash_conf_get, + lib.ethdev.rss_hash_conf_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_hash_update, + lib.ethdev.rss_hash_update) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_reta_query, + lib.ethdev.rss_reta_query) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_reta_update, + lib.ethdev.rss_reta_update) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl, + lib.ethdev.rx_intr_ctl) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl_q, + lib.ethdev.rx_intr_ctl_q) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl_q_get_fd, + lib.ethdev.rx_intr_ctl_q_get_fd) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_disable, + lib.ethdev.rx_intr_disable) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_enable, + lib.ethdev.rx_intr_enable) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_offload_name, + lib.ethdev.rx_offload_name) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_queue_start, + lib.ethdev.rx_queue_start) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_queue_stop, + lib.ethdev.rx_queue_stop) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_eeprom, + lib.ethdev.set_eeprom) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_link_down, + lib.ethdev.set_link_down) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_link_up, + lib.ethdev.set_link_up) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_mc_addr_list, + lib.ethdev.set_mc_addr_list) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_ptypes, + lib.ethdev.set_ptypes) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_rx_queue_stats_mapping,
lib/ethdev/ethdev_trace_points.c +3
-0+ lib.ethdev.set_rx_queue_stats_mapping) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_tx_queue_stats_mapping,
lib/ethdev/ethdev_trace_points.c +249
-0+ lib.ethdev.set_tx_queue_stats_mapping) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_ether_type, + lib.ethdev.set_vlan_ether_type) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_offload, + lib.ethdev.set_vlan_offload) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_pvid, + lib.ethdev.set_vlan_pvid) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_strip_on_queue, + lib.ethdev.set_vlan_strip_on_queue) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_socket_id, + lib.ethdev.socket_id) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_offload_name, + lib.ethdev.tx_offload_name) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_queue_start, + lib.ethdev.tx_queue_start) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_queue_stop, + lib.ethdev.tx_queue_stop) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_all_hash_table_set, + lib.ethdev.uc_all_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_hash_table_set, + lib.ethdev.uc_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_add, + lib.ethdev.udp_tunnel_port_add) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_delete, + lib.ethdev.udp_tunnel_port_delete) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_vlan_filter, + lib.ethdev.vlan_filter) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next, + lib.ethdev.find_next) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_of, + lib.ethdev.find_next_of) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_owned_by, + lib.ethdev.find_next_owned_by) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_sibling, + lib.ethdev.find_next_sibling) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_cleanup, + lib.ethdev.iterator_cleanup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_init, + lib.ethdev.iterator_init) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_next, + lib.ethdev.iterator_next) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_off, + lib.ethdev.led_off) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_on, + lib.ethdev.led_on) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_get, + lib.ethdev.link_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_get_nowait, + lib.ethdev.link_get_nowait) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_macaddr_get, + lib.ethdev.macaddr_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_disable, + lib.ethdev.promiscuous_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_enable, + lib.ethdev.promiscuous_enable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_get, + lib.ethdev.promiscuous_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_rx_callback, + lib.ethdev.remove_rx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_tx_callback, + lib.ethdev.remove_tx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_burst_mode_get, + lib.ethdev.rx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_queue_info_get, + lib.ethdev.rx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_queue_setup, + lib.ethdev.rx_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_set_queue_rate_limit, + lib.ethdev.set_queue_rate_limit) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_speed_bitflag, + lib.ethdev.speed_bitflag) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_stats_get, + lib.ethdev.stats_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_stats_reset, + lib.ethdev.stats_reset) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_adjust_time, + lib.ethdev.timesync_adjust_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_disable, + lib.ethdev.timesync_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_enable, + lib.ethdev.timesync_enable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_rx_timestamp, + lib.ethdev.timesync_read_rx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_time, + lib.ethdev.timesync_read_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_tx_timestamp, + lib.ethdev.timesync_read_tx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_write_time, + lib.ethdev.timesync_write_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_count_callback, + lib.ethdev.tx_buffer_count_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_drop_callback, + lib.ethdev.tx_buffer_drop_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_init, + lib.ethdev.tx_buffer_init) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_set_err_callback, + lib.ethdev.tx_buffer_set_err_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_burst_mode_get, + lib.ethdev.tx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_done_cleanup, + lib.ethdev.tx_done_cleanup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_queue_info_get, + lib.ethdev.tx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get, + lib.ethdev.xstats_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_by_id, + lib.ethdev.xstats_get_by_id) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_id_by_name, + lib.ethdev.xstats_get_id_by_name) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_names, + lib.ethdev.xstats_get_names) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_names_by_id, + lib.ethdev.xstats_get_names_by_id) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_reset, + lib.ethdev.xstats_reset) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_delete, + lib.ethdev.owner_delete) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_get, + lib.ethdev.owner_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_new, + lib.ethdev.owner_new) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_set, + lib.ethdev.owner_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_unset, + lib.ethdev.owner_unset) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_eeprom, + lib.ethdev.get_module_eeprom) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_info, + lib.ethdev.get_module_info) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_read_clock, + lib.ethdev.read_clock) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_hairpin_capability_get, + lib.ethdev.hairpin_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_hairpin_queue_setup, + lib.ethdev.rx.hairpin_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_hairpin_queue_setup, + lib.ethdev.tx.hairpin_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_bind, + lib.ethdev.hairpin_bind) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_get_peer_ports, + lib.ethdev.hairpin_get_peer_ports) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_unbind, + lib.ethdev.hairpin_unbind) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_speed_to_str, + lib.ethdev.link_speed_to_str) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_to_str, + lib.ethdev.link_to_str) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get_capability, + lib.ethdev.fec_get_capability) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get, + lib.ethdev.fec_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_set, + lib.ethdev.fec_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_get_monitor_addr, + lib.ethdev.get_monitor_addr) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_representor_info_get, + lib.ethdev.representor_info_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_capability_name, + lib.ethdev.capability_name) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_conf_get, + lib.ethdev.conf_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_macaddrs_get, + lib.ethdev.macaddrs_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_metadata_negotiate, + lib.ethdev.rx_metadata_negotiate) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_configure,
lib/ethdev/ethdev_trace_points.c +3
-0+ lib.ethdev.priority_flow_ctrl_queue_configure) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_in
fo_get,lib/ethdev/ethdev_trace_points.c +19
-0+ lib.ethdev.priority_flow_ctrl_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priv_dump, + lib.ethdev.priv_dump) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_capability_get, + lib.ethdev.ip_reassembly_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_get, + lib.ethdev.ip_reassembly_conf_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_set, + lib.ethdev.ip_reassembly_conf_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query, + lib.ethdev.rx_avail_thresh_query) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_avail_thresh_set, + lib.ethdev.rx_avail_thresh_set)lib/ethdev/rte_ethdev.c +2
-0@@ -182,6 +182,8 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) memset(iter, 0, sizeof(*iter));memset (&devargs,0 ,sizeof (devargs)); +rte_eth_trace_iterator_init (iter, devargs_str); +/* * The devargs string may use various syntaxes: * - 0000:08:00.0,representor=[1-3]
lib/ethdev/rte_ethdev.c +3
-0@@ -283,6 +285,8 @@ rte_eth_iterator_next(struct rte_dev_iterator *iter)if (iter->cls ==NULL )/* invalid ethdev iterator */ return RTE_MAX_ETHPORTS ; +rte_eth_trace_iterator_next (iter); + do { /* loop to try all matching rte_device */ /* If not pure ethdev filter and */ if (iter->bus != NULL &&@@ -316,6 +320,7 @@ rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)if (iter->bus_str ==NULL )return ;/* nothing to free in pure class filter */ +rte_eth_trace_iterator_cleanup (iter);free (RTE_CAST_FIELD(iter ,bus_str ,char *));/* workaround const */ free (RTE_CAST_FIELD(iter ,cls_str ,char *));/* workaround const */ memset(iter, 0, sizeof(*iter));lib/ethdev/rte_ethdev.c +3
-0@@ -331,6 +336,7 @@ rte_eth_find_next(uint16_t port_id)if (port_id >=RTE_MAX_ETHPORTS )return RTE_MAX_ETHPORTS ; +rte_eth_trace_find_next (port_id);return port_id; }@@ -351,6 +357,7 @@ rte_eth_find_next_of(uint16_t port_id, const struct rte_device *parent) rte_eth_devices[port_id].device != parent) port_id =rte_eth_find_next (port_id +1 ); +rte_eth_trace_find_next_of (port_id, parent);return port_id; }@@ -358,6 +365,7 @@ uint16_t rte_eth_find_next_sibling(uint16_t port_id, uint16_t ref_port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (ref_port_id, RTE_MAX_ETHPORTS); +rte_eth_trace_find_next_sibling (port_id, ref_port_id);return rte_eth_find_next_of (port_id, rte_eth_devices[ref_port_id].device);}
lib/ethdev/rte_ethdev.c +0
-0@@ -371,6 +379,7 @@ eth_dev_is_allocated(const struct rte_eth_dev *ethdev)int
rte_eth_dev_is_valid_port(uint16_t port_id)
{lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_is_valid_port (port_id);if (port_id >= RTE_MAX_ETHPORTS || (rte_eth_devices[port_id].state == RTE_ETH_DEV_UNUSED)) return 0;lib/ethdev/rte_ethdev.c +12
-0@@ -395,6 +404,7 @@ rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id) rte_eth_devices[port_id].data->owner.id != owner_id) port_id =rte_eth_find_next (port_id +1 ); +rte_eth_trace_find_next_owned_by (port_id, owner_id);return port_id; }@@ -413,6 +423,7 @@ rte_eth_dev_owner_new(uint64_t *owner_id) *owner_id = eth_dev_shared_data->next_owner_id++;rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_new (*owner_id);return 0 ; }@@ -476,6 +487,7 @@ rte_eth_dev_owner_set(const uint16_t port_id, ret =eth_dev_owner_set (port_id,RTE_ETH_DEV_NO_OWNER , owner);rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_set (port_id, owner, ret);return ret; }@@ -493,6 +505,7 @@ rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id) ret =eth_dev_owner_set (port_id, owner_id, &new_owner);rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_unset (port_id, owner_id, ret);return ret; }@@ -526,6 +539,7 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_delete (owner_id, ret);return ret; }@@ -555,6 +569,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner) rte_memcpy(owner, ðdev->data->owner, sizeof(*owner));rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_get (port_id, owner);return 0 ; }@@ -562,6 +577,7 @@ int rte_eth_dev_socket_id(uint16_t port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id,-1 ); +rte_ethdev_trace_socket_id (port_id);return rte_eth_devices[port_id].data->numa_node; }@@ -569,6 +585,7 @@ void * rte_eth_dev_get_sec_ctx(uint16_t port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id,NULL ); +rte_ethdev_trace_get_sec_ctx (port_id);return rte_eth_devices[port_id].security_ctx; }@@ -583,6 +600,7 @@ rte_eth_dev_count_avail(void)RTE_ETH_FOREACH_DEV (p) count++; +rte_ethdev_trace_count_avail (count);return count; }@@ -594,6 +612,7 @@ rte_eth_dev_count_total(void)RTE_ETH_FOREACH_VALID_DEV (port) count++; +rte_ethdev_trace_count_total (count);return count; }@@ -614,6 +633,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id,char *name) * because it might be overwritten by VDEV PMD */ tmp = eth_dev_shared_data->data[port_id].name;strcpy (name, tmp); +rte_ethdev_trace_get_name_by_port (port_id, name);return 0 ; }@@ -636,6 +656,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)RTE_ETH_FOREACH_VALID_DEV (pid ) if (!strcmp(name, eth_dev_shared_data->data[pid].name)) { *port_id = pid; +rte_ethdev_trace_get_port_by_name (name, *port_id);return 0 ;}lib/ethdev/rte_ethdev.c +1
-0@@ -737,6 +758,7 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_start (port_id, rx_queue_id);return eth_err (port_id, dev->dev_ops->rx_queue_start (dev, rx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -770,6 +792,7 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_stop (port_id, rx_queue_id);return eth_err (port_id, dev->dev_ops->rx_queue_stop (dev, rx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -810,6 +833,7 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_start (port_id, tx_queue_id);return eth_err (port_id, dev->dev_ops->tx_queue_start (dev, tx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -843,12 +867,14 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_stop (port_id, tx_queue_id);return eth_err (port_id, dev->dev_ops->tx_queue_stop (dev, tx_queue_id)); }
uint32_trte_eth_speed_bitflag(uint32_t speed, int duplex)
{lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_speed_bitflag (speed, duplex);switch (speed) { case RTE_ETH_SPEED_NUM_10M: return duplex ? RTE_ETH_LINK_SPEED_10M :
RTE_ETH_LINK_SPEED_10M_HD;lib/ethdev/rte_ethdev.c +9
-0@@ -894,6 +920,7 @@ rte_eth_dev_rx_offload_name(uint64_t offload) } } +rte_ethdev_trace_rx_offload_name (offload, name);return name; }@@ -910,6 +937,7 @@ rte_eth_dev_tx_offload_name(uint64_t offload) } } +rte_ethdev_trace_tx_offload_name (offload, name);return name; }@@ -926,6 +954,7 @@ rte_eth_dev_capability_name(uint64_t capability) } } +rte_ethdev_trace_capability_name (capability, name);return name; }@@ -1552,6 +1581,7 @@ rte_eth_dev_set_link_up(uint16_t port_id)if (*dev->dev_ops->dev_set_link_up ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_up (port_id);return eth_err (port_id, (*dev->dev_ops->dev_set_link_up)(dev)); }@@ -1565,6 +1595,7 @@ rte_eth_dev_set_link_down(uint16_t port_id)if (*dev->dev_ops->dev_set_link_down ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_down (port_id);return eth_err (port_id, (*dev->dev_ops->dev_set_link_down)(dev)); }@@ -1621,6 +1652,7 @@ rte_eth_dev_reset(uint16_t port_id) port_id, rte_strerror(-ret)); } ret = dev->dev_ops->dev_reset (dev); +rte_ethdev_trace_reset (port_id, ret);return eth_err (port_id, ret); }@@ -1645,6 +1677,7 @@ rte_eth_dev_is_removed(uint16_t port_id)/* Device is physically removed. */ dev->state =RTE_ETH_DEV_REMOVED ; +rte_ethdev_trace_is_removed (port_id, ret);return ret; }@@ -1984,6 +2017,8 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id,uint16_t rx_queue_id, if (ret == 0) dev->data->rx_queue_state[rx_queue_id] =RTE_ETH_QUEUE_STATE_HAIRPIN ; +rte_eth_trace_rx_hairpin_queue_setup (port_id, rx_queue_id, nb_rx_desc, + conf, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +1
-0@@ -2151,6 +2186,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id,uint16_t tx_queue_id, if (ret == 0) dev->data->tx_queue_state[tx_queue_id] =RTE_ETH_QUEUE_STATE_HAIRPIN ; +rte_eth_trace_tx_hairpin_queue_setup (port_id, tx_queue_id, nb_tx_desc, conf, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +3
-0@@ -2176,6 +2212,7 @@ rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)" to Rx %d (%d - all ports)\n" , tx_port, rx_port, RTE_MAX_ETHPORTS); +rte_eth_trace_hairpin_bind (tx_port, rx_port, ret);return ret; }@@ -2201,6 +2238,7 @@ rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port)" from Rx %d (%d - all ports)\n" , tx_port, rx_port, RTE_MAX_ETHPORTS); +rte_eth_trace_hairpin_unbind (tx_port, rx_port, ret);return ret; }@@ -2237,6 +2275,7 @@ rte_eth_hairpin_get_peer_ports(uint16_t port_id,uint16_t *peer_ports, RTE_ETHDEV_LOG(ERR, "Failed to get %d hairpin peer %s ports\n", port_id, direction ? "Rx" : "Tx"); +rte_eth_trace_hairpin_get_peer_ports (port_id, peer_ports, len, direction, ret);return ret; }lib/ethdev/rte_ethdev.c +2
-0@@ -2244,6 +2283,7 @@ void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata __rte_unused) { +rte_eth_trace_tx_buffer_drop_callback (pkts ,unsent );rte_pktmbuf_free_bulk (pkts, unsent); }@@ -2255,6 +2295,7 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,rte_pktmbuf_free_bulk (pkts, unsent); *count += unsent; +rte_eth_trace_tx_buffer_count_callback (pkts, unsent, *count); }int
lib/ethdev/rte_ethdev.c +1
-0@@ -2267,6 +2308,7 @@ rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, return -EINVAL ; } +rte_eth_trace_tx_buffer_set_err_callback (buffer, cbfn, userdata); buffer->error_callback = cbfn; buffer->error_userdata = userdata;return 0;lib/ethdev/rte_ethdev.c +2
-0@@ -2288,6 +2330,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size) buffer, rte_eth_tx_buffer_drop_callback, NULL); } +rte_eth_trace_tx_buffer_init (buffer, size, ret);return ret; }@@ -2306,6 +2349,7 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)/* Call driver to free pending mbufs. */ ret = (*dev->dev_ops->tx_done_cleanup)(dev->data- >tx_queues[queue_id], free_cnt); +rte_eth_trace_tx_done_cleanup (port_id, queue_id, free_cnt, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +8
-0@@ -2327,6 +2371,7 @@ rte_eth_promiscuous_enable(uint16_t port_id) diag = (*dev->dev_ops->promiscuous_enable)(dev); dev->data->promiscuous = (diag ==0 ) ?1 :0 ; +rte_eth_trace_promiscuous_enable (port_id, dev->data- >promiscuous);return eth_err (port_id, diag); }@@ -2350,6 +2395,7 @@ rte_eth_promiscuous_disable(uint16_t port_id)if (diag !=0 ) dev->data->promiscuous =1 ; +rte_eth_trace_promiscuous_disable (port_id, dev->data- >promiscuous);return eth_err (port_id, diag); }@@ -2361,6 +2407,7 @@ rte_eth_promiscuous_get(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_promiscuous_get (port_id, dev->data->promiscuous);return dev->data->promiscuous; }@@ -2381,6 +2428,7 @@ rte_eth_allmulticast_enable(uint16_t port_id) diag = (*dev->dev_ops->allmulticast_enable)(dev); dev->data->all_multicast = (diag ==0 ) ?1 :0 ; +rte_eth_trace_allmulticast_enable (port_id, dev->data->all_multicast);return eth_err (port_id, diag); }@@ -2403,6 +2451,7 @@ rte_eth_allmulticast_disable(uint16_t port_id)if (diag !=0 ) dev->data->all_multicast =1 ; +rte_eth_trace_allmulticast_disable (port_id, dev->data->all_multicast);return eth_err (port_id, diag); }@@ -2414,6 +2463,7 @@ rte_eth_allmulticast_get(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_allmulticast_get (port_id, dev->data->all_multicast);return dev->data->all_multicast; }@@ -2440,6 +2490,7 @@ rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link) *eth_link = dev->data->dev_link; } +rte_eth_trace_link_get (port_id, eth_link);return 0 ; }@@ -2466,12 +2517,14 @@ rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link) *eth_link = dev->data->dev_link; } +rte_eth_trace_link_get_nowait (port_id, eth_link);return 0 ; }const char *
rte_eth_link_speed_to_str(uint32_t link_speed)
{lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_link_speed_to_str (link_speed);switch (link_speed) { case RTE_ETH_SPEED_NUM_NONE: return "None"; case RTE_ETH_SPEED_NUM_10M: return "10 Mbps";lib/ethdev/rte_ethdev.c +1
-0@@ -2511,6 +2564,7 @@ rte_eth_link_to_str(char *str, size_t len, const struct rte_eth_link *eth_link)return -EINVAL ; } +rte_eth_trace_link_to_str (str, len, eth_link);if (eth_link->link_status ==RTE_ETH_LINK_DOWN )return snprintf (str, len,"Link down" );else
lib/ethdev/rte_ethdev.c +3
-0@@ -2541,6 +2595,7 @@ rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)if (*dev->dev_ops->stats_get ==NULL )return -ENOTSUP ; stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed; +rte_eth_trace_stats_get (port_id, stats);return eth_err (port_id, (*dev->dev_ops->stats_get)(dev, stats)); }@@ -2561,6 +2616,7 @@ rte_eth_stats_reset(uint16_t port_id) dev->data->rx_mbuf_alloc_failed =0 ; +rte_eth_trace_stats_reset (port_id);return 0 ; }@@ -2625,6 +2681,7 @@ rte_eth_xstats_get_id_by_name(uint16_t port_id,const char *xstat_name, return -ENOMEM; } +rte_eth_trace_xstats_get_id_by_name (port_id, xstat_name, id);/* Get count */ cnt_xstats =rte_eth_xstats_get_names_by_id (port_id,NULL ,0 ,NULL );if (cnt_xstats < 0) {lib/ethdev/rte_ethdev.c +2
-0@@ -2797,6 +2854,8 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,return -1 ; } xstats_names[i] = xstats_names_copy[ids[i]]; +rte_eth_trace_xstats_get_names_by_id (port_id, &xstats_names[i], + ids[i]); }free(xstats_names_copy);lib/ethdev/rte_ethdev.c +5
-0@@ -2836,6 +2895,7 @@ rte_eth_xstats_get_names(uint16_t port_id, cnt_used_entries += cnt_driver_entries; } +rte_eth_trace_xstats_get_names (port_id, xstats_names, size, cnt_used_entries);return cnt_used_entries; }@@ -2985,6 +3045,7 @@ rte_eth_xstats_get_by_id(uint16_t port_id, constuint64_t *ids, } values[i] = xstats[ids[i]].value; } +rte_eth_trace_xstats_get_by_id (port_id, ids, values, size);return size; }@@ -3032,6 +3093,8 @@ rte_eth_xstats_get(uint16_t port_id, structrte_eth_xstat *xstats, for ( ; i < count + xcount; i++) xstats[i].id += count; +for (i =0 ; i < n; i++) +rte_eth_trace_xstats_get (port_id, xstats[i], i);return count + xcount; }@@ -3044,6 +3107,7 @@ rte_eth_xstats_reset(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_xstats_reset (port_id);/* implemented by the driver */ if (dev->dev_ops->xstats_reset !=NULL )return eth_err (port_id, (*dev->dev_ops->xstats_reset)(dev));@@ -3079,6 +3143,8 @@ intrte_eth_dev_set_tx_queue_stats_mapping(uint16_t
port_id,uint16_ttx_queue_id,
uint8_tstat_idx)
{lib/ethdev/rte_ethdev.c +2
-0+rte_ethdev_trace_set_tx_queue_stats_mapping (port_id, tx_queue_id, + stat_idx);return eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id, tx_queue_id, stat_idx, STAT_QMAP_TX));lib/ethdev/rte_ethdev.c +0
-0@@ -3088,6 +3154,8 @@ intrte_eth_dev_set_rx_queue_stats_mapping(uint16_t
port_id,uint16_trx_queue_id,
uint8_tstat_idx)
{lib/ethdev/rte_ethdev.c +1
-0+ rte_ethdev_trace_set_rx_queue_stats_mapping(port_id,
rx_queue_id,lib/ethdev/rte_ethdev.c +1
-0+ stat_idx);return eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id, rx_queue_id, stat_idx, STAT_QMAP_RX));lib/ethdev/rte_ethdev.c +1
-0@@ -3110,6 +3178,7 @@ rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)if (*dev->dev_ops->fw_version_get ==NULL )return -ENOTSUP ; +rte_ethdev_trace_fw_version_get (port_id, fw_version, fw_size);return eth_err (port_id, (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_size));}
lib/ethdev/rte_ethdev.c +2
-0@@ -3171,6 +3240,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) dev_info->dev_flags = &dev->data->dev_flags; +rte_ethdev_trace_info_get (port_id, dev_info);return 0 ; }@@ -3191,6 +3261,7 @@ rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) memcpy(dev_conf, &dev->data->dev_conf, sizeof(structrte_eth_conf )); +rte_ethdev_trace_conf_get (port_id, dev_conf);return 0 ;}
lib/ethdev/rte_ethdev.c +1
-0@@ -3226,6 +3297,7 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, j++; } +rte_ethdev_trace_get_supported_ptypes (port_id, ptype_mask, ptypes, num, j);return j;}
lib/ethdev/rte_ethdev.c +1
-0@@ -3310,6 +3382,7 @@ rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, if (set_ptypes != NULL && j < num) set_ptypes[j] =RTE_PTYPE_UNKNOWN ; +rte_ethdev_trace_set_ptypes (port_id, ptype_mask, set_ptypes, num);return (*dev->dev_ops->dev_ptypes_set)(dev, ptype_mask);
ptype_unknown:lib/ethdev/rte_ethdev.c +2
-0@@ -3341,6 +3414,7 @@ rte_eth_macaddrs_get(uint16_t port_id, structrte_ether_addr *ma, num =RTE_MIN (dev_info.max_mac_addrs, num);memcpy (ma, dev->data->mac_addrs, num *sizeof (ma[0 ])); +rte_eth_trace_macaddrs_get (port_id, ma, num);return num; }@@ -3359,6 +3433,7 @@ rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)return -EINVAL ; } +rte_eth_trace_macaddr_get (port_id, mac_addr);rte_ether_addr_copy (&dev->data->mac_addrs[0 ], mac_addr);return 0;lib/ethdev/rte_ethdev.c +4
-0@@ -3379,6 +3454,7 @@ rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu) } *mtu = dev->data->mtu; +rte_ethdev_trace_get_mtu (port_id, *mtu);return 0 ; }@@ -3421,6 +3497,7 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)if (ret ==0 ) dev->data->mtu = mtu; +rte_ethdev_trace_set_mtu (port_id, mtu, ret);return eth_err (port_id, ret); }@@ -3464,6 +3541,7 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on) vfc->ids[vidx] &= ~RTE_BIT64 (vbit); } +rte_ethdev_trace_vlan_filter (port_id, vlan_id, on, ret);return eth_err (port_id, ret); }@@ -3483,6 +3561,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, if (*dev->dev_ops->vlan_strip_queue_set == NULL) return -ENOTSUP; +rte_ethdev_trace_set_vlan_strip_on_queue (port_id, rx_queue_id, on); (*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on);return 0;lib/ethdev/rte_ethdev.c +1
-0@@ -3500,6 +3579,7 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,if (*dev->dev_ops->vlan_tpid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_ether_type (port_id, vlan_type, tpid);return eth_err (port_id, (*dev->dev_ops->vlan_tpid_set)(dev, vlan_type, tpid));}
lib/ethdev/rte_ethdev.c +3
-0@@ -3593,6 +3673,7 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask) dev->data->dev_conf.rxmode.offloads = orig_offloads; } +rte_ethdev_trace_set_vlan_offload (port_id, offload_mask, ret);return eth_err (port_id, ret); }@@ -3619,6 +3700,7 @@ rte_eth_dev_get_vlan_offload(uint16_t port_id)if (*dev_offloads &RTE_ETH_RX_OFFLOAD_QINQ_STRIP ) ret |=RTE_ETH_QINQ_STRIP_OFFLOAD ; +rte_ethdev_trace_get_vlan_offload (port_id, ret);return ret; }@@ -3632,6 +3714,7 @@ rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)if (*dev->dev_ops->vlan_pvid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_pvid (port_id, pvid, on);return eth_err (port_id, (*dev->dev_ops->vlan_pvid_set)(dev, pvid, on));}
lib/ethdev/rte_ethdev.c +1
-0@@ -3653,6 +3736,7 @@ rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)if (*dev->dev_ops->flow_ctrl_get ==NULL )return -ENOTSUP ;memset (fc_conf,0 ,sizeof (*fc_conf)); +rte_ethdev_trace_flow_ctrl_get (port_id, fc_conf);return eth_err (port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf));}
lib/ethdev/rte_ethdev.c +2
-0@@ -3678,6 +3762,7 @@ rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)if (*dev->dev_ops->flow_ctrl_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_flow_ctrl_set (port_id, fc_conf);return eth_err (port_id, (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf)); }@@ -3702,6 +3787,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, return -EINVAL ; } +rte_ethdev_trace_priority_flow_ctrl_set (port_id, pfc_conf);/* High water, low water validation are device specific */ if (*dev->dev_ops->priority_flow_ctrl_set)return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_set)lib/ethdev/rte_ethdev.c +1
-0@@ -3774,6 +3860,7 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, return -EINVAL; } +rte_ethdev_trace_priority_flow_ctrl_queue_info_get (port_id, pfc_queue_info);if (*dev->dev_ops->priority_flow_ctrl_queue_info_get)return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_queue_info_get)(dev, pfc_queue_info));lib/ethdev/rte_ethdev.c +2
-0@@ -3845,6 +3932,8 @@ rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, return ret; } +rte_ethdev_trace_priority_flow_ctrl_queue_configure (port_id, + pfc_queue_conf);if (*dev->dev_ops->priority_flow_ctrl_queue_config) return eth_err(port_id,(*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_queue_config)(
lib/ethdev/rte_ethdev.c +1
-0@@ -3940,6 +4029,7 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,if (*dev->dev_ops->reta_update ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_reta_update (port_id, reta_conf, reta_size);return eth_err (port_id, (*dev->dev_ops->reta_update)(dev, reta_conf, reta_size));}
lib/ethdev/rte_ethdev.c +4
-0@@ -3969,6 +4059,7 @@ rte_eth_dev_rss_reta_query(uint16_t port_id,if (*dev->dev_ops->reta_query ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_reta_query (port_id, reta_conf, reta_size);return eth_err (port_id, (*dev->dev_ops->reta_query)(dev, reta_conf, reta_size)); }@@ -4014,6 +4105,7 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,if (*dev->dev_ops->rss_hash_update ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_hash_update (port_id, rss_conf);return eth_err (port_id, (*dev->dev_ops->rss_hash_update)(dev, rss_conf)); }@@ -4036,6 +4128,7 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id,if (*dev->dev_ops->rss_hash_conf_get ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_hash_conf_get (port_id, rss_conf);return eth_err (port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, rss_conf)); }@@ -4063,6 +4156,7 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_add == NULL) return -ENOTSUP; +rte_ethdev_trace_udp_tunnel_port_add (port_id, udp_tunnel);return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, udp_tunnel));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4090,6 +4184,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_del == NULL) return -ENOTSUP; +rte_ethdev_trace_udp_tunnel_port_delete (port_id, udp_tunnel);return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, udp_tunnel));}
lib/ethdev/rte_ethdev.c +9
-0@@ -4104,6 +4199,7 @@ rte_eth_led_on(uint16_t port_id)if (*dev->dev_ops->dev_led_on ==NULL )return -ENOTSUP ; +rte_eth_trace_led_on (port_id);return eth_err (port_id, (*dev->dev_ops->dev_led_on)(dev)); }@@ -4117,6 +4213,7 @@ rte_eth_led_off(uint16_t port_id)if (*dev->dev_ops->dev_led_off ==NULL )return -ENOTSUP ; +rte_eth_trace_led_off (port_id);return eth_err (port_id, (*dev->dev_ops->dev_led_off)(dev)); }@@ -4142,6 +4239,7 @@ rte_eth_fec_get_capability(uint16_t port_id,return -ENOTSUP ; ret = (*dev->dev_ops->fec_get_capability)(dev, speed_fec_capa, num); +rte_eth_trace_fec_get_capability (port_id, speed_fec_capa, num, ret);return ret; }@@ -4162,6 +4260,7 @@ rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa)if (*dev->dev_ops->fec_get ==NULL )return -ENOTSUP ; +rte_eth_trace_fec_get (port_id, fec_capa);return eth_err (port_id, (*dev->dev_ops->fec_get)(dev, fec_capa)); }@@ -4175,6 +4274,7 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)if (*dev->dev_ops->fec_set ==NULL )return -ENOTSUP ; +rte_eth_trace_fec_set (port_id, fec_capa);return eth_err (port_id, (*dev->dev_ops->fec_set)(dev, fec_capa)); }@@ -4252,6 +4352,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id,struct rte_ether_addr *addr, return 0; } +rte_ethdev_trace_mac_addr_add (port_id, addr, pool);/* Update NIC */ ret = (*dev->dev_ops->mac_addr_add)(dev, addr, index, pool);@@ -4294,6 +4395,7 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) }else if (index <0 )return 0 ;/* Do nothing if address wasn't found */ +rte_ethdev_trace_mac_addr_remove (port_id, addr);/* Update NIC */ (*dev->dev_ops->mac_addr_remove)(dev, index);@@ -4329,6 +4431,7 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)return -ENOTSUP ; ret = (*dev->dev_ops->mac_addr_set)(dev, addr); +rte_ethdev_trace_default_mac_addr_set (port_id, addr, ret);if (ret <0 )return ret;@@ -4415,6 +4518,7 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, if (*dev->dev_ops->uc_hash_table_set == NULL) return -ENOTSUP; ret = (*dev->dev_ops->uc_hash_table_set)(dev, addr, on); +rte_ethdev_trace_uc_hash_table_set (port_id, addr, on, ret);if (ret ==0 ) {/* Update address in NIC data structure */ if (on)lib/ethdev/rte_ethdev.c +1
-0@@ -4438,6 +4542,7 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)if (*dev->dev_ops->uc_all_hash_table_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_uc_all_hash_table_set (port_id, on);return eth_err (port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, on));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4475,6 +4580,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, if (*dev->dev_ops->set_queue_rate_limit == NULL) return -ENOTSUP; +rte_eth_trace_set_queue_rate_limit (port_id, queue_idx, tx_rate);return eth_err (port_id, (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4502,6 +4608,7 @@ int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, }if (*dev->dev_ops->rx_queue_avail_thresh_set ==NULL )return -ENOTSUP ; +rte_eth_trace_rx_avail_thresh_set (port_id, queue_id, avail_thresh); return eth_err(port_id, (*dev->dev_ops- >rx_queue_avail_thresh_set)(dev,
queue_id,avail_thresh));
}lib/ethdev/rte_ethdev.c +1
-0@@ -4521,6 +4628,7 @@ int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, if (*dev->dev_ops->rx_queue_avail_thresh_query == NULL) return -ENOTSUP; +rte_eth_trace_rx_avail_thresh_query (port_id, *queue_id); return eth_err(port_id, (*dev->dev_ops- >rx_queue_avail_thresh_query)(dev,
queue_id,avail_thresh));
}lib/ethdev/rte_ethdev.c +3
-0@@ -4570,6 +4678,9 @@ rte_eth_dev_callback_register(uint16_t port_id, next_port = last_port = port_id; } +rte_ethdev_trace_callback_register (port_id, event, cb_fn, cb_arg, next_port, + last_port); +rte_spinlock_lock (ð_dev_cb_lock);do {lib/ethdev/rte_ethdev.c +2
-0@@ -4665,6 +4776,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }while (++next_port <= last_port);rte_spinlock_unlock (ð_dev_cb_lock); +rte_ethdev_trace_callback_unregister (port_id, event, cb_fn, cb_arg, ret);return ret; }@@ -4694,6 +4806,7 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)for (qid =0 ; qid < dev->data->nb_rx_queues; qid++) { vec =rte_intr_vec_list_index_get (intr_handle, qid); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl (port_id, epfd, op, data, rc);if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR,"p %u q %u Rx ctl error op %d epfd %d vec
%u\n",lib/ethdev/rte_ethdev.c +2
-0@@ -4737,6 +4850,7 @@ rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id) (vec - RTE_INTR_VEC_RXTX_OFFSET) : vec; fd = rte_intr_efds_index_get(intr_handle, efd_idx); +rte_ethdev_trace_rx_intr_ctl_q_get_fd (port_id, queue_id, fd);return fd; }@@ -4770,6 +4884,7 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id,uint16_t queue_id, vec =rte_intr_vec_list_index_get (intr_handle, queue_id); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl_q (port_id, queue_id, epfd, op, data, rc);if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR,"p %u q %u Rx ctl error op %d epfd %d vec %u\n",
lib/ethdev/rte_ethdev.c +3
-0@@ -4796,6 +4911,7 @@ rte_eth_dev_rx_intr_enable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_enable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_enable (port_id, queue_id);return eth_err (port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id)); }@@ -4815,6 +4931,7 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_disable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_disable (port_id, queue_id);return eth_err (port_id, (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id)); }@@ -4873,6 +4990,7 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_add_rx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +1
-0@@ -4912,6 +5030,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id,uint16_t queue_id, cb, __ATOMIC_RELEASE);rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_add_first_rx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +1
-0@@ -4971,6 +5090,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_tx_cb_lock); +rte_eth_trace_add_tx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +5
-0@@ -5005,6 +5125,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_remove_rx_callback (port_id, queue_id, user_cb, ret);return ret; }@@ -5039,6 +5160,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_tx_cb_lock); +rte_eth_trace_remove_tx_callback (port_id, queue_id, user_cb, ret);return ret; }@@ -5085,6 +5207,7 @@ rte_eth_rx_queue_info_get(uint16_t port_id,uint16_t queue_id, dev->dev_ops->rxq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->rx_queue_state[queue_id]; +rte_eth_trace_rx_queue_info_get (port_id, queue_id, qinfo);return 0 ; }@@ -5131,6 +5254,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id,uint16_t queue_id, dev->dev_ops->txq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->tx_queue_state[queue_id]; +rte_eth_trace_tx_queue_info_get (port_id, queue_id, qinfo);return 0 ; }@@ -5158,6 +5282,7 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->rx_burst_mode_get == NULL) return -ENOTSUP;memset (mode,0 ,sizeof (*mode)); +rte_eth_trace_rx_burst_mode_get (port_id, queue_id, mode); return eth_err(port_id, dev->dev_ops->rx_burst_mode_get(dev, queue_id,mode));
}lib/ethdev/rte_ethdev.c +1
-0@@ -5186,6 +5311,7 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->tx_burst_mode_get == NULL) return -ENOTSUP;memset (mode,0 ,sizeof (*mode)); +rte_eth_trace_tx_burst_mode_get (port_id, queue_id, mode); return eth_err(port_id, dev->dev_ops->tx_burst_mode_get(dev, queue_id,mode));
}lib/ethdev/rte_ethdev.c +1
-0@@ -5213,6 +5339,7 @@ rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->get_monitor_addr == NULL) return -ENOTSUP; +rte_eth_trace_get_monitor_addr (port_id, queue_id, pmc); return eth_err(port_id, dev->dev_ops->get_monitor_addr(dev->data-Quoted 1 line
rx_queues[queue_id], pmc));
}
lib/ethdev/rte_ethdev.c +1
-0@@ -5229,6 +5356,7 @@ rte_eth_dev_set_mc_addr_list(uint16_t port_id,if (*dev->dev_ops->set_mc_addr_list ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_mc_addr_list (port_id, mc_addr_set, nb_mc_addr);return eth_err (port_id, dev->dev_ops->set_mc_addr_list (dev, mc_addr_set, nb_mc_addr));}
lib/ethdev/rte_ethdev.c +3
-0@@ -5243,6 +5371,7 @@ rte_eth_timesync_enable(uint16_t port_id)if (*dev->dev_ops->timesync_enable ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_enable (port_id);return eth_err (port_id, (*dev->dev_ops->timesync_enable)(dev)); }@@ -5256,6 +5385,7 @@ rte_eth_timesync_disable(uint16_t port_id)if (*dev->dev_ops->timesync_disable ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_disable (port_id);return eth_err (port_id, (*dev->dev_ops->timesync_disable)(dev)); }@@ -5277,6 +5407,7 @@ rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, if (*dev->dev_ops->timesync_read_rx_timestamp == NULL) return -ENOTSUP; +rte_eth_trace_timesync_read_rx_timestamp (port_id, timestamp, flags); return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
timesync_read_rx_timestamp)(dev, timestamp, flags)); }lib/ethdev/rte_ethdev.c +1
-0@@ -5299,6 +5430,7 @@ rte_eth_timesync_read_tx_timestamp(uint16_t port_id, if (*dev->dev_ops->timesync_read_tx_timestamp == NULL) return -ENOTSUP; +rte_eth_trace_timesync_read_tx_timestamp (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops- >timesync_read_tx_timestamp)(dev, timestamp)); }lib/ethdev/rte_ethdev.c +1
-0@@ -5313,6 +5445,7 @@ rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)if (*dev->dev_ops->timesync_adjust_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_adjust_time (port_id, delta);return eth_err (port_id, (*dev->dev_ops->timesync_adjust_time)(dev, delta));}
lib/ethdev/rte_ethdev.c +1
-0@@ -5333,6 +5466,7 @@ rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp)if (*dev->dev_ops->timesync_read_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_read_time (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops->timesync_read_time)(dev, timestamp));}
lib/ethdev/rte_ethdev.c +1
-0@@ -5354,6 +5488,7 @@ rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp)if (*dev->dev_ops->timesync_write_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_write_time (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops->timesync_write_time)(dev, timestamp));}
lib/ethdev/rte_ethdev.c +9
-0@@ -5374,6 +5509,7 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *clock)if (*dev->dev_ops->read_clock ==NULL )return -ENOTSUP ; +rte_eth_trace_read_clock (port_id, clock);return eth_err (port_id, (*dev->dev_ops->read_clock)(dev, clock)); }@@ -5394,6 +5530,7 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)if (*dev->dev_ops->get_reg ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_reg_info (port_id, info);return eth_err (port_id, (*dev->dev_ops->get_reg)(dev, info)); }@@ -5407,6 +5544,7 @@ rte_eth_dev_get_eeprom_length(uint16_t port_id)if (*dev->dev_ops->get_eeprom_length ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_eeprom_length (port_id);return eth_err (port_id, (*dev->dev_ops->get_eeprom_length)(dev)); }@@ -5427,6 +5565,7 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->get_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_eeprom (port_id, info);return eth_err (port_id, (*dev->dev_ops->get_eeprom)(dev, info)); }@@ -5447,6 +5586,7 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->set_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_eeprom (port_id, info);return eth_err (port_id, (*dev->dev_ops->set_eeprom)(dev, info)); }@@ -5468,6 +5608,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,if (*dev->dev_ops->get_module_info ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_module_info (port_id, modinfo);return (*dev->dev_ops->get_module_info)(dev, modinfo); }@@ -5503,6 +5644,7 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,if (*dev->dev_ops->get_module_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_module_eeprom (port_id, info);return (*dev->dev_ops->get_module_eeprom)(dev, info); }@@ -5526,6 +5668,7 @@ rte_eth_dev_get_dcb_info(uint16_t port_id,if (*dev->dev_ops->get_dcb_info ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_dcb_info (port_id, dcb_info);return eth_err (port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info)); }@@ -5562,6 +5705,7 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, if (nb_tx_desc != NULL)eth_dev_adjust_nb_desc (nb_tx_desc, &dev_info.tx_desc_lim); +rte_ethdev_trace_adjust_nb_rx_tx_desc (port_id, *nb_rx_desc, *nb_tx_desc);return 0; }lib/ethdev/rte_ethdev.c +4
-0@@ -5584,6 +5728,7 @@ rte_eth_dev_hairpin_capability_get(uint16_t port_id, if (*dev->dev_ops->hairpin_cap_get == NULL) return -ENOTSUP;memset (cap,0 ,sizeof (*cap)); +rte_ethdev_trace_hairpin_capability_get (port_id, cap);return eth_err (port_id, (*dev->dev_ops->hairpin_cap_get)(dev, cap)); }@@ -5605,6 +5750,7 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)if (*dev->dev_ops->pool_ops_supported ==NULL )return 1 ;/* all pools are supported */ +rte_ethdev_trace_pool_ops_supported (port_id, pool);return (*dev->dev_ops->pool_ops_supported)(dev, pool); }@@ -5901,6 +6047,7 @@ rte_eth_representor_info_get(uint16_t port_id,if (*dev->dev_ops->representor_info_get ==NULL )return -ENOTSUP ; +rte_eth_trace_representor_info_get (port_id, info);return eth_err (port_id, (*dev->dev_ops->representor_info_get)(dev, info)); }@@ -5924,6 +6071,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)return -EINVAL ; } +rte_eth_trace_rx_metadata_negotiate (port_id, features, *features);if (*dev->dev_ops->rx_metadata_negotiate ==NULL )return -ENOTSUP ;return eth_err(port_id,
lib/ethdev/rte_ethdev.c +1
-0@@ -5956,6 +6104,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id, return -ENOTSUP ;memset (reassembly_capa,0 ,sizeof (struct rte_eth_ip_reassembly_params )); +rte_eth_trace_ip_reassembly_capability_get (port_id, reassembly_capa);return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
ip_reassembly_capability_get)(dev, reassembly_capa)); }lib/ethdev/rte_ethdev.c +3
-0@@ -5985,6 +6134,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,if (*dev->dev_ops->ip_reassembly_conf_get ==NULL )return -ENOTSUP ;memset (conf,0 ,sizeof (struct rte_eth_ip_reassembly_params )); +rte_eth_trace_ip_reassembly_conf_get (port_id, conf);return eth_err (port_id, (*dev->dev_ops->ip_reassembly_conf_get)(dev, conf)); }@@ -6022,6 +6172,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,if (*dev->dev_ops->ip_reassembly_conf_set ==NULL )return -ENOTSUP ; +rte_eth_trace_ip_reassembly_conf_set (port_id, conf);return eth_err (port_id, (*dev->dev_ops->ip_reassembly_conf_set)(dev, conf)); }@@ -6041,6 +6192,7 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)if (*dev->dev_ops->eth_dev_priv_dump ==NULL )return -ENOTSUP ; +rte_ethdev_trace_priv_dump (port_id);return eth_err (port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file)); }lib/ethdev/rte_ethdev_trace.h +109
-0@@ -88,6 +88,1200 @@ RTE_TRACE_POINT(rte_trace_point_emit_u16 (port_id); ) +RTE_TRACE_POINT ( + rte_eth_trace_add_first_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_add_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_add_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_tx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (mtu); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_adjust_nb_rx_tx_desc, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t nb_rx_desc, + uint16_t nb_tx_desc), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u16 (nb_tx_desc); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_callback_register, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, void *cb_arg, uint16_t next_port, + uint16_t last_port), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (event); +rte_trace_point_emit_ptr (cb_fn); +rte_trace_point_emit_ptr (cb_arg); +rte_trace_point_emit_u16 (next_port); +rte_trace_point_emit_u16 (last_port); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_callback_unregister, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, void *cb_arg, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (event); +rte_trace_point_emit_ptr (cb_fn); +rte_trace_point_emit_ptr (cb_arg); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_default_mac_addr_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
*fc_conf),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fc_conf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
*fc_conf),lib/ethdev/rte_ethdev_trace.h +13
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (fc_conf->high_water); +rte_trace_point_emit_u32 (fc_conf->low_water); +rte_trace_point_emit_u16 (fc_conf->pause_time); +rte_trace_point_emit_u16 (fc_conf->send_xon); +rte_trace_point_emit_int (fc_conf->mode); +rte_trace_point_emit_u8 (fc_conf->mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (fc_conf->autoneg); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_fw_version_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *fw_version, size_t
fw_size),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fw_version); +rte_trace_point_emit_size_t (fw_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_dcb_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_dcb_info
*dcb_info),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (dcb_info); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct
rte_dev_eeprom_info*info),lib/ethdev/rte_ethdev_trace.h +46
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_eeprom_length, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (mtu); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_count_avail, + RTE_TRACE_POINT_ARGS(uint16_t count), + rte_trace_point_emit_u16(count); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_count_total, + RTE_TRACE_POINT_ARGS(uint16_t count), + rte_trace_point_emit_u16(count); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_name_by_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *name), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_port_by_name, + RTE_TRACE_POINT_ARGS(const char *name, uint16_t port_id), + rte_trace_point_emit_string(name); +rte_trace_point_emit_u16 (port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_reg_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_reg_info*info),
lib/ethdev/rte_ethdev_trace.h +65
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_sec_ctx, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_supported_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *ptypes, int num, int j), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (ptypes); +rte_trace_point_emit_int (num); +rte_trace_point_emit_int (j); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu); +rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen); +rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa); +rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size); +rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_removed, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_valid_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr,
lib/ethdev/rte_ethdev_trace.h +9
-0+ uint32_t pool), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u32 (pool); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_remove, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr),
lib/ethdev/rte_ethdev_trace.h +14
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (addr); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_pool_ops_supported, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pool); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_pfc_conf
*pfc_conf),lib/ethdev/rte_ethdev_trace.h +21
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (pfc_conf->fc.high_water); +rte_trace_point_emit_u32 (pfc_conf->fc.low_water); +rte_trace_point_emit_u16 (pfc_conf->fc.pause_time); +rte_trace_point_emit_u16 (pfc_conf->fc.send_xon); +rte_trace_point_emit_int (pfc_conf->fc.mode); +rte_trace_point_emit_u8 (pfc_conf->fc.mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (pfc_conf->fc.autoneg); +rte_trace_point_emit_u8 (pfc_conf->priority); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf->rss_key); +rte_trace_point_emit_u8 (rss_conf->rss_key_len); +rte_trace_point_emit_u64 (rss_conf->rss_hf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t
reta_size),lib/ethdev/rte_ethdev_trace.h +9
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (reta_conf); +rte_trace_point_emit_u16 (reta_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t
reta_size),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u64 (reta_conf->mask); +rte_trace_point_emit_u16 (reta_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int epfd, int op, void*data, int rc),
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_int (epfd); +rte_trace_point_emit_int (op); +rte_trace_point_emit_ptr (data); +rte_trace_point_emit_int (rc); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl_q, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, intepfd,
lib/ethdev/rte_ethdev_trace.h +55
-0+ int op, void *data, int rc), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_int (epfd); +rte_trace_point_emit_int (op); +rte_trace_point_emit_ptr (data); +rte_trace_point_emit_int (rc); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_ctl_q_get_fd, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int fd), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_int (fd); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_offload_name, + RTE_TRACE_POINT_ARGS(uint64_t offload, const char *name), + rte_trace_point_emit_u64(offload); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_queue_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_queue_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct
rte_dev_eeprom_info*info),lib/ethdev/rte_ethdev_trace.h +60
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info->data); +rte_trace_point_emit_u32 (info->offset); +rte_trace_point_emit_u32 (info->length); +rte_trace_point_emit_u32 (info->magic); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_link_down, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_link_up, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_mc_addr_list, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_ether_addr *mc_addr_set, + uint32_t nb_mc_addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (mc_addr_set); +rte_trace_point_emit_u32 (nb_mc_addr); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *set_ptypes, unsigned int num), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (set_ptypes); +rte_trace_point_emit_u32 (num); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_rx_queue_stats_mapping, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint8_t stat_idx), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u8 (stat_idx); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_tx_queue_stats_mapping, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id, + uint8_t stat_idx), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +rte_trace_point_emit_u8 (stat_idx); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_ether_type, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_vlan_type
vlan_type,lib/ethdev/rte_ethdev_trace.h +68
-0+ uint16_t tag_type), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_int (vlan_type); +rte_trace_point_emit_u16 (tag_type); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int offload_mask, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (offload_mask); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_pvid, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t pvid, int on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (pvid); +rte_trace_point_emit_int (on); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_strip_on_queue, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + int on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_int (on); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_socket_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_offload_name, + RTE_TRACE_POINT_ARGS(uint64_t offload, const char *name), + rte_trace_point_emit_u64(offload); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_queue_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_queue_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_uc_all_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint8_t on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u8 (on); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_uc_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr,
lib/ethdev/rte_ethdev_trace.h +10
-0+ uint8_t on, int ret), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u8 (on); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_udp_tunnel
*tunnel_udp),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (tunnel_udp->udp_port); +rte_trace_point_emit_u8 (tunnel_udp->prot_type); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_delete, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_udp_tunnel
*tunnel_udp),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (tunnel_udp->udp_port); +rte_trace_point_emit_u8 (tunnel_udp->prot_type); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_vlan_filter, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t vlan_id, int on,int ret),
lib/ethdev/rte_ethdev_trace.h +31
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (vlan_id); +rte_trace_point_emit_int (on); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next_of, + RTE_TRACE_POINT_ARGS(uint16_t port_id_start, + const struct rte_device *parent), + rte_trace_point_emit_u16(port_id_start); +rte_trace_point_emit_ptr (parent); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next_owned_by, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const uint64_t owner_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner_id); +) + +RTE_TRACE_POINT( + rte_eth_trace_find_next_sibling, + RTE_TRACE_POINT_ARGS(uint16_t port_id_start, uint16_t
ref_port_id),lib/ethdev/rte_ethdev_trace.h +13
-0+rte_trace_point_emit_u16 (port_id_start); +rte_trace_point_emit_u16 (ref_port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_iterator_cleanup, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter), + rte_trace_point_emit_ptr(iter); +) + +RTE_TRACE_POINT( + rte_eth_trace_iterator_init, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter, const char*devargs),
lib/ethdev/rte_ethdev_trace.h +39
-0+rte_trace_point_emit_ptr (iter); +rte_trace_point_emit_ptr (devargs); +) + +RTE_TRACE_POINT ( + rte_eth_trace_iterator_next, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter), + rte_trace_point_emit_ptr(iter); +) + +RTE_TRACE_POINT ( + rte_eth_trace_led_off, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_led_on, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_get_nowait, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) + +RTE_TRACE_POINT( + rte_eth_trace_macaddr_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr
*mac_addr),lib/ethdev/rte_ethdev_trace.h +100
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (mac_addr); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_remove_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (user_cb); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_remove_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (user_cb); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (qinfo->mp); +rte_trace_point_emit_u8 (qinfo->scattered_rx); +rte_trace_point_emit_u8 (qinfo->queue_state); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u16 (qinfo->rx_buf_size); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, unsigned int socket_id, + const struct rte_eth_rxconf *rx_conf, + struct rte_mempool *mb_pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u32 (socket_id); +rte_trace_point_emit_ptr (rx_conf); +rte_trace_point_emit_ptr (mb_pool); +) + +RTE_TRACE_POINT ( + rte_eth_trace_set_queue_rate_limit, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_idx, + uint16_t tx_rate), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_idx); +rte_trace_point_emit_u16 (tx_rate); +) + +RTE_TRACE_POINT ( + rte_eth_trace_speed_bitflag, + RTE_TRACE_POINT_ARGS(uint32_t speed, int duplex), + rte_trace_point_emit_u32(speed); +rte_trace_point_emit_int (duplex); +) + +RTE_TRACE_POINT( + rte_eth_trace_stats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_stats*stats),
lib/ethdev/rte_ethdev_trace.h +33
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (stats); +rte_trace_point_emit_u64 (stats->rx_nombuf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_stats_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_adjust_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int64_t delta), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_i64 (delta); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_read_rx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec*timestamp,
lib/ethdev/rte_ethdev_trace.h +16
-0+ uint32_t flags), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (timestamp); +rte_trace_point_emit_u32 (flags); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_read_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec *time), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (time); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_read_tx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec*timestamp),
lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (timestamp); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_write_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec*time),
lib/ethdev/rte_ethdev_trace.h +23
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (time); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_count_callback, + RTE_TRACE_POINT_ARGS(struct rte_mbuf **pkts, uint16_t unsent, + uint64_t count), + rte_trace_point_emit_ptr(pkts); +rte_trace_point_emit_u16 (unsent); +rte_trace_point_emit_u64 (count); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_drop_callback, + RTE_TRACE_POINT_ARGS(struct rte_mbuf **pkts, uint16_t unsent), + rte_trace_point_emit_ptr(pkts); +rte_trace_point_emit_u16 (unsent); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_buffer_init, + RTE_TRACE_POINT_ARGS(struct rte_eth_dev_tx_buffer *buffer,
uint16_tsize,lib/ethdev/rte_ethdev_trace.h +27
-0+ int ret), +rte_trace_point_emit_ptr (buffer ); +rte_trace_point_emit_u16 (size); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_set_err_callback, + RTE_TRACE_POINT_ARGS(struct rte_eth_dev_tx_buffer *buffer, + buffer_tx_error_fn callback, void *userdata), + rte_trace_point_emit_ptr(buffer); +rte_trace_point_emit_ptr (callback); +rte_trace_point_emit_ptr (userdata); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_done_cleanup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id,
uint32_tfree_cnt,lib/ethdev/rte_ethdev_trace.h +262
-0+ int ret), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u32 (free_cnt); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_txq_info *qinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u8 (qinfo->queue_state); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_xstat xstats, + int i), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (xstats.id); +rte_trace_point_emit_u64 (xstats.value); +rte_trace_point_emit_u32 (i); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_by_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint64_t *ids, + uint64_t *values, unsigned int size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (ids); +rte_trace_point_emit_ptr (values); +rte_trace_point_emit_u32 (size); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_id_by_name, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *xstat_name, + uint64_t *id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstat_name); +rte_trace_point_emit_ptr (id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_names, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_xstat_name *xstats_names, + unsigned int size, int cnt_used_entries), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstats_names->name); +rte_trace_point_emit_u32 (size); +rte_trace_point_emit_int (cnt_used_entries); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_names_by_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_xstat_name *xstats_names, uint64_t ids), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstats_names->name); +rte_trace_point_emit_u64 (ids); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_delete, + RTE_TRACE_POINT_ARGS(const uint64_t owner_id, int ret), + rte_trace_point_emit_u64(owner_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_get, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + struct rte_eth_dev_owner *owner), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner->id); +rte_trace_point_emit_string (owner->name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_new, + RTE_TRACE_POINT_ARGS(uint64_t owner_id), + rte_trace_point_emit_u64(owner_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_set, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + const struct rte_eth_dev_owner *owner, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner->id); +rte_trace_point_emit_string (owner->name); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_unset, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + const uint64_t owner_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_module_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_dev_eeprom_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_module_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_module_info *modinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (modinfo); +) + +RTE_TRACE_POINT ( + rte_eth_trace_read_clock, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint64_t *clk), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (clk); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_hairpin_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_hairpin_cap *cap), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (cap); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_hairpin_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, const struct rte_eth_hairpin_conf *conf, + int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_ptr (conf); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_hairpin_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id, + uint16_t nb_tx_desc, const struct rte_eth_hairpin_conf *conf, + int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +rte_trace_point_emit_u16 (nb_tx_desc); +rte_trace_point_emit_ptr (conf); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_bind, + RTE_TRACE_POINT_ARGS(uint16_t tx_port, uint16_t rx_port, int ret), + rte_trace_point_emit_u16(tx_port); +rte_trace_point_emit_u16 (rx_port); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_get_peer_ports, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t *peer_ports, + size_t len, uint32_t direction, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (peer_ports); +rte_trace_point_emit_size_t (len); +rte_trace_point_emit_u32 (direction); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_unbind, + RTE_TRACE_POINT_ARGS(uint16_t tx_port, uint16_t rx_port, int ret), + rte_trace_point_emit_u16(tx_port); +rte_trace_point_emit_u16 (rx_port); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_speed_to_str, + RTE_TRACE_POINT_ARGS(uint32_t link_speed), + rte_trace_point_emit_u32(link_speed); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_to_str, + RTE_TRACE_POINT_ARGS(char *str, size_t len, + const struct rte_eth_link *eth_link), + rte_trace_point_emit_ptr(str); +rte_trace_point_emit_size_t (len); +rte_trace_point_emit_ptr (eth_link); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_get_capability, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_fec_capa *speed_fec_capa, + unsigned int num, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (speed_fec_capa); +rte_trace_point_emit_u32 (num); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t *fec_capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (fec_capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t fec_capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (fec_capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_get_monitor_addr, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_power_monitor_cond *pmc), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (pmc); +) + +RTE_TRACE_POINT ( + rte_eth_trace_representor_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_representor_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_capability_name, + RTE_TRACE_POINT_ARGS(uint64_t capability, const char *name), + rte_trace_point_emit_u64(capability); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_conf
*dev_conf),lib/ethdev/rte_ethdev_trace.h +11
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (dev_conf); +rte_trace_point_emit_u32 (dev_conf->link_speeds); +rte_trace_point_emit_u64 (dev_conf->rxmode.offloads); +rte_trace_point_emit_u64 (dev_conf->txmode.offloads); +rte_trace_point_emit_u32 (dev_conf->lpbk_mode); +) + +RTE_TRACE_POINT( + rte_eth_trace_macaddrs_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*ma,
lib/ethdev/rte_ethdev_trace.h +80
-0+ unsigned int num), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (ma); +rte_trace_point_emit_u32 (num); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_metadata_negotiate, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint64_t *features, + uint64_t features_val), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (features); +rte_trace_point_emit_u64 (features_val); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priority_flow_ctrl_queue_configure, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_pfc_queue_conf *pfc_queue_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pfc_queue_conf); +rte_trace_point_emit_int (pfc_queue_conf->mode); +rte_trace_point_emit_u16 (pfc_queue_conf->rx_pause.tx_qid); +rte_trace_point_emit_u16 (pfc_queue_conf->tx_pause.rx_qid); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priority_flow_ctrl_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_pfc_queue_info *pfc_queue_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pfc_queue_info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priv_dump, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_ip_reassembly_params *capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_ip_reassembly_params *conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (conf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_conf_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_ip_reassembly_params *conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (conf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_avail_thresh_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_avail_thresh_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint8_t avail_thresh), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u8 (avail_thresh); +) +#ifdef
__cplusplus
}
#endiflib/ethdev/rte_ethdev_trace_fp.h +19
-0@@ -37,6 +37,25 @@ RTE_TRACE_POINT_FP(rte_trace_point_emit_u16 (nb_pkts); ) +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_rx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_rx, uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +) + +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_tx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_pkts); +) + #ifdef __cplusplus }#endif lib/ethdev/version.map +144
-1@@ -319,4 +319,148 @@ INTERNAL { rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; + __rte_eth_trace_add_first_rx_callback; + __rte_eth_trace_add_rx_callback; + __rte_eth_trace_add_tx_callback; + __rte_eth_trace_allmulticast_disable; + __rte_eth_trace_allmulticast_enable; + __rte_eth_trace_allmulticast_get; + __rte_eth_trace_call_rx_callbacks; + __rte_eth_trace_call_tx_callbacks; + __rte_ethdev_trace_count_avail; + __rte_ethdev_trace_count_total; + __rte_ethdev_trace_set_mtu; + __rte_ethdev_trace_adjust_nb_rx_tx_desc; + __rte_ethdev_trace_callback_register; + __rte_ethdev_trace_callback_unregister; + __rte_ethdev_trace_default_mac_addr_set; + __rte_ethdev_trace_flow_ctrl_get; + __rte_ethdev_trace_flow_ctrl_set; + __rte_ethdev_trace_fw_version_get; + __rte_ethdev_trace_get_dcb_info; + __rte_ethdev_trace_get_eeprom; + __rte_ethdev_trace_get_eeprom_length; + __rte_ethdev_trace_get_mtu; + __rte_ethdev_trace_get_name_by_port; + __rte_ethdev_trace_get_port_by_name; + __rte_ethdev_trace_get_reg_info; + __rte_ethdev_trace_get_sec_ctx; + __rte_ethdev_trace_get_supported_ptypes; + __rte_ethdev_trace_get_vlan_offload; + __rte_ethdev_trace_info_get; + __rte_ethdev_trace_is_removed; + __rte_ethdev_trace_is_valid_port; + __rte_ethdev_trace_mac_addr_add; + __rte_ethdev_trace_mac_addr_remove; + __rte_ethdev_trace_pool_ops_supported; + __rte_ethdev_trace_priority_flow_ctrl_set; + __rte_ethdev_trace_reset; + __rte_ethdev_trace_rss_hash_conf_get; + __rte_ethdev_trace_rss_hash_update; + __rte_ethdev_trace_rss_reta_query; + __rte_ethdev_trace_rss_reta_update; + __rte_ethdev_trace_rx_intr_ctl; + __rte_ethdev_trace_rx_intr_ctl_q; + __rte_ethdev_trace_rx_intr_ctl_q_get_fd; + __rte_ethdev_trace_rx_intr_disable; + __rte_ethdev_trace_rx_intr_enable; + __rte_ethdev_trace_rx_offload_name; + __rte_ethdev_trace_rx_queue_start; + __rte_ethdev_trace_rx_queue_stop; + __rte_ethdev_trace_set_eeprom; + __rte_ethdev_trace_set_link_down; + __rte_ethdev_trace_set_link_up; + __rte_ethdev_trace_set_mc_addr_list; + __rte_ethdev_trace_set_ptypes; + __rte_ethdev_trace_set_rx_queue_stats_mapping; + __rte_ethdev_trace_set_tx_queue_stats_mapping; + __rte_ethdev_trace_set_vlan_ether_type; + __rte_ethdev_trace_set_vlan_offload; + __rte_ethdev_trace_set_vlan_pvid; + __rte_ethdev_trace_set_vlan_strip_on_queue; + __rte_ethdev_trace_socket_id; + __rte_ethdev_trace_tx_offload_name; + __rte_ethdev_trace_tx_queue_start; + __rte_ethdev_trace_tx_queue_stop; + __rte_ethdev_trace_uc_all_hash_table_set; + __rte_ethdev_trace_uc_hash_table_set; + __rte_ethdev_trace_udp_tunnel_port_add; + __rte_ethdev_trace_udp_tunnel_port_delete; + __rte_ethdev_trace_vlan_filter; + __rte_eth_trace_find_next; + __rte_eth_trace_find_next_of; + __rte_eth_trace_find_next_owned_by; + __rte_eth_trace_find_next_sibling; + __rte_eth_trace_iterator_cleanup; + __rte_eth_trace_iterator_init; + __rte_eth_trace_iterator_next; + __rte_eth_trace_led_off; + __rte_eth_trace_led_on; + __rte_eth_trace_link_get; + __rte_eth_trace_link_get_nowait; + __rte_eth_trace_macaddr_get; + __rte_eth_trace_promiscuous_disable; + __rte_eth_trace_promiscuous_enable; + __rte_eth_trace_promiscuous_get; + __rte_eth_trace_remove_rx_callback; + __rte_eth_trace_remove_tx_callback; + __rte_eth_trace_rx_burst_mode_get; + __rte_eth_trace_rx_queue_info_get; + __rte_eth_trace_rx_queue_setup; + __rte_eth_trace_set_queue_rate_limit; + __rte_eth_trace_speed_bitflag; + __rte_eth_trace_stats_get; + __rte_eth_trace_stats_reset; + __rte_eth_trace_timesync_adjust_time; + __rte_eth_trace_timesync_disable; + __rte_eth_trace_timesync_enable; + __rte_eth_trace_timesync_read_rx_timestamp; + __rte_eth_trace_timesync_read_time; + __rte_eth_trace_timesync_read_tx_timestamp; + __rte_eth_trace_timesync_write_time; + __rte_eth_trace_tx_buffer_count_callback; + __rte_eth_trace_tx_buffer_drop_callback; + __rte_eth_trace_tx_buffer_init; + __rte_eth_trace_tx_buffer_set_err_callback; + __rte_eth_trace_tx_burst_mode_get; + __rte_eth_trace_tx_done_cleanup; + __rte_eth_trace_tx_queue_info_get; + __rte_eth_trace_xstats_get; + __rte_eth_trace_xstats_get_by_id; + __rte_eth_trace_xstats_get_id_by_name; + __rte_eth_trace_xstats_get_names; + __rte_eth_trace_xstats_get_names_by_id; + __rte_eth_trace_xstats_reset; + __rte_ethdev_trace_owner_delete; + __rte_ethdev_trace_owner_get; + __rte_ethdev_trace_owner_new; + __rte_ethdev_trace_owner_set; + __rte_ethdev_trace_owner_unset; + __rte_ethdev_trace_get_module_eeprom; + __rte_ethdev_trace_get_module_info; + __rte_ethdev_trace_hairpin_capability_get; + __rte_eth_trace_rx_hairpin_queue_setup; + __rte_eth_trace_tx_hairpin_queue_setup; + __rte_eth_trace_hairpin_bind; + __rte_eth_trace_hairpin_get_peer_ports; + __rte_eth_trace_hairpin_unbind; + __rte_eth_trace_link_speed_to_str; + __rte_eth_trace_link_to_str; + __rte_eth_trace_fec_get_capability; + __rte_eth_trace_fec_get; + __rte_eth_trace_fec_set; + __rte_eth_trace_get_monitor_addr; + __rte_eth_trace_representor_info_get; + __rte_ethdev_trace_capability_name; + __rte_ethdev_trace_conf_get; + __rte_eth_trace_macaddrs_get; + __rte_eth_trace_rx_metadata_negotiate; + __rte_ethdev_trace_priority_flow_ctrl_queue_configure; + __rte_ethdev_trace_priority_flow_ctrl_queue_info_get; + __rte_ethdev_trace_priv_dump; + __rte_eth_trace_ip_reassembly_capability_get; + __rte_eth_trace_ip_reassembly_conf_get; + __rte_eth_trace_ip_reassembly_conf_set; + __rte_eth_trace_rx_avail_thresh_query; + __rte_eth_trace_rx_avail_thresh_set; }; --2.28.0
RE: [PATCH v3 1/4] ethdev: add trace points
Hi All,
Quoted 92 lines
-----Original Message-----
From: Ankur Dwivedi
Sent: Friday, October 7, 2022 9:54 PM
To: [email protected]; Morten Brørup <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH v3 1/4] ethdev: add trace pointsHi Morten,
Quoted 44 lines
-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Thursday, October 6, 2022 8:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH v3 1/4] ethdev: add trace pointsQuoted 4 lines
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>---
Quoted 8 lines
Yes the functions you mentioned in previous comment are called in while loop in worker core. So I think they are fastpath.
rte_eth_stats_get()is called in fastpath. Similar torte_eth_macaddr_get(), I think functions likerte_eth_promiscuous_get(),rte_eth_allmulticast_get()can also be called in fastpath.
I am not sure which other functions can be fastpath. Is there a guideline/theme which can be used to determine this?
[Ankur] I will make the trace call in following functions as fast path trace, considering they are used in while loop in worker core or as rx/tx callback in examples applications. rte_eth_tx_buffer_drop_callbackrte_eth_tx_buffer_count_callbackrte_eth_tx_done_cleanuprte_eth_macaddr_getrte_eth_timesync_read_rx_timestamprte_eth_timesync_read_tx_timestamprte_eth_timesync_adjust_timerte_eth_timesync_read_timerte_eth_timesync_write_timerte_eth_stats_getrte_flow_get_restore_inforte_eth_read_clock
Please let me know your comments on the patch series.
Quoted 3,211 lines
Quoted 211 lines
lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 435 +++++++++++ lib/ethdev/rte_ethdev.c | 152 ++++ lib/ethdev/rte_ethdev_trace.h | 1194 ++++++++++++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 19 + lib/ethdev/version.map | 144 ++++ 6 files changed, 1947 insertions(+)lib/ethdev/ethdev_private.c +3
-0@@ -5,6 +5,7 @@#include <rte_debug.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "ethdev_driver.h" #include "ethdev_private.h" @@ -297,6 +298,7 @@ rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_rx_callbacks (port_id, queue_id, nb_rx, nb_pkts);return nb_rx; }@@ -312,6 +314,7 @@ rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id, cb = cb->next; } +rte_eth_trace_call_tx_callbacks (port_id, queue_id, nb_pkts);return nb_pkts; }lib/ethdev/ethdev_trace_points.c +0
-0@@ -29,3 +29,438 @@ RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_burst,lib.ethdev.tx.burst)
lib/ethdev/ethdev_trace_points.c +161
-0+ +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_first_rx_callback, + lib.ethdev.add_first_rx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_rx_callback, + lib.ethdev.add_rx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_add_tx_callback, + lib.ethdev.add_tx_callback) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_disable, + lib.ethdev.allmulticast_disable) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_enable, + lib.ethdev.allmulticast_enable) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_allmulticast_get, + lib.ethdev.allmulticast_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_call_rx_callbacks, + lib.ethdev.call_rx_callbacks) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_call_tx_callbacks, + lib.ethdev.call_tx_callbacks) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_mtu, + lib.ethdev.set_mtu) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_adjust_nb_rx_tx_desc, + lib.ethdev.adjust_nb_rx_tx_desc) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_callback_register, + lib.ethdev.callback_register) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_callback_unregister, + lib.ethdev.callback_unregister) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_default_mac_addr_set, + lib.ethdev.default_mac_addr_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_flow_ctrl_get, + lib.ethdev.flow_ctrl_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_flow_ctrl_set, + lib.ethdev.flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_fw_version_get, + lib.ethdev.fw_version_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_dcb_info, + lib.ethdev.get_dcb_info) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_eeprom, + lib.ethdev.get_eeprom) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_eeprom_length, + lib.ethdev.get_eeprom_length) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_mtu, + lib.ethdev.get_mtu) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_count_avail, + lib.ethdev.count_avail) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_count_total, + lib.ethdev.count_total) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_name_by_port, + lib.ethdev.get_name_by_port) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_port_by_name, + lib.ethdev.get_port_by_name) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_reg_info, + lib.ethdev.get_reg_info) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_sec_ctx, + lib.ethdev.get_sec_ctx) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_supported_ptypes, + lib.ethdev.get_supported_ptypes) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_get_vlan_offload, + lib.ethdev.get_vlan_offload) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_info_get, + lib.ethdev.info_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_is_removed, + lib.ethdev.is_removed) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_is_valid_port, + lib.ethdev.is_valid_port) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_mac_addr_add, + lib.ethdev.mac_addr_add) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_mac_addr_remove, + lib.ethdev.mac_addr_remove) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_pool_ops_supported, + lib.ethdev.pool_ops_supported) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_priority_flow_ctrl_set, + lib.ethdev.priority_flow_ctrl_set) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_reset, + lib.ethdev.reset) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_hash_conf_get, + lib.ethdev.rss_hash_conf_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_hash_update, + lib.ethdev.rss_hash_update) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_reta_query, + lib.ethdev.rss_reta_query) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rss_reta_update, + lib.ethdev.rss_reta_update) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl, + lib.ethdev.rx_intr_ctl) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl_q, + lib.ethdev.rx_intr_ctl_q) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_ctl_q_get_fd, + lib.ethdev.rx_intr_ctl_q_get_fd) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_disable, + lib.ethdev.rx_intr_disable) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_intr_enable, + lib.ethdev.rx_intr_enable) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_offload_name, + lib.ethdev.rx_offload_name) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_queue_start, + lib.ethdev.rx_queue_start) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_rx_queue_stop, + lib.ethdev.rx_queue_stop) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_eeprom, + lib.ethdev.set_eeprom) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_link_down, + lib.ethdev.set_link_down) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_link_up, + lib.ethdev.set_link_up) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_mc_addr_list, + lib.ethdev.set_mc_addr_list) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_set_ptypes, + lib.ethdev.set_ptypes) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_rx_queue_stats_mapping,
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst,
Quoted 3 lines
lib/ethdev/ethdev_trace_points.c +3
-0+ lib.ethdev.set_rx_queue_stats_mapping) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_tx_queue_stats_mappin
Quoted 240 lines
g,
lib/ethdev/ethdev_trace_points.c +239
-0+ lib.ethdev.set_tx_queue_stats_mapping) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_ether_type, + lib.ethdev.set_vlan_ether_type) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_offload, + lib.ethdev.set_vlan_offload) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_pvid, + lib.ethdev.set_vlan_pvid) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_vlan_strip_on_queue, + lib.ethdev.set_vlan_strip_on_queue) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_socket_id, + lib.ethdev.socket_id) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_offload_name, + lib.ethdev.tx_offload_name) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_queue_start, + lib.ethdev.tx_queue_start) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_queue_stop, + lib.ethdev.tx_queue_stop) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_all_hash_table_set, + lib.ethdev.uc_all_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_uc_hash_table_set, + lib.ethdev.uc_hash_table_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_add, + lib.ethdev.udp_tunnel_port_add) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_udp_tunnel_port_delete, + lib.ethdev.udp_tunnel_port_delete) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_vlan_filter, + lib.ethdev.vlan_filter) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next, + lib.ethdev.find_next) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_of, + lib.ethdev.find_next_of) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_owned_by, + lib.ethdev.find_next_owned_by) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_find_next_sibling, + lib.ethdev.find_next_sibling) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_cleanup, + lib.ethdev.iterator_cleanup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_init, + lib.ethdev.iterator_init) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_iterator_next, + lib.ethdev.iterator_next) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_off, + lib.ethdev.led_off) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_led_on, + lib.ethdev.led_on) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_get, + lib.ethdev.link_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_get_nowait, + lib.ethdev.link_get_nowait) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_macaddr_get, + lib.ethdev.macaddr_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_disable, + lib.ethdev.promiscuous_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_enable, + lib.ethdev.promiscuous_enable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_promiscuous_get, + lib.ethdev.promiscuous_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_rx_callback, + lib.ethdev.remove_rx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_remove_tx_callback, + lib.ethdev.remove_tx_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_burst_mode_get, + lib.ethdev.rx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_queue_info_get, + lib.ethdev.rx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_queue_setup, + lib.ethdev.rx_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_set_queue_rate_limit, + lib.ethdev.set_queue_rate_limit) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_speed_bitflag, + lib.ethdev.speed_bitflag) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_stats_get, + lib.ethdev.stats_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_stats_reset, + lib.ethdev.stats_reset) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_adjust_time, + lib.ethdev.timesync_adjust_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_disable, + lib.ethdev.timesync_disable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_enable, + lib.ethdev.timesync_enable) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_rx_timestamp, + lib.ethdev.timesync_read_rx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_time, + lib.ethdev.timesync_read_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_read_tx_timestamp, + lib.ethdev.timesync_read_tx_timestamp) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_timesync_write_time, + lib.ethdev.timesync_write_time) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_count_callback, + lib.ethdev.tx_buffer_count_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_drop_callback, + lib.ethdev.tx_buffer_drop_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_init, + lib.ethdev.tx_buffer_init) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_buffer_set_err_callback, + lib.ethdev.tx_buffer_set_err_callback) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_burst_mode_get, + lib.ethdev.tx_burst_mode_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_done_cleanup, + lib.ethdev.tx_done_cleanup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_queue_info_get, + lib.ethdev.tx_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get, + lib.ethdev.xstats_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_by_id, + lib.ethdev.xstats_get_by_id) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_id_by_name, + lib.ethdev.xstats_get_id_by_name) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_names, + lib.ethdev.xstats_get_names) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get_names_by_id, + lib.ethdev.xstats_get_names_by_id) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_reset, + lib.ethdev.xstats_reset) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_delete, + lib.ethdev.owner_delete) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_get, + lib.ethdev.owner_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_new, + lib.ethdev.owner_new) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_set, + lib.ethdev.owner_set) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_owner_unset, + lib.ethdev.owner_unset) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_eeprom, + lib.ethdev.get_module_eeprom) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_get_module_info, + lib.ethdev.get_module_info) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_read_clock, + lib.ethdev.read_clock) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_hairpin_capability_get, + lib.ethdev.hairpin_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_hairpin_queue_setup, + lib.ethdev.rx.hairpin_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_hairpin_queue_setup, + lib.ethdev.tx.hairpin_queue_setup) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_bind, + lib.ethdev.hairpin_bind) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_get_peer_ports, + lib.ethdev.hairpin_get_peer_ports) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_hairpin_unbind, + lib.ethdev.hairpin_unbind) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_speed_to_str, + lib.ethdev.link_speed_to_str) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_link_to_str, + lib.ethdev.link_to_str) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get_capability, + lib.ethdev.fec_get_capability) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_get, + lib.ethdev.fec_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_fec_set, + lib.ethdev.fec_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_get_monitor_addr, + lib.ethdev.get_monitor_addr) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_representor_info_get, + lib.ethdev.representor_info_get) + +RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_capability_name, + lib.ethdev.capability_name) +lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst,
Quoted 10 lines
lib/ethdev/ethdev_trace_points.c +10
-0+RTE_TRACE_POINT_REGISTER (rte_ethdev_trace_conf_get, + lib.ethdev.conf_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_macaddrs_get, + lib.ethdev.macaddrs_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_metadata_negotiate, + lib.ethdev.rx_metadata_negotiate) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_co
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst,
Quoted 4 lines
nfigure,
lib/ethdev/ethdev_trace_points.c +3
-0+ lib.ethdev.priority_flow_ctrl_queue_configure) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priority_flow_ctrl_queue_in
Quoted 2,740 lines
fo_get,lib/ethdev/ethdev_trace_points.c +19
-0+ lib.ethdev.priority_flow_ctrl_queue_info_get) + +RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_priv_dump, + lib.ethdev.priv_dump) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_capability_get, + lib.ethdev.ip_reassembly_capability_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_get, + lib.ethdev.ip_reassembly_conf_get) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_ip_reassembly_conf_set, + lib.ethdev.ip_reassembly_conf_set) + +RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query, + lib.ethdev.rx_avail_thresh_query) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_avail_thresh_set, + lib.ethdev.rx_avail_thresh_set)lib/ethdev/rte_ethdev.c +2
-0@@ -182,6 +182,8 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) memset(iter, 0, sizeof(*iter));memset (&devargs,0 ,sizeof (devargs)); +rte_eth_trace_iterator_init (iter, devargs_str); +/* * The devargs string may use various syntaxes: * - 0000:08:00.0,representor=[1-3]
lib/ethdev/rte_ethdev.c +3
-0@@ -283,6 +285,8 @@ rte_eth_iterator_next(struct rte_dev_iterator *iter)if (iter->cls ==NULL )/* invalid ethdev iterator */ return RTE_MAX_ETHPORTS ; +rte_eth_trace_iterator_next (iter); + do { /* loop to try all matching rte_device */ /* If not pure ethdev filter and */ if (iter->bus != NULL &&@@ -316,6 +320,7 @@ rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)if (iter->bus_str ==NULL )return ;/* nothing to free in pure class filter */ +rte_eth_trace_iterator_cleanup (iter);free (RTE_CAST_FIELD(iter ,bus_str ,char *));/* workaround const */ free (RTE_CAST_FIELD(iter ,cls_str ,char *));/* workaround const */ memset(iter, 0, sizeof(*iter));lib/ethdev/rte_ethdev.c +3
-0@@ -331,6 +336,7 @@ rte_eth_find_next(uint16_t port_id)if (port_id >=RTE_MAX_ETHPORTS )return RTE_MAX_ETHPORTS ; +rte_eth_trace_find_next (port_id);return port_id; }@@ -351,6 +357,7 @@ rte_eth_find_next_of(uint16_t port_id, const struct rte_device *parent) rte_eth_devices[port_id].device != parent) port_id =rte_eth_find_next (port_id +1 ); +rte_eth_trace_find_next_of (port_id, parent);return port_id; }@@ -358,6 +365,7 @@ uint16_t rte_eth_find_next_sibling(uint16_t port_id, uint16_t ref_port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (ref_port_id, RTE_MAX_ETHPORTS); +rte_eth_trace_find_next_sibling (port_id, ref_port_id);return rte_eth_find_next_of (port_id, rte_eth_devices[ref_port_id].device);}
lib/ethdev/rte_ethdev.c +0
-0@@ -371,6 +379,7 @@ eth_dev_is_allocated(const struct rte_eth_dev *ethdev)int
rte_eth_dev_is_valid_port(uint16_t port_id)
{lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_is_valid_port (port_id);if (port_id >= RTE_MAX_ETHPORTS || (rte_eth_devices[port_id].state == RTE_ETH_DEV_UNUSED)) return 0;lib/ethdev/rte_ethdev.c +12
-0@@ -395,6 +404,7 @@ rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id) rte_eth_devices[port_id].data->owner.id != owner_id) port_id =rte_eth_find_next (port_id +1 ); +rte_eth_trace_find_next_owned_by (port_id, owner_id);return port_id; }@@ -413,6 +423,7 @@ rte_eth_dev_owner_new(uint64_t *owner_id) *owner_id = eth_dev_shared_data->next_owner_id++;rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_new (*owner_id);return 0 ; }@@ -476,6 +487,7 @@ rte_eth_dev_owner_set(const uint16_t port_id, ret =eth_dev_owner_set (port_id,RTE_ETH_DEV_NO_OWNER , owner);rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_set (port_id, owner, ret);return ret; }@@ -493,6 +505,7 @@ rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id) ret =eth_dev_owner_set (port_id, owner_id, &new_owner);rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_unset (port_id, owner_id, ret);return ret; }@@ -526,6 +539,7 @@ rte_eth_dev_owner_delete(const uint64_t owner_id)rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_delete (owner_id, ret);return ret; }@@ -555,6 +569,7 @@ rte_eth_dev_owner_get(const uint16_t port_id, struct rte_eth_dev_owner *owner) rte_memcpy(owner, ðdev->data->owner, sizeof(*owner));rte_spinlock_unlock (ð_dev_shared_data->ownership_lock); +rte_ethdev_trace_owner_get (port_id, owner);return 0 ; }@@ -562,6 +577,7 @@ int rte_eth_dev_socket_id(uint16_t port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id,-1 ); +rte_ethdev_trace_socket_id (port_id);return rte_eth_devices[port_id].data->numa_node; }@@ -569,6 +585,7 @@ void * rte_eth_dev_get_sec_ctx(uint16_t port_id) {RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id,NULL ); +rte_ethdev_trace_get_sec_ctx (port_id);return rte_eth_devices[port_id].security_ctx; }@@ -583,6 +600,7 @@ rte_eth_dev_count_avail(void)RTE_ETH_FOREACH_DEV (p) count++; +rte_ethdev_trace_count_avail (count);return count; }@@ -594,6 +612,7 @@ rte_eth_dev_count_total(void)RTE_ETH_FOREACH_VALID_DEV (port) count++; +rte_ethdev_trace_count_total (count);return count; }@@ -614,6 +633,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id,char *name) * because it might be overwritten by VDEV PMD */ tmp = eth_dev_shared_data->data[port_id].name;strcpy (name, tmp); +rte_ethdev_trace_get_name_by_port (port_id, name);return 0 ; }@@ -636,6 +656,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)RTE_ETH_FOREACH_VALID_DEV (pid ) if (!strcmp(name, eth_dev_shared_data->data[pid].name)) { *port_id = pid; +rte_ethdev_trace_get_port_by_name (name, *port_id);return 0 ;}lib/ethdev/rte_ethdev.c +1
-0@@ -737,6 +758,7 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_start (port_id, rx_queue_id);return eth_err (port_id, dev->dev_ops->rx_queue_start (dev, rx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -770,6 +792,7 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_stop (port_id, rx_queue_id);return eth_err (port_id, dev->dev_ops->rx_queue_stop (dev, rx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -810,6 +833,7 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_start (port_id, tx_queue_id);return eth_err (port_id, dev->dev_ops->tx_queue_start (dev, tx_queue_id));}
lib/ethdev/rte_ethdev.c +1
-0@@ -843,12 +867,14 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_stop (port_id, tx_queue_id);return eth_err (port_id, dev->dev_ops->tx_queue_stop (dev, tx_queue_id)); }
uint32_trte_eth_speed_bitflag(uint32_t speed, int duplex)
{lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_speed_bitflag (speed, duplex);switch (speed) { case RTE_ETH_SPEED_NUM_10M: return duplex ? RTE_ETH_LINK_SPEED_10M :
RTE_ETH_LINK_SPEED_10M_HD;lib/ethdev/rte_ethdev.c +9
-0@@ -894,6 +920,7 @@ rte_eth_dev_rx_offload_name(uint64_t offload) } } +rte_ethdev_trace_rx_offload_name (offload, name);return name; }@@ -910,6 +937,7 @@ rte_eth_dev_tx_offload_name(uint64_t offload) } } +rte_ethdev_trace_tx_offload_name (offload, name);return name; }@@ -926,6 +954,7 @@ rte_eth_dev_capability_name(uint64_t capability) } } +rte_ethdev_trace_capability_name (capability, name);return name; }@@ -1552,6 +1581,7 @@ rte_eth_dev_set_link_up(uint16_t port_id)if (*dev->dev_ops->dev_set_link_up ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_up (port_id);return eth_err (port_id, (*dev->dev_ops->dev_set_link_up)(dev)); }@@ -1565,6 +1595,7 @@ rte_eth_dev_set_link_down(uint16_t port_id)if (*dev->dev_ops->dev_set_link_down ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_down (port_id);return eth_err (port_id, (*dev->dev_ops->dev_set_link_down)(dev)); }@@ -1621,6 +1652,7 @@ rte_eth_dev_reset(uint16_t port_id) port_id, rte_strerror(-ret)); } ret = dev->dev_ops->dev_reset (dev); +rte_ethdev_trace_reset (port_id, ret);return eth_err (port_id, ret); }@@ -1645,6 +1677,7 @@ rte_eth_dev_is_removed(uint16_t port_id)/* Device is physically removed. */ dev->state =RTE_ETH_DEV_REMOVED ; +rte_ethdev_trace_is_removed (port_id, ret);return ret; }@@ -1984,6 +2017,8 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id,uint16_t rx_queue_id, if (ret == 0) dev->data->rx_queue_state[rx_queue_id] =RTE_ETH_QUEUE_STATE_HAIRPIN ; +rte_eth_trace_rx_hairpin_queue_setup (port_id, rx_queue_id, nb_rx_desc, + conf, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +1
-0@@ -2151,6 +2186,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id,uint16_t tx_queue_id, if (ret == 0) dev->data->tx_queue_state[tx_queue_id] =RTE_ETH_QUEUE_STATE_HAIRPIN ; +rte_eth_trace_tx_hairpin_queue_setup (port_id, tx_queue_id, nb_tx_desc, conf, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +3
-0@@ -2176,6 +2212,7 @@ rte_eth_hairpin_bind(uint16_t tx_port, uint16_t rx_port)" to Rx %d (%d - all ports)\n" , tx_port, rx_port, RTE_MAX_ETHPORTS); +rte_eth_trace_hairpin_bind (tx_port, rx_port, ret);return ret; }@@ -2201,6 +2238,7 @@ rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port)" from Rx %d (%d - all ports)\n" , tx_port, rx_port, RTE_MAX_ETHPORTS); +rte_eth_trace_hairpin_unbind (tx_port, rx_port, ret);return ret; }@@ -2237,6 +2275,7 @@ rte_eth_hairpin_get_peer_ports(uint16_t port_id,uint16_t *peer_ports, RTE_ETHDEV_LOG(ERR, "Failed to get %d hairpin peer %s ports\n", port_id, direction ? "Rx" : "Tx"); +rte_eth_trace_hairpin_get_peer_ports (port_id, peer_ports, len, direction, ret);return ret; }lib/ethdev/rte_ethdev.c +2
-0@@ -2244,6 +2283,7 @@ void rte_eth_tx_buffer_drop_callback(struct rte_mbuf **pkts, uint16_t unsent, void *userdata __rte_unused) { +rte_eth_trace_tx_buffer_drop_callback (pkts ,unsent );rte_pktmbuf_free_bulk (pkts, unsent); }@@ -2255,6 +2295,7 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,rte_pktmbuf_free_bulk (pkts, unsent); *count += unsent; +rte_eth_trace_tx_buffer_count_callback (pkts, unsent, *count); }int
lib/ethdev/rte_ethdev.c +1
-0@@ -2267,6 +2308,7 @@ rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, return -EINVAL ; } +rte_eth_trace_tx_buffer_set_err_callback (buffer, cbfn, userdata); buffer->error_callback = cbfn; buffer->error_userdata = userdata;return 0;lib/ethdev/rte_ethdev.c +2
-0@@ -2288,6 +2330,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size) buffer, rte_eth_tx_buffer_drop_callback, NULL); } +rte_eth_trace_tx_buffer_init (buffer, size, ret);return ret; }@@ -2306,6 +2349,7 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)/* Call driver to free pending mbufs. */ ret = (*dev->dev_ops->tx_done_cleanup)(dev->data- >tx_queues[queue_id], free_cnt); +rte_eth_trace_tx_done_cleanup (port_id, queue_id, free_cnt, ret);return eth_err (port_id, ret);}
lib/ethdev/rte_ethdev.c +8
-0@@ -2327,6 +2371,7 @@ rte_eth_promiscuous_enable(uint16_t port_id) diag = (*dev->dev_ops->promiscuous_enable)(dev); dev->data->promiscuous = (diag ==0 ) ?1 :0 ; +rte_eth_trace_promiscuous_enable (port_id, dev->data- >promiscuous);return eth_err (port_id, diag); }@@ -2350,6 +2395,7 @@ rte_eth_promiscuous_disable(uint16_t port_id)if (diag !=0 ) dev->data->promiscuous =1 ; +rte_eth_trace_promiscuous_disable (port_id, dev->data- >promiscuous);return eth_err (port_id, diag); }@@ -2361,6 +2407,7 @@ rte_eth_promiscuous_get(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_promiscuous_get (port_id, dev->data->promiscuous);return dev->data->promiscuous; }@@ -2381,6 +2428,7 @@ rte_eth_allmulticast_enable(uint16_t port_id) diag = (*dev->dev_ops->allmulticast_enable)(dev); dev->data->all_multicast = (diag ==0 ) ?1 :0 ; +rte_eth_trace_allmulticast_enable (port_id, dev->data->all_multicast);return eth_err (port_id, diag); }@@ -2403,6 +2451,7 @@ rte_eth_allmulticast_disable(uint16_t port_id)if (diag !=0 ) dev->data->all_multicast =1 ; +rte_eth_trace_allmulticast_disable (port_id, dev->data->all_multicast);return eth_err (port_id, diag); }@@ -2414,6 +2463,7 @@ rte_eth_allmulticast_get(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_allmulticast_get (port_id, dev->data->all_multicast);return dev->data->all_multicast; }@@ -2440,6 +2490,7 @@ rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link) *eth_link = dev->data->dev_link; } +rte_eth_trace_link_get (port_id, eth_link);return 0 ; }@@ -2466,12 +2517,14 @@ rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link) *eth_link = dev->data->dev_link; } +rte_eth_trace_link_get_nowait (port_id, eth_link);return 0 ; }const char *
rte_eth_link_speed_to_str(uint32_t link_speed)
{lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_link_speed_to_str (link_speed);switch (link_speed) { case RTE_ETH_SPEED_NUM_NONE: return "None"; case RTE_ETH_SPEED_NUM_10M: return "10 Mbps";lib/ethdev/rte_ethdev.c +1
-0@@ -2511,6 +2564,7 @@ rte_eth_link_to_str(char *str, size_t len, const struct rte_eth_link *eth_link)return -EINVAL ; } +rte_eth_trace_link_to_str (str, len, eth_link);if (eth_link->link_status ==RTE_ETH_LINK_DOWN )return snprintf (str, len,"Link down" );else
lib/ethdev/rte_ethdev.c +3
-0@@ -2541,6 +2595,7 @@ rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)if (*dev->dev_ops->stats_get ==NULL )return -ENOTSUP ; stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed; +rte_eth_trace_stats_get (port_id, stats);return eth_err (port_id, (*dev->dev_ops->stats_get)(dev, stats)); }@@ -2561,6 +2616,7 @@ rte_eth_stats_reset(uint16_t port_id) dev->data->rx_mbuf_alloc_failed =0 ; +rte_eth_trace_stats_reset (port_id);return 0 ; }@@ -2625,6 +2681,7 @@ rte_eth_xstats_get_id_by_name(uint16_t port_id,const char *xstat_name, return -ENOMEM; } +rte_eth_trace_xstats_get_id_by_name (port_id, xstat_name, id);/* Get count */ cnt_xstats =rte_eth_xstats_get_names_by_id (port_id,NULL ,0 ,NULL );if (cnt_xstats < 0) {lib/ethdev/rte_ethdev.c +2
-0@@ -2797,6 +2854,8 @@ rte_eth_xstats_get_names_by_id(uint16_t port_id,return -1 ; } xstats_names[i] = xstats_names_copy[ids[i]]; +rte_eth_trace_xstats_get_names_by_id (port_id, &xstats_names[i], + ids[i]); }free(xstats_names_copy);lib/ethdev/rte_ethdev.c +5
-0@@ -2836,6 +2895,7 @@ rte_eth_xstats_get_names(uint16_t port_id, cnt_used_entries += cnt_driver_entries; } +rte_eth_trace_xstats_get_names (port_id, xstats_names, size, cnt_used_entries);return cnt_used_entries; }@@ -2985,6 +3045,7 @@ rte_eth_xstats_get_by_id(uint16_t port_id, constuint64_t *ids, } values[i] = xstats[ids[i]].value; } +rte_eth_trace_xstats_get_by_id (port_id, ids, values, size);return size; }@@ -3032,6 +3093,8 @@ rte_eth_xstats_get(uint16_t port_id, structrte_eth_xstat *xstats, for ( ; i < count + xcount; i++) xstats[i].id += count; +for (i =0 ; i < n; i++) +rte_eth_trace_xstats_get (port_id, xstats[i], i);return count + xcount; }@@ -3044,6 +3107,7 @@ rte_eth_xstats_reset(uint16_t port_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); dev = &rte_eth_devices[port_id]; +rte_eth_trace_xstats_reset (port_id);/* implemented by the driver */ if (dev->dev_ops->xstats_reset !=NULL )return eth_err (port_id, (*dev->dev_ops->xstats_reset)(dev));@@ -3079,6 +3143,8 @@ intrte_eth_dev_set_tx_queue_stats_mapping(uint16_t
port_id,uint16_ttx_queue_id,
uint8_tstat_idx)
{lib/ethdev/rte_ethdev.c +2
-0+rte_ethdev_trace_set_tx_queue_stats_mapping (port_id, tx_queue_id, + stat_idx);return eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id, tx_queue_id, stat_idx, STAT_QMAP_TX));lib/ethdev/rte_ethdev.c +0
-0@@ -3088,6 +3154,8 @@ intrte_eth_dev_set_rx_queue_stats_mapping(uint16_t
port_id,uint16_trx_queue_id,
uint8_tstat_idx)
{lib/ethdev/rte_ethdev.c +1
-0+ rte_ethdev_trace_set_rx_queue_stats_mapping(port_id,
rx_queue_id,lib/ethdev/rte_ethdev.c +1
-0+ stat_idx);return eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id, rx_queue_id, stat_idx, STAT_QMAP_RX));lib/ethdev/rte_ethdev.c +1
-0@@ -3110,6 +3178,7 @@ rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)if (*dev->dev_ops->fw_version_get ==NULL )return -ENOTSUP ; +rte_ethdev_trace_fw_version_get (port_id, fw_version, fw_size);return eth_err (port_id, (*dev->dev_ops->fw_version_get)(dev, fw_version, fw_size));}
lib/ethdev/rte_ethdev.c +2
-0@@ -3171,6 +3240,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) dev_info->dev_flags = &dev->data->dev_flags; +rte_ethdev_trace_info_get (port_id, dev_info);return 0 ; }@@ -3191,6 +3261,7 @@ rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf) memcpy(dev_conf, &dev->data->dev_conf, sizeof(structrte_eth_conf )); +rte_ethdev_trace_conf_get (port_id, dev_conf);return 0 ;}
lib/ethdev/rte_ethdev.c +1
-0@@ -3226,6 +3297,7 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask, j++; } +rte_ethdev_trace_get_supported_ptypes (port_id, ptype_mask, ptypes, num, j);return j;}
lib/ethdev/rte_ethdev.c +1
-0@@ -3310,6 +3382,7 @@ rte_eth_dev_set_ptypes(uint16_t port_id, uint32_t ptype_mask, if (set_ptypes != NULL && j < num) set_ptypes[j] =RTE_PTYPE_UNKNOWN ; +rte_ethdev_trace_set_ptypes (port_id, ptype_mask, set_ptypes, num);return (*dev->dev_ops->dev_ptypes_set)(dev, ptype_mask);
ptype_unknown:lib/ethdev/rte_ethdev.c +2
-0@@ -3341,6 +3414,7 @@ rte_eth_macaddrs_get(uint16_t port_id, structrte_ether_addr *ma, num =RTE_MIN (dev_info.max_mac_addrs, num);memcpy (ma, dev->data->mac_addrs, num *sizeof (ma[0 ])); +rte_eth_trace_macaddrs_get (port_id, ma, num);return num; }@@ -3359,6 +3433,7 @@ rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)return -EINVAL ; } +rte_eth_trace_macaddr_get (port_id, mac_addr);rte_ether_addr_copy (&dev->data->mac_addrs[0 ], mac_addr);return 0;lib/ethdev/rte_ethdev.c +4
-0@@ -3379,6 +3454,7 @@ rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu) } *mtu = dev->data->mtu; +rte_ethdev_trace_get_mtu (port_id, *mtu);return 0 ; }@@ -3421,6 +3497,7 @@ rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)if (ret ==0 ) dev->data->mtu = mtu; +rte_ethdev_trace_set_mtu (port_id, mtu, ret);return eth_err (port_id, ret); }@@ -3464,6 +3541,7 @@ rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on) vfc->ids[vidx] &= ~RTE_BIT64 (vbit); } +rte_ethdev_trace_vlan_filter (port_id, vlan_id, on, ret);return eth_err (port_id, ret); }@@ -3483,6 +3561,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, if (*dev->dev_ops->vlan_strip_queue_set == NULL) return -ENOTSUP; +rte_ethdev_trace_set_vlan_strip_on_queue (port_id, rx_queue_id, on); (*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on);return 0;lib/ethdev/rte_ethdev.c +1
-0@@ -3500,6 +3579,7 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,if (*dev->dev_ops->vlan_tpid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_ether_type (port_id, vlan_type, tpid);return eth_err (port_id, (*dev->dev_ops->vlan_tpid_set)(dev, vlan_type, tpid));}
lib/ethdev/rte_ethdev.c +3
-0@@ -3593,6 +3673,7 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask) dev->data->dev_conf.rxmode.offloads = orig_offloads; } +rte_ethdev_trace_set_vlan_offload (port_id, offload_mask, ret);return eth_err (port_id, ret); }@@ -3619,6 +3700,7 @@ rte_eth_dev_get_vlan_offload(uint16_t port_id)if (*dev_offloads &RTE_ETH_RX_OFFLOAD_QINQ_STRIP ) ret |=RTE_ETH_QINQ_STRIP_OFFLOAD ; +rte_ethdev_trace_get_vlan_offload (port_id, ret);return ret; }@@ -3632,6 +3714,7 @@ rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)if (*dev->dev_ops->vlan_pvid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_pvid (port_id, pvid, on);return eth_err (port_id, (*dev->dev_ops->vlan_pvid_set)(dev, pvid, on));}
lib/ethdev/rte_ethdev.c +1
-0@@ -3653,6 +3736,7 @@ rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)if (*dev->dev_ops->flow_ctrl_get ==NULL )return -ENOTSUP ;memset (fc_conf,0 ,sizeof (*fc_conf)); +rte_ethdev_trace_flow_ctrl_get (port_id, fc_conf);return eth_err (port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf));}
lib/ethdev/rte_ethdev.c +2
-0@@ -3678,6 +3762,7 @@ rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)if (*dev->dev_ops->flow_ctrl_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_flow_ctrl_set (port_id, fc_conf);return eth_err (port_id, (*dev->dev_ops->flow_ctrl_set)(dev, fc_conf)); }@@ -3702,6 +3787,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, return -EINVAL ; } +rte_ethdev_trace_priority_flow_ctrl_set (port_id, pfc_conf);/* High water, low water validation are device specific */ if (*dev->dev_ops->priority_flow_ctrl_set)return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_set)lib/ethdev/rte_ethdev.c +1
-0@@ -3774,6 +3860,7 @@ rte_eth_dev_priority_flow_ctrl_queue_info_get(uint16_t port_id, return -EINVAL; } +rte_ethdev_trace_priority_flow_ctrl_queue_info_get (port_id, pfc_queue_info);if (*dev->dev_ops->priority_flow_ctrl_queue_info_get)return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_queue_info_get)(dev, pfc_queue_info));lib/ethdev/rte_ethdev.c +2
-0@@ -3845,6 +3932,8 @@ rte_eth_dev_priority_flow_ctrl_queue_configure(uint16_t port_id, return ret; } +rte_ethdev_trace_priority_flow_ctrl_queue_configure (port_id, + pfc_queue_conf);if (*dev->dev_ops->priority_flow_ctrl_queue_config) return eth_err(port_id,(*dev->dev_ops-Quoted 1 line
priority_flow_ctrl_queue_config)(
lib/ethdev/rte_ethdev.c +1
-0@@ -3940,6 +4029,7 @@ rte_eth_dev_rss_reta_update(uint16_t port_id,if (*dev->dev_ops->reta_update ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_reta_update (port_id, reta_conf, reta_size);return eth_err (port_id, (*dev->dev_ops->reta_update)(dev, reta_conf, reta_size));}
lib/ethdev/rte_ethdev.c +4
-0@@ -3969,6 +4059,7 @@ rte_eth_dev_rss_reta_query(uint16_t port_id,if (*dev->dev_ops->reta_query ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_reta_query (port_id, reta_conf, reta_size);return eth_err (port_id, (*dev->dev_ops->reta_query)(dev, reta_conf, reta_size)); }@@ -4014,6 +4105,7 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,if (*dev->dev_ops->rss_hash_update ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_hash_update (port_id, rss_conf);return eth_err (port_id, (*dev->dev_ops->rss_hash_update)(dev, rss_conf)); }@@ -4036,6 +4128,7 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id,if (*dev->dev_ops->rss_hash_conf_get ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rss_hash_conf_get (port_id, rss_conf);return eth_err (port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, rss_conf)); }@@ -4063,6 +4156,7 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_add == NULL) return -ENOTSUP; +rte_ethdev_trace_udp_tunnel_port_add (port_id, udp_tunnel);return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, udp_tunnel));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4090,6 +4184,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_del == NULL) return -ENOTSUP; +rte_ethdev_trace_udp_tunnel_port_delete (port_id, udp_tunnel);return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, udp_tunnel));}
lib/ethdev/rte_ethdev.c +9
-0@@ -4104,6 +4199,7 @@ rte_eth_led_on(uint16_t port_id)if (*dev->dev_ops->dev_led_on ==NULL )return -ENOTSUP ; +rte_eth_trace_led_on (port_id);return eth_err (port_id, (*dev->dev_ops->dev_led_on)(dev)); }@@ -4117,6 +4213,7 @@ rte_eth_led_off(uint16_t port_id)if (*dev->dev_ops->dev_led_off ==NULL )return -ENOTSUP ; +rte_eth_trace_led_off (port_id);return eth_err (port_id, (*dev->dev_ops->dev_led_off)(dev)); }@@ -4142,6 +4239,7 @@ rte_eth_fec_get_capability(uint16_t port_id,return -ENOTSUP ; ret = (*dev->dev_ops->fec_get_capability)(dev, speed_fec_capa, num); +rte_eth_trace_fec_get_capability (port_id, speed_fec_capa, num, ret);return ret; }@@ -4162,6 +4260,7 @@ rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa)if (*dev->dev_ops->fec_get ==NULL )return -ENOTSUP ; +rte_eth_trace_fec_get (port_id, fec_capa);return eth_err (port_id, (*dev->dev_ops->fec_get)(dev, fec_capa)); }@@ -4175,6 +4274,7 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)if (*dev->dev_ops->fec_set ==NULL )return -ENOTSUP ; +rte_eth_trace_fec_set (port_id, fec_capa);return eth_err (port_id, (*dev->dev_ops->fec_set)(dev, fec_capa)); }@@ -4252,6 +4352,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id,struct rte_ether_addr *addr, return 0; } +rte_ethdev_trace_mac_addr_add (port_id, addr, pool);/* Update NIC */ ret = (*dev->dev_ops->mac_addr_add)(dev, addr, index, pool);@@ -4294,6 +4395,7 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) }else if (index <0 )return 0 ;/* Do nothing if address wasn't found */ +rte_ethdev_trace_mac_addr_remove (port_id, addr);/* Update NIC */ (*dev->dev_ops->mac_addr_remove)(dev, index);@@ -4329,6 +4431,7 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)return -ENOTSUP ; ret = (*dev->dev_ops->mac_addr_set)(dev, addr); +rte_ethdev_trace_default_mac_addr_set (port_id, addr, ret);if (ret <0 )return ret;@@ -4415,6 +4518,7 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, if (*dev->dev_ops->uc_hash_table_set == NULL) return -ENOTSUP; ret = (*dev->dev_ops->uc_hash_table_set)(dev, addr, on); +rte_ethdev_trace_uc_hash_table_set (port_id, addr, on, ret);if (ret ==0 ) {/* Update address in NIC data structure */ if (on)lib/ethdev/rte_ethdev.c +1
-0@@ -4438,6 +4542,7 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)if (*dev->dev_ops->uc_all_hash_table_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_uc_all_hash_table_set (port_id, on);return eth_err (port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, on));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4475,6 +4580,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, if (*dev->dev_ops->set_queue_rate_limit == NULL) return -ENOTSUP; +rte_eth_trace_set_queue_rate_limit (port_id, queue_idx, tx_rate);return eth_err (port_id, (*dev->dev_ops->set_queue_rate_limit)(dev, queue_idx, tx_rate));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4502,6 +4608,7 @@ int rte_eth_rx_avail_thresh_set(uint16_t port_id, uint16_t queue_id, }if (*dev->dev_ops->rx_queue_avail_thresh_set ==NULL )return -ENOTSUP ; +rte_eth_trace_rx_avail_thresh_set (port_id, queue_id, avail_thresh); return eth_err(port_id, (*dev->dev_ops- >rx_queue_avail_thresh_set)(dev,
queue_id,avail_thresh));
}lib/ethdev/rte_ethdev.c +1
-0@@ -4521,6 +4628,7 @@ int rte_eth_rx_avail_thresh_query(uint16_t port_id, uint16_t *queue_id, if (*dev->dev_ops->rx_queue_avail_thresh_query == NULL) return -ENOTSUP; +rte_eth_trace_rx_avail_thresh_query (port_id, *queue_id); return eth_err(port_id, (*dev->dev_ops- >rx_queue_avail_thresh_query)(dev,
queue_id,avail_thresh));
}lib/ethdev/rte_ethdev.c +3
-0@@ -4570,6 +4678,9 @@ rte_eth_dev_callback_register(uint16_t port_id, next_port = last_port = port_id; } +rte_ethdev_trace_callback_register (port_id, event, cb_fn, cb_arg, next_port, + last_port); +rte_spinlock_lock (ð_dev_cb_lock);do {lib/ethdev/rte_ethdev.c +2
-0@@ -4665,6 +4776,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }while (++next_port <= last_port);rte_spinlock_unlock (ð_dev_cb_lock); +rte_ethdev_trace_callback_unregister (port_id, event, cb_fn, cb_arg, ret);return ret; }@@ -4694,6 +4806,7 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)for (qid =0 ; qid < dev->data->nb_rx_queues; qid++) { vec =rte_intr_vec_list_index_get (intr_handle, qid); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl (port_id, epfd, op, data, rc);if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR,"p %u q %u Rx ctl error op %d epfd %d vec
%u\n",lib/ethdev/rte_ethdev.c +2
-0@@ -4737,6 +4850,7 @@ rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id) (vec - RTE_INTR_VEC_RXTX_OFFSET) : vec; fd = rte_intr_efds_index_get(intr_handle, efd_idx); +rte_ethdev_trace_rx_intr_ctl_q_get_fd (port_id, queue_id, fd);return fd; }@@ -4770,6 +4884,7 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id,uint16_t queue_id, vec =rte_intr_vec_list_index_get (intr_handle, queue_id); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl_q (port_id, queue_id, epfd, op, data, rc);if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR,"p %u q %u Rx ctl error op %d epfd %d vec %u\n",
lib/ethdev/rte_ethdev.c +3
-0@@ -4796,6 +4911,7 @@ rte_eth_dev_rx_intr_enable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_enable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_enable (port_id, queue_id);return eth_err (port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id)); }@@ -4815,6 +4931,7 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_disable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_disable (port_id, queue_id);return eth_err (port_id, (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id)); }@@ -4873,6 +4990,7 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_add_rx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +1
-0@@ -4912,6 +5030,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id,uint16_t queue_id, cb, __ATOMIC_RELEASE);rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_add_first_rx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +1
-0@@ -4971,6 +5090,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_tx_cb_lock); +rte_eth_trace_add_tx_callback (port_id, queue_id, fn, user_param, cb);return cb;}
lib/ethdev/rte_ethdev.c +5
-0@@ -5005,6 +5125,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_rx_cb_lock); +rte_eth_trace_remove_rx_callback (port_id, queue_id, user_cb, ret);return ret; }@@ -5039,6 +5160,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id, }rte_spinlock_unlock (ð_dev_tx_cb_lock); +rte_eth_trace_remove_tx_callback (port_id, queue_id, user_cb, ret);return ret; }@@ -5085,6 +5207,7 @@ rte_eth_rx_queue_info_get(uint16_t port_id,uint16_t queue_id, dev->dev_ops->rxq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->rx_queue_state[queue_id]; +rte_eth_trace_rx_queue_info_get (port_id, queue_id, qinfo);return 0 ; }@@ -5131,6 +5254,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id,uint16_t queue_id, dev->dev_ops->txq_info_get(dev, queue_id, qinfo); qinfo->queue_state = dev->data->tx_queue_state[queue_id]; +rte_eth_trace_tx_queue_info_get (port_id, queue_id, qinfo);return 0 ; }@@ -5158,6 +5282,7 @@ rte_eth_rx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->rx_burst_mode_get == NULL) return -ENOTSUP;memset (mode,0 ,sizeof (*mode)); +rte_eth_trace_rx_burst_mode_get (port_id, queue_id, mode); return eth_err(port_id, dev->dev_ops->rx_burst_mode_get(dev, queue_id,mode));
}lib/ethdev/rte_ethdev.c +1
-0@@ -5186,6 +5311,7 @@ rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->tx_burst_mode_get == NULL) return -ENOTSUP;memset (mode,0 ,sizeof (*mode)); +rte_eth_trace_tx_burst_mode_get (port_id, queue_id, mode); return eth_err(port_id, dev->dev_ops->tx_burst_mode_get(dev, queue_id,mode));
}lib/ethdev/rte_ethdev.c +1
-0@@ -5213,6 +5339,7 @@ rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id, if (*dev->dev_ops->get_monitor_addr == NULL) return -ENOTSUP; +rte_eth_trace_get_monitor_addr (port_id, queue_id, pmc); return eth_err(port_id, dev->dev_ops->get_monitor_addr(dev->data-Quoted 1 line
rx_queues[queue_id], pmc));
}
lib/ethdev/rte_ethdev.c +1
-0@@ -5229,6 +5356,7 @@ rte_eth_dev_set_mc_addr_list(uint16_t port_id,if (*dev->dev_ops->set_mc_addr_list ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_mc_addr_list (port_id, mc_addr_set, nb_mc_addr);return eth_err (port_id, dev->dev_ops->set_mc_addr_list (dev, mc_addr_set, nb_mc_addr));}
lib/ethdev/rte_ethdev.c +3
-0@@ -5243,6 +5371,7 @@ rte_eth_timesync_enable(uint16_t port_id)if (*dev->dev_ops->timesync_enable ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_enable (port_id);return eth_err (port_id, (*dev->dev_ops->timesync_enable)(dev)); }@@ -5256,6 +5385,7 @@ rte_eth_timesync_disable(uint16_t port_id)if (*dev->dev_ops->timesync_disable ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_disable (port_id);return eth_err (port_id, (*dev->dev_ops->timesync_disable)(dev)); }@@ -5277,6 +5407,7 @@ rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp, if (*dev->dev_ops->timesync_read_rx_timestamp == NULL) return -ENOTSUP; +rte_eth_trace_timesync_read_rx_timestamp (port_id, timestamp, flags); return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
timesync_read_rx_timestamp)(dev, timestamp, flags)); }lib/ethdev/rte_ethdev.c +1
-0@@ -5299,6 +5430,7 @@ rte_eth_timesync_read_tx_timestamp(uint16_t port_id, if (*dev->dev_ops->timesync_read_tx_timestamp == NULL) return -ENOTSUP; +rte_eth_trace_timesync_read_tx_timestamp (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops- >timesync_read_tx_timestamp)(dev, timestamp)); }lib/ethdev/rte_ethdev.c +1
-0@@ -5313,6 +5445,7 @@ rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)if (*dev->dev_ops->timesync_adjust_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_adjust_time (port_id, delta);return eth_err (port_id, (*dev->dev_ops->timesync_adjust_time)(dev, delta));}
lib/ethdev/rte_ethdev.c +1
-0@@ -5333,6 +5466,7 @@ rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp)if (*dev->dev_ops->timesync_read_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_read_time (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops->timesync_read_time)(dev, timestamp));}
lib/ethdev/rte_ethdev.c +1
-0@@ -5354,6 +5488,7 @@ rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp)if (*dev->dev_ops->timesync_write_time ==NULL )return -ENOTSUP ; +rte_eth_trace_timesync_write_time (port_id, timestamp);return eth_err (port_id, (*dev->dev_ops->timesync_write_time)(dev, timestamp));}
lib/ethdev/rte_ethdev.c +9
-0@@ -5374,6 +5509,7 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *clock)if (*dev->dev_ops->read_clock ==NULL )return -ENOTSUP ; +rte_eth_trace_read_clock (port_id, clock);return eth_err (port_id, (*dev->dev_ops->read_clock)(dev, clock)); }@@ -5394,6 +5530,7 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)if (*dev->dev_ops->get_reg ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_reg_info (port_id, info);return eth_err (port_id, (*dev->dev_ops->get_reg)(dev, info)); }@@ -5407,6 +5544,7 @@ rte_eth_dev_get_eeprom_length(uint16_t port_id)if (*dev->dev_ops->get_eeprom_length ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_eeprom_length (port_id);return eth_err (port_id, (*dev->dev_ops->get_eeprom_length)(dev)); }@@ -5427,6 +5565,7 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->get_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_eeprom (port_id, info);return eth_err (port_id, (*dev->dev_ops->get_eeprom)(dev, info)); }@@ -5447,6 +5586,7 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->set_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_eeprom (port_id, info);return eth_err (port_id, (*dev->dev_ops->set_eeprom)(dev, info)); }@@ -5468,6 +5608,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,if (*dev->dev_ops->get_module_info ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_module_info (port_id, modinfo);return (*dev->dev_ops->get_module_info)(dev, modinfo); }@@ -5503,6 +5644,7 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,if (*dev->dev_ops->get_module_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_module_eeprom (port_id, info);return (*dev->dev_ops->get_module_eeprom)(dev, info); }@@ -5526,6 +5668,7 @@ rte_eth_dev_get_dcb_info(uint16_t port_id,if (*dev->dev_ops->get_dcb_info ==NULL )return -ENOTSUP ; +rte_ethdev_trace_get_dcb_info (port_id, dcb_info);return eth_err (port_id, (*dev->dev_ops->get_dcb_info)(dev, dcb_info)); }@@ -5562,6 +5705,7 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, if (nb_tx_desc != NULL)eth_dev_adjust_nb_desc (nb_tx_desc, &dev_info.tx_desc_lim); +rte_ethdev_trace_adjust_nb_rx_tx_desc (port_id, *nb_rx_desc, *nb_tx_desc);return 0; }lib/ethdev/rte_ethdev.c +4
-0@@ -5584,6 +5728,7 @@ rte_eth_dev_hairpin_capability_get(uint16_t port_id, if (*dev->dev_ops->hairpin_cap_get == NULL) return -ENOTSUP;memset (cap,0 ,sizeof (*cap)); +rte_ethdev_trace_hairpin_capability_get (port_id, cap);return eth_err (port_id, (*dev->dev_ops->hairpin_cap_get)(dev, cap)); }@@ -5605,6 +5750,7 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)if (*dev->dev_ops->pool_ops_supported ==NULL )return 1 ;/* all pools are supported */ +rte_ethdev_trace_pool_ops_supported (port_id, pool);return (*dev->dev_ops->pool_ops_supported)(dev, pool); }@@ -5901,6 +6047,7 @@ rte_eth_representor_info_get(uint16_t port_id,if (*dev->dev_ops->representor_info_get ==NULL )return -ENOTSUP ; +rte_eth_trace_representor_info_get (port_id, info);return eth_err (port_id, (*dev->dev_ops->representor_info_get)(dev, info)); }@@ -5924,6 +6071,7 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)return -EINVAL ; } +rte_eth_trace_rx_metadata_negotiate (port_id, features, *features);if (*dev->dev_ops->rx_metadata_negotiate ==NULL )return -ENOTSUP ;return eth_err(port_id,
lib/ethdev/rte_ethdev.c +1
-0@@ -5956,6 +6104,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id, return -ENOTSUP ;memset (reassembly_capa,0 ,sizeof (struct rte_eth_ip_reassembly_params )); +rte_eth_trace_ip_reassembly_capability_get (port_id, reassembly_capa);return eth_err(port_id, (*dev->dev_ops-Quoted 1 line
ip_reassembly_capability_get)(dev, reassembly_capa)); }lib/ethdev/rte_ethdev.c +3
-0@@ -5985,6 +6134,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,if (*dev->dev_ops->ip_reassembly_conf_get ==NULL )return -ENOTSUP ;memset (conf,0 ,sizeof (struct rte_eth_ip_reassembly_params )); +rte_eth_trace_ip_reassembly_conf_get (port_id, conf);return eth_err (port_id, (*dev->dev_ops->ip_reassembly_conf_get)(dev, conf)); }@@ -6022,6 +6172,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,if (*dev->dev_ops->ip_reassembly_conf_set ==NULL )return -ENOTSUP ; +rte_eth_trace_ip_reassembly_conf_set (port_id, conf);return eth_err (port_id, (*dev->dev_ops->ip_reassembly_conf_set)(dev, conf)); }@@ -6041,6 +6192,7 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)if (*dev->dev_ops->eth_dev_priv_dump ==NULL )return -ENOTSUP ; +rte_ethdev_trace_priv_dump (port_id);return eth_err (port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file)); }lib/ethdev/rte_ethdev_trace.h +109
-0@@ -88,6 +88,1200 @@ RTE_TRACE_POINT(rte_trace_point_emit_u16 (port_id); ) +RTE_TRACE_POINT ( + rte_eth_trace_add_first_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_add_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_rx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_add_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + rte_tx_callback_fn fn, void *user_param, + struct rte_eth_rxtx_callback *cb), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (fn); +rte_trace_point_emit_ptr (user_param); +rte_trace_point_emit_ptr (cb); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_eth_trace_allmulticast_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int all_multicast), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (all_multicast); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (mtu); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_adjust_nb_rx_tx_desc, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t nb_rx_desc, + uint16_t nb_tx_desc), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u16 (nb_tx_desc); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_callback_register, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, void *cb_arg, uint16_t next_port, + uint16_t last_port), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (event); +rte_trace_point_emit_ptr (cb_fn); +rte_trace_point_emit_ptr (cb_arg); +rte_trace_point_emit_u16 (next_port); +rte_trace_point_emit_u16 (last_port); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_callback_unregister, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_eth_event_type event, + rte_eth_dev_cb_fn cb_fn, void *cb_arg, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (event); +rte_trace_point_emit_ptr (cb_fn); +rte_trace_point_emit_ptr (cb_arg); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_default_mac_addr_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
*fc_conf),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fc_conf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
*fc_conf),lib/ethdev/rte_ethdev_trace.h +13
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (fc_conf->high_water); +rte_trace_point_emit_u32 (fc_conf->low_water); +rte_trace_point_emit_u16 (fc_conf->pause_time); +rte_trace_point_emit_u16 (fc_conf->send_xon); +rte_trace_point_emit_int (fc_conf->mode); +rte_trace_point_emit_u8 (fc_conf->mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (fc_conf->autoneg); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_fw_version_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *fw_version, size_t
fw_size),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fw_version); +rte_trace_point_emit_size_t (fw_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_dcb_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_dcb_info
*dcb_info),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (dcb_info); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct
rte_dev_eeprom_info*info),lib/ethdev/rte_ethdev_trace.h +46
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_eeprom_length, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_mtu, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t mtu), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (mtu); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_count_avail, + RTE_TRACE_POINT_ARGS(uint16_t count), + rte_trace_point_emit_u16(count); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_count_total, + RTE_TRACE_POINT_ARGS(uint16_t count), + rte_trace_point_emit_u16(count); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_name_by_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *name), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_port_by_name, + RTE_TRACE_POINT_ARGS(const char *name, uint16_t port_id), + rte_trace_point_emit_string(name); +rte_trace_point_emit_u16 (port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_get_reg_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_reg_info*info),
lib/ethdev/rte_ethdev_trace.h +65
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_sec_ctx, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_supported_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *ptypes, int num, int j), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (ptypes); +rte_trace_point_emit_int (num); +rte_trace_point_emit_int (j); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu); +rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen); +rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa); +rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size); +rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_removed, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_valid_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr,
lib/ethdev/rte_ethdev_trace.h +9
-0+ uint32_t pool), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u32 (pool); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_mac_addr_remove, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr),
lib/ethdev/rte_ethdev_trace.h +14
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (addr); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_pool_ops_supported, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pool); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_pfc_conf
*pfc_conf),lib/ethdev/rte_ethdev_trace.h +21
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (pfc_conf->fc.high_water); +rte_trace_point_emit_u32 (pfc_conf->fc.low_water); +rte_trace_point_emit_u16 (pfc_conf->fc.pause_time); +rte_trace_point_emit_u16 (pfc_conf->fc.send_xon); +rte_trace_point_emit_int (pfc_conf->fc.mode); +rte_trace_point_emit_u8 (pfc_conf->fc.mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (pfc_conf->fc.autoneg); +rte_trace_point_emit_u8 (pfc_conf->priority); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf->rss_key); +rte_trace_point_emit_u8 (rss_conf->rss_key_len); +rte_trace_point_emit_u64 (rss_conf->rss_hf); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t
reta_size),lib/ethdev/rte_ethdev_trace.h +9
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (reta_conf); +rte_trace_point_emit_u16 (reta_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_reta_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t
reta_size),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u64 (reta_conf->mask); +rte_trace_point_emit_u16 (reta_size); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int epfd, int op, void*data, int rc),
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_int (epfd); +rte_trace_point_emit_int (op); +rte_trace_point_emit_ptr (data); +rte_trace_point_emit_int (rc); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rx_intr_ctl_q, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, intepfd,
lib/ethdev/rte_ethdev_trace.h +55
-0+ int op, void *data, int rc), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_int (epfd); +rte_trace_point_emit_int (op); +rte_trace_point_emit_ptr (data); +rte_trace_point_emit_int (rc); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_ctl_q_get_fd, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, int fd), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_int (fd); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_intr_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_offload_name, + RTE_TRACE_POINT_ARGS(uint64_t offload, const char *name), + rte_trace_point_emit_u64(offload); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_queue_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rx_queue_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct
rte_dev_eeprom_info*info),lib/ethdev/rte_ethdev_trace.h +60
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info->data); +rte_trace_point_emit_u32 (info->offset); +rte_trace_point_emit_u32 (info->length); +rte_trace_point_emit_u32 (info->magic); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_link_down, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_link_up, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_mc_addr_list, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_ether_addr *mc_addr_set, + uint32_t nb_mc_addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (mc_addr_set); +rte_trace_point_emit_u32 (nb_mc_addr); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *set_ptypes, unsigned int num), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (set_ptypes); +rte_trace_point_emit_u32 (num); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_rx_queue_stats_mapping, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint8_t stat_idx), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u8 (stat_idx); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_tx_queue_stats_mapping, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id, + uint8_t stat_idx), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +rte_trace_point_emit_u8 (stat_idx); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_set_vlan_ether_type, + RTE_TRACE_POINT_ARGS(uint16_t port_id, enum rte_vlan_type
vlan_type,lib/ethdev/rte_ethdev_trace.h +68
-0+ uint16_t tag_type), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_int (vlan_type); +rte_trace_point_emit_u16 (tag_type); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int offload_mask, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (offload_mask); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_pvid, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t pvid, int on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (pvid); +rte_trace_point_emit_int (on); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_set_vlan_strip_on_queue, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + int on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_int (on); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_socket_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_offload_name, + RTE_TRACE_POINT_ARGS(uint64_t offload, const char *name), + rte_trace_point_emit_u64(offload); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_queue_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_tx_queue_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_uc_all_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint8_t on), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u8 (on); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_uc_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*addr,
lib/ethdev/rte_ethdev_trace.h +10
-0+ uint8_t on, int ret), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u8 (on); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_udp_tunnel
*tunnel_udp),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (tunnel_udp->udp_port); +rte_trace_point_emit_u8 (tunnel_udp->prot_type); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_udp_tunnel_port_delete, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_udp_tunnel
*tunnel_udp),lib/ethdev/rte_ethdev_trace.h +8
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (tunnel_udp->udp_port); +rte_trace_point_emit_u8 (tunnel_udp->prot_type); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_vlan_filter, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t vlan_id, int on,int ret),
lib/ethdev/rte_ethdev_trace.h +31
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u16 (vlan_id); +rte_trace_point_emit_int (on); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next_of, + RTE_TRACE_POINT_ARGS(uint16_t port_id_start, + const struct rte_device *parent), + rte_trace_point_emit_u16(port_id_start); +rte_trace_point_emit_ptr (parent); +) + +RTE_TRACE_POINT ( + rte_eth_trace_find_next_owned_by, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const uint64_t owner_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner_id); +) + +RTE_TRACE_POINT( + rte_eth_trace_find_next_sibling, + RTE_TRACE_POINT_ARGS(uint16_t port_id_start, uint16_t
ref_port_id),lib/ethdev/rte_ethdev_trace.h +13
-0+rte_trace_point_emit_u16 (port_id_start); +rte_trace_point_emit_u16 (ref_port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_iterator_cleanup, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter), + rte_trace_point_emit_ptr(iter); +) + +RTE_TRACE_POINT( + rte_eth_trace_iterator_init, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter, const char*devargs),
lib/ethdev/rte_ethdev_trace.h +39
-0+rte_trace_point_emit_ptr (iter); +rte_trace_point_emit_ptr (devargs); +) + +RTE_TRACE_POINT ( + rte_eth_trace_iterator_next, + RTE_TRACE_POINT_ARGS(struct rte_dev_iterator *iter), + rte_trace_point_emit_ptr(iter); +) + +RTE_TRACE_POINT ( + rte_eth_trace_led_off, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_led_on, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_get_nowait, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) + +RTE_TRACE_POINT( + rte_eth_trace_macaddr_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr
*mac_addr),lib/ethdev/rte_ethdev_trace.h +100
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (mac_addr); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_promiscuous_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int promiscuous), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (promiscuous); +) + +RTE_TRACE_POINT ( + rte_eth_trace_remove_rx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (user_cb); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_remove_tx_callback, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + const struct rte_eth_rxtx_callback *user_cb, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (user_cb); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (qinfo->mp); +rte_trace_point_emit_u8 (qinfo->scattered_rx); +rte_trace_point_emit_u8 (qinfo->queue_state); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u16 (qinfo->rx_buf_size); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, unsigned int socket_id, + const struct rte_eth_rxconf *rx_conf, + struct rte_mempool *mb_pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u32 (socket_id); +rte_trace_point_emit_ptr (rx_conf); +rte_trace_point_emit_ptr (mb_pool); +) + +RTE_TRACE_POINT ( + rte_eth_trace_set_queue_rate_limit, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_idx, + uint16_t tx_rate), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_idx); +rte_trace_point_emit_u16 (tx_rate); +) + +RTE_TRACE_POINT ( + rte_eth_trace_speed_bitflag, + RTE_TRACE_POINT_ARGS(uint32_t speed, int duplex), + rte_trace_point_emit_u32(speed); +rte_trace_point_emit_int (duplex); +) + +RTE_TRACE_POINT( + rte_eth_trace_stats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_stats*stats),
lib/ethdev/rte_ethdev_trace.h +33
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (stats); +rte_trace_point_emit_u64 (stats->rx_nombuf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_stats_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_adjust_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int64_t delta), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_i64 (delta); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_disable, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_enable, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_read_rx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec*timestamp,
lib/ethdev/rte_ethdev_trace.h +16
-0+ uint32_t flags), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (timestamp); +rte_trace_point_emit_u32 (flags); +) + +RTE_TRACE_POINT ( + rte_eth_trace_timesync_read_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec *time), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (time); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_read_tx_timestamp, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct timespec*timestamp),
lib/ethdev/rte_ethdev_trace.h +7
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (timestamp); +) + +RTE_TRACE_POINT( + rte_eth_trace_timesync_write_time, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec*time),
lib/ethdev/rte_ethdev_trace.h +23
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (time); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_count_callback, + RTE_TRACE_POINT_ARGS(struct rte_mbuf **pkts, uint16_t unsent, + uint64_t count), + rte_trace_point_emit_ptr(pkts); +rte_trace_point_emit_u16 (unsent); +rte_trace_point_emit_u64 (count); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_drop_callback, + RTE_TRACE_POINT_ARGS(struct rte_mbuf **pkts, uint16_t unsent), + rte_trace_point_emit_ptr(pkts); +rte_trace_point_emit_u16 (unsent); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_buffer_init, + RTE_TRACE_POINT_ARGS(struct rte_eth_dev_tx_buffer *buffer,
uint16_tsize,lib/ethdev/rte_ethdev_trace.h +27
-0+ int ret), +rte_trace_point_emit_ptr (buffer ); +rte_trace_point_emit_u16 (size); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_buffer_set_err_callback, + RTE_TRACE_POINT_ARGS(struct rte_eth_dev_tx_buffer *buffer, + buffer_tx_error_fn callback, void *userdata), + rte_trace_point_emit_ptr(buffer); +rte_trace_point_emit_ptr (callback); +rte_trace_point_emit_ptr (userdata); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) + +RTE_TRACE_POINT( + rte_eth_trace_tx_done_cleanup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id,
uint32_tfree_cnt,lib/ethdev/rte_ethdev_trace.h +262
-0+ int ret), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u32 (free_cnt); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_txq_info *qinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u8 (qinfo->queue_state); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_xstat xstats, + int i), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (xstats.id); +rte_trace_point_emit_u64 (xstats.value); +rte_trace_point_emit_u32 (i); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_by_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const uint64_t *ids, + uint64_t *values, unsigned int size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (ids); +rte_trace_point_emit_ptr (values); +rte_trace_point_emit_u32 (size); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_id_by_name, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *xstat_name, + uint64_t *id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstat_name); +rte_trace_point_emit_ptr (id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_names, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_xstat_name *xstats_names, + unsigned int size, int cnt_used_entries), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstats_names->name); +rte_trace_point_emit_u32 (size); +rte_trace_point_emit_int (cnt_used_entries); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_get_names_by_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_xstat_name *xstats_names, uint64_t ids), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (xstats_names->name); +rte_trace_point_emit_u64 (ids); +) + +RTE_TRACE_POINT ( + rte_eth_trace_xstats_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_delete, + RTE_TRACE_POINT_ARGS(const uint64_t owner_id, int ret), + rte_trace_point_emit_u64(owner_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_get, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + struct rte_eth_dev_owner *owner), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner->id); +rte_trace_point_emit_string (owner->name); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_new, + RTE_TRACE_POINT_ARGS(uint64_t owner_id), + rte_trace_point_emit_u64(owner_id); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_set, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + const struct rte_eth_dev_owner *owner, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner->id); +rte_trace_point_emit_string (owner->name); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_owner_unset, + RTE_TRACE_POINT_ARGS(const uint16_t port_id, + const uint64_t owner_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (owner_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_module_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_dev_eeprom_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_get_module_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_module_info *modinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (modinfo); +) + +RTE_TRACE_POINT ( + rte_eth_trace_read_clock, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint64_t *clk), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (clk); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_hairpin_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_hairpin_cap *cap), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (cap); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_hairpin_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, const struct rte_eth_hairpin_conf *conf, + int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_ptr (conf); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_tx_hairpin_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id, + uint16_t nb_tx_desc, const struct rte_eth_hairpin_conf *conf, + int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (tx_queue_id); +rte_trace_point_emit_u16 (nb_tx_desc); +rte_trace_point_emit_ptr (conf); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_bind, + RTE_TRACE_POINT_ARGS(uint16_t tx_port, uint16_t rx_port, int ret), + rte_trace_point_emit_u16(tx_port); +rte_trace_point_emit_u16 (rx_port); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_get_peer_ports, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t *peer_ports, + size_t len, uint32_t direction, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (peer_ports); +rte_trace_point_emit_size_t (len); +rte_trace_point_emit_u32 (direction); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_hairpin_unbind, + RTE_TRACE_POINT_ARGS(uint16_t tx_port, uint16_t rx_port, int ret), + rte_trace_point_emit_u16(tx_port); +rte_trace_point_emit_u16 (rx_port); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_speed_to_str, + RTE_TRACE_POINT_ARGS(uint32_t link_speed), + rte_trace_point_emit_u32(link_speed); +) + +RTE_TRACE_POINT ( + rte_eth_trace_link_to_str, + RTE_TRACE_POINT_ARGS(char *str, size_t len, + const struct rte_eth_link *eth_link), + rte_trace_point_emit_ptr(str); +rte_trace_point_emit_size_t (len); +rte_trace_point_emit_ptr (eth_link); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_get_capability, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_fec_capa *speed_fec_capa, + unsigned int num, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (speed_fec_capa); +rte_trace_point_emit_u32 (num); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t *fec_capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (fec_capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_fec_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t fec_capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (fec_capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_get_monitor_addr, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_power_monitor_cond *pmc), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (pmc); +) + +RTE_TRACE_POINT ( + rte_eth_trace_representor_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_representor_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_capability_name, + RTE_TRACE_POINT_ARGS(uint64_t capability, const char *name), + rte_trace_point_emit_u64(capability); +rte_trace_point_emit_string (name); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_conf
*dev_conf),lib/ethdev/rte_ethdev_trace.h +11
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (dev_conf); +rte_trace_point_emit_u32 (dev_conf->link_speeds); +rte_trace_point_emit_u64 (dev_conf->rxmode.offloads); +rte_trace_point_emit_u64 (dev_conf->txmode.offloads); +rte_trace_point_emit_u32 (dev_conf->lpbk_mode); +) + +RTE_TRACE_POINT( + rte_eth_trace_macaddrs_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr*ma,
lib/ethdev/rte_ethdev_trace.h +80
-0+ unsigned int num), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_ptr (ma); +rte_trace_point_emit_u32 (num); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_metadata_negotiate, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint64_t *features, + uint64_t features_val), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (features); +rte_trace_point_emit_u64 (features_val); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priority_flow_ctrl_queue_configure, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_pfc_queue_conf *pfc_queue_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pfc_queue_conf); +rte_trace_point_emit_int (pfc_queue_conf->mode); +rte_trace_point_emit_u16 (pfc_queue_conf->rx_pause.tx_qid); +rte_trace_point_emit_u16 (pfc_queue_conf->tx_pause.rx_qid); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priority_flow_ctrl_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_pfc_queue_info *pfc_queue_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pfc_queue_info); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_priv_dump, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_capability_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_ip_reassembly_params *capa), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (capa); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_ip_reassembly_params *conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (conf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_ip_reassembly_conf_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + const struct rte_eth_ip_reassembly_params *conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (conf); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_avail_thresh_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +) + +RTE_TRACE_POINT ( + rte_eth_trace_rx_avail_thresh_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint8_t avail_thresh), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u8 (avail_thresh); +) +#ifdef
__cplusplus
}
#endiflib/ethdev/rte_ethdev_trace_fp.h +19
-0@@ -37,6 +37,25 @@ RTE_TRACE_POINT_FP(rte_trace_point_emit_u16 (nb_pkts); ) +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_rx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_rx, uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_rx); +rte_trace_point_emit_u16 (nb_pkts); +) + +RTE_TRACE_POINT_FP ( + rte_eth_trace_call_tx_callbacks, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_u16 (nb_pkts); +) + #ifdef __cplusplus }#endif lib/ethdev/version.map +144
-1@@ -319,4 +319,148 @@ INTERNAL { rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; + __rte_eth_trace_add_first_rx_callback; + __rte_eth_trace_add_rx_callback; + __rte_eth_trace_add_tx_callback; + __rte_eth_trace_allmulticast_disable; + __rte_eth_trace_allmulticast_enable; + __rte_eth_trace_allmulticast_get; + __rte_eth_trace_call_rx_callbacks; + __rte_eth_trace_call_tx_callbacks; + __rte_ethdev_trace_count_avail; + __rte_ethdev_trace_count_total; + __rte_ethdev_trace_set_mtu; + __rte_ethdev_trace_adjust_nb_rx_tx_desc; + __rte_ethdev_trace_callback_register; + __rte_ethdev_trace_callback_unregister; + __rte_ethdev_trace_default_mac_addr_set; + __rte_ethdev_trace_flow_ctrl_get; + __rte_ethdev_trace_flow_ctrl_set; + __rte_ethdev_trace_fw_version_get; + __rte_ethdev_trace_get_dcb_info; + __rte_ethdev_trace_get_eeprom; + __rte_ethdev_trace_get_eeprom_length; + __rte_ethdev_trace_get_mtu; + __rte_ethdev_trace_get_name_by_port; + __rte_ethdev_trace_get_port_by_name; + __rte_ethdev_trace_get_reg_info; + __rte_ethdev_trace_get_sec_ctx; + __rte_ethdev_trace_get_supported_ptypes; + __rte_ethdev_trace_get_vlan_offload; + __rte_ethdev_trace_info_get; + __rte_ethdev_trace_is_removed; + __rte_ethdev_trace_is_valid_port; + __rte_ethdev_trace_mac_addr_add; + __rte_ethdev_trace_mac_addr_remove; + __rte_ethdev_trace_pool_ops_supported; + __rte_ethdev_trace_priority_flow_ctrl_set; + __rte_ethdev_trace_reset; + __rte_ethdev_trace_rss_hash_conf_get; + __rte_ethdev_trace_rss_hash_update; + __rte_ethdev_trace_rss_reta_query; + __rte_ethdev_trace_rss_reta_update; + __rte_ethdev_trace_rx_intr_ctl; + __rte_ethdev_trace_rx_intr_ctl_q; + __rte_ethdev_trace_rx_intr_ctl_q_get_fd; + __rte_ethdev_trace_rx_intr_disable; + __rte_ethdev_trace_rx_intr_enable; + __rte_ethdev_trace_rx_offload_name; + __rte_ethdev_trace_rx_queue_start; + __rte_ethdev_trace_rx_queue_stop; + __rte_ethdev_trace_set_eeprom; + __rte_ethdev_trace_set_link_down; + __rte_ethdev_trace_set_link_up; + __rte_ethdev_trace_set_mc_addr_list; + __rte_ethdev_trace_set_ptypes; + __rte_ethdev_trace_set_rx_queue_stats_mapping; + __rte_ethdev_trace_set_tx_queue_stats_mapping; + __rte_ethdev_trace_set_vlan_ether_type; + __rte_ethdev_trace_set_vlan_offload; + __rte_ethdev_trace_set_vlan_pvid; + __rte_ethdev_trace_set_vlan_strip_on_queue; + __rte_ethdev_trace_socket_id; + __rte_ethdev_trace_tx_offload_name; + __rte_ethdev_trace_tx_queue_start; + __rte_ethdev_trace_tx_queue_stop; + __rte_ethdev_trace_uc_all_hash_table_set; + __rte_ethdev_trace_uc_hash_table_set; + __rte_ethdev_trace_udp_tunnel_port_add; + __rte_ethdev_trace_udp_tunnel_port_delete; + __rte_ethdev_trace_vlan_filter; + __rte_eth_trace_find_next; + __rte_eth_trace_find_next_of; + __rte_eth_trace_find_next_owned_by; + __rte_eth_trace_find_next_sibling; + __rte_eth_trace_iterator_cleanup; + __rte_eth_trace_iterator_init; + __rte_eth_trace_iterator_next; + __rte_eth_trace_led_off; + __rte_eth_trace_led_on; + __rte_eth_trace_link_get; + __rte_eth_trace_link_get_nowait; + __rte_eth_trace_macaddr_get; + __rte_eth_trace_promiscuous_disable; + __rte_eth_trace_promiscuous_enable; + __rte_eth_trace_promiscuous_get; + __rte_eth_trace_remove_rx_callback; + __rte_eth_trace_remove_tx_callback; + __rte_eth_trace_rx_burst_mode_get; + __rte_eth_trace_rx_queue_info_get; + __rte_eth_trace_rx_queue_setup; + __rte_eth_trace_set_queue_rate_limit; + __rte_eth_trace_speed_bitflag; + __rte_eth_trace_stats_get; + __rte_eth_trace_stats_reset; + __rte_eth_trace_timesync_adjust_time; + __rte_eth_trace_timesync_disable; + __rte_eth_trace_timesync_enable; + __rte_eth_trace_timesync_read_rx_timestamp; + __rte_eth_trace_timesync_read_time; + __rte_eth_trace_timesync_read_tx_timestamp; + __rte_eth_trace_timesync_write_time; + __rte_eth_trace_tx_buffer_count_callback; + __rte_eth_trace_tx_buffer_drop_callback; + __rte_eth_trace_tx_buffer_init; + __rte_eth_trace_tx_buffer_set_err_callback; + __rte_eth_trace_tx_burst_mode_get; + __rte_eth_trace_tx_done_cleanup; + __rte_eth_trace_tx_queue_info_get; + __rte_eth_trace_xstats_get; + __rte_eth_trace_xstats_get_by_id; + __rte_eth_trace_xstats_get_id_by_name; + __rte_eth_trace_xstats_get_names; + __rte_eth_trace_xstats_get_names_by_id; + __rte_eth_trace_xstats_reset; + __rte_ethdev_trace_owner_delete; + __rte_ethdev_trace_owner_get; + __rte_ethdev_trace_owner_new; + __rte_ethdev_trace_owner_set; + __rte_ethdev_trace_owner_unset; + __rte_ethdev_trace_get_module_eeprom; + __rte_ethdev_trace_get_module_info; + __rte_ethdev_trace_hairpin_capability_get; + __rte_eth_trace_rx_hairpin_queue_setup; + __rte_eth_trace_tx_hairpin_queue_setup; + __rte_eth_trace_hairpin_bind; + __rte_eth_trace_hairpin_get_peer_ports; + __rte_eth_trace_hairpin_unbind; + __rte_eth_trace_link_speed_to_str; + __rte_eth_trace_link_to_str; + __rte_eth_trace_fec_get_capability; + __rte_eth_trace_fec_get; + __rte_eth_trace_fec_set; + __rte_eth_trace_get_monitor_addr; + __rte_eth_trace_representor_info_get; + __rte_ethdev_trace_capability_name; + __rte_ethdev_trace_conf_get; + __rte_eth_trace_macaddrs_get; + __rte_eth_trace_rx_metadata_negotiate; + __rte_ethdev_trace_priority_flow_ctrl_queue_configure; + __rte_ethdev_trace_priority_flow_ctrl_queue_info_get; + __rte_ethdev_trace_priv_dump; + __rte_eth_trace_ip_reassembly_capability_get; + __rte_eth_trace_ip_reassembly_conf_get; + __rte_eth_trace_ip_reassembly_conf_set; + __rte_eth_trace_rx_avail_thresh_query; + __rte_eth_trace_rx_avail_thresh_set; }; --2.28.0
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 22 lines · Ankur Dwivedi
Quoted 8 lines
Yes the functions you mentioned in previous comment are called in while loop in worker core. So I think they are fastpath.
rte_eth_stats_get()is called in fastpath. Similar torte_eth_macaddr_get(), I think functions likerte_eth_promiscuous_get(),rte_eth_allmulticast_get()can also be called in fastpath.
I am not sure which other functions can be fastpath. Is there a guideline/theme which can be used to determine this?[Ankur] I will make the trace call in following functions as fast path trace, considering they are used in while loop in worker core or as rx/tx callback in examples applications.
rte_eth_tx_buffer_drop_callbackrte_eth_tx_buffer_count_callbackrte_eth_tx_done_cleanuprte_eth_macaddr_getrte_eth_timesync_read_rx_timestamprte_eth_timesync_read_tx_timestamprte_eth_timesync_adjust_timerte_eth_timesync_read_timerte_eth_timesync_write_timerte_eth_stats_getrte_flow_get_restore_inforte_eth_read_clock
Quoted 1 line
Please let me know your comments on the patch series.
Hi Ankur,
I agree that tracing should not cause performance degradation, but not all APIs in your list are for datapath, or for each packet (even called in datapath in sample app).
I would use fast path trace for following ones, but keep rest regular trace for rest:
fastpath
rte_eth_tx_buffer_drop_callback
rte_eth_tx_buffer_count_callback
rte_eth_tx_done_cleanup
btw, I am planning to review series today/tomorrow, so please hold a possible new version for a while.
Re: [PATCH v3 1/4] ethdev: add trace points
In reply to Ankur Dwivedilib/ethdev/version.map INTERNAL { · line 325
Quoted 12 lines · Ankur Dwivedi
lib/ethdev/version.map +4
-0@@ -319,4 +319,148 @@ INTERNAL { rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; + __rte_eth_trace_add_first_rx_callback; + __rte_eth_trace_add_rx_callback; + __rte_eth_trace_add_tx_callback; + __rte_eth_trace_allmulticast_disable;
These are not trace functions, but trace point objects, I see this is common usage in other libraries too, but can you please explain why we need to export the trace point objects from the .so file?
For some datapath functions, which are static inline functions, trace point objects are need to be accessible by application, it is OK to export them, but they are very limited, but I am not clear why exporting all of them is required.
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 20 lines · Ferruh Yigit
lib/ethdev/version.map INTERNAL { · line 325
Quoted 12 lines · Ankur Dwivedi
lib/ethdev/version.map +4
-0@@ -319,4 +319,148 @@ INTERNAL { rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; + __rte_eth_trace_add_first_rx_callback; + __rte_eth_trace_add_rx_callback; + __rte_eth_trace_add_tx_callback; + __rte_eth_trace_allmulticast_disable;These are not trace functions, but trace point objects, I see this is common usage in other libraries too, but can you please explain why we need to export the trace point objects from the .so file?
Quoted 4 lines
For some datapath functions, which are static inline functions, trace point objects are need to be accessible by application, it is OK to export them, but they are very limited, but I am not clear why exporting all of them is required.
There should be no need to export them.
The only usage I can think of is when calling a tracepoint from a public inline helper.
Signature · 1 line
David Marchand
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 21 lines · David Marchand
Quoted 20 lines · Ferruh Yigit
lib/ethdev/version.map INTERNAL { · line 325
Quoted 12 lines · Ankur Dwivedi
lib/ethdev/version.map +4
-0@@ -319,4 +319,148 @@ INTERNAL { rte_eth_representor_id_get; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; + __rte_eth_trace_add_first_rx_callback; + __rte_eth_trace_add_rx_callback; + __rte_eth_trace_add_tx_callback; + __rte_eth_trace_allmulticast_disable;These are not trace functions, but trace point objects, I see this is common usage in other libraries too, but can you please explain why we need to export the trace point objects from the .so file?
Quoted 9 lines
Quoted 4 lines
For some datapath functions, which are static inline functions, trace point objects are need to be accessible by application, it is OK to export them, but they are very limited, but I am not clear why exporting all of them is required.
There should be no need to export them.
The only usage I can think of is when calling a tracepoint from a public inline helper.
Like '__rte_ethdev_trace_rx_burst' & '__rte_ethdev_trace_tx_burst', which are used by 'rte_eth_rx_burst()' & 'rte_eth_tx_burst()' static inline functions.
Re: [PATCH v3 1/4] ethdev: add trace points
In reply to Ankur DwivediOn 10/6/2022 4:18 PM, Ankur Dwivedi wrote:
Hi Ankur, Jerin,
I have some major questions, I can see some already queried by Andrew as well:
1) How flexible are we on changing trace log output? Should we take trace log as kind of user interface and don't break it (as much as possible)? Or is it OK to change whenever we want?
2) What is the main purpose of the trace library.
Is it to record type and frequency of the calls? Or is it to log values and state of the device/driver after each call?
This can guide us to decide
- which values to record (should record only pointers or values of structs)
- if to record API return values and failure paths
- if to add tracing all APIs or not, like 'rte_eth_dev_rx_offload_name()' kind of helper function that converts offload to a string, which doesn't have any functional impact, or 'rte_eth_speed_bitflag()', and many more...
3) What is the runtime impact.
As far as I can see some values copied and some memory is used for this support, even user is not interested in tracing. For control path APIs we can ignore the additional cost by memcpy, but how big memory requirement is?
4) Why we need to export trace point variables in the .map files, like '__rte_eth_trace_allmulticast_disable' one...
5) (bonus Q) Can we have an 'rte_trace_point_emit_xx()' function to record mac address (struct rte_ether_addr) as string? And maybe another set for array types?
There are bunch of small comments inline, some are related to above highlevel question.
But I stopped after some point, specifically after 'rte_eth_trace_timesync_adjust_time()' :), this is a big file, splitting it may help reviewers.
Quoted 4 lines
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>
<...>
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, · line 290
Quoted 3 lines
lib/ethdev/ethdev_trace_points.c +3
-0+RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_burst_mode_get, + lib.ethdev.rx_burst_mode_get) +
Tx counterpart of this API is missing.
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, · line 296
Quoted 6 lines
lib/ethdev/ethdev_trace_points.c +6
-0+RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_queue_info_get, + lib.ethdev.rx_queue_info_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_queue_setup, + lib.ethdev.rx_queue_setup) +
! rte_eth_trace_rx_queue_setup() is not called.
And Tx counterpart of this API is missing, these are important APIs, we should have them.
<...>
lib/ethdev/rte_ethdev.c rte_eth_find_next(uint16_t port_id) · line 339
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -331,6 +336,7 @@ rte_eth_find_next(uint16_t port_id)if (port_id >=RTE_MAX_ETHPORTS )return RTE_MAX_ETHPORTS ; +rte_eth_trace_find_next (port_id);
For the output 'port_id', trace function is after "return RTE_MAX_ETHPORTS;", so "there is no next port" case is ignored, need to update function to get trace on each call.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id) · line 659
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -636,6 +656,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)RTE_ETH_FOREACH_VALID_DEV (pid) if (!strcmp(name, eth_dev_shared_data->data[pid].name)) { *port_id = pid; +rte_ethdev_trace_get_port_by_name (name, *port_id);
This completely ignores the path that not able to find port_id from name.
What about change the function as
```
ret = -ENODEV;
*port_id = RTE_MAX_ETHPORTS;
RTE_ETH_FOREACH_VALID_DEV(pid)
if (!strcmp())
*port_id = pid;
ret = 0;
break;
rte_ethdev_trace_get_port_by_name(name, *port_id, ret);
return ret;
```lib/ethdev/rte_ethdev.c rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id) · line 761
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return 0 ; }@@ -737,6 +758,7 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_start (port_id, rx_queue_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id) · line 795
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, dev->dev_ops->rx_queue_start (dev, rx_queue_id)); }@@ -770,6 +792,7 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)return 0 ; } +rte_ethdev_trace_rx_queue_stop (port_id, rx_queue_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id) · line 836
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, dev->dev_ops->rx_queue_stop (dev, rx_queue_id)); }@@ -810,6 +833,7 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_start (port_id, tx_queue_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id) · line 870
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, dev->dev_ops->tx_queue_start (dev, tx_queue_id)); }@@ -843,12 +867,14 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)return 0 ; } +rte_ethdev_trace_tx_queue_stop (port_id, tx_queue_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id) · line 877
Quoted 7 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, dev->dev_ops->tx_queue_stop (dev, tx_queue_id)); }uint32_t rte_eth_speed_bitflag (uint32_t speed,int duplex) { +rte_eth_trace_speed_bitflag (speed, duplex);
I think this should have return value, but I can see this requires change in the function.
I am for either having return value or drop the tracing of this function completely.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_link_up(uint16_t port_id) · line 1584
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -1552,6 +1581,7 @@ rte_eth_dev_set_link_up(uint16_t port_id)if (*dev->dev_ops->dev_set_link_up ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_up (port_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_set_link_down(uint16_t port_id) · line 1598
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->dev_set_link_up)(dev)); }@@ -1565,6 +1595,7 @@ rte_eth_dev_set_link_down(uint16_t port_id)if (*dev->dev_ops->dev_set_link_down ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_down (port_id);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_promiscuous_enable(uint16_t port_id) · line 2374
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -2327,6 +2371,7 @@ rte_eth_promiscuous_enable(uint16_t port_id) diag = (*dev->dev_ops->promiscuous_enable)(dev); dev->data->promiscuous = (diag ==0 ) ?1 :0 ; +rte_eth_trace_promiscuous_enable (port_id, dev->data->promiscuous);
Above is good, but to be consistent what about returning return value of the API (diag (with record name 'return')), which is relavent with 'dev->data->promiscuous' value.
lib/ethdev/rte_ethdev.c rte_eth_promiscuous_disable(uint16_t port_id) · line 2398
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, diag); }@@ -2350,6 +2395,7 @@ rte_eth_promiscuous_disable(uint16_t port_id)if (diag !=0 ) dev->data->promiscuous =1 ; +rte_eth_trace_promiscuous_disable (port_id, dev->data->promiscuous);
Above is good, but to be consistent what about returning return value of the API (diag (with record name 'return')), which is relavent with 'dev->data->promiscuous' value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_stats_reset(uint16_t port_id) · line 2619
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -2561,6 +2616,7 @@ rte_eth_stats_reset(uint16_t port_id) dev->data->rx_mbuf_alloc_failed =0 ; +rte_eth_trace_stats_reset (port_id);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id, · line 3564
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -3483,6 +3561,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,if (*dev->dev_ops->vlan_strip_queue_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_strip_on_queue (port_id, rx_queue_id, on);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_ether_type(uint16_t port_id, · line 3582
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0(*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on);return 0 ;@@ -3500,6 +3579,7 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,if (*dev->dev_ops->vlan_tpid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_ether_type (port_id, vlan_type, tpid);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on) · line 3717
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -3632,6 +3714,7 @@ rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)if (*dev->dev_ops->vlan_pvid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_pvid (port_id, pvid, on);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, · line 3790
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -3702,6 +3787,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,return -EINVAL ; } +rte_ethdev_trace_priority_flow_ctrl_set (port_id, pfc_conf);
Please put the call very bottom of the function and include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, · line 4159
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4063,6 +4156,7 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,if (*dev->dev_ops->udp_tunnel_port_add ==NULL )return -ENOTSUP ; +rte_ethdev_trace_udp_tunnel_port_add (port_id, udp_tunnel);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id, · line 4187
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev, udp_tunnel)); }@@ -4090,6 +4184,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,if (*dev->dev_ops->udp_tunnel_port_del ==NULL )return -ENOTSUP ; +rte_ethdev_trace_udp_tunnel_port_delete (port_id, udp_tunnel);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_led_on(uint16_t port_id) · line 4202
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev, udp_tunnel)); }@@ -4104,6 +4199,7 @@ rte_eth_led_on(uint16_t port_id)if (*dev->dev_ops->dev_led_on ==NULL )return -ENOTSUP ; +rte_eth_trace_led_on (port_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_led_off(uint16_t port_id) · line 4216
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->dev_led_on)(dev)); }@@ -4117,6 +4213,7 @@ rte_eth_led_off(uint16_t port_id)if (*dev->dev_ops->dev_led_off ==NULL )return -ENOTSUP ; +rte_eth_trace_led_off (port_id);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) · line 4398
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4294,6 +4395,7 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) }else if (index <0 )return 0 ;/* Do nothing if address wasn't found */ +rte_ethdev_trace_mac_addr_remove (port_id, addr);
better to keep trace APIs are last thing in the function for consistency, as long as it is possible, and for this case it is possible.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on) · line 4545
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4438,6 +4542,7 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)if (*dev->dev_ops->uc_all_hash_table_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_uc_all_hash_table_set (port_id, on);
Please include return value.
lib/ethdev/rte_ethdev.c int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, · line 4583
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev, on)); }@@ -4475,6 +4580,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,if (*dev->dev_ops->set_queue_rate_limit ==NULL )return -ENOTSUP ; +rte_eth_trace_set_queue_rate_limit (port_id, queue_idx, tx_rate);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_callback_register(uint16_t port_id, · line 4683
Quoted 7 lines
lib/ethdev/rte_ethdev.c +3
-0@@ -4570,6 +4678,9 @@ rte_eth_dev_callback_register(uint16_t port_id, next_port = last_port = port_id; } +rte_ethdev_trace_callback_register (port_id, event, cb_fn, cb_arg, next_port, + last_port); +
I assume this added into middle to be able to use 'next_port' & 'last_port', but they are generated from given 'port_id', so what do you think to have only 'port_id', and move call to the bottom of the function.
'rte_ethdev_trace_callback_unregister()' has same logic, and it has only 'port_id' already.
And I think better to standardise to record API return value or not, because some has it, some don't.
What do you think to trace all return values, is there any downside of this approach?
If we need fine grain on recording return values, what about following:
- All API that changes device config return values should be recorded
* like, record return for set_mtu(), but ignore it for get_mtu()
- If return value has not API status but useful information, record it
* like rte_eth_dev_is_valid_port() return value
lib/ethdev/rte_ethdev.c rte_eth_dev_callback_unregister(uint16_t port_id, · line 4779
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0rte_spinlock_lock (ð_dev_cb_lock); do {@@ -4665,6 +4776,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }while (++next_port <= last_port);rte_spinlock_unlock (ð_dev_cb_lock); +rte_ethdev_trace_callback_unregister (port_id, event, cb_fn, cb_arg, ret);
Just a syntax comment, what do you think to have an empty line one before and after the trace call, to separate this trace calls from regular logic.
lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data) · line 4809
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return ret; }@@ -4694,6 +4806,7 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)for (qid =0 ; qid < dev->data->nb_rx_queues; qid++) { vec =rte_intr_vec_list_index_get (intr_handle, qid); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl (port_id, epfd, op, data, rc);
Why this is in the for loop, API if for port level, this loop iterates on queues?
What about moving this trace to the bottom of the function, and record return value as return value of the API?
Quoted 12 lines
lib/ethdev/rte_ethdev.c +1
-0if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %d vec %u\n",@@ -4737,6 +4850,7 @@ rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id) (vec - RTE_INTR_VEC_RXTX_OFFSET) : vec; fd =rte_intr_efds_index_get (intr_handle, efd_idx); +rte_ethdev_trace_rx_intr_ctl_q_get_fd (port_id, queue_id, fd);return fd; }
lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, · line 4887
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4770,6 +4884,7 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id, vec =rte_intr_vec_list_index_get (intr_handle, queue_id); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl_q (port_id, queue_id, epfd, op, data, rc);
Instead of trace API having in the middle, what about changing API as:
```
rc = ...
if (rc && rc != -EEXIST) {
...
}
rte_ethdev_trace_rx_intr_ctl_q(port_id, queue_id, epfd, op, data, rc);
return rc;
```lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_enable(uint16_t port_id, · line 4914
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %d vec %u\n",@@ -4796,6 +4911,7 @@ rte_eth_dev_rx_intr_enable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_enable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_enable (port_id, queue_id);
Please include return value.
lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_disable(uint16_t port_id, · line 4934
Quoted 8 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id)); }@@ -4815,6 +4931,7 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_disable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_disable (port_id, queue_id);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info) · line 5589
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -5447,6 +5586,7 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->set_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_eeprom (port_id, info);
Please include return value.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id, · line 5708
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -5562,6 +5705,7 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,if (nb_tx_desc !=NULL )eth_dev_adjust_nb_desc (nb_tx_desc, &dev_info.tx_desc_lim); +rte_ethdev_trace_adjust_nb_rx_tx_desc (port_id, *nb_rx_desc, *nb_rx_desc);
'nb_rx_desc' or 'nb_rx_desc' can be NULL, so we can't directly access them.
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool) · line 5753
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -5605,6 +5750,7 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)if (*dev->dev_ops->pool_ops_supported ==NULL )return 1 ;/* all pools are supported */ +rte_ethdev_trace_pool_ops_supported (port_id, pool);
Please include return value.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 202
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_flow_ctrl_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf *fc_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (fc_conf); +)
'fc_conf' is pointer for the config struct, its address is not much useful, can you expand it similar to ones in 'rte_ethdev_trace_flow_ctrl_set()' API?
Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf *fc_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (fc_conf->high_water); +rte_trace_point_emit_u32 (fc_conf->low_water); +rte_trace_point_emit_u16 (fc_conf->pause_time); +rte_trace_point_emit_u16 (fc_conf->send_xon); +rte_trace_point_emit_int (fc_conf->mode); +rte_trace_point_emit_u8 (fc_conf->mac_ctrl_frame_fwd);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 223
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u8 (fc_conf->autoneg); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_fw_version_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *fw_version, size_t fw_size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (fw_version); +rte_trace_point_emit_size_t (fw_size); +)
'fw_version' is string, it help to display the string, but not sure if the pointer value has a value.
Is there a way to display string in the trace point?
And 'fw_size' is normally just used to know the valid data in the 'fw_version', when 'fw_version' string is displayed, not sure if there is a value to have 'fw_size'
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 230
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_dcb_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_dcb_info *dcb_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (dcb_info); +)
'dcb_info' is pointer to a info struct, not useful as pointer value, we should display content of the 'dcb_info' struct.
There are arrays in the 'dcb_info', perhaps it can be possible to trace 'dcb_info->nb_tcs', also 'dcb_info->prio_tc[]' & 'dcb_info->tc_bws[]' since their size is small (8).
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 238
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h +8
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_eeprom_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +) +
Similarly, content of the 'info' should be displayed, for '*data' it can be possible to display address of it, but values for rest.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 244
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_get_eeprom_length, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +
This should return the size of the eeprom, existing 'rte_eth_dev_get_eeprom_length()' needs to be updated for it.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 283
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_get_reg_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_reg_info *info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (info); +)
What do you think to display content of the 'info', insted of pointer value which is not very useful.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 289
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_sec_ctx, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +)
'security_ctx' is "void *", so can't record content, but what do you think to record pointer value of it?
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 300
Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_supported_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *ptypes, int num, int j), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (ptypes); +rte_trace_point_emit_int (num); +rte_trace_point_emit_int (j); +)
better to use 'supported_num' instead of 'j' which is not clear what it is.
The real information is in 'ptypes' but that is an array, I guess not possible to record array values.
Quoted 19 lines
lib/ethdev/rte_ethdev_trace.h +19
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu); +rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 329
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa); +rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size); +rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues); +) +
It is a debate what to display, but I would remove 'if_index' and add 'max_rx_queues', 'max_tx_queues', 'max_mac_addrs', 'flow_type_rss_offloads', 'rx_desc_lim', 'tx_desc_lim', 'speed_capa', 'dev_capa'.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 342
Quoted 13 lines
lib/ethdev/rte_ethdev_trace.h +13
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_is_removed, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_valid_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +
Should have return value, if the port is valid of not.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 351
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_mac_addr_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, + uint32_t pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u32 (pool); +) +
Isn't it possible to return 'addr' as string? I am not sure about benefit to record addr pointer value.
Should have return value.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 358
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_mac_addr_remove, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +) +
As above, can content of 'addr' be recorded, like as string?
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 365
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_pool_ops_supported, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pool); +) +
'pool' should be string, instead of pointer.
Quoted 18 lines
lib/ethdev/rte_ethdev_trace.h +18
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_priority_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_pfc_conf *pfc_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (pfc_conf->fc.high_water); +rte_trace_point_emit_u32 (pfc_conf->fc.low_water); +rte_trace_point_emit_u16 (pfc_conf->fc.pause_time); +rte_trace_point_emit_u16 (pfc_conf->fc.send_xon); +rte_trace_point_emit_int (pfc_conf->fc.mode); +rte_trace_point_emit_u8 (pfc_conf->fc.mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (pfc_conf->fc.autoneg); +rte_trace_point_emit_u8 (pfc_conf->priority); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 393
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rss_hash_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf *rss_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (rss_conf); +) +
Please record content of the 'rss_conf' instead of pointer value.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 402
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_rss_hash_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf *rss_conf), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (rss_conf->rss_key); +rte_trace_point_emit_u8 (rss_conf->rss_key_len); +rte_trace_point_emit_u64 (rss_conf->rss_hf); +) +
Please add return value.
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_rss_reta_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (reta_conf); +rte_trace_point_emit_u16 (reta_size);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 419
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rss_reta_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u64 (reta_conf->mask); +rte_trace_point_emit_u16 (reta_size); +)
'reta_conf->mask' on its own is not much usefull, and 'reta_conf->reta' is an array and hard to record.
As above 'rte_ethdev_trace_rss_reta_query' trace point only record reta_config pointer, this can do the same.
Overall, I think better to make get/set pair of an API record same set of values.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 517
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_set_mc_addr_list, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_ether_addr *mc_addr_set, + uint32_t nb_mc_addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (mc_addr_set); +rte_trace_point_emit_u32 (nb_mc_addr); +) +
Better to record content of 'mc_addr_set' but it is pointer array for mac address, so I guess we can't record these mac addresses.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 527
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_set_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *set_ptypes, unsigned int num), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (set_ptypes); +rte_trace_point_emit_u32 (num); +) +
Similarly 'set_ptypes' is an array.
I wonder if there should be an rte_trace_point_emit_ function for arrays? What do you think?
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 584
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +5
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_socket_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +)
Should include 'socket_id'.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 623
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_uc_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, + uint8_t on, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u8 (on); +rte_trace_point_emit_int (ret); +) +
Can have 'addr' as string?
Do we need a specific rte_trace_point_emit_ function for mac addr?
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 654
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_eth_trace_find_next, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +
rte_eth_trace_find_next* functions gets 'port_id' as input parameter, and returns next 'port_id', so both input and output is 'port_id' and both should be recorded.
For this need to update these functions to create an interim variable for input 'port_id'.
Above comments are for all 'rte_eth_trace_find_next*()' functions.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 714
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_eth_trace_link_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +)
I think better to record other link values too.
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 722
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h +8
-0+ +RTE_TRACE_POINT ( + rte_eth_trace_link_get_nowait, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) +
I think better to record other link values too.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 779
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_eth_trace_rx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) +
Can you please record content of 'mode' inst
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 792
Quoted 13 lines
lib/ethdev/rte_ethdev_trace.h +13
-0+RTE_TRACE_POINT ( + rte_eth_trace_rx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (qinfo->mp); +rte_trace_point_emit_u8 (qinfo->scattered_rx); +rte_trace_point_emit_u8 (qinfo->queue_state); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u16 (qinfo->rx_buf_size); +) +
Can you please add 'qinfo->conf->rx_drop_en' & 'qinfo->conf->offloads'.
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+RTE_TRACE_POINT( + rte_eth_trace_rx_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, unsigned int socket_id,
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 806
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+const struct rte_eth_rxconf *rx_conf, + struct rte_mempool *mb_pool), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u32 (socket_id); +rte_trace_point_emit_ptr (rx_conf); +rte_trace_point_emit_ptr (mb_pool); +) +
Can you please add 'rx_conf->rx_drop_en' & 'rx_conf->offloads'.
Quoted 14 lines
lib/ethdev/rte_ethdev_trace.h +14
-0+RTE_TRACE_POINT ( + rte_eth_trace_set_queue_rate_limit, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_idx, + uint16_t tx_rate), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_idx); +rte_trace_point_emit_u16 (tx_rate); +) + +RTE_TRACE_POINT ( + rte_eth_trace_speed_bitflag, + RTE_TRACE_POINT_ARGS(uint32_t speed, int duplex), + rte_trace_point_emit_u32(speed); +rte_trace_point_emit_int (duplex);
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 830
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+) + +RTE_TRACE_POINT ( + rte_eth_trace_stats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_stats *stats), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (stats); +rte_trace_point_emit_u64 (stats->rx_nombuf); +) +
Not sure what to record here, I think all basic stat counters can be recorded if there cost is effordable.
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 4 lines · Ferruh Yigit
On 10/6/2022 4:18 PM, Ankur Dwivedi wrote:
Hi Ankur, Jerin,
Hi Ferruh, Please find answers to generic trace questions.
Quoted 7 lines
I have some major questions, I can see some already queried by Andrew as well:
1) How flexible are we on changing trace log output? Should we take trace log as kind of user interface and don't break it (as much as possible)? Or is it OK to change whenever we want?
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
"Section: 6.9.3. Trace memory layout", Currently, we defined packet.header, packet.context, trace.header as minimum as required. It can be extended if needed.
Trace payload is not fixed, it is created based on arguments of RTE_TRACE_POINT.
Quoted 5 lines
2) What is the main purpose of the trace library.
Is it to record type and frequency of the calls? Or is it to log values and state of the device/driver after each call?
From the framework POV, it can be used for both.
I think, as first step, we can emit the traces for public DPDK APIs with return type of each API.
Quoted 10 lines
This can guide us to decide
- which values to record (should record only pointers or values of structs)
- if to record API return values and failure paths
- if to add tracing all APIs or not, like 'rte_eth_dev_rx_offload_name()' kind of helper function that converts offload to a string, which doesn't have any functional impact, or 'rte_eth_speed_bitflag()', and many more...3) What is the runtime impact.
Profiling overhead is one cycle. i.e. RTE_TRACE_POINT is added, and it is disabled at runtime.
For RTE_TRACE_POINT_FP it is zero if it is not enabled at compile time.
Quoted 4 lines
As far as I can see some values copied and some memory is used for this support, even user is not interested in tracing. For control path APIs we can ignore the additional cost by memcpy, but how big memory requirement is?
Currently, per core/thread 1MB trace buffer is created as default. The size can be overridden via EAL command line argument.
See __rte_trace_mem_per_thread_alloc().
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
section "6.5. Event record mode", it has two modes
Overwrite - When the trace buffer is full, new trace events overwrites the existing captured events in the trace buffer.
Discard - When the trace buffer is full, new trace events will be discarded.
Quoted 4 lines
4) Why we need to export trace point variables in the .map files, like '
__rte_eth_trace_allmulticast_disable' one...
If you see app/test/test_trace.c example
There are two-way to operate on trace point, We need to export symbol iff we need option 1
option1:rte_trace_point_enable(&__app_dpdk_test_tp);
option2:rte_trace_point_t *trace = rte_trace_point_lookup("app.dpdk.test.tp"); rte_trace_point_enable(trace);
Quoted 6 lines
5) (bonus Q) Can we have an '
rte_trace_point_emit_xx()' function to record mac address (structrte_ether_addr) as string? And maybe another set for array types?
Yes it possible and better to add rte_trace_pint_emit_,mac() or so.
Quoted 8 lines
There are bunch of small comments inline, some are related to above highlevel question.
But I stopped after some point, specifically after 'rte_eth_trace_timesync_adjust_time()' :), this is a big file, splitting it may help reviewers.
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 16 lines · Jerin Jacob
Quoted 4 lines · Ferruh Yigit
On 10/6/2022 4:18 PM, Ankur Dwivedi wrote:
Hi Ankur, Jerin,
Hi Ferruh, Please find answers to generic trace questions.
Quoted 7 lines
I have some major questions, I can see some already queried by Andrew as well:
1) How flexible are we on changing trace log output? Should we take trace log as kind of user interface and don't break it (as much as possible)? Or is it OK to change whenever we want?
Quoted 6 lines
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
"Section: 6.9.3. Trace memory layout", Currently, we defined packet.header, packet.context, trace.header as minimum as required. It can be extended if needed.
Trace payload is not fixed, it is created based on arguments ofRTE_TRACE_POINT.
I am aware payload is not fixed technically, but my concern is from user perspective.
Lets get 'rte_ethdev_trace_info_get' as example, right now it records 'dev_info->if_index', if we remove it in next release, will it impact the users?
Or if we start recording 'dev_info->max_rx_queues' in another release, it will change order of fields in output, will it impact the user?
If changing payload doesn't impact user, we can accept changes easier since we can tweak them as needed without user impact.
But if the target is to stick to the payload layout as much as possible, we should be more careful before we finalize it.
I am trying to understand how strict to be in accepting trace point patches.
Quoted 10 lines
Quoted 5 lines
2) What is the main purpose of the trace library.
Is it to record type and frequency of the calls? Or is it to log values and state of the device/driver after each call?From the framework POV, it can be used for both.
I think, as first step, we can emit the traces for public DPDK APIs with return type of each API.
Most of the trace point records only on success path, and not record at all when there is a failure in the API, that is why I think trace can't completely replace the logging.
But trace may be useful to analysis a functioning system for performance issues, overall system analysis, or unexpected behaviors.
In that case I am not sure how much detail to record in trace.
Because recording more fields comes with additional runtime cost and memory cost, right? Also useless records can be noise in the trace output.
OK to record return values but I don't know if it may be misleading because in some of the failure path trace functions not called at all, so recorded failures will be subset of the overall failures. BTW, I don't think that we should record all failures in trace log, that will create to much noise in the code.
Quoted 9 lines
Quoted 9 lines
This can guide us to decide
- which values to record (should record only pointers or values of structs)
- if to record API return values and failure paths
- if to add tracing all APIs or not, like 'rte_eth_dev_rx_offload_name()' kind of helper function that converts offload to a string, which doesn't have any functional impact, or 'rte_eth_speed_bitflag()', and many more...
Quoted 4 lines
Quoted 1 line
3) What is the runtime impact.
Profiling overhead is one cycle. i.e.
RTE_TRACE_POINTis added, and it is disabled at runtime.
Got it, there is '__RTE_TRACE_FIELD_ENABLE_MASK' check, and this is the only cost when trace is disabled.
Quoted 2 lines
For
RTE_TRACE_POINT_FPit is zero if it is not enabled at compile time.
ack
Quoted 6 lines
Quoted 5 lines
As far as I can see some values copied and some memory is used for this support, even user is not interested in tracing. For control path APIs we can ignore the additional cost by memcpy, but how big memory requirement is?
Quoted 9 lines
Currently, per core/thread 1MB trace buffer is created as default. The size can be overridden via EAL command line argument.
See__rte_trace_mem_per_thread_alloc().
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
section "6.5. Event record mode", it has two modes
Overwrite - When the trace buffer is full, new trace events overwrites the existing captured events in the trace buffer.
Discard - When the trace buffer is full, new trace events will be discarded.
OK, default 1M buffer doesn't look something to worry about.
Quoted 10 lines
Quoted 4 lines
4) Why we need to export trace point variables in the .map files, like '
__rte_eth_trace_allmulticast_disable' one...If you see
app/test/test_trace.cexampleThere are two-way to operate on trace point, We need to export symbol iff we need option 1
Quoted 7 lines
option1:
rte_trace_point_enable(&__app_dpdk_test_tp);option2:
rte_trace_point_t*trace =rte_trace_point_lookup("app.dpdk.test.tp");rte_trace_point_enable(trace);
got it, do we really need direct access to trace point (option 1), I would be OK to remove that option to not expose all these trace point objects.
Quoted 10 lines
Quoted 7 lines
5) (bonus Q) Can we have an '
rte_trace_point_emit_xx()' function to record mac address (structrte_ether_addr) as string? And maybe another set for array types?Yes it possible and better to add rte_trace_pint_emit_,mac() or so.
Thanks.
Quoted 9 lines
Quoted 9 lines
There are bunch of small comments inline, some are related to above highlevel question.
But I stopped after some point, specifically after 'rte_eth_trace_timesync_adjust_time()' :), this is a big file, splitting it may help reviewers.
Re: [PATCH v3 1/4] ethdev: add trace points
Quoted 25 lines · Ferruh Yigit
Quoted 16 lines · Jerin Jacob
Quoted 4 lines · Ferruh Yigit
On 10/6/2022 4:18 PM, Ankur Dwivedi wrote:
Hi Ankur, Jerin,
Hi Ferruh, Please find answers to generic trace questions.
Quoted 7 lines
I have some major questions, I can see some already queried by Andrew as well:
1) How flexible are we on changing trace log output? Should we take trace log as kind of user interface and don't break it (as much as possible)? Or is it OK to change whenever we want?
Quoted 6 lines
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
"Section: 6.9.3. Trace memory layout", Currently, we defined packet.header, packet.context, trace.header as minimum as required. It can be extended if needed.
Trace payload is not fixed, it is created based on arguments ofRTE_TRACE_POINT.
Quoted 8 lines
I am aware payload is not fixed technically, but my concern is from user perspective.
Lets get '
rte_ethdev_trace_info_get' as example, right now it records 'dev_info->if_index', if we remove it in next release, will it impact the users?
Or if we start recording 'dev_info->max_rx_queues' in another release, it will change order of fields in output, will it impact the user?
No. IMO, That level of compatibility is not needed.
Quoted 14 lines
If changing payload doesn't impact user, we can accept changes easier since we can tweak them as needed without user impact.
But if the target is to stick to the payload layout as much as possible, we should be more careful before we finalize it.I am trying to understand how strict to be in accepting trace point patches.
Quoted 6 lines
Quoted 5 lines
2) What is the main purpose of the trace library.
Is it to record type and frequency of the calls? Or is it to log values and state of the device/driver after each call?
Quoted 8 lines
Quoted 4 lines
From the framework POV, it can be used for both.
I think, as first step, we can emit the traces for public DPDK APIs with return type of each API.Most of the trace point records only on success path, and not record at all when there is a failure in the API, that is why I think trace can't completely replace the logging.
Yes.
Quoted 4 lines
But trace may be useful to analysis a functioning system for performance issues, overall system analysis, or unexpected behaviors.
In that case I am not sure how much detail to record in trace.
For other projects(example:
https://docs.zephyrproject.org/2.6.0/guides/tracing/index.html), I see it's just capturing the PUBLIC APIs to know how application using the library and debug
customer issues. i.e API contract between user and DPDK library,
Quoted 3 lines
Because recording more fields comes with additional runtime cost and memory cost, right? Also useless records can be noise in the trace output.
Since each trace point can be disabled(using regex pattern) at runtime, users have control on it
Quoted 6 lines
OK to record return values but I don't know if it may be misleading because in some of the failure path trace functions not called at all, so recorded failures will be subset of the overall failures. BTW, I don't think that we should record all failures in trace log, that will create to much noise in the code.
Yes. Just the return value of the function is enough in most case. Also, it is up to the specific subsystem maintainer to decide what level of info needs to capture.
Quoted 54 lines
Quoted 10 lines
Quoted 10 lines
This can guide us to decide
- which values to record (should record only pointers or values of structs)
- if to record API return values and failure paths
- if to add tracing all APIs or not, like 'rte_eth_dev_rx_offload_name()' kind of helper function that converts offload to a string, which doesn't have any functional impact, or 'rte_eth_speed_bitflag()', and many more...Quoted 4 lines
Quoted 1 line
3) What is the runtime impact.
Profiling overhead is one cycle. i.e.
RTE_TRACE_POINTis added, and it is disabled at runtime.Got it, there is '
__RTE_TRACE_FIELD_ENABLE_MASK' check, and this is the only cost when trace is disabled.Quoted 2 lines
For
RTE_TRACE_POINT_FPit is zero if it is not enabled at compile time.ack
Quoted 6 lines
Quoted 5 lines
As far as I can see some values copied and some memory is used for this support, even user is not interested in tracing. For control path APIs we can ignore the additional cost by memcpy, but how big memory requirement is?
Quoted 9 lines
Currently, per core/thread 1MB trace buffer is created as default. The size can be overridden via EAL command line argument.
See__rte_trace_mem_per_thread_alloc().
If you see https://doc.dpdk.org/guides/prog_guide/trace_lib.html
section "6.5. Event record mode", it has two modes
Overwrite - When the trace buffer is full, new trace events overwrites the existing captured events in the trace buffer.
Discard - When the trace buffer is full, new trace events will be discarded.OK, default 1M buffer doesn't look something to worry about.
Quoted 13 lines
Quoted 4 lines
4) Why we need to export trace point variables in the .map files, like '
__rte_eth_trace_allmulticast_disable' one...If you see
app/test/test_trace.cexampleThere are two-way to operate on trace point, We need to export symbol iff we need option 1
option1:
rte_trace_point_enable(&__app_dpdk_test_tp);
Quoted 8 lines
Quoted 4 lines
option2:
rte_trace_point_t*trace =rte_trace_point_lookup("app.dpdk.test.tp");rte_trace_point_enable(trace);got it, do we really need direct access to trace point (option 1), I would be OK to remove that option to not expose all these trace point objects.
Looks good to me.
Quoted 24 lines
Quoted 11 lines
Quoted 8 lines
5) (bonus Q) Can we have an '
rte_trace_point_emit_xx()' function to record mac address (structrte_ether_addr) as string? And maybe another set for array types?Yes it possible and better to add rte_trace_pint_emit_,mac() or so.
Thanks.
Quoted 9 lines
Quoted 9 lines
There are bunch of small comments inline, some are related to above highlevel question.
But I stopped after some point, specifically after 'rte_eth_trace_timesync_adjust_time()' :), this is a big file, splitting it may help reviewers.
Re: [PATCH v3 1/4] ethdev: add trace points
15/12/2022 07:49, Jerin Jacob:
Quoted 20 lines · Ferruh Yigit
Quoted 19 lines · Jerin Jacob
Quoted 16 lines · Ferruh Yigit
Quoted 2 lines
4) Why we need to export trace point variables in the .map files, like '
__rte_eth_trace_allmulticast_disable' one...If you see
app/test/test_trace.cexampleThere are two-way to operate on trace point, We need to export symbol iff we need option 1
option1:
rte_trace_point_enable(&__app_dpdk_test_tp);option2:
rte_trace_point_t*trace =rte_trace_point_lookup("app.dpdk.test.tp");rte_trace_point_enable(trace);
Quoted 5 lines
Quoted 3 lines
got it, do we really need direct access to trace point (option 1), I would be OK to remove that option to not expose all these trace point objects.
Looks good to me.
I would like to see a policy regarding trace symbols.
If we decide option 1 is not so useful,
then we should not export trace symbols at all and document this policy. Also there are some trace symbols which could be cleaned up.
trace point symbols
Quoted 18 lines
From: Thomas Monjalon [mailto:[email protected]]
Sent: Thursday, 12 January 2023 10.1115/12/2022 07:49, Jerin Jacob:
Quoted 1 line
On Wed, Dec 14, 2022 at 5:40 PM Ferruh Yigit <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines · Jerin Jacob
Quoted 1 line
On Wed, Dec 14, 2022 at 1:37 AM Ferruh Yigit
Quoted 1 line · <[email protected]> wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
4) Why we need to export trace point variables in the .map
files,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
like '
__rte_eth_trace_allmulticast_disable' one...If you see
app/test/test_trace.cexampleThere are two-way to operate on trace point, We need to export
symbol
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
iff we need option 1
option1:
rte_trace_point_enable(&__app_dpdk_test_tp);option2:
rte_trace_point_t*trace =
rte_trace_point_lookup("app.dpdk.test.tp");Quoted 1 line
Quoted 1 line
Quoted 1 line
rte_trace_point_enable(trace);
rte_trace_point_enable() allows passing a NULL pointer, so enabling a trace point can still be a one-liner:
rte_trace_point_enable(rte_trace_point_lookup("app.dpdk.test.tp"));
With option2, we lose the build-time error if trying to enable a non-existing trace point. But it's an acceptable tradeoff.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
got it, do we really need direct access to trace point (option 1),
I
Quoted 1 line
Quoted 1 line
would be OK to remove that option to not expose all these trace
point
Quoted 2 lines
Quoted 1 line
objects.
Quoted 7 lines
Quoted 1 line
Looks good to me.
I would like to see a policy regarding trace symbols. If we decide option 1 is not so useful,
then we should not export trace symbols at all and document this policy.
Also there are some trace symbols which could be cleaned up.
+1 for not exposing trace point symbols at all.
The trace point symbols are only used internally by DPDK, so they should not be part of DPDK's public API.
It might also make it easier for Bruce to move the trace library out of EAL.
I'm not familiar with the CTF format, but I assume that if we don't expose the trace point symbols, the trace points can still be identified when parsing the trace file.
Re: trace point symbols
Quoted 11 lines · Morten Brørup
Quoted 11 lines
From: Thomas Monjalon [mailto:[email protected]]
Sent: Thursday, 12 January 2023 10.11I would like to see a policy regarding trace symbols. If we decide option 1 is not so useful,
then we should not export trace symbols at all and document this policy.
Also there are some trace symbols which could be cleaned up.
I can send a patch to remove existing exposed symbols for option 1 in DPDK repo. But, Is n't an ABI break? The only downside, I can think of, is that a few more entries in version.map file.
I don't have a strong option one way, either. Let me know what you think?
If we decided to remove then, In
https://doc.dpdk.org/guides/prog_guide/trace_lib.html, There is NOTE section as following, I can remove that as well.
--
The RTE_TRACE_POINT_REGISTER defines the placeholder for the rte_trace_point_t tracepoint object. The user must export a __<trace_function_name> symbol in the library .map file for this tracepoint to be used out of the library, in shared builds. For example, __app_trace_string will be the exported symbol in the above example.
---
Quoted 8 lines
+1 for not exposing trace point symbols at all.
The trace point symbols are only used internally by DPDK, so they should not be part of DPDK's public API.
It might also make it easier for Bruce to move the trace library out of EAL.
I'm not familiar with the CTF format, but I assume that if we don't expose the trace point symbols, the trace points can still be identified when parsing the trace file.
Yes. It won't impact. The only use case for option 1 is to avoid named lookup.
Quoted 1 line
RE: [EXT] Re: [PATCH v3 1/4] ethdev: add trace points
In reply to Ferruh YigitHi Ferruh,
Thanks a lot for reviewing this patch. The generic questions have been answered by Jerin in earlier email. I have replied inline to the remaining comments.
Quoted 6 lines
There are bunch of small comments inline, some are related to above highlevel question.
But I stopped after some point, specifically after 'rte_eth_trace_timesync_adjust_time()' :), this is a big file, splitting it may help reviewers.
I will split this patch into two.
Quoted 6 lines
Quoted 5 lines
Add trace points for ethdev functions.
Signed-off-by Ankur Dwivedi <[email protected]>
Quoted 7 lines
<...>
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, · line 290
Quoted 3 lines
lib/ethdev/ethdev_trace_points.c +3
-0+RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_burst_mode_get, + lib.ethdev.rx_burst_mode_get) +Tx counterpart of this API is missing.
The tx API is also added. +RTE_TRACE_POINT_REGISTER(rte_eth_trace_tx_burst_mode_get,
+ lib.ethdev.tx_burst_mode_get)
+
Quoted 9 lines
lib/ethdev/ethdev_trace_points.c RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, · line 296
Quoted 7 lines
lib/ethdev/ethdev_trace_points.c +6
-0+RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_queue_info_get, + lib.ethdev.rx_queue_info_get) + +RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_queue_setup, + lib.ethdev.rx_queue_setup) +!
rte_eth_trace_rx_queue_setup()is not called.
Will remove this. This is not required as rte_ethdev_trace_rxq_setup is already added.
Quoted 3 lines
And Tx counterpart of this API is missing, these are important APIs, we should have them.
rte_ethdev_trace_txq_setup is already added.
Quoted 7 lines
<...>
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0@@ -331,6 +336,7 @@ rte_eth_find_next(uint16_t port_id)if (port_id >=RTE_MAX_ETHPORTS )return RTE_MAX_ETHPORTS ;
Quoted 6 lines
lib/ethdev/rte_ethdev.c rte_eth_find_next(uint16_t port_id) · line 339
Quoted 1 line
lib/ethdev/rte_ethdev.c +1
-0+rte_eth_trace_find_next (port_id);For the output '
port_id', trace function is after "returnRTE_MAX_ETHPORTS;", so "there is no next port" case is ignored, need to update function to get trace on each call.
Ok. Will add trace for the "there is no next port" case.
Quoted 5 lines
<...>
Review rte_eth_dev_get_port_by_name(const char *name,
Quoted 1 line
(quoted diff) +0
-0@@ -636,6 +656,7 @@ rte_eth_dev_get_port_by_name(const char *name,
uint16_t*port_id)
Quoted 8 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
Quoted 5 lines
lib/ethdev/rte_ethdev.c +2
-0RTE_ETH_FOREACH_VALID_DEV (pid) if (!strcmp(name, eth_dev_shared_data->data[pid].name)) { *port_id = pid; +rte_ethdev_trace_get_port_by_name (name, + *port_id);This completely ignores the path that not able to find
port_idfrom name.
The trace was added for the success case only. For the failure case there is no port_id value.
Quoted 21 lines
What about change the function as
``` ret = -ENODEV; *port_id = RTE_MAX_ETHPORTS; RTE_ETH_FOREACH_VALID_DEV(pid) if (!strcmp()) *port_id = pid; ret = 0; break; rte_ethdev_trace_get_port_by_name(name, *port_id, ret); return ret; ```Quoted 3 lines
(quoted diff) +0
-0return 0; }
Quoted 8 lines
Review rte_eth_dev_rx_queue_start(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -737,6 +758,7 @@ rte_eth_dev_rx_queue_start(uint16_t port_id,
uint16_trx_queue_id)lib/ethdev/rte_ethdev.c rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id) · line 761
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0return 0 ; } +rte_ethdev_trace_rx_queue_start (port_id, rx_queue_id);Please include return value.
Will add return value. The following changes will be required:
ret = eth_err(port_id, dev->dev_ops->rx_queue_start(dev, rx_queue_id)); rte_ethdev_trace_rx_queue_start(port_id, rx_queue_id, ret); return ret;
Quoted 4 lines
Quoted 4 lines
(quoted diff) +0
-0return eth_err(port_id, dev->dev_ops->rx_queue_start(dev, rx_queue_id)); }
Quoted 8 lines
Review rte_eth_dev_rx_queue_stop(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -770,6 +792,7 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id,
uint16_trx_queue_id)lib/ethdev/rte_ethdev.c rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id) · line 795
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0return 0 ; } +rte_ethdev_trace_rx_queue_stop (port_id, rx_queue_id);Please include return value.
Ok.
Quoted 4 lines
Quoted 4 lines
(quoted diff) +0
-0return eth_err(port_id, dev->dev_ops->rx_queue_stop(dev, rx_queue_id)); }
Quoted 8 lines
Review rte_eth_dev_tx_queue_start(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -810,6 +833,7 @@ rte_eth_dev_tx_queue_start(uint16_t port_id,
uint16_ttx_queue_id)lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id) · line 836
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0return 0 ; } +rte_ethdev_trace_tx_queue_start (port_id, tx_queue_id);Please include return value.
Ok.
Quoted 4 lines
Quoted 4 lines
(quoted diff) +0
-0return eth_err(port_id, dev->dev_ops->tx_queue_start(dev, tx_queue_id)); }
Quoted 8 lines
Review rte_eth_dev_tx_queue_stop(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -843,12 +867,14 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id,
uint16_ttx_queue_id)lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id) · line 870
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0return 0 ; } +rte_ethdev_trace_tx_queue_stop (port_id, tx_queue_id);Please include return value.
Ok.
Quoted 8 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id) · line 877
Quoted 7 lines
lib/ethdev/rte_ethdev.c +1
-0return eth_err (port_id, dev->dev_ops->tx_queue_stop (dev, tx_queue_id)); }uint32_t rte_eth_speed_bitflag (uint32_t speed,int duplex) { +rte_eth_trace_speed_bitflag (speed, duplex);
Quoted 5 lines
I think this should have return value, but I can see this requires change in the function.
I am for either having return value or drop the tracing of this function completely.
Will drop the tracing for this function.
Quoted 10 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_link_up(uint16_t port_id) · line 1584
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -1552,6 +1581,7 @@ rte_eth_dev_set_link_up(uint16_t port_id)if (*dev->dev_ops->dev_set_link_up ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_up (port_id);Please include return value.
Ok.
Quoted 5 lines
Quoted 5 lines
lib/ethdev/rte_ethdev.c +0
-0return eth_err (port_id, (*dev->dev_ops->dev_set_link_up)(dev)); }
Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_set_link_down(uint16_t port_id) · line 1598
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -1565,6 +1595,7 @@ rte_eth_dev_set_link_down(uint16_t port_id)if (*dev->dev_ops->dev_set_link_down ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_link_down (port_id);Please include return value.
Ok.
Quoted 7 lines
<...>
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0@@ -2327,6 +2371,7 @@ rte_eth_promiscuous_enable(uint16_t port_id) diag = (*dev->dev_ops->promiscuous_enable)(dev); dev->data->promiscuous = (diag ==0 ) ?1 :0 ;
Quoted 6 lines
Review rte_eth_promiscuous_enable(uint16_t port_id) · line 2375
Quoted 2 lines
(quoted diff) +2
-0+ rte_eth_trace_promiscuous_enable(port_id, + dev->data->promiscuous);Above is good, but to be consistent what about returning return value of the API (diag (with record name 'return')), which is relavent with 'dev->data-
Quoted 1 line
promiscuous' value.
For this the following changes will capture return value and diag:
ret = eth_err(port_id, diag);rte_eth_trace_promiscuous_enable(port_id, dev->data->promiscuous, diag, ret); return ret;
Quoted 7 lines
Quoted 7 lines
return eth_err(port_id, diag); }lib/ethdev/rte_ethdev.c +0
-0@@ -2350,6 +2395,7 @@ rte_eth_promiscuous_disable(uint16_t port_id)if (diag !=0 ) dev->data->promiscuous =1 ;
Quoted 6 lines
Review rte_eth_promiscuous_disable(uint16_t port_id) · line 2399
Quoted 2 lines
(quoted diff) +2
-0+ rte_eth_trace_promiscuous_disable(port_id, + dev->data->promiscuous);Above is good, but to be consistent what about returning return value of the API (diag (with record name 'return')), which is relavent with 'dev->data-
Quoted 1 line
promiscuous' value.
Similar changes as rte_eth_trace_promiscuous_enable.
Quoted 10 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_stats_reset(uint16_t port_id) · line 2619
Quoted 5 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -2561,6 +2616,7 @@ rte_eth_stats_reset(uint16_t port_id) dev->data->rx_mbuf_alloc_failed =0 ; +rte_eth_trace_stats_reset (port_id);Please include return value.
Here the return value is not required, because if the control reached here the return is 0.
Quoted 6 lines
<...>
Quoted 3 lines
(quoted diff) +0
-0@@ -3483,6 +3561,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
Quoted 8 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
Quoted 4 lines
lib/ethdev/rte_ethdev.c +2
-0if (*dev->dev_ops->vlan_strip_queue_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_strip_on_queue (port_id, rx_queue_id, + on);Please include return value.
Quoted 1 line
lib/ethdev/rte_ethdev.c +0
-0(*dev->dev_ops->vlan_strip_queue_set)(dev, rx_queue_id, on);
If the control reached this point the return is 0. I think the return value is not required here.
Quoted 11 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_ether_type(uint16_t · line 3584
Quoted 9 lines
lib/ethdev/rte_ethdev.c +2
-0return 0 ;@@ -3500,6 +3579,7 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id, if (*dev->dev_ops->vlan_tpid_set == NULL) return -ENOTSUP; +rte_ethdev_trace_set_vlan_ether_type (port_id, vlan_type, + tpid);Please include return value.
Ok.
Quoted 11 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_vlan_pvid(uint16_t port_id, · line 3718
Quoted 6 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -3632,6 +3714,7 @@ rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)if (*dev->dev_ops->vlan_pvid_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_vlan_pvid (port_id, pvid, on);Please include return value.
Ok.
Quoted 11 lines
<...>
Review rte_eth_dev_priority_flow_ctrl_set(uint16_t
Quoted 1 line
(quoted diff) +0
-0@@ -3702,6 +3787,7 @@ rte_eth_dev_priority_flow_ctrl_set(uint16_t
port_id,lib/ethdev/rte_ethdev.c rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id, · line 3790
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0return -EINVAL ; } +rte_ethdev_trace_priority_flow_ctrl_set (port_id, pfc_conf);Please put the call very bottom of the function and include return value.
Ok.
Quoted 11 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_udp_tunnel_port_add(uint16_t · line 4160
Quoted 6 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4063,6 +4156,7 @@ rte_eth_dev_udp_tunnel_port_add(uint16_t port_id, if (*dev->dev_ops->udp_tunnel_port_add == NULL) return -ENOTSUP; +rte_ethdev_trace_udp_tunnel_port_add (port_id, udp_tunnel);Please include return value.
Ok.
Quoted 11 lines
Quoted 9 lines
(quoted diff) +0
-0return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_add)(dev,
udp_tunnel)); } @@ -4090,6 +4184,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_tport_id,if (*dev->dev_ops->udp_tunnel_port_del == NULL) return -ENOTSUP;+
rte_ethdev_trace_udp_tunnel_port_delete(port_id, udp_tunnel);Please include return value.
Ok.
Quoted 11 lines
Quoted 9 lines
return eth_err(port_id, (*dev->dev_ops->udp_tunnel_port_del)(dev,
udp_tunnel)); } @@ -4104,6 +4199,7 @@rte_eth_led_on(uint16_t port_id)if (*dev->dev_ops->dev_led_on == NULL) return -ENOTSUP;+
rte_eth_trace_led_on(port_id);Please include return value.
Ok.
Quoted 11 lines
lib/ethdev/rte_ethdev.c rte_eth_led_off(uint16_t port_id) · line 4216
Quoted 9 lines
return eth_err(port_id, (*dev->dev_ops->dev_led_on)(dev));}
lib/ethdev/rte_ethdev.c +1
-0@@ -4117,6 +4213,7 @@ rte_eth_led_off(uint16_t port_id)if (*dev->dev_ops->dev_led_off ==NULL )return -ENOTSUP ; +rte_eth_trace_led_off (port_id);Please include return value.
Ok.
Quoted 5 lines
<...>
Review rte_eth_dev_mac_addr_remove(uint16_t port_id,
Quoted 1 line
(quoted diff) +0
-0@@ -4294,6 +4395,7 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id,struct
rte_ether_addr*addr)
Quoted 7 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr) · line 4398
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0}else if (index <0 )return 0 ;/* Do nothing if address wasn't found */ +rte_ethdev_trace_mac_addr_remove (port_id, addr);better to keep trace APIs are last thing in the function for consistency, as long as it is possible, and for this case it is possible.
Ok.
Quoted 11 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_uc_all_hash_table_set(uint16_t · line 4546
Quoted 6 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -4438,6 +4542,7 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)if (*dev->dev_ops->uc_all_hash_table_set ==NULL )return -ENOTSUP ; +rte_ethdev_trace_uc_all_hash_table_set (port_id, on);Please include return value.
Ok.
Quoted 6 lines
Quoted 6 lines
(quoted diff) +0
-0return eth_err(port_id, (*dev->dev_ops->uc_all_hash_table_set)(dev,on)); } @@ -4475,6 +4580,7 @@ int rte_eth_set_queue_rate_limit(uint16_t
port_id,uint16_tqueue_idx,
Quoted 6 lines
Quoted 4 lines
if (*dev->dev_ops->set_queue_rate_limit == NULL) return -ENOTSUP;+ rte_eth_trace_set_queue_rate_limit(port_id,
queue_idx,
+tx_rate);Please include return value.
Ok.
Quoted 7 lines
<...>
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0@@ -4570,6 +4678,9 @@ rte_eth_dev_callback_register(uint16_t port_id, next_port = last_port = port_id; }
Quoted 8 lines
Review rte_eth_dev_callback_register(uint16_t port_id, · line 4681
Quoted 1 line
(quoted diff) +1
-0+ rte_ethdev_trace_callback_register(port_id, event, cb_fn, cb_arg,
next_port,lib/ethdev/rte_ethdev.c rte_eth_dev_callback_register(uint16_t port_id, · line 4683
Quoted 2 lines
lib/ethdev/rte_ethdev.c +2
-0+ last_port); +I assume this added into middle to be able to use '
next_port' & 'last_port', but they are generated from given 'port_id', so what do you think to have only 'port_id', and move call to the bottom of the function.
I think its fine to move the trace to the bottom. But I was thinking of capturing all the input arguments to the function like port_id, event, cb_fn, cb_arg also.
Quoted 10 lines
'
rte_ethdev_trace_callback_unregister()' has same logic, and it has only 'port_id' already.And I think better to standardise to record API return value or not, because some has it, some don't.
What do you think to trace all return values, is there any downside of this approach?
Initially my thought was to not change the existing code of library functions, and capture the trace with input args and in some cases capture return value where possible. But now I think small modifications are fine if return values can be captured.
Quoted 14 lines
If we need fine grain on recording return values, what about following:
- All API that changes device config return values should be recorded
* like, record return forset_mtu(), but ignore it forget_mtu()
- If return value has not API status but useful information, record it
* likerte_eth_dev_is_valid_port()return valueQuoted 6 lines
lib/ethdev/rte_ethdev.c +0
-0rte_spinlock_lock (ð_dev_cb_lock); do {@@ -4665,6 +4776,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }while (++next_port <= last_port);
Quoted 6 lines
Review rte_eth_dev_callback_unregister(uint16_t port_id, · line 4780
Quoted 3 lines
(quoted diff) +2
-0rte_spinlock_unlock(ð_dev_cb_lock); + rte_ethdev_trace_callback_unregister(port_id, event, cb_fn, + cb_arg, ret);Just a syntax comment, what do you think to have an empty line one before and after the trace call, to separate this trace calls from regular logic.
Just that it makes the function(and as a result the file) longer. But i agree adding the empty lines improve readability.
Quoted 6 lines
Review rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd,
Quoted 5 lines
(quoted diff) +0
-0return ret; }@@ -4694,6 +4806,7 @@ rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd,int op, void *data)
Quoted 8 lines
Review rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, · line 4811
Quoted 6 lines
(quoted diff) +2
-0for (qid = 0; qid < dev->data->nb_rx_queues; qid++) { vec = rte_intr_vec_list_index_get(intr_handle, qid); rc = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data); + rte_ethdev_trace_rx_intr_ctl(port_id, epfd, op, data, + rc);Why this is in the for loop, API if for port level, this loop iterates on queues?
Yes this iterates on queues records the return (rc) for qid 0 to nb_rx_queues.
Quoted 25 lines
What about moving this trace to the bottom of the function, and record return value as return value of the API?
Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %dvec %u\n", @@ -4737,6 +4850,7 @@
rte_eth_dev_rx_intr_ctl_q_get_fd(uint16_t port_id, uint16_t queue_id)Quoted 8 lines
(vec - RTE_INTR_VEC_RXTX_OFFSET) : vec; fd = rte_intr_efds_index_get(intr_handle, efd_idx);lib/ethdev/rte_ethdev.c +1
-0+rte_ethdev_trace_rx_intr_ctl_q_get_fd (port_id, queue_id, fd);return fd; }lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, · line 4889
Quoted 6 lines
lib/ethdev/rte_ethdev.c +2
-0@@ -4770,6 +4884,7 @@ rte_eth_dev_rx_intr_ctl_q(uint16_t port_id,uint16_t queue_id, vec =rte_intr_vec_list_index_get (intr_handle, queue_id); rc =rte_intr_rx_ctl (intr_handle, epfd, op, vec, data); +rte_ethdev_trace_rx_intr_ctl_q (port_id, queue_id, epfd, op, + data, rc);Instead of trace API having in the middle, what about changing API as:
Quoted 11 lines
```
rc = ...
if (rc && rc != -EEXIST) {
...
}
rte_ethdev_trace_rx_intr_ctl_q(port_id, queue_id, epfd, op, data, rc);
return rc;
```In this trace the return value rc is being captured, so I was thinking changing the API is not required.
Quoted 7 lines
Quoted 7 lines
lib/ethdev/rte_ethdev.c +0
-0if (rc && rc != -EEXIST ) { RTE_ETHDEV_LOG(ERR, "p %u q %u Rx ctl error op %d epfd %d vec%u\n", @@ -4796,6 +4911,7 @@ rte_eth_dev_rx_intr_enable(uint16_t
port_id,
Quoted 5 lines
Quoted 3 lines
if (*dev->dev_ops->rx_queue_intr_enable == NULL) return -ENOTSUP;+
rte_ethdev_trace_rx_intr_enable(port_id, queue_id);Please include return value.
Ok.
Quoted 11 lines
lib/ethdev/rte_ethdev.c rte_eth_dev_rx_intr_disable(uint16_t port_id, · line 4934
Quoted 9 lines
return eth_err(port_id,
(*dev->dev_ops->rx_queue_intr_enable)(dev,queue_id)); }lib/ethdev/rte_ethdev.c +1
-0@@ -4815,6 +4931,7 @@ rte_eth_dev_rx_intr_disable(uint16_t port_id,if (*dev->dev_ops->rx_queue_intr_disable ==NULL )return -ENOTSUP ; +rte_ethdev_trace_rx_intr_disable (port_id, queue_id);Please include return value.
Ok.
Quoted 11 lines
<...>
lib/ethdev/rte_ethdev.c rte_eth_dev_set_eeprom(uint16_t port_id, struct · line 5590
Quoted 6 lines
lib/ethdev/rte_ethdev.c +1
-0@@ -5447,6 +5586,7 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)if (*dev->dev_ops->set_eeprom ==NULL )return -ENOTSUP ; +rte_ethdev_trace_set_eeprom (port_id, info);Please include return value.
Ok.
Quoted 9 lines
<...>
Review rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t
Quoted 1 line
(quoted diff) +0
-0@@ -5562,6 +5705,7 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t
port_id,Quoted 4 lines
lib/ethdev/rte_ethdev.c +0
-0if (nb_tx_desc !=NULL )eth_dev_adjust_nb_desc (nb_tx_desc, &dev_info.tx_desc_lim);
Quoted 5 lines
Review rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t · line 5710
Quoted 2 lines
(quoted diff) +2
-0+ rte_ethdev_trace_adjust_nb_rx_tx_desc(port_id, *nb_rx_desc, + *nb_rx_desc);'
nb_rx_desc' or 'nb_rx_desc' can be NULL, so we can't directly access them.
Yes. Will remove nb_rx_desc and nb_tx_desc.
Quoted 11 lines
<...>
Review rte_eth_dev_pool_ops_supported(uint16_t
Quoted 1 line
(quoted diff) +0
-0@@ -5605,6 +5750,7 @@ rte_eth_dev_pool_ops_supported(uint16_t
port_id, const char *pool)lib/ethdev/rte_ethdev.c rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool) · line 5753
Quoted 4 lines
lib/ethdev/rte_ethdev.c +1
-0if (*dev->dev_ops->pool_ops_supported ==NULL )return 1 ;/* all pools are supported */ +rte_ethdev_trace_pool_ops_supported (port_id, pool);Please include return value.
Ok.
Quoted 6 lines
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
Quoted 7 lines
*fc_conf),lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 202
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fc_conf); +)'
fc_conf' is pointer for the config struct, its address is not much useful, can you expand it similar to ones in 'rte_ethdev_trace_flow_ctrl_set()' API?
The value of fc_conf is updated after this line.
return eth_err(port_id, (*dev->dev_ops->flow_ctrl_get)(dev, fc_conf));
So to capture fc_conf values the return of eth_err needs to be stored in a local variable and also the return needs to be checked for success(if condition). Then only fc_conf will have valid values. Is this fine?
Quoted 20 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+ +RTE_TRACE_POINT( + rte_ethdev_trace_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_fc_conf
*fc_conf),lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 13 lines
lib/ethdev/rte_ethdev_trace.h +13
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (fc_conf->high_water); +rte_trace_point_emit_u32 (fc_conf->low_water); +rte_trace_point_emit_u16 (fc_conf->pause_time); +rte_trace_point_emit_u16 (fc_conf->send_xon); +rte_trace_point_emit_int (fc_conf->mode); +rte_trace_point_emit_u8 (fc_conf->mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (fc_conf->autoneg); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_fw_version_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, char *fw_version, size_t
fw_size),
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 223
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (fw_version); +rte_trace_point_emit_size_t (fw_size); +)'
fw_version' is string, it help to display the string, but not sure if the pointer value has a value.
Is there a way to display string in the trace point?
Yes string can be displayed in trace by rte_trace_point_emit_string() function. But there is a max string length of 32 which can be displayed. Will display 'fw_version' as string.
Quoted 3 lines
And '
fw_size' is normally just used to know the valid data in the 'fw_version', when 'fw_version' string is displayed, not sure if there is a value to have 'fw_size'
If fw_size is greater than 32, displaying fw_size will present some additional information, as only 32 bytes of fw_version will be displayed.
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+ +RTE_TRACE_POINT( + rte_ethdev_trace_get_dcb_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_dcb_info
*dcb_info),lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 230
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (dcb_info); +)
Quoted 5 lines
'
dcb_info' is pointer to a info struct, not useful as pointer value, we should display content of the 'dcb_info' struct.
There are arrays in the 'dcb_info', perhaps it can be possible to trace 'dcb_info-Quoted 1 line
nb_tcs', also 'dcb_info->prio_tc[]' & 'dcb_info->tc_bws[]'since their size is small (8).
Yes will capture the array also. Same changes required as fc_conf above.
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+ +RTE_TRACE_POINT( + rte_ethdev_trace_get_eeprom, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_eeprom_info*info),
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 238
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +) +Similarly, content of the 'info' should be displayed, for '*data' it can be possible to display address of it, but values for rest.
Ok. Same changes required as fc_conf above.
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 244
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_get_eeprom_length, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +This should return the size of the eeprom, existing '
rte_eth_dev_get_eeprom_length()' needs to be updated for it.
Ok. Same as fc_conf above.
Quoted 6 lines
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_ethdev_trace_get_reg_info, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_dev_reg_info
Quoted 7 lines
*info),
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 237
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (info); +)What do you think to display content of the 'info', insted of pointer value which is not very useful.
Yes info can be displayed. The rte_eth_dev_get_reg_info needs to be changed such that trace is called after eth_err() function call. Same as fc_conf above.
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 289
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_sec_ctx, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +)'
security_ctx' is "void *", so can't record content, but what do you think to record pointer value of it?
rte_eth_dev_get_sec_ctx() needs to be changed. The rte_eth_devices[port_id].security_ctx needs to be stored in a local variable.
Quoted 14 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 300
Quoted 12 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_supported_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *ptypes, int num, int j), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (ptypes); +rte_trace_point_emit_int (num); +rte_trace_point_emit_int (j); +)better to use '
supported_num' instead of 'j' which is not clear what it is.
Ok.
Quoted 29 lines
The real information is in 'ptypes' but that is an array, I guess not possible to record array values.
Quoted 25 lines
lib/ethdev/rte_ethdev_trace.h +25
-0+ +RTE_TRACE_POINT ( + rte_ethdev_trace_get_vlan_offload, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_dev_info *dev_info), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_string (dev_info->driver_name); +rte_trace_point_emit_u32 (dev_info->if_index); +rte_trace_point_emit_u16 (dev_info->min_mtu); +rte_trace_point_emit_u16 (dev_info->max_mtu); +rte_trace_point_emit_u32 (dev_info->min_rx_bufsize); +rte_trace_point_emit_u32 (dev_info->max_rx_pktlen); +rte_trace_point_emit_u64 (dev_info->rx_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_offload_capa); +rte_trace_point_emit_u64 (dev_info->rx_queue_offload_capa); +rte_trace_point_emit_u64 (dev_info->tx_queue_offload_capa); +rte_trace_point_emit_u16 (dev_info->reta_size); +rte_trace_point_emit_u8 (dev_info->hash_key_size);
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 329
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+rte_trace_point_emit_u16 (dev_info->nb_rx_queues); +rte_trace_point_emit_u16 (dev_info->nb_tx_queues); +) +It is a debate what to display, but I would remove '
if_index' and add 'max_rx_queues', 'max_tx_queues', 'max_mac_addrs', 'flow_type_rss_offloads', 'rx_desc_lim', 'tx_desc_lim', 'speed_capa', 'dev_capa'.
Ok.
Quoted 16 lines
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_ethdev_trace_is_removed, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret),lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 342
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_is_valid_port, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +Should have return value, if the port is valid of not.
Some changes needs to be made as the rte_ethdev_is_valid_port function return 0 or 1.
Quoted 14 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 351
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_mac_addr_add, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, + uint32_t pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u32 (pool); +) +Isn't it possible to return 'addr' as string? I am not sure about benefit to record addr pointer value.
Should have return value.
Right now the function to display array is not there in trace. I have added a new function(not yet sent upstream) to display mac addresses.
Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 358
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_mac_addr_remove, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +) +As above, can content of 'addr' be recorded, like as string?
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 365
Quoted 7 lines
lib/ethdev/rte_ethdev_trace.h +7
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_pool_ops_supported, + RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *pool), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (pool); +) +'pool' should be string, instead of pointer.
Ok.
Quoted 27 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_ethdev_trace_priority_flow_ctrl_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_pfc_conf
*pfc_conf),Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h +11
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_u32 (pfc_conf->fc.high_water); +rte_trace_point_emit_u32 (pfc_conf->fc.low_water); +rte_trace_point_emit_u16 (pfc_conf->fc.pause_time); +rte_trace_point_emit_u16 (pfc_conf->fc.send_xon); +rte_trace_point_emit_int (pfc_conf->fc.mode); +rte_trace_point_emit_u8 (pfc_conf->fc.mac_ctrl_frame_fwd); +rte_trace_point_emit_u8 (pfc_conf->fc.autoneg); +rte_trace_point_emit_u8 (pfc_conf->priority); +) +lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_reset, + RTE_TRACE_POINT_ARGS(uint16_t port_id, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_int (ret); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_conf_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 393
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf); +) +Please record content of the '
rss_conf' instead of pointer value.
Ok. Same as fc_conf above.
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT(
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_ethdev_trace_rss_hash_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_rss_conf
*rss_conf),
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 402
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (rss_conf->rss_key); +rte_trace_point_emit_u8 (rss_conf->rss_key_len); +rte_trace_point_emit_u64 (rss_conf->rss_hf); +) +Please add return value.
Ok.
Quoted 15 lines
Quoted 15 lines
lib/ethdev/rte_ethdev_trace.h +14
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_rss_reta_query, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (reta_conf); +rte_trace_point_emit_u16 (reta_size); +) + +RTE_TRACE_POINT ( + rte_ethdev_trace_rss_reta_update, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t reta_size), + rte_trace_point_emit_u16(port_id);
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 419
Quoted 3 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+rte_trace_point_emit_u64 (reta_conf->mask); +rte_trace_point_emit_u16 (reta_size); +)'
reta_conf->mask' on its own is not much usefull, and 'reta_conf->reta' is an array and hard to record.
As above 'rte_ethdev_trace_rss_reta_query' trace point only recordreta_configpointer, this can do the same.
In rte_eth_dev_rss_reta_query, if return of eth_err is captured and success then reta conf can be displayed.
Quoted 32 lines
Overall, I think better to make get/set pair of an API record same set of values.
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 517
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_set_mc_addr_list, + RTE_TRACE_POINT_ARGS(uint16_t port_id, + struct rte_ether_addr *mc_addr_set, + uint32_t nb_mc_addr), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (mc_addr_set); +rte_trace_point_emit_u32 (nb_mc_addr); +) +Better to record content of '
mc_addr_set' but it is pointer array for mac address, so I guess we can't record these mac addresses.lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 527
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_set_ptypes, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t ptype_mask, + uint32_t *set_ptypes, unsigned int num), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (ptype_mask); +rte_trace_point_emit_ptr (set_ptypes); +rte_trace_point_emit_u32 (num); +) +Similarly '
set_ptypes' is an array.
Quoted 2 lines
I wonder if there should be an
rte_trace_point_emit_function for arrays? What do you think?
In my new series(not yet sent upstream), I have added a function to display uint8_t arrays like mac addresses. Will have to check how much change is required to display other array type.
Quoted 10 lines
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 584
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +5
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_socket_id, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +)Should include '
socket_id'.
Ok.
Quoted 15 lines
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 623
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+RTE_TRACE_POINT ( + rte_ethdev_trace_uc_hash_table_set, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_ether_addr *addr, + uint8_t on, int ret), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_ptr (addr); +rte_trace_point_emit_u8 (on); +rte_trace_point_emit_int (ret); +) +Can have 'addr' as string?
mac_addr can be displayed as arrays.
Quoted 15 lines
Do we need a specific
rte_trace_point_emit_function for mac addr?<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 654
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_eth_trace_find_next, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) +rte_eth_trace_find_next* functions gets '
port_id' as input parameter, and returns next 'port_id', so both input and output is 'port_id' and both should be recorded.
Quoted 4 lines
For this need to update these functions to create an interim variable for input '
port_id'.Above comments are for all 'rte_eth_trace_find_next*()' functions.
Ok.
Quoted 11 lines
<...>
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 714
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +6
-0+RTE_TRACE_POINT ( + rte_eth_trace_link_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +)I think better to record other link values too.
Ok.
Quoted 14 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 722
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +8
-0+ +RTE_TRACE_POINT ( + rte_eth_trace_link_get_nowait, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_link *link), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u32 (link->link_speed); +) +I think better to record other link values too.
<...>
Quoted 11 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 779
Quoted 9 lines
lib/ethdev/rte_ethdev_trace.h +9
-0+RTE_TRACE_POINT ( + rte_eth_trace_rx_burst_mode_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + struct rte_eth_burst_mode *mode), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (mode); +) +Can you please record content of 'mode' inst
mode->flags can be displayed. Not sure about info array.
Quoted 16 lines
Quoted 4 lines
lib/ethdev/rte_ethdev_trace.h +3
-0+RTE_TRACE_POINT( + rte_eth_trace_rx_queue_info_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id,lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 792
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+ struct rte_eth_rxq_info *qinfo), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (queue_id); +rte_trace_point_emit_ptr (qinfo->mp); +rte_trace_point_emit_u8 (qinfo->scattered_rx); +rte_trace_point_emit_u8 (qinfo->queue_state); +rte_trace_point_emit_u16 (qinfo->nb_desc); +rte_trace_point_emit_u16 (qinfo->rx_buf_size); +) +Can you please add '
qinfo->conf->rx_drop_en' & 'qinfo->conf->offloads'.
Ok.
Quoted 18 lines
Quoted 6 lines
lib/ethdev/rte_ethdev_trace.h +4
-0+RTE_TRACE_POINT( + rte_eth_trace_rx_queue_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, unsigned int socket_id,lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 806
Quoted 10 lines
lib/ethdev/rte_ethdev_trace.h +10
-0+const struct rte_eth_rxconf *rx_conf, + struct rte_mempool *mb_pool), +rte_trace_point_emit_u16 (port_id ); +rte_trace_point_emit_u16 (rx_queue_id); +rte_trace_point_emit_u16 (nb_rx_desc); +rte_trace_point_emit_u32 (socket_id); +rte_trace_point_emit_ptr (rx_conf); +rte_trace_point_emit_ptr (mb_pool); +) +Can you please add '
rx_conf->rx_drop_en' & 'rx_conf->offloads'.
Ok.
Quoted 20 lines
Quoted 20 lines
lib/ethdev/rte_ethdev_trace.h +19
-0+RTE_TRACE_POINT ( + rte_eth_trace_set_queue_rate_limit, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_idx, + uint16_t tx_rate), + rte_trace_point_emit_u16(port_id); +rte_trace_point_emit_u16 (queue_idx); +rte_trace_point_emit_u16 (tx_rate); +) + +RTE_TRACE_POINT ( + rte_eth_trace_speed_bitflag, + RTE_TRACE_POINT_ARGS(uint32_t speed, int duplex), + rte_trace_point_emit_u32(speed); +rte_trace_point_emit_int (duplex); +) + +RTE_TRACE_POINT( + rte_eth_trace_stats_get, + RTE_TRACE_POINT_ARGS(uint16_t port_id, struct rte_eth_stats *stats),
Quoted 8 lines
lib/ethdev/rte_ethdev_trace.h RTE_TRACE_POINT( · line 830
Quoted 5 lines
lib/ethdev/rte_ethdev_trace.h +5
-0+rte_trace_point_emit_u16 (port_id); +rte_trace_point_emit_ptr (stats); +rte_trace_point_emit_u64 (stats->rx_nombuf); +) +Not sure what to record here, I think all basic stat counters can be recorded if there cost is effordable.
Ok. Same changes required as fc_conf above.
PATCH v3 2/4 ethdev: add trace points for flow
In reply to Ankur DwivediAdds trace points for rte_flow specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 117 +++++++++ lib/ethdev/rte_ethdev_trace.h | 434 +++++++++++++++++++++++++++++++ lib/ethdev/rte_flow.c | 54 ++++ lib/ethdev/version.map | 39 +++ 4 files changed, 644 insertions(+)
lib/ethdev/ethdev_trace_points.c +117 -0
@@ -464,3 +464,120 @@ RTE_TRACE_POINT_REGISTER(rte_eth_trace_rx_avail_thresh_query,RTE_TRACE_POINT_REGISTER (rte_eth_trace_rx_avail_thresh_set, lib.ethdev.rx_avail_thresh_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_copy, + lib.ethdev.flow.copy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_create, + lib.ethdev.flow.create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_destroy, + lib.ethdev.flow.destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_error_set, + lib.ethdev.flow.error_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flush, + lib.ethdev.flow.flush) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_isolate, + lib.ethdev.flow.isolate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_query, + lib.ethdev.flow.query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_validate, + lib.ethdev.flow.validate) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_conv, + lib.ethdev.flow.conv) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dynf_metadata_register, + lib.ethdev.dynf_metadata_register) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_dev_dump, + lib.ethdev.flow.dev_dump) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_aged_flows, + lib.ethdev.flow.get_aged_flows) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_decap_set, + lib.ethdev.flow.tunnel_decap_set) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_match, + lib.ethdev.flow.tunnel_match) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_get_restore_info, + lib.ethdev.flow.get_restore_info) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_action_decap_release, + lib.ethdev.flow.tunnel_action_decap_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_tunnel_item_release, + lib.ethdev.flow.tunnel_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_create, + lib.ethdev.flow.action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_destroy, + lib.ethdev.flow.action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_update, + lib.ethdev.flow.action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_action_handle_query, + lib.ethdev.flow.action_handle_query) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_create, + lib.ethdev.flow.flex_item_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_flex_item_release, + lib.ethdev.flow.flex_item_release) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pick_transfer_proxy, + lib.ethdev.flow.pick_transfer_proxy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_info_get, + lib.ethdev.flow.info_get) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_configure, + lib.ethdev.flow.configure) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_create, + lib.ethdev.flow.pattern_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pattern_template_destroy, + lib.ethdev.flow.pattern_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_create, + lib.ethdev.flow.actions_template_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_actions_template_destroy, + lib.ethdev.flow.actions_template_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_create, + lib.ethdev.flow.template_table_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_template_table_destroy, + lib.ethdev.flow.template_table_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_create, + lib.ethdev.flow.async_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_destroy, + lib.ethdev.flow.async_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_push, + lib.ethdev.flow.push) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_pull, + lib.ethdev.flow.pull) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_create, + lib.ethdev.flow.async_action_handle_create) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_destroy, + lib.ethdev.flow.async_action_handle_destroy) + +RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, + lib.ethdev.flow.async_action_handle_update)
lib/ethdev/rte_ethdev_trace.h +434 -0
440 lines not on this page · raw message
lib/ethdev/rte_flow.c +54 -0
294 lines not on this page · raw message
lib/ethdev/version.map +39 -0
@@ -463,4 +463,43 @@ INTERNAL { __rte_eth_trace_ip_reassembly_conf_set; __rte_eth_trace_rx_avail_thresh_query; __rte_eth_trace_rx_avail_thresh_set; + __rte_flow_trace_action_handle_create; + __rte_flow_trace_action_handle_destroy; + __rte_flow_trace_action_handle_query; + __rte_flow_trace_action_handle_update; + __rte_flow_trace_actions_template_create; + __rte_flow_trace_actions_template_destroy; + __rte_flow_trace_async_action_handle_create; + __rte_flow_trace_async_action_handle_destroy; + __rte_flow_trace_async_action_handle_update; + __rte_flow_trace_async_create; + __rte_flow_trace_async_destroy; + __rte_flow_trace_conv; + __rte_flow_trace_configure; + __rte_flow_trace_copy; + __rte_flow_trace_create; + __rte_flow_trace_destroy; + __rte_flow_trace_dev_dump; + __rte_flow_trace_dynf_metadata_register; + __rte_flow_trace_error_set; + __rte_flow_trace_flex_item_create; + __rte_flow_trace_flex_item_release; + __rte_flow_trace_flush; + __rte_flow_trace_get_aged_flows; + __rte_flow_trace_get_restore_info; + __rte_flow_trace_info_get; + __rte_flow_trace_isolate; + __rte_flow_trace_pattern_template_create; + __rte_flow_trace_pattern_template_destroy; + __rte_flow_trace_pick_transfer_proxy; + __rte_flow_trace_push; + __rte_flow_trace_pull; + __rte_flow_trace_query; + __rte_flow_trace_template_table_create; + __rte_flow_trace_template_table_destroy; + __rte_flow_trace_tunnel_action_decap_release; + __rte_flow_trace_tunnel_decap_set; + __rte_flow_trace_tunnel_item_release; + __rte_flow_trace_tunnel_match; + __rte_flow_trace_validate; };
Signature · 1 line
2.28.0
PATCH v3 3/4 ethdev: add trace points for mtr
In reply to Ankur DwivediAdds trace points for rte_mtr specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 57 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 176 +++++++++++++++++++++++++++++++ lib/ethdev/rte_mtr.c | 27 +++++ lib/ethdev/version.map | 19 ++++ 4 files changed, 279 insertions(+)
lib/ethdev/ethdev_trace_points.c +57 -0
@@ -581,3 +581,60 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_handle_destroy,RTE_TRACE_POINT_REGISTER (rte_flow_trace_async_action_handle_update, lib.ethdev.flow.async_action_handle_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_capabilities_get, + lib.ethdev.mtr.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_create, + lib.ethdev.mtr.create) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_destroy, + lib.ethdev.mtr.destroy) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_disable, + lib.ethdev.mtr.meter_disable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_dscp_table_update, + lib.ethdev.mtr.meter_dscp_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_enable, + lib.ethdev.mtr.meter_enable) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_add, + lib.ethdev.mtr.meter_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_delete, + lib.ethdev.mtr.meter_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_profile_update, + lib.ethdev.mtr.meter_profile_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_read, + lib.ethdev.mtr.stats_read) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_stats_update, + lib.ethdev.mtr.stats_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_add, + lib.ethdev.mtr.meter_policy_add) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_delete, + lib.ethdev.mtr.meter_policy_delete) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_update, + lib.ethdev.mtr.meter_policy_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_policy_validate, + lib.ethdev.mtr.meter_policy_validate) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_meter_vlan_table_update, + lib.ethdev.mtr.meter_vlan_table_update) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_get, + lib.ethdev.mtr.color_in_protocol_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_priority_get, + lib.ethdev.mtr.color_in_protocol_priority_get) + +RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, + lib.ethdev.mtr.color_in_protocol_set)
lib/ethdev/rte_ethdev_trace.h +176 -0
188 lines not on this page · raw message
lib/ethdev/rte_mtr.c +27 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_mtr_driver.h" #include "rte_mtr.h"
@@ -82,6 +83,7 @@ rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_capabilities_get (port_id, cap);return RTE_MTR_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -94,6 +96,7 @@ rte_mtr_meter_profile_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_add (port_id, meter_profile_id, profile);return RTE_MTR_FUNC (port_id, meter_profile_add)(dev, meter_profile_id, profile, error); }
@@ -105,6 +108,7 @@ rte_mtr_meter_profile_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_delete (port_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_delete)(dev, meter_profile_id, error); }
@@ -127,6 +131,10 @@ rte_mtr_meter_policy_validate(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_validate (port_id, policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_validate)(dev, policy, error); }
@@ -139,6 +147,11 @@ rte_mtr_meter_policy_add(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +int i; + +for (i =0 ; i <RTE_COLORS ; i++) +rte_mtr_trace_meter_policy_add (port_id, policy_id, + policy->actions[i]);return RTE_MTR_FUNC (port_id, meter_policy_add)(dev, policy_id, policy, error); }
@@ -150,6 +163,7 @@ rte_mtr_meter_policy_delete(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_delete (port_id, policy_id);return RTE_MTR_FUNC (port_id, meter_policy_delete)(dev, policy_id, error); }
@@ -174,6 +188,7 @@ rte_mtr_create(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_create (port_id, mtr_id, params, shared);return RTE_MTR_FUNC (port_id, create)(dev, mtr_id, params, shared, error); }
@@ -185,6 +200,7 @@ rte_mtr_destroy(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_destroy (port_id, mtr_id);return RTE_MTR_FUNC (port_id, destroy)(dev, mtr_id, error); }
@@ -196,6 +212,7 @@ rte_mtr_meter_enable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_enable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_enable)(dev, mtr_id, error); }
@@ -207,6 +224,7 @@ rte_mtr_meter_disable(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_disable (port_id, mtr_id);return RTE_MTR_FUNC (port_id, meter_disable)(dev, mtr_id, error); }
@@ -219,6 +237,7 @@ rte_mtr_meter_profile_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_profile_update (port_id, mtr_id, meter_profile_id);return RTE_MTR_FUNC (port_id, meter_profile_update)(dev, mtr_id, meter_profile_id, error); }
@@ -231,6 +250,7 @@ rte_mtr_meter_policy_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_policy_update (port_id, mtr_id, meter_policy_id);return RTE_MTR_FUNC (port_id, meter_policy_update)(dev, mtr_id, meter_policy_id, error); }
@@ -243,6 +263,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_dscp_table_update (port_id, mtr_id, dscp_table);return RTE_MTR_FUNC (port_id, meter_dscp_table_update)(dev, mtr_id, proto, dscp_table, error); }
@@ -255,6 +276,7 @@ rte_mtr_meter_vlan_table_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_meter_vlan_table_update (port_id, mtr_id, vlan_table);return RTE_MTR_FUNC (port_id, meter_vlan_table_update)(dev, mtr_id, proto, vlan_table, error); }
@@ -268,6 +290,7 @@ rte_mtr_color_in_protocol_set(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_set (port_id, mtr_id, proto, priority);return RTE_MTR_FUNC (port_id, in_proto_set)(dev, mtr_id, proto, priority, error); }
@@ -280,6 +303,7 @@ rte_mtr_color_in_protocol_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_get (port_id, mtr_id);return RTE_MTR_FUNC (port_id, in_proto_get)(dev, mtr_id, proto_mask, error); }
@@ -293,6 +317,7 @@ rte_mtr_color_in_protocol_priority_get(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_color_in_protocol_priority_get (port_id, mtr_id, proto);return RTE_MTR_FUNC (port_id, in_proto_prio_get)(dev, mtr_id, proto, priority, error); }
@@ -305,6 +330,7 @@ rte_mtr_stats_update(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_update (port_id, mtr_id, stats_mask);return RTE_MTR_FUNC (port_id, stats_update)(dev, mtr_id, stats_mask, error); }
@@ -319,6 +345,7 @@ rte_mtr_stats_read(uint16_t port_id, struct rte_mtr_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_mtr_trace_stats_read (port_id, mtr_id, stats, stats_mask, clear);return RTE_MTR_FUNC (port_id, stats_read)(dev, mtr_id, stats, stats_mask, clear, error); }
lib/ethdev/version.map +19 -0
@@ -502,4 +502,23 @@ INTERNAL { __rte_flow_trace_tunnel_item_release; __rte_flow_trace_tunnel_match; __rte_flow_trace_validate; + __rte_mtr_trace_capabilities_get; + __rte_mtr_trace_color_in_protocol_get; + __rte_mtr_trace_color_in_protocol_priority_get; + __rte_mtr_trace_color_in_protocol_set; + __rte_mtr_trace_create; + __rte_mtr_trace_destroy; + __rte_mtr_trace_meter_disable; + __rte_mtr_trace_meter_dscp_table_update; + __rte_mtr_trace_meter_enable; + __rte_mtr_trace_meter_policy_add; + __rte_mtr_trace_meter_policy_delete; + __rte_mtr_trace_meter_policy_update; + __rte_mtr_trace_meter_policy_validate; + __rte_mtr_trace_meter_profile_add; + __rte_mtr_trace_meter_profile_delete; + __rte_mtr_trace_meter_profile_update; + __rte_mtr_trace_meter_vlan_table_update; + __rte_mtr_trace_stats_read; + __rte_mtr_trace_stats_update; };
Signature · 1 line
2.28.0
PATCH v3 4/4 ethdev: add trace points for tm
In reply to Ankur DwivediAdds trace points for rte_tm specific functions in ethdev lib.
--- lib/ethdev/ethdev_trace_points.c | 90 ++++++++++ lib/ethdev/rte_ethdev_trace.h | 283 +++++++++++++++++++++++++++++++ lib/ethdev/rte_tm.c | 40 +++++ lib/ethdev/version.map | 30 ++++ 4 files changed, 443 insertions(+)
lib/ethdev/ethdev_trace_points.c +90 -0
@@ -638,3 +638,93 @@ RTE_TRACE_POINT_REGISTER(rte_mtr_trace_color_in_protocol_priority_get,RTE_TRACE_POINT_REGISTER (rte_mtr_trace_color_in_protocol_set, lib.ethdev.mtr.color_in_protocol_set) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_capabilities_get, + lib.ethdev.tm.capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_get_number_of_leaf_nodes, + lib.ethdev.tm.get_number_of_leaf_nodes) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_hierarchy_commit, + lib.ethdev.tm.hierarchy_commit) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_level_capabilities_get, + lib.ethdev.tm.level_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_dscp, + lib.ethdev.tm.mark_ip_dscp) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_ip_ecn, + lib.ethdev.tm.mark_ip_ecn) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_mark_vlan_dei, + lib.ethdev.tm.mark_vlan_dei) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_add, + lib.ethdev.tm.node_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_capabilities_get, + lib.ethdev.tm.node_capabilities_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_cman_update, + lib.ethdev.tm.node_cman_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_delete, + lib.ethdev.tm.node_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_parent_update, + lib.ethdev.tm.node_parent_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_resume, + lib.ethdev.tm.node_resume) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shaper_update, + lib.ethdev.tm.node_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_shaper_update, + lib.ethdev.tm.node_shared_shaper_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_shared_wred_context_update, + lib.ethdev.tm.node_shared_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_read, + lib.ethdev.tm.node_stats_read) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_stats_update, + lib.ethdev.tm.node_stats_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_suspend, + lib.ethdev.tm.node_suspend) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_type_get, + lib.ethdev.tm.node_type_get) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wfq_weight_mode_update, + lib.ethdev.tm.node_wfq_weight_mode_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_node_wred_context_update, + lib.ethdev.tm.node_wred_context_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_add, + lib.ethdev.tm.shaper_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shaper_profile_delete, + lib.ethdev.tm.shaper_profile_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_add_update, + lib.ethdev.tm.shared_shaper_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_shaper_delete, + lib.ethdev.tm.shared_shaper_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_add_update, + lib.ethdev.tm.shared_wred_context_add_update) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_shared_wred_context_delete, + lib.ethdev.tm.shared_wred_context_delete) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_add, + lib.ethdev.tm.wred_profile_add) + +RTE_TRACE_POINT_REGISTER (rte_tm_trace_wred_profile_delete, + lib.ethdev.tm.wred_profile_delete)
lib/ethdev/rte_ethdev_trace.h +283 -0
295 lines not on this page · raw message
lib/ethdev/rte_tm.c +40 -0
@@ -6,6 +6,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_trace.h" #include "rte_tm_driver.h" #include "rte_tm.h"
@@ -79,6 +80,7 @@ rte_tm_get_number_of_leaf_nodes(uint16_t port_id, } *n_leaf_nodes = dev->data->nb_tx_queues; +rte_tm_trace_get_number_of_leaf_nodes (port_id, *n_leaf_nodes, error);return 0 ; }
@@ -90,6 +92,7 @@ rte_tm_node_type_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_type_get (port_id, node_id, is_leaf);return RTE_TM_FUNC (port_id, node_type_get)(dev, node_id, is_leaf, error); }
@@ -100,6 +103,7 @@ int rte_tm_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_capabilities_get (port_id, cap);return RTE_TM_FUNC (port_id, capabilities_get)(dev, cap, error); }
@@ -111,6 +115,7 @@ int rte_tm_level_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_level_capabilities_get (port_id, level_id, cap);return RTE_TM_FUNC (port_id, level_capabilities_get)(dev, level_id, cap, error); }
@@ -122,6 +127,7 @@ int rte_tm_node_capabilities_get(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_capabilities_get (port_id, node_id, cap);return RTE_TM_FUNC (port_id, node_capabilities_get)(dev, node_id, cap, error); }
@@ -133,6 +139,7 @@ int rte_tm_wred_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_add (port_id, wred_profile_id, profile);return RTE_TM_FUNC (port_id, wred_profile_add)(dev, wred_profile_id, profile, error); }
@@ -143,6 +150,7 @@ int rte_tm_wred_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_wred_profile_delete (port_id, wred_profile_id);return RTE_TM_FUNC (port_id, wred_profile_delete)(dev, wred_profile_id, error); }
@@ -154,6 +162,8 @@ int rte_tm_shared_wred_context_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_add_update (port_id, shared_wred_context_id, + wred_profile_id);return RTE_TM_FUNC (port_id, shared_wred_context_add_update)(dev, shared_wred_context_id, wred_profile_id, error); }
@@ -164,6 +174,7 @@ int rte_tm_shared_wred_context_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_wred_context_delete (port_id, shared_wred_context_id);return RTE_TM_FUNC (port_id, shared_wred_context_delete)(dev, shared_wred_context_id, error); }
@@ -175,6 +186,7 @@ int rte_tm_shaper_profile_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_add (port_id, shaper_profile_id, profile);return RTE_TM_FUNC (port_id, shaper_profile_add)(dev, shaper_profile_id, profile, error); }
@@ -185,6 +197,7 @@ int rte_tm_shaper_profile_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shaper_profile_delete (port_id, shaper_profile_id);return RTE_TM_FUNC (port_id, shaper_profile_delete)(dev, shaper_profile_id, error); }
@@ -196,6 +209,8 @@ int rte_tm_shared_shaper_add_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_add_update (port_id, shared_shaper_id, + shaper_profile_id);return RTE_TM_FUNC (port_id, shared_shaper_add_update)(dev, shared_shaper_id, shaper_profile_id, error); }
@@ -206,6 +221,7 @@ int rte_tm_shared_shaper_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_shared_shaper_delete (port_id, shared_shaper_id);return RTE_TM_FUNC (port_id, shared_shaper_delete)(dev, shared_shaper_id, error); }
@@ -221,6 +237,8 @@ int rte_tm_node_add(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_add (port_id, node_id, parent_node_id, priority, + weight, level_id, params);return RTE_TM_FUNC (port_id, node_add)(dev, node_id, parent_node_id, priority, weight, level_id, params, error);
@@ -232,6 +250,7 @@ int rte_tm_node_delete(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_delete (port_id, node_id);return RTE_TM_FUNC (port_id, node_delete)(dev, node_id, error); }
@@ -242,6 +261,7 @@ int rte_tm_node_suspend(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_suspend (port_id, node_id);return RTE_TM_FUNC (port_id, node_suspend)(dev, node_id, error); }
@@ -252,6 +272,7 @@ int rte_tm_node_resume(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_resume (port_id, node_id);return RTE_TM_FUNC (port_id, node_resume)(dev, node_id, error); }
@@ -262,6 +283,7 @@ int rte_tm_hierarchy_commit(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_hierarchy_commit (port_id, clear_on_fail);return RTE_TM_FUNC (port_id, hierarchy_commit)(dev, clear_on_fail, error); }
@@ -275,6 +297,8 @@ int rte_tm_node_parent_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_parent_update (port_id, node_id, parent_node_id, + priority, weight);return RTE_TM_FUNC (port_id, node_parent_update)(dev, node_id, parent_node_id, priority, weight, error); }
@@ -286,6 +310,7 @@ int rte_tm_node_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shaper_update (port_id, node_id, shaper_profile_id);return RTE_TM_FUNC (port_id, node_shaper_update)(dev, node_id, shaper_profile_id, error); }
@@ -298,6 +323,8 @@ int rte_tm_node_shared_shaper_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_shaper_update (port_id, node_id, shared_shaper_id, + add);return RTE_TM_FUNC (port_id, node_shared_shaper_update)(dev, node_id, shared_shaper_id, add, error); }
@@ -309,6 +336,7 @@ int rte_tm_node_stats_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_update (port_id, node_id, stats_mask);return RTE_TM_FUNC (port_id, node_stats_update)(dev, node_id, stats_mask, error); }
@@ -321,6 +349,8 @@ int rte_tm_node_wfq_weight_mode_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wfq_weight_mode_update (port_id, node_id, wfq_weight_mode, + n_sp_priorities);return RTE_TM_FUNC (port_id, node_wfq_weight_mode_update)(dev, node_id, wfq_weight_mode, n_sp_priorities, error); }
@@ -332,6 +362,7 @@ int rte_tm_node_cman_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_cman_update (port_id, node_id, cman);return RTE_TM_FUNC (port_id, node_cman_update)(dev, node_id, cman, error); }
@@ -343,6 +374,7 @@ int rte_tm_node_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_wred_context_update (port_id, node_id, wred_profile_id);return RTE_TM_FUNC (port_id, node_wred_context_update)(dev, node_id, wred_profile_id, error); }
@@ -355,6 +387,9 @@ int rte_tm_node_shared_wred_context_update(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_shared_wred_context_update (port_id, node_id, + shared_wred_context_id, + add);return RTE_TM_FUNC (port_id, node_shared_wred_context_update)(dev, node_id, shared_wred_context_id, add, error); }
@@ -368,6 +403,8 @@ int rte_tm_node_stats_read(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_node_stats_read (port_id, node_id, stats, stats_mask, + clear);return RTE_TM_FUNC (port_id, node_stats_read)(dev, node_id, stats, stats_mask, clear, error); }
@@ -380,6 +417,7 @@ int rte_tm_mark_vlan_dei(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_vlan_dei (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_vlan_dei)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -392,6 +430,7 @@ int rte_tm_mark_ip_ecn(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_ecn (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_ecn)(dev, mark_green, mark_yellow, mark_red, error); }
@@ -404,6 +443,7 @@ int rte_tm_mark_ip_dscp(uint16_t port_id, struct rte_tm_error *error) {struct rte_eth_dev *dev = &rte_eth_devices[port_id]; +rte_tm_trace_mark_ip_dscp (port_id, mark_green, mark_yellow, mark_red);return RTE_TM_FUNC (port_id, mark_ip_dscp)(dev, mark_green, mark_yellow, mark_red, error); }
lib/ethdev/version.map +30 -0
@@ -521,4 +521,34 @@ INTERNAL { __rte_mtr_trace_meter_vlan_table_update; __rte_mtr_trace_stats_read; __rte_mtr_trace_stats_update; + __rte_tm_trace_capabilities_get; + __rte_tm_trace_get_number_of_leaf_nodes; + __rte_tm_trace_hierarchy_commit; + __rte_tm_trace_level_capabilities_get; + __rte_tm_trace_mark_ip_dscp; + __rte_tm_trace_mark_ip_ecn; + __rte_tm_trace_mark_vlan_dei; + __rte_tm_trace_node_add; + __rte_tm_trace_node_capabilities_get; + __rte_tm_trace_node_cman_update; + __rte_tm_trace_node_delete; + __rte_tm_trace_node_parent_update; + __rte_tm_trace_node_resume; + __rte_tm_trace_node_shaper_update; + __rte_tm_trace_node_shared_shaper_update; + __rte_tm_trace_node_shared_wred_context_update; + __rte_tm_trace_node_stats_read; + __rte_tm_trace_node_stats_update; + __rte_tm_trace_node_suspend; + __rte_tm_trace_node_type_get; + __rte_tm_trace_node_wfq_weight_mode_update; + __rte_tm_trace_node_wred_context_update; + __rte_tm_trace_shaper_profile_add; + __rte_tm_trace_shaper_profile_delete; + __rte_tm_trace_shared_shaper_add_update; + __rte_tm_trace_shared_shaper_delete; + __rte_tm_trace_shared_wred_context_add_update; + __rte_tm_trace_shared_wred_context_delete; + __rte_tm_trace_wred_profile_add; + __rte_tm_trace_wred_profile_delete; };
Signature · 1 line
2.28.0
v4 cover add trace points in ethdev library
In reply to Ankur DwivediThis series adds trace points for functions in the ethdev library. The trace points are added in ethdev, flow, mtr and tm files.
v4:
- Adds tracepoint function to emit char array. Also adds the test case.
- Resolved review comments on "ethdev: add trace point" patch. This patch is divided into 2 patches to minimize per patch size.
- From the earlier version (v3), few tracepoints in ethdev, flow, mtr, tm are made as fast path tracepoints. For the tracepoint which i was unsure, i have made it as fastpath. All the fast path tracepoints can be found in rte_ethdev_trace_fp.h and rte_ethdev_trace_fp_burst.h. All the slow path tracepoints can be found in rte_ethdev_trace.h.
- Capturing of return value is added to tracepoint in ethdev. For flow, mtr and tm these changes are still yet to bde done. Will do it in the next versions.
- Moved the trace functions from INTERNAL to EXPERIMENTAL in version.map.
v3:
- Moved the trace functions from EXPERIMENTAL to INTERNAL in version.map.
- Moved trace functions call to the end, in ethdev and flow trace.
- Added code to print the input value of features in rte_eth_trace_rx_metadata_negotiate().
- Added code to capture return value in flow trace.
Ankur Dwivedi (6):
eal: trace: add trace point emit for array
ethdev: add trace points for ethdev
ethdev: add trace points for remaining functions
ethdev: add trace points for flow
ethdev: add trace points for mtr
ethdev: add trace points for tm
app/test/test_trace.c | 3 + lib/eal/common/eal_common_trace_points.c | 2 + lib/eal/include/rte_eal_trace.h | 6 + lib/eal/include/rte_trace_point.h | 20 + lib/eal/include/rte_trace_point_register.h | 8 + lib/ethdev/ethdev_private.c | 3 + lib/ethdev/ethdev_trace_points.c | 715 ++++++++++ lib/ethdev/meson.build | 1 + lib/ethdev/rte_ethdev.c | 659 +++++++-- lib/ethdev/rte_ethdev.h | 2 +- lib/ethdev/rte_ethdev_cman.c | 30 +- lib/ethdev/rte_ethdev_trace.h | 1404 ++++++++++++++++++++ lib/ethdev/rte_ethdev_trace_fp.h | 967 +++++++++++++- lib/ethdev/rte_ethdev_trace_fp_burst.h | 44 + lib/ethdev/rte_flow.c | 57 + lib/ethdev/rte_mtr.c | 30 + lib/ethdev/rte_tm.c | 41 + lib/ethdev/version.map | 235 ++++ 18 files changed, 4118 insertions(+), 109 deletions(-) create mode 100644 lib/ethdev/rte_ethdev_trace_fp_burst.h
Signature · 1 line
2.25.1
PATCH v4 1/6 eal: trace: add trace point emit for array
Adds a trace point emit function for array. The maximum array bytes which can be captured is set to 32.
Also adds test case for emit array tracepoint function.
--- app/test/test_trace.c | 3 +++ lib/eal/common/eal_common_trace_points.c | 2 ++ lib/eal/include/rte_eal_trace.h | 6 ++++++ lib/eal/include/rte_trace_point.h | 20 ++++++++++++++++++++ lib/eal/include/rte_trace_point_register.h | 8 ++++++++ 5 files changed, 39 insertions(+)
app/test/test_trace.c +3 -0
@@ -177,6 +177,7 @@ test_fp_trace_points(void)static int test_generic_trace_points (void ) { +uint8_t arr[32 ] = {0 };int tmp;rte_eal_trace_generic_void ();
@@ -195,6 +196,8 @@ test_generic_trace_points(void)rte_eal_trace_generic_ptr (&tmp);rte_eal_trace_generic_str ("my string" );rte_eal_trace_generic_size_t (sizeof (void *)); +rte_eal_trace_generic_char_array (arr,32 ); +rte_eal_trace_generic_char_array (arr,64 );RTE_EAL_TRACE_GENERIC_FUNC ;return TEST_SUCCESS ;
lib/eal/common/eal_common_trace_points.c +2 -0
@@ -40,6 +40,8 @@ RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_size_t, lib.eal.generic.size_t) RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, lib.eal.generic.func) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_char_array, + lib.eal.generic.char.array)RTE_TRACE_POINT_REGISTER (rte_eal_trace_alarm_set, lib.eal.alarm.set)
lib/eal/include/rte_eal_trace.h +6 -0
@@ -143,6 +143,12 @@ RTE_TRACE_POINT(rte_trace_point_emit_string (func); ) +RTE_TRACE_POINT( + rte_eal_trace_generic_char_array, + RTE_TRACE_POINT_ARGS(void *in, uint8_t len), + rte_trace_point_emit_char_array(in, len); +) + #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__)/* Interrupt */
lib/eal/include/rte_trace_point.h +20 -0
@@ -144,6 +144,8 @@ _tp _args \#define rte_trace_point_emit_ptr (val)/** Tracepoint function payload for string datatype */ #define rte_trace_point_emit_string (val) +/** Tracepoint function payload for char array */ +#define rte_trace_point_emit_char_array (val, len)#endif /* __DOXYGEN__ */
@@ -151,6 +153,8 @@ _tp _args \#define __RTE_TRACE_EMIT_STRING_LEN_MAX 32/** @internal Macro to define event header size. */ #define __RTE_TRACE_EVENT_HEADER_SZ sizeof(uint64_t) +/** @internal Macro to define maximum emit length of array. */ +#define __RTE_TRACE_EMIT_ARRAY_LEN_MAX 32/** * Enable recording events of the given tracepoint in the trace buffer.
@@ -374,12 +378,28 @@ do { \ mem =RTE_PTR_ADD (mem, __RTE_TRACE_EMIT_STRING_LEN_MAX); \ } while (0) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + if (unlikely(in == NULL)) \ + return; \ + if (len > __RTE_TRACE_EMIT_ARRAY_LEN_MAX) \ + return; \ + memcpy(mem, in, len); \ + mem = RTE_PTR_ADD(mem, len); \ +} while (0) +#else #define __rte_trace_point_emit_header_generic (t) RTE_SET_USED(t)#define __rte_trace_point_emit_header_fp (t) RTE_SET_USED(t)#define __rte_trace_point_emit (in, type) RTE_SET_USED(in)#define rte_trace_point_emit_string (in) RTE_SET_USED(in) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + RTE_SET_USED(in); \ + RTE_SET_USED(len); \ +} while (0) +#endif /* ALLOW_EXPERIMENTAL_API */ #endif /* _RTE_TRACE_POINT_REGISTER_H_ */
lib/eal/include/rte_trace_point_register.h +8 -0
@@ -47,6 +47,14 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + RTE_SET_USED(in); \ + if (len > __RTE_TRACE_EMIT_ARRAY_LEN_MAX) \ + return; \ + __rte_trace_point_emit_field(len, RTE_STR(in)"[32]", "uint8_t"); \ +} while (0) + #ifdef __cplusplus }#endif
Signature · 1 line
2.25.1
RE: [PATCH v4 1/6] eal: trace: add trace point emit for array
Quoted 50 lines
-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Thursday, December 22, 2022 12:03 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Igor Russkikh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Maciej Czekaj [C] <[email protected]>; Shijith Thotton <[email protected]>; Srisivasubramanian Srinivasan <[email protected]>; Harman Kalra <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Liron Himi <[email protected]>; [email protected]; Radha Chintakuntla <[email protected]>; Veerasenareddy Burru <[email protected]>; Sathesh B Edara <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rasesh Mody <[email protected]>; Shahed Shaikh <[email protected]>; Devendra Singh Rawat <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH v4 1/6] eal: trace: add trace point emit for arrayAdds a trace point emit function for array. The maximum array bytes which can be captured is set to 32.
Also adds test case for emit array tracepoint function.
Quoted 9 lines
Signed-off-by Ankur Dwivedi <[email protected]>--- app/test/test_trace.c | 3 +++ lib/eal/common/eal_common_trace_points.c | 2 ++ lib/eal/include/rte_eal_trace.h | 6 ++++++ lib/eal/include/rte_trace_point.h | 20 ++++++++++++++++++++ lib/eal/include/rte_trace_point_register.h | 8 ++++++++ 5 files changed, 39 insertions(+)
Please make sure that version history should be maintained.
[sniped]
Quoted 6 lines
app/test/test_trace.c index renamed from app/test/test_trace.c +0
-0
6bedf14024..99cd0762d1100644app/test/test_trace.c +0
-1--2.25.1
RE: [PATCH v4 1/6] eal: trace: add trace point emit for array
In reply to Ankur DwivediQuoted 5 lines
From: Ankur Dwivedi [mailto:[email protected]]
Sent: Thursday, 22 December 2022 07.33Adds a trace point emit function for array. The maximum array bytes which can be captured is set to 32.
This seems very useful.
Disclaimer: I am not familiar with the trace library or the CTF file format, so my feedback below may be completely wrong and impossible - please keep in mind when reading.
Quoted 25 lines
Also adds test case for emit array tracepoint function.
Signed-off-by Ankur Dwivedi <[email protected]>--- app/test/test_trace.c | 3 +++ lib/eal/common/eal_common_trace_points.c | 2 ++ lib/eal/include/rte_eal_trace.h | 6 ++++++ lib/eal/include/rte_trace_point.h | 20 ++++++++++++++++++++ lib/eal/include/rte_trace_point_register.h | 8 ++++++++ 5 files changed, 39 insertions(+)app/test/test_trace.c +1
-0@@ -177,6 +177,7 @@ test_fp_trace_points(void)static int test_generic_trace_points (void ) { +uint8_t arr[32 ] = {0 };int tmp;rte_eal_trace_generic_void ();
app/test/test_trace.c test_generic_trace_points(void) · line 198
Quoted 3 lines
app/test/test_trace.c +0
-0@@ -195,6 +196,8 @@ test_generic_trace_points(void)rte_eal_trace_generic_ptr (&tmp);rte_eal_trace_generic_str ("my string" );rte_eal_trace_generic_size_t (sizeof (void *));
Please also test smaller, unaligned length, e.g.:rte_eal_trace_generic_char_array(arr, 17);
Please also test variable len, unknown at build time, e.g.:rte_eal_trace_generic_char_array(arr, rand() % 31);
Quoted 65 lines
app/test/test_trace.c +2
-0+rte_eal_trace_generic_char_array (arr,32 ); +rte_eal_trace_generic_char_array (arr,64 );RTE_EAL_TRACE_GENERIC_FUNC ;return TEST_SUCCESS ;lib/eal/common/eal_common_trace_points.c +2
-0@@ -40,6 +40,8 @@RTE_TRACE_POINT_REGISTER (rte_eal_trace_generic_size_t, lib.eal.generic.size_t)RTE_TRACE_POINT_REGISTER (rte_eal_trace_generic_func, lib.eal.generic.func) +RTE_TRACE_POINT_REGISTER (rte_eal_trace_generic_char_array, + lib.eal.generic.char.array) RTE_TRACE_POINT_REGISTER(rte_eal_trace_alarm_set,lib/eal/common/eal_common_trace_points.c +0
-0lib.eal.alarm.set)lib/eal/include/rte_eal_trace.h +6
-0@@ -143,6 +143,12 @@ RTE_TRACE_POINT(rte_trace_point_emit_string (func); ) +RTE_TRACE_POINT( + rte_eal_trace_generic_char_array, + RTE_TRACE_POINT_ARGS(void *in, uint8_t len), + rte_trace_point_emit_char_array(in, len); +) + #define RTE_EAL_TRACE_GENERIC_FUNCrte_eal_trace_generic_func (__func__ )/* Interrupt */
lib/eal/include/rte_trace_point.h +4
-0@@ -144,6 +144,8 @@ _tp _args \#define rte_trace_point_emit_ptr (val)/** Tracepoint function payload for string datatype */ #define rte_trace_point_emit_string (val) +/** Tracepoint function payload for char array */ +#define rte_trace_point_emit_char_array (val, len)#endif /* __DOXYGEN__ */ @@ -151,6 +153,8 @@ _tp _args \#define __RTE_TRACE_EMIT_STRING_LEN_MAX 32/** @internal Macro to define event header size. */ #define __RTE_TRACE_EVENT_HEADER_SZ sizeof(uint64_t) +/** @internal Macro to define maximum emit length of array. */ +#define __RTE_TRACE_EMIT_ARRAY_LEN_MAX 32/** * Enable recording events of the given tracepoint in the trace buffer.
lib/eal/include/rte_trace_point.h +0
-0@@ -374,12 +378,28 @@ do { \ mem =RTE_PTR_ADD (mem, __RTE_TRACE_EMIT_STRING_LEN_MAX); \
lib/eal/include/rte_trace_point.h do { \ · line 388
Quoted 10 lines
lib/eal/include/rte_trace_point.h +8
-0} while (0) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + if (unlikely(in == NULL)) \ + return; \ + if (len > __RTE_TRACE_EMIT_ARRAY_LEN_MAX) \ + return; \ + memcpy(mem, in, len); \ + mem = RTE_PTR_ADD(mem, len); \
This does not work for len < 32, because the trace format is defined to emit an array of 32 byte. You must always increment mem by 32:
mem = RTE_PTR_ADD(mem, __RTE_TRACE_EMIT_ARRAY_LEN_MAX); \
Also, instead of silently ignoring len > __RTE_TRACE_EMIT_ARRAY_LEN_MAX, you should:
if (len < __RTE_TRACE_EMIT_ARRAY_LEN_MAX) { \
memcpy(mem, in, len); \
memset(RTE_PTR_ADD(mem, len), 0, __RTE_TRACE_EMIT_ARRAY_LEN_MAX - len); \
} else { \
memcpy(mem, in, __RTE_TRACE_EMIT_ARRAY_LEN_MAX); \
} \If not emitting the length value (see my comments at the end), you should clear the unused part of the array; notice the added memset().
Quoted 37 lines
lib/eal/include/rte_trace_point.h +8
-0+} while (0) +#else #define __rte_trace_point_emit_header_generic (t) RTE_SET_USED(t)#define __rte_trace_point_emit_header_fp (t) RTE_SET_USED(t)#define __rte_trace_point_emit (in, type) RTE_SET_USED(in)#define rte_trace_point_emit_string (in) RTE_SET_USED(in) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + RTE_SET_USED(in); \ + RTE_SET_USED(len); \ +} while (0) +#endif /* ALLOW_EXPERIMENTAL_API */ #endif /* _RTE_TRACE_POINT_REGISTER_H_ */ lib/eal/include/rte_trace_point_register.h +8
-0@@ -47,6 +47,14 @@ do { \ RTE_STR(in)"[32]", "string_bounded_t"); \ } while (0) +#define rte_trace_point_emit_char_array (in, len) \ +do { \ + RTE_SET_USED(in); \ + if (len > __RTE_TRACE_EMIT_ARRAY_LEN_MAX) \ + return; \ + __rte_trace_point_emit_field(len, RTE_STR(in)"[32]", "uint8_t"); \ +}while (0 ) + #ifdef __cplusplus }
Quoted 4 lines
#endif
--
2.25.1
This emits 0..32 byte of binary data into a 32 byte array to the trace. But there is no way to read the length from the trace file, i.e. how many of the 32 bytes contain data.
If length is required to be constant at build time, perhaps the "[32]" in rte_trace_point_register.h can be modified to emit the length as the array size. (If so, the requirement for the length to be constant must be documented.)
Suggestion (not a requirement):
Instead of simply emitting an array, consider emitting a structure where the first field is the length, and the second field is an array of 32 bytes of data:
struct {
integer {
size = 8;
} len;
integer {
size = 8;
} data[32];
}Or even better, emit a sequence [1]:
struct {
integer {
size = 16;
} length;
integer {
size = 8;
} data[length];
}[1]: https://diamon.org/ctf/#spec4.2.4
If emitting a sequence, the length does not have to be limited to 32 byte, but could be up to 65535 byte.
And a personal preference about the name: I would prefer _blob instead of _char_array.