Skip to content

Commit 5b186cd

Browse files
heinrich-kuhndavem330
authored andcommitted
nfp: flower: fix used time of merge flow statistics
Prior to this change the correct value for the used counter is calculated but not stored nor, therefore, propagated to user-space. In use-cases such as OVS use-case at least this results in active flows being removed from the hardware datapath. Which results in both unnecessary flow tear-down and setup, and packet processing on the host. This patch addresses the problem by saving the calculated used value which allows the value to propagate to user-space. Found by inspection. Fixes: aa6ce2e ("nfp: flower: support stats update for merge flows") Signed-off-by: Heinrich Kuhn <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bb2f930 commit 5b186cd

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/netronome/nfp/flower

1 file changed

+2
-1
lines changed

drivers/net/ethernet/netronome/nfp/flower/offload.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,8 @@ __nfp_flower_update_merge_stats(struct nfp_app *app,
14401440
ctx_id = be32_to_cpu(sub_flow->meta.host_ctx_id);
14411441
priv->stats[ctx_id].pkts += pkts;
14421442
priv->stats[ctx_id].bytes += bytes;
1443-
max_t(u64, priv->stats[ctx_id].used, used);
1443+
priv->stats[ctx_id].used = max_t(u64, used,
1444+
priv->stats[ctx_id].used);
14441445
}
14451446
}
14461447

0 commit comments

Comments
 (0)