@@ -1239,7 +1239,7 @@ static void dpdk_lsc_callback(portid_t port, enum rte_eth_event_type event,
12391239 fprintf (stderr , "LSC - link status is %s %s speed=%d\n" ,
12401240 link_info .link_status ? "up" : "down" ,
12411241 (link_info .link_duplex == RTE_ETH_LINK_FULL_DUPLEX ) ? "full-duplex"
1242- : "half-duplex" ,
1242+ : "half-duplex" ,
12431243 (int )link_info .link_speed );
12441244#endif
12451245
@@ -1751,14 +1751,14 @@ static int dpdk_start_streams(struct dpdk_format_data_t *format_data, char *err,
17511751
17521752 for (j = 0 ; j < len ; j ++ ) {
17531753 if (strcmp (names [j ].name , p2 ) == 0 ||
1754- strcmp (names [j ].name , p3 ) == 0 ) {
1754+ strcmp (names [j ].name , p3 ) == 0 ) {
17551755 // discards is the best name to use for Mellanox
17561756 // error_packets is the best name to use for i40e
17571757 stream -> xstat_drop_id = j ;
17581758 }
17591759
17601760 if (strcmp (names [j ].name , p1 ) == 0 &&
1761- stream -> xstat_drop_id == -1 ) {
1761+ stream -> xstat_drop_id == -1 ) {
17621762 // errors is the fallback option if neither of the
17631763 // better options exist, but can be a counter of
17641764 // corrupt packets received rather than packets lost due
@@ -1768,11 +1768,10 @@ static int dpdk_start_streams(struct dpdk_format_data_t *format_data, char *err,
17681768 }
17691769
17701770 if (strcmp (names [j ].name , p4 ) == 0 ||
1771- strcmp (names [j ].name , p5 ) == 0 ||
1772- strcmp (names [j ].name , p6 ) == 0 ) {
1771+ strcmp (names [j ].name , p5 ) == 0 ||
1772+ strcmp (names [j ].name , p6 ) == 0 ) {
17731773 stream -> xstat_good_id = j ;
17741774 }
1775-
17761775 }
17771776 free (names );
17781777 }
@@ -2738,7 +2737,8 @@ void dpdk_get_stats(libtrace_t *trace, libtrace_stat_t *stats)
27382737}
27392738
27402739static void dpdk_get_thread_stats (libtrace_t * libtrace , libtrace_thread_t * t ,
2741- libtrace_stat_t * stats ) {
2740+ libtrace_stat_t * stats )
2741+ {
27422742
27432743 dpdk_per_stream_t * stream = (dpdk_per_stream_t * )t -> format_data ;
27442744 uint64_t value ;
@@ -2751,17 +2751,17 @@ static void dpdk_get_thread_stats(libtrace_t *libtrace, libtrace_thread_t *t,
27512751
27522752 if (stream -> xstat_good_id >= 0 ) {
27532753 id = (uint64_t )stream -> xstat_good_id ;
2754- if (rte_eth_xstats_get_by_id (FORMAT (libtrace )-> port , & id ,
2755- & value , 1 ) == 1 ) {
2754+ if (rte_eth_xstats_get_by_id (FORMAT (libtrace )-> port , & id , & value , 1 ) ==
2755+ 1 ) {
27562756 stats -> received_valid = 1 ;
27572757 stats -> received = value ;
27582758 }
27592759 }
27602760
27612761 if (stream -> xstat_drop_id >= 0 ) {
27622762 id = (uint64_t )stream -> xstat_drop_id ;
2763- if (rte_eth_xstats_get_by_id (FORMAT (libtrace )-> port , & id ,
2764- & value , 1 ) == 1 ) {
2763+ if (rte_eth_xstats_get_by_id (FORMAT (libtrace )-> port , & id , & value , 1 ) ==
2764+ 1 ) {
27652765 stats -> dropped_valid = 1 ;
27662766 stats -> dropped = value ;
27672767 }
@@ -2771,7 +2771,6 @@ static void dpdk_get_thread_stats(libtrace_t *libtrace, libtrace_thread_t *t,
27712771 stats -> captured = stats -> received - stats -> dropped ;
27722772 stats -> captured_valid = 1 ;
27732773 }
2774-
27752774}
27762775
27772776/* Attempts to read a packet in a non-blocking fashion. If one is not
0 commit comments