Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e4ca986 authored by Or Gerlitz's avatar Or Gerlitz Committed by Saeed Mahameed
Browse files

net/mlx5: Add trace points for flow tables create/destroy



We were not tracking flow tables so far, add it up.

Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 71129676
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+35 −0
Original line number Diff line number Diff line
@@ -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),
+2 −0
Original line number Diff line number Diff line
@@ -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);