@@ -266,6 +266,10 @@ static struct api_out iface_stats_get(const void * /*request*/, struct api_ctx *
266266 s .tx_packets = 0 ;
267267 s .tx_bytes = 0 ;
268268 s .tx_errors = 0 ;
269+ s .cp_rx_packets = 0 ;
270+ s .cp_rx_bytes = 0 ;
271+ s .cp_tx_packets = 0 ;
272+ s .cp_tx_bytes = 0 ;
269273
270274 // Aggregate per-core stats
271275 for (int i = 0 ; i < RTE_MAX_LCORE ; i ++ ) {
@@ -274,6 +278,10 @@ static struct api_out iface_stats_get(const void * /*request*/, struct api_ctx *
274278 s .rx_bytes += sw_stats -> rx_bytes ;
275279 s .tx_packets += sw_stats -> tx_packets ;
276280 s .tx_bytes += sw_stats -> tx_bytes ;
281+ s .cp_rx_packets += sw_stats -> cp_rx_packets ;
282+ s .cp_rx_bytes += sw_stats -> cp_rx_bytes ;
283+ s .cp_tx_packets += sw_stats -> cp_tx_packets ;
284+ s .cp_tx_bytes += sw_stats -> cp_tx_bytes ;
277285 }
278286
279287 if (iface -> type == GR_IFACE_TYPE_PORT ) {
@@ -386,17 +394,26 @@ telemetry_ifaces_info_get(const char * /*cmd*/, const char * /*params*/, struct
386394
387395 // Software stats
388396 uint64_t rx_pkts = 0 , rx_bytes = 0 , tx_pkts = 0 , tx_bytes = 0 ;
397+ uint64_t cp_rx_pkts = 0 , cp_rx_bytes = 0 , cp_tx_pkts = 0 , cp_tx_bytes = 0 ;
389398 for (int i = 0 ; i < RTE_MAX_LCORE ; i ++ ) {
390399 struct iface_stats * sw_stats = iface_get_stats (i , iface -> id );
391400 rx_pkts += sw_stats -> rx_packets ;
392401 rx_bytes += sw_stats -> rx_bytes ;
393402 tx_pkts += sw_stats -> tx_packets ;
394403 tx_bytes += sw_stats -> tx_bytes ;
404+ cp_rx_pkts += sw_stats -> cp_rx_packets ;
405+ cp_rx_bytes += sw_stats -> cp_rx_bytes ;
406+ cp_tx_pkts += sw_stats -> cp_tx_packets ;
407+ cp_tx_bytes += sw_stats -> cp_tx_bytes ;
395408 }
396409 rte_tel_data_add_dict_uint (stats_container , "rx_packets" , rx_pkts );
397410 rte_tel_data_add_dict_uint (stats_container , "rx_bytes" , rx_bytes );
398411 rte_tel_data_add_dict_uint (stats_container , "tx_packets" , tx_pkts );
399412 rte_tel_data_add_dict_uint (stats_container , "tx_bytes" , tx_bytes );
413+ rte_tel_data_add_dict_uint (stats_container , "cp_rx_packets" , cp_rx_pkts );
414+ rte_tel_data_add_dict_uint (stats_container , "cp_rx_bytes" , cp_rx_bytes );
415+ rte_tel_data_add_dict_uint (stats_container , "cp_tx_packets" , cp_tx_pkts );
416+ rte_tel_data_add_dict_uint (stats_container , "cp_tx_bytes" , cp_tx_bytes );
400417
401418 // Get hardware stats for physical ports.
402419 if (iface -> type == GR_IFACE_TYPE_PORT ) {
0 commit comments