nfp: flower-tc: add flow stats updates for ct
authorLouis Peens <louis.peens@corigine.com>
Thu, 22 Jul 2021 07:58:08 +0000 (09:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2021 09:22:22 +0000 (02:22 -0700)
commit40c10bd9be3fec47062cd9c074d83854832fe825
treec921454ee74a0f7c9f4b230898d7070632291b70
parent400a5e5f15a6a64bd4aed59af703efe748a8778a
nfp: flower-tc: add flow stats updates for ct

Add in the logic to update flow stats. The flow stats from the nfp
is saved in the flow_pay struct, which is associated with the final
merged flow. This saves deltas however, so once read it needs to
be cleared. However the flow stats requests from the kernel is
from the other side of the chain, and a single tc flow from
the kernel can be merged into multiple other tc flows to form
multiple offloaded flows. This means that all linked flows
needs to be updated for each stats request.

Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/conntrack.c
drivers/net/ethernet/netronome/nfp/flower/conntrack.h
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/offload.c