[ovs-dev] [v5 01/11] dpif-netdev: Add command line and function pointer for miniflow extract
Amber, Kumar
kumar.amber at intel.com
Wed Jul 7 09:04:33 UTC 2021
Hi Eelco,
Thanks for reviews good find I missed it will be fixed in v7.
< Snip>
>
> >>> + * for that packet.
> >>> + */
> >>> + uint32_t mfex_hit = (mf_mask & (1 << i));
> >>
> >> This was supposed to become a bool?
> >>
> >
> > This cannot be a bool as this is used like a bit-mask and set bits are used to
> iterate the packets.
> >
>
Fixed.
> Guess the problem is that it should be a bool in this instance, but later on in the
> code you redefine the same variable and use it as a count!
> I would suggest changing this to a bool, and renaming the other instance to hits
> or mfex_hit_cnt.
>
>
> 313 /* At this point we don't return error anymore, so commit stats here. */
> 314 uint32_t mfex_hit = __builtin_popcountll(mf_mask);
>
> Change this to “uint32_t mfex_hit_cnt / or mfex_hits”
>
> 315 pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_RECV,
> batch_size);
> 316 pms_perf_update_counter(&pmd->perf_stats, PMD_STAT_PHWOL_HIT,
> phwol_hits);
> 317 pmd_perf_update_counter(&pmd->perf_stats,
> PMD_STAT_MFEX_OPT_HIT, mfex_hit);
>
> And this to:
>
> pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_MFEX_OPT_HIT,
> mfex_hits);
>
> 318 pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_EXACT_HIT,
> emc_hits);
> 319 pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_SMC_HIT,
> smc_hits);
> 320 pmd_perf_update_counter(&pmd->perf_stats, PMD_STAT_MASKED_HIT,
> 321 dpcls_key_idx);
> 322 pmd_perf_update_counter(&pmd->perf_stats,
> PMD_STAT_MASKED_LOOKUP,
> 323 dpcls_key_idx);
>
>
Fixed.
> <SNIP>
More information about the dev
mailing list