net/mlx5: support flow dump value
PATCH 1/1 net/mlx5: support flow dump value
Currently the flow dump provides few information about actions
- just the pointers. Add implementations to display details for counter, modify_hdr and encap_decap actions.
For counter, the regular flow operation query is engaged and the counter content information is provided, including hits and bytes values.For modify_hdr, encap_and decap actions, the information stored in the ipool objects is dumped.
There are the formats of information presented in the dump:
Counter: rec_type,id,hits,bytes
Modify_hdr: rec_type,id,actions_number,actions
Encap_decap: rec_type,id,buf
--- drivers/net/mlx5/mlx5.h | 15 ++++ drivers/net/mlx5/mlx5_flow.c | 165 ++++++++++++++++++++++++++++++++++- 2 files changed, 179 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5.h +15 -0
@@ -1397,6 +1397,13 @@ struct rte_hairpin_peer_info {uint16_t manual_bind; }; +#define BUF_SIZE 1024 +enum dr_dump_rec_type { +DR_DUMP_REC_TYPE_PMD_PKT_REFORMAT =4410 , +DR_DUMP_REC_TYPE_PMD_MODIFY_HDR =4420 , +DR_DUMP_REC_TYPE_PMD_COUNTER =4430 , +}; +/* mlx5.c */ int mlx5_getenv_int (const char *);
@@ -1628,6 +1635,14 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt, bool clear, uint64_t *pkts, uint64_t *bytes);int mlx5_flow_dev_dump (struct rte_eth_dev *dev,struct rte_flow *flow,FILE *file,struct rte_flow_error *error); +int save_dump_file (const unsigned char *data,uint32_t size, +uint32_t type,uint32_t id,void *arg,FILE *file); +int mlx5_flow_query_counter (struct rte_eth_dev *dev,struct rte_flow *flow, +struct rte_flow_query_count *count,struct rte_flow_error *error); +#ifdef HAVE_IBV_FLOW_DV_SUPPORT +int mlx5_flow_dev_dump_ipool (struct rte_eth_dev *dev,struct rte_flow *flow, +FILE *file,struct rte_flow_error *error); +#endif void mlx5_flow_rxq_dynf_metadata_set (struct rte_eth_dev *dev);int mlx5_flow_get_aged_flows (struct rte_eth_dev *dev,void **contexts,uint32_t nb_contexts,struct rte_flow_error *error);
drivers/net/mlx5/mlx5_flow.c +164 -1
192 lines not on this page · raw message
Signature · 1 line
2.31.1
Quoted 17 lines
-----Original Message-----
From: Haifei Luo <[email protected]>
Sent: Monday, May 31, 2021 5:22
To: Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Shahaf Shuler <[email protected]>
Cc: [email protected]; NBU-Contact-Thomas Monjalon <[email protected]>; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: support flow dump valueCurrently the flow dump provides few information about actions
- just the pointers. Add implementations to display details for counter,modify_hdrandencap_decapactions.For counter, the regular flow operation query is engaged and the counter content information is provided, including hits and bytes values.For
modify_hdr,encap_anddecap actions, the information stored in the ipool objects is dumped.
Quoted 6 lines
There are the formats of information presented in the dump:
Counter: rec_type,id,hits,bytes
Modify_hdr: rec_type,id,actions_number,actions
Encap_decap: rec_type,id,bufSigned-off-by Haifei Luo <[email protected]>
Hi,
Quoted 18 lines
-----Original Message-----
From: Haifei Luo <[email protected]>
Sent: Monday, May 31, 2021 5:22 AM
To: Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Shahaf Shuler <[email protected]>
Cc: [email protected]; NBU-Contact-Thomas Monjalon <[email protected]>; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: support flow dump valueCurrently the flow dump provides few information about actions
- just the pointers. Add implementations to display details for counter,modify_hdrandencap_decapactions.For counter, the regular flow operation query is engaged and the counter content information is provided, including hits and bytes values.For
modify_hdr,encap_anddecap actions, the information stored in the ipool objects is dumped.
Quoted 6 lines
There are the formats of information presented in the dump:
Counter: rec_type,id,hits,bytes
Modify_hdr: rec_type,id,actions_number,actions
Encap_decap: rec_type,id,bufSigned-off-by Haifei Luo <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh