[ovs-dev] [PATCH v3 4/9] netdev-dpdk: implement flow put with rte flow

Chandran, Sugesh sugesh.chandran at intel.com
Mon Oct 2 16:28:38 UTC 2017



Regards
_Sugesh


> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu at fridaylinux.org]
> Sent: Tuesday, September 26, 2017 6:37 AM
> To: dev at openvswitch.org
> Cc: Finn Christensen <fc at napatech.com>; Darrell Ball <dball at vmware.com>;
> Chandran, Sugesh <sugesh.chandran at intel.com>; Simon Horman
> <simon.horman at netronome.com>; Yuanhan Liu <yliu at fridaylinux.org>
> Subject: [PATCH v3 4/9] netdev-dpdk: implement flow put with rte flow
> 
> From: Finn Christensen <fc at napatech.com>
> 
> The basic yet the major part of this patch is to translate the "match"
> to rte flow patterns. And then, we create a rte flow with a MARK action.
> Afterwards, all pkts matches the flow will have the mark id in the mbuf.
> 
> For any unsupported flows, such as MPLS, -1 is returned, meaning the flow
> offload is failed and then skipped.
> 
> Co-authored-by: Yuanhan Liu <yliu at fridaylinux.org>
> Signed-off-by: Finn Christensen <fc at napatech.com>
> Signed-off-by: Yuanhan Liu <yliu at fridaylinux.org>
> ---
> 
> v3: - fix duplicate (and wrong) TOS assignment
>     - zero the pattern spec as well
>     - remove macros
>     - add missing unsupported fields
> 
> v2: - convert some macros to functions
>     - do not hardcode the max number of flow/action
>     - fix L2 patterns for Intel nic
>     - add comments for not implemented offload methods
> ---
>  lib/netdev-dpdk.c | 441
> +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 440 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 1be9131..525536a
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -3404,6 +3404,445 @@ get_rte_flow_by_ufid(const ovs_u128 *ufid)  }
> 

[snip] 
> +
> +    /* unsupported L2 */
> +    if (!is_all_zero(&match->wc.masks.mpls_lse,
> +                     sizeof(match_zero_wc.flow.mpls_lse))) {
> +        goto err;
[Sugesh] As we discussed earlier, If we know the capability , we can avoid the whole translation itself.
Also it helps to avoid the flow install when the device is full and cannot take any more flow rules.

> +    }
> +
> +    /* unsupported L3 */
> +    if (match->wc.masks.ipv6_label ||
> --
> 2.7.4



More information about the dev mailing list