> +static void > +get_eventdev_xstats(uint8_t dev_id, >+You can separate this function (basically the code inside this function) into >3 functions, one for reset and one for display stats values. >+And move the common code(stats storage calculation logic and getting stats >name logic) to a another function, so you can call that function from reset >and display functions. This can be done, but we will have 2 API calls for each now, if we have this flag we will be able to reset withing one API call. > + > + if (enable_dump_eventdev_xstats) { > + ret = rte_event_dev_dump(evdev_id, stdout); > + if (ret) > + rte_panic("dump failed with err=%d\n", ret); > + } > + > + process_eventdev_xstats(false); > + > + if (enable_eventdev_reset_xstats) > + process_eventdev_xstats(true); >+For easy code readability, I would say have a sperate function for reset >stats, do not mix display and resets by just passing reset bool value. Same for this one as above, one API call to the xstats instead of two separate calls if we use this flag. Thanks, Reshma
- RE: [PATCH v6] app/procinfo: display eventdev ... Pattan, Reshma
- [PATCH v7] app/procinfo: display eventdev xstats Abdullah Sevincer
- Re: [PATCH v7] app/procinfo: display eventdev xsta... Stephen Hemminger
- RE: [PATCH v7] app/procinfo: display eventdev ... Sevincer, Abdullah
- Re: [PATCH v7] app/procinfo: display event... Stephen Hemminger
- RE: [PATCH v7] app/procinfo: display e... Sevincer, Abdullah
- [PATCH v8] app/procinfo: display eventdev xstats Abdullah Sevincer
- RE: [PATCH v8] app/procinfo: display eventdev xsta... Pattan, Reshma
- RE: [PATCH v8] app/procinfo: display eventdev ... Sevincer, Abdullah
- RE: [PATCH v8] app/procinfo: display eventdev xsta... Pattan, Reshma
- RE: [PATCH v8] app/procinfo: display eventdev ... Sevincer, Abdullah
- [PATCH v9] app/procinfo: display eventdev xstats Abdullah Sevincer
- [PATCH v10] app/procinfo: display eventdev xstats Abdullah Sevincer
- [PATCH v11] app/procinfo: display eventdev xstats Abdullah Sevincer
- [PATCH v12] app/procinfo: display eventdev xstats Abdullah Sevincer
- RE: [PATCH v12] app/procinfo: display eventdev... Pattan, Reshma
- RE: [PATCH v12] app/procinfo: display even... Sevincer, Abdullah
- RE: [PATCH v12] app/procinfo: display even... Sevincer, Abdullah
- RE: [PATCH v12] app/procinfo: display ... Pattan, Reshma
- RE: [PATCH v12] app/procinfo: dis... Sevincer, Abdullah
- RE: [PATCH v12] app/procinfo:... Pattan, Reshma