diff mbox series

[ovs-dev,08/62] netdev-offload-dpdk: Not attemp to offload ipv4 fragment pkt

Message ID 20201228092520.11807-9-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: Liuchang <liuchang@cmss.chinamobile.com>

Code Source From: Self Code
Description:

    For ipv4 fragment pkt , as Hardware not support to offload,
we disable these pkts during offloading.

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

Patch

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 5ce25e3..05c7558 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -613,6 +613,13 @@  parse_flow_match(struct flow_patterns *patterns,
         add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_VLAN, spec, mask);
     }
 
+    /* do not attempt to offload frags. */
+    if (match->flow.nw_frag != OVS_FRAG_TYPE_NONE && match->wc.masks.nw_frag) {
+        VLOG_DBG("Frag (%d/%d) not supported", match->flow.nw_frag,
+                    match->wc.masks.nw_frag);
+        return -1;
+    }
+
     /* IP v4 */
     if (match->flow.dl_type == htons(ETH_TYPE_IP)) {
         struct rte_flow_item_ipv4 *spec, *mask;