Fixes: 0e6366c2399d ("netdev-offload-dpdk: Implement hw-offload statistics 
read.")

Signed-off-by: Linda Wang <linda.w...@jaguarmicro.com>

---
 If the device is a vport, the following steps occur:
 1.netdev_offload_dpdk_add_flow()->netdev_offload_dpdk_actions(patterns.physdev)
   ->netdev_offload_dpdk_flow_create()->data->rte_flow_counters[tid]++.
   The incremented of hardware offload counters use physdev in the code.
 2.The decremented of hardware offload counters use netdev.
   In this case, when all the flow tables are deleted, the hw-offload 
statistics   shows an incorrect value.
---
 lib/netdev-offload-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index 6ca271489..08740a27a 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -2375,7 +2375,7 @@ netdev_offload_dpdk_flow_destroy(struct 
ufid_to_rte_flow_data *rte_flow_data)
         unsigned int tid = netdev_offload_thread_id();
 
         data = (struct netdev_offload_dpdk_data *)
-            ovsrcu_get(void *, &netdev->hw_info.offload_data);
+            ovsrcu_get(void *, &physdev->hw_info.offload_data);
         data->rte_flow_counters[tid]--;
 
         VLOG_DBG_RL(&rl, "%s/%s: rte_flow 0x%"PRIxPTR
-- 
2.50.1.windows.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to