[dpdk-dev] [PATCH v2 4/4] app/testpmd: support tunnel offload API

Ajit Khaparde ajit.khaparde at broadcom.com
Tue Sep 15 06:47:16 CEST 2020


On Tue, Sep 8, 2020 at 1:17 PM Gregory Etelson <getelson at nvidia.com> wrote:

> ::::snip::::
> @@ -1520,6 +1574,75 @@ port_flow_create(portid_t port_id,
>                 }
>                 id = port->flow_list->id + 1;
>         }
> +       if (tunnel_ops->enabled) {
> +               int ret;
> +               pft = port_flow_locate_tunnel(port, tunnel_ops->id);
> +               if (!pft) {
> +                       printf("failed to locate port flow tunnel #%u\n",
> +                               tunnel_ops->id);
> +                       return -ENOENT;
> +               }
> +               if (tunnel_ops->actions) {
> +                       uint32_t num_actions;
> +                       const struct rte_flow_action *aptr;
> +
> +                       ret = rte_flow_tunnel_decap_set(port_id,
> &pft->tunnel,
> +                                                       &pft->pmd_actions,
> +
>  &pft->num_pmd_actions,
> +                                                       &error);
>
Does tunnel_ops always indicate decap?
Shouldn't there be a check for encap/decap? Or check for direction?



> +                       if (ret) {
> +                               port_flow_complain(&error);
> +                               return -EINVAL;
> +                       }
> ::::snip::::
>
>


More information about the dev mailing list