diff mbox series

[ovs-dev,41/62] netdev-offload-dpdk: validate mask check for disable megaflow

Message ID 20201228092520.11807-42-taoyunxiang@cmss.chinamobile.com
State Not Applicable
Headers show
Series DPDK Offload API to test | expand

Commit Message

Tao YunXiang Dec. 28, 2020, 9:24 a.m. UTC
From: Rongyin <rongyin@cmss.chinamobile.com>

Code Source From: Self Code

Description:

     Validate mask check for disable megaflow

Jira:  #[Optional]
市场项目编号(名称):[Optional]
---
 lib/netdev-offload-dpdk.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 4c0a5be..ad6302b 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -1789,11 +1789,12 @@  netdev_offload_dpdk_validate_flow(const struct match *match)
         goto err;
     }
      */
-
+    /* work around
     if (masks->metadata || masks->skb_priority ||
         masks->pkt_mark || masks->dp_hash) {
         goto err;
     }
+     */
 
     /* recirc id must be zero. */
     /* support recirc now so mark this checker
@@ -1810,12 +1811,15 @@  netdev_offload_dpdk_validate_flow(const struct match *match)
         return -1;
     }
 
+    /* support conntrack now so mark this checker
     if (masks->ct_state || masks->ct_nw_proto ||
         masks->ct_zone  || masks->ct_mark     ||
         !ovs_u128_is_zero(masks->ct_label)) {
         goto err;
     }
+     */
 
+    /* not support conj action */
     if (masks->conj_id || masks->actset_output) {
         goto err;
     }
@@ -1825,19 +1829,10 @@  netdev_offload_dpdk_validate_flow(const struct match *match)
         goto err;
     }
 
-    /* Unsupported L3. */
-    if (masks->ipv6_label || masks->ct_nw_src || masks->ct_nw_dst     ||
-        !is_all_zeros(&masks->ipv6_src,    sizeof masks->ipv6_src)    ||
-        !is_all_zeros(&masks->ipv6_dst,    sizeof masks->ipv6_dst)    ||
-        !is_all_zeros(&masks->ct_ipv6_src, sizeof masks->ct_ipv6_src) ||
-        !is_all_zeros(&masks->ct_ipv6_dst, sizeof masks->ct_ipv6_dst) ||
-        !is_all_zeros(&masks->nd_target,   sizeof masks->nd_target)   ||
-        !is_all_zeros(&masks->nsh,         sizeof masks->nsh)         ||
-        !is_all_zeros(&masks->arp_sha,     sizeof masks->arp_sha)     ||
-        !is_all_zeros(&masks->arp_tha,     sizeof masks->arp_tha)) {
+    if (!is_all_zeros(&masks->nd_target,   sizeof masks->nd_target)   ||
+        !is_all_zeros(&masks->nsh,         sizeof masks->nsh)         ){
         goto err;
     }
-
     /* If fragmented, then don't HW accelerate - for now. */
     /* move this checker to parse_flow_match
     if (match_zero_wc.flow.nw_frag) {