> -----Original Message-----
> From: Amber, Kumar <[email protected]>
> Sent: Tuesday, May 24, 2022 12:39 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; [email protected]; Van Haaren,
> Harry <[email protected]>; Ferriter, Cian <[email protected]>;
> Stokes, Ian <[email protected]>; Amber, Kumar <[email protected]>
> Subject: [PATCH v2 5/5] dpif-netdev-avx512: Add inner packet handling to dpif.
> 
> This patch adds the necessary changes required to support
> tunnel packet types in avx512 dpif.
> 
> Signed-off-by: Kumar Amber <[email protected]>
> Signed-off-by: Cian Ferriter <[email protected]>
> Co-authored-by: Cian Ferriter <[email protected]>
> ---
>  lib/dpif-netdev-avx512.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)

<snip>

> @@ -262,7 +267,8 @@ dp_netdev_input_avx512__(struct
> dp_netdev_pmd_thread *pmd,
>       * dpcls_rules[] array.
>       */
>      if (dpcls_key_idx > 0) {
> -        struct dpcls *cls = dp_netdev_pmd_lookup_dpcls(pmd, in_port);
> +        odp_port_t port_no = packets->packets[0]->md.in_port.odp_port;
> +        struct dpcls *cls = dp_netdev_pmd_lookup_dpcls(pmd, port_no);
>          if (OVS_UNLIKELY(!cls)) {
>              return -1;
>          }

Possible improvement to the above method;
For *outer* packets, the below snippet is true, as it is initialized to that:
packets->packets[0]->md.in_port.odp_port == in_port

For *recirc* packets, the "packets->packets[0]->md.in_port.odp_port" value must 
be used.

Suggesting an optimization like below, to avoid re-loading packet[0]->md in 
outer?
if (!md_is_valid) {
    // in_port method
} else {
    // packets[0]->md method
}

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

Reply via email to