diff mbox series

[ovs-dev,33/62] dpif-netdev.c: for offloaded flow, change offloaded_type to partial when rte_flow_query doesn't available

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

Commit Message

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

Code Source From: Self Code

Description:

     For offloaded flow, change offloaded_type to partial when rte_flow_query
doesn't available

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

Patch

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 623e1c8..ff226ea 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3165,7 +3165,15 @@  get_dpif_flow_status(const struct dp_netdev *dp,
             attrs->dp_layer = offload_attrs.dp_layer;
         }
     } else if (attrs) {
-        attrs->offloaded = false;
+        attrs->offloaded = offload_attrs.offloaded;
+        /* When dpdk_rte_flow_query doesn't available,we should also use
+         * offloaded flag to mark if this flow has been offloaded success
+         * and for offloaded:partial, dp:ovs , the stats get from userspace
+         * datapath
+         *
+         *
+         * attrs->offloaded = false;
+         */
         attrs->dp_layer = "ovs";
     }
 }