]> git.droids-corp.org - dpdk.git/commit
net/mlx5: enhance flow dump
authorHaifei Luo <haifeil@nvidia.com>
Tue, 26 Oct 2021 03:56:32 +0000 (06:56 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 28 Oct 2021 08:14:21 +0000 (10:14 +0200)
commita7ac7fae4919530dd2ad5aff8f82665018fd928a
treee5a3207e8acbc0df728141dcc105f6d2bc8fceca
parent3c4338a421344d9671adc26f6e92949169276c47
net/mlx5: enhance flow dump

Multiple rules could use the same encap_decap/modify_hdr/counter action.
The flow dump data could be duplicated.

To avoid redundancy, flow dump value is based on the actions' pointer
instead of previous rules' pointer.

For counter, the data is stored in cmng of priv->sh.
For encap_decap/modify_hdr, the data stored in encaps_decaps/modify_cmds.
Traverse the fields and get action's pointer and information.

Formats are same for information in the dump except "id" stands for
actions' pointer:
    Counter:     rec_type,id,hits,bytes
    Modify_hdr:  rec_type,id,actions_number,actions
    Encap_decap: rec_type,id,buf

Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c