On 7 Jul 2021, at 6:34, Amber, Kumar wrote:
> Hi Eelco, > > MFEX v7 will be available shorty EOD today. > Some comments are inline. Thanks, looks like one item is still not clear, and I think why (see below). > <Sniped> >>> + * 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. > 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); <SNIP> _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev