Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In DPDK 23.03 (and later), it is possible that Length of xstats_name doesn't match lenth of xstats_values:
https://doc.dpdk.org/api-23.03/rte__ethdev_8h.html#a300d75b583c1f5acfe5b162a5d8c0ac1
There is an assumption that 'xstat_names' and 'xstats' arrays are matched by array index: xstats_names[i].name => xstats[i].value
This is exactly what happens in my case:
trex>stats -x stats - Length of get_xstats_names: 79 and get_port_xstats_values: 63
https://github.com/cisco-system-traffic-generator/trex-core/blob/master/scripts/automation/trex_control_plane/interactive/trex/common/stats/trex_port_stats.py#L226-L227
Simple workaround would be to do:
names = self.names[:len(values)] if len(values) != len(names): raise TRexError('Length of get_xstats_names: %s and get_port_xstats_values: %s' % (len(self.names), len(values)))
And that would make stats -x working again even if you combine multiple generations of connectx cards:
stats -x
The text was updated successfully, but these errors were encountered:
Fix console stats -x not working on mlx5 cards
40c38b4
At least in DPDK 23.03 (and later) xstats_names might return more names than xstats_values and that is considered normal. See https://doc.dpdk.org/api-23.03/rte__ethdev_8h.html#a300d75b583c1f5acfe5b162a5d8c0ac1 In this case it seems appropriate to force names to be same length as values Fixes cisco-system-traffic-generator#1111
f369fff
95ca7e7
In DPDK 23.03 (and later), it is possible that Length of xstats_name doesn't match lenth of xstats_values:
https://doc.dpdk.org/api-23.03/rte__ethdev_8h.html#a300d75b583c1f5acfe5b162a5d8c0ac1
This is exactly what happens in my case:
https://github.com/cisco-system-traffic-generator/trex-core/blob/master/scripts/automation/trex_control_plane/interactive/trex/common/stats/trex_port_stats.py#L226-L227
Simple workaround would be to do:
And that would make
![CleanShot 2024-02-27 at 19 35 46](https://cdn.statically.io/img/private-user-images.githubusercontent.com/844380/308295546-92fa6f7b-070a-480a-98d4-d4662a3c0e6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0MDQ4NDAsIm5iZiI6MTcyMTQwNDU0MCwicGF0aCI6Ii84NDQzODAvMzA4Mjk1NTQ2LTkyZmE2ZjdiLTA3MGEtNDgwYS05OGQ0LWQ0NjYyYTNjMGU2ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOVQxNTU1NDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZWZiNzllMjQ4MjI5MDAyMGQxNTZkM2E3MmNiYjNmNGUwZmEzN2Y0OGRmZmYwMzY0MDM5MWRlYzdmZjA4ODQ1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.xgsHfOoQAxsx4CZ_pAi5JZ4smvuuBpjoOCweAUfkpBA)
stats -x
working again even if you combine multiple generations of connectx cards:The text was updated successfully, but these errors were encountered: