Mellanox ConnectX-6 Dx counter action limit

I am experiencing an issue with flow rule counters on a NVIDIA Mellanox ConnectX-6 Dx.

Environment
NIC: NVIDIA Mellanox ConnectX-6 Dx
OS: Ubuntu 24.04 (kernel 6.14)
OFED: 24.10-4.1.4
DPDK: 24.11

I created 65,536 flow rules, each with its own COUNT + DROP actions.

To test, I generated traffic that matches only the first flow rule (rule 0). Then I iterated over all flow rules to read their counters.

Observed behavior

  • Traffic is correctly counted in flow rule 0

  • However, I also see the same counter values in flow rule 65536

  • This suggests that the counter is being shared or aliased between these two rules

Additionally:

  • The same behavior repeats when increasing the number of flow rules in multiples of **65,535
    **

I am using async template API and flow rule actions are like the below:

struct rte_flow_action actions[] = {
{ .type = RTE_FLOW_ACTION_TYPE_COUNT, .conf = count_conf },
{ .type = RTE_FLOW_ACTION_TYPE_DROP },
{ .type = RTE_FLOW_ACTION_TYPE_END }
};

Is there a hardware or driver limitation on the number of distinct flow counters (0xFFFF?) on ConnectX-6 Dx? Where is it documented?

Is the use of shared or indirect COUNT actions (RTE_FLOW_ACTION_TYPE_COUNT) supported on a NVIDIA Mellanox ConnectX-6 Dx? If yes, what is the expected behavior when a single indirect/shared counter handle is attached to multiple flow rules with RTE_FLOW_ACTION_TYPE_COUNT?

Specifically:

  • Are packet/byte counters aggregated across all flows using the same handle?

  • Or is there any per-flow visibility preserved internally?