diff mbox series

[ovs-dev,v3] netdev_offload_dpdk: Fix error deletion of hardware offload counters.

Message ID 20250811121912.1947-1-linda.wang@jaguarmicro.com
State Changes Requested
Headers show
Series [ovs-dev,v3] netdev_offload_dpdk: Fix error deletion of hardware offload counters. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/cirrus-robot success cirrus build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Linda Wang Aug. 11, 2025, 12:19 p.m. UTC
Fixes: 7851e602c090 ("netdev-offload-dpdk: Use per-thread HW offload stats.")

Signed-off-by: Linda Wang <linda.wang@jaguarmicro.com>
---
 lib/netdev-offload-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kevin Traynor Aug. 15, 2025, 5:45 p.m. UTC | #1
Hi Linda,

On 11/08/2025 13:19, Linda Wang via dev wrote:
> Fixes: 7851e602c090 ("netdev-offload-dpdk: Use per-thread HW offload stats.")
> 

Can you clearly describe the problem and solution in the description
section.

It is probably best to describe the counters as "decremented" or
"updated" rather than deleted.

The fixes mentioned above just expanded stats to per-thread, so i think
the fixes should be:
Fixes: 0e6366c2399d ("netdev-offload-dpdk: Implement hw-offload
statistics read.")

> Signed-off-by: Linda Wang <linda.wang@jaguarmicro.com>
> ---
>  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

Without vport, netdev and physdev will be the same, but I think the
change looks right for vport case. Let's see if Gaetan or Eli have
comments too.

thanks,
Kevin.
diff mbox series

Patch

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