UCS/DEBUG: Add table builder API#11477
Conversation
56705a7 to
bc51287
Compare
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
bc51287 to
0120324
Compare
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
|
🤖 Starting review — findings will be posted here when done. |
svc-nvidia-pr-review
left a comment
There was a problem hiding this comment.
Code Review
9 findings —
9 findings posted as inline comments.
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
2074928 to
5aebde0
Compare
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
0686c21 to
f6c54fb
Compare
| */ | ||
| void ucs_table_init(ucs_table_t *table, const ucs_table_config_t *config); | ||
| ucs_status_t | ||
| ucs_table_init(ucs_table_t *table, const ucs_table_config_t *config); |
There was a problem hiding this comment.
perhaps a more compact API for tables still would be better? since tables are printed based on a special request, not as part of the regular workflow.
There was a problem hiding this comment.
There was a problem hiding this comment.
Well, I just provided my feedback, if others think that compact API is better - we can do it. Personally I think that fatal in logging utility is not the best.
Another approach would be to add "ucs_status last_error" field to the table, so that:
- each function checks this field in the beginning, if error is set - just return
- first time we set an error - log ERROR
This way we keep API simple and avoid fatal
There was a problem hiding this comment.
@iyastreb I implemented your suggestion, please review
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
f6c54fb to
3d554a9
Compare
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
edfc804 to
69d61ee
Compare
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
What?
Unify table printing logic under a common API, refactored existing table prints in
sys_info.candproto_debug.c.Why?
Every feature that prints a table implements its own table formatting logic which is fragile and hard to extend.
A unified API would make printing new tables easier and would unify behavior across UCX.
This refactor was done to allow me print new tables as part of a new feature I'm working on.
Examples:
UCX_PROTO_INFO=usedUCX_PROTO_INFO=yucx_info -T