Hi Kumar,

First can you please use the correct subject line for your patches, i.e. 
include the word PATCH for example. See 
https://github.com/openvswitch/ovs/blob/master/Documentation/internals/contributing/submitting-patches.rst#email-subject.

More specific to this patch, can you add the reason why this patch was sent 
separately, i.e. potential performance penalty. Also, you should do some Port 
to Port and Port-VirtualPort-Port (PVP) tests and report the results with and 
without this patch for the scalar datapath (so no AVX enabled anywhere). This 
so people can give feedback on this performance regression and make a proper 
decision.

Cheers,

Eelco


On 14 Jul 2021, at 4:22, kumar Amber wrote:

> This commits add the mfex optimized options to be executed as part of scalar 
> DPIF.
>
> Signed-off-by: kumar Amber <[email protected]>
> Acked-by: Flavio Leitner <[email protected]>
> ---
>  lib/dpif-netdev.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index 10aed2299..c241a2158 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -7022,6 +7022,7 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
>      size_t n_missed = 0, n_emc_hit = 0, n_phwol_hit = 0,  n_mfex_opt_hit = 0;
>      struct dfc_cache *cache = &pmd->flow_cache;
>      struct dp_packet *packet;
> +    struct dp_packet_batch single_packet;
>      const size_t cnt = dp_packet_batch_size(packets_);
>      uint32_t cur_min = pmd->ctx.emc_insert_min;
>      const uint32_t recirc_depth = *recirc_depth_get();
> @@ -7032,6 +7033,11 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
>      size_t map_cnt = 0;
>      bool batch_enable = true;
>
> +    single_packet.count = 1;
> +
> +    miniflow_extract_func mfex_func;
> +    atomic_read_relaxed(&pmd->miniflow_extract_opt, &mfex_func);
> +
>      atomic_read_relaxed(&pmd->dp->smc_enable_db, &smc_enable_db);
>      pmd_perf_update_counter(&pmd->perf_stats,
>                              md_is_valid ? PMD_STAT_RECIRC : PMD_STAT_RECV,
> @@ -7082,7 +7088,22 @@ dfc_processing(struct dp_netdev_pmd_thread *pmd,
>              }
>          }
>
> -        miniflow_extract(packet, &key->mf);
> +        /* Set the count and packet for miniflow_opt with batch_size 1. */
> +        if ((mfex_func) && (!md_is_valid)) {
> +            single_packet.packets[0] = packet;
> +            int mf_ret;
> +
> +            mf_ret = mfex_func(&single_packet, key, 1, port_no, pmd);
> +            /* Fallback to original miniflow_extract if there is a miss. */
> +            if (mf_ret) {
> +                n_mfex_opt_hit++;
> +            } else {
> +                miniflow_extract(packet, &key->mf);
> +            }
> +        } else {
> +            miniflow_extract(packet, &key->mf);
> +        }
> +
>          key->len = 0; /* Not computed yet. */
>          key->hash =
>                  (md_is_valid == false)
> -- 
> 2.25.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to