diff mbox series

[ovs-dev,1/1] netdev-offload-dpdk: Support vxlan encap offload with load actions

Message ID 20200730105838.5329-1-elibr@mellanox.com
State New
Headers show
Series [ovs-dev,1/1] netdev-offload-dpdk: Support vxlan encap offload with load actions | expand

Commit Message

Eli Britstein July 30, 2020, 10:58 a.m. UTC
From: Lei Wang <leiw@mellanox.com>

Struct match has the tunnel values/masks in
match->flow.tunnel/match->wc.masks.tunnel.
Load actions such as load:0xa566c10->NXM_NX_TUN_IPV4_DST[],
load:0xbba->NXM_NX_TUN_ID[] are utilizing the tunnel masks fields,
but those should not be used for matching.
Offloading fails if masks is not clear. Clear it if no tunnel used.

Signed-off-by: Lei Wang <leiw@mellanox.com>
Reviewed-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Gaetan Rivet <gaetanr@mellanox.com>
Signed-off-by: Eli Britstein <elibr@mellanox.com>
---
 lib/netdev-offload-dpdk.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

0-day Robot July 30, 2020, 12:01 p.m. UTC | #1
Bleep bloop.  Greetings Eli Britstein, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Eli Britstein <elibr@mellanox.com>
Lines checked: 38, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Eli Britstein Aug. 23, 2020, 2:20 p.m. UTC | #2
ping

On 7/30/2020 1:58 PM, Eli Britstein wrote:
> From: Lei Wang <leiw@mellanox.com>
>
> Struct match has the tunnel values/masks in
> match->flow.tunnel/match->wc.masks.tunnel.
> Load actions such as load:0xa566c10->NXM_NX_TUN_IPV4_DST[],
> load:0xbba->NXM_NX_TUN_ID[] are utilizing the tunnel masks fields,
> but those should not be used for matching.
> Offloading fails if masks is not clear. Clear it if no tunnel used.
>
> Signed-off-by: Lei Wang <leiw@mellanox.com>
> Reviewed-by: Eli Britstein <elibr@mellanox.com>
> Reviewed-by: Gaetan Rivet <gaetanr@mellanox.com>
> Signed-off-by: Eli Britstein <elibr@mellanox.com>
> ---
>   lib/netdev-offload-dpdk.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index de6101e4d..0d23e4879 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -682,6 +682,10 @@ parse_flow_match(struct flow_patterns *patterns,
>   
>       consumed_masks = &match->wc.masks;
>   
> +    if (!flow_tnl_dst_is_set(&match->flow.tunnel)) {
> +        memset(&match->wc.masks.tunnel, 0, sizeof match->wc.masks.tunnel);
> +    }
> +
>       memset(&consumed_masks->in_port, 0, sizeof consumed_masks->in_port);
>       /* recirc id must be zero. */
>       if (match->wc.masks.recirc_id & match->flow.recirc_id) {
Eli Britstein Sept. 6, 2020, 12:21 p.m. UTC | #3
ping

On 7/30/2020 1:58 PM, Eli Britstein wrote:
> From: Lei Wang <leiw@mellanox.com>
>
> Struct match has the tunnel values/masks in
> match->flow.tunnel/match->wc.masks.tunnel.
> Load actions such as load:0xa566c10->NXM_NX_TUN_IPV4_DST[],
> load:0xbba->NXM_NX_TUN_ID[] are utilizing the tunnel masks fields,
> but those should not be used for matching.
> Offloading fails if masks is not clear. Clear it if no tunnel used.
>
> Signed-off-by: Lei Wang <leiw@mellanox.com>
> Reviewed-by: Eli Britstein <elibr@mellanox.com>
> Reviewed-by: Gaetan Rivet <gaetanr@mellanox.com>
> Signed-off-by: Eli Britstein <elibr@mellanox.com>
> ---
>   lib/netdev-offload-dpdk.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index de6101e4d..0d23e4879 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -682,6 +682,10 @@ parse_flow_match(struct flow_patterns *patterns,
>   
>       consumed_masks = &match->wc.masks;
>   
> +    if (!flow_tnl_dst_is_set(&match->flow.tunnel)) {
> +        memset(&match->wc.masks.tunnel, 0, sizeof match->wc.masks.tunnel);
> +    }
> +
>       memset(&consumed_masks->in_port, 0, sizeof consumed_masks->in_port);
>       /* recirc id must be zero. */
>       if (match->wc.masks.recirc_id & match->flow.recirc_id) {
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index de6101e4d..0d23e4879 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -682,6 +682,10 @@  parse_flow_match(struct flow_patterns *patterns,
 
     consumed_masks = &match->wc.masks;
 
+    if (!flow_tnl_dst_is_set(&match->flow.tunnel)) {
+        memset(&match->wc.masks.tunnel, 0, sizeof match->wc.masks.tunnel);
+    }
+
     memset(&consumed_masks->in_port, 0, sizeof consumed_masks->in_port);
     /* recirc id must be zero. */
     if (match->wc.masks.recirc_id & match->flow.recirc_id) {