Skip to content
Commit 917d1e79 authored by Hamdan Igbaria's avatar Hamdan Igbaria Committed by Saeed Mahameed
Browse files

net/mlx5: DR, Change SWS usage to debug fs seq_file interface



In current SWS debug dump mechanism we implement the seq_file interface,
but we only implement the 'show' callback to dump the whole steering DB
with a single call to this callback.

However, for large data size the seq_printf function will fail to
allocate a buffer with the adequate capacity to hold such data.

This patch solves this problem by utilizing the seq_file interface
mechanism in the following way:
 - when the user triggers a dump procedure, we will allocate a list of
   buffers that hold the whole data dump (in the start callback)
 - using the start, next, show and stop callbacks of the seq_file
   API we iterate through the list and dump the whole data

Signed-off-by: default avatarHamdan Igbaria <hamdani@nvidia.com>
Reviewed-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 507472ed
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment