mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
net/mlx5: Add trace points for flow tables create/destroy
We were not tracking flow tables so far, add it up. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
71129676ab
commit
8e4ca98609
@ -258,6 +258,8 @@ const char *parse_fs_dst(struct trace_seq *p,
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL(mlx5_fs_add_ft);
|
||||
EXPORT_TRACEPOINT_SYMBOL(mlx5_fs_del_ft);
|
||||
EXPORT_TRACEPOINT_SYMBOL(mlx5_fs_add_fg);
|
||||
EXPORT_TRACEPOINT_SYMBOL(mlx5_fs_del_fg);
|
||||
EXPORT_TRACEPOINT_SYMBOL(mlx5_fs_set_fte);
|
||||
|
@ -61,6 +61,41 @@ const char *parse_fs_dst(struct trace_seq *p,
|
||||
const struct mlx5_flow_destination *dst,
|
||||
u32 counter_id);
|
||||
|
||||
TRACE_EVENT(mlx5_fs_add_ft,
|
||||
TP_PROTO(const struct mlx5_flow_table *ft),
|
||||
TP_ARGS(ft),
|
||||
TP_STRUCT__entry(
|
||||
__field(const struct mlx5_flow_table *, ft)
|
||||
__field(u32, id)
|
||||
__field(u32, level)
|
||||
__field(u32, type)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->ft = ft;
|
||||
__entry->id = ft->id;
|
||||
__entry->level = ft->level;
|
||||
__entry->type = ft->type;
|
||||
),
|
||||
TP_printk("ft=%p id=%u level=%u type=%u \n",
|
||||
__entry->ft, __entry->id, __entry->level, __entry->type)
|
||||
);
|
||||
|
||||
TRACE_EVENT(mlx5_fs_del_ft,
|
||||
TP_PROTO(const struct mlx5_flow_table *ft),
|
||||
TP_ARGS(ft),
|
||||
TP_STRUCT__entry(
|
||||
__field(const struct mlx5_flow_table *, ft)
|
||||
__field(u32, id)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->ft = ft;
|
||||
__entry->id = ft->id;
|
||||
|
||||
),
|
||||
TP_printk("ft=%p id=%u\n",
|
||||
__entry->ft, __entry->id)
|
||||
);
|
||||
|
||||
TRACE_EVENT(mlx5_fs_add_fg,
|
||||
TP_PROTO(const struct mlx5_flow_group *fg),
|
||||
TP_ARGS(fg),
|
||||
|
@ -397,6 +397,7 @@ static void del_hw_flow_table(struct fs_node *node)
|
||||
fs_get_obj(ft, node);
|
||||
dev = get_dev(&ft->node);
|
||||
root = find_root(&ft->node);
|
||||
trace_mlx5_fs_del_ft(ft);
|
||||
|
||||
if (node->active) {
|
||||
err = root->cmds->destroy_flow_table(dev, ft);
|
||||
@ -1019,6 +1020,7 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa
|
||||
fs_prio->num_ft++;
|
||||
up_write_ref_node(&fs_prio->node);
|
||||
mutex_unlock(&root->chain_lock);
|
||||
trace_mlx5_fs_add_ft(ft);
|
||||
return ft;
|
||||
destroy_ft:
|
||||
root->cmds->destroy_flow_table(root->dev, ft);
|
||||
|
Loading…
Reference in New Issue
Block a user