Robin Jarry, Aug 31, 2023 at 15:11:
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 70b953ae6dd3..ebf43a0f62e4 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -1427,6 +1427,41 @@ dpif_netdev_pmd_rebalance(struct unixctl_conn *conn,
> int argc,
> ds_destroy(&reply);
> }
>
> +static void
> +dpif_netdev_get_pmd_cycles(unsigned int core_id,
> + uint64_t *busy_cycles, uint64_t *total_cycles)
> +{
> + struct dp_netdev_pmd_thread **pmd_list = NULL;
> + uint64_t stats[PMD_N_STATS];
> + struct dp_netdev *dp;
> + size_t num_pmds;
> +
> + ovs_mutex_lock(&dp_netdev_mutex);
> +
> + if (shash_count(&dp_netdevs) != 1) {
> + goto out;
> + }
> +
> + dp = shash_first(&dp_netdevs)->data;
> + sorted_poll_thread_list(dp, &pmd_list, &num_pmds);
> +
> + for (size_t i = 0; i < num_pmds; i++) {
> + struct dp_netdev_pmd_thread *pmd = pmd_list[i];
> +
> + if (pmd->core_id == core_id) {
> + continue;
> + }
This logic is reversed. Too bad for the last minute cleanup/rework.
Before sending a v2, I'll wait to see if there are other things to
change.
By the way, this patch is targeted for the dpdk-latest branch. I forgot
to change the subject prefix. I'll do that for v2 as well.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev