]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Refactor fragmented buffer struct fields and init flow
authorTariq Toukan <tariqt@mellanox.com>
Wed, 12 Sep 2018 12:36:41 +0000 (15:36 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 18 Oct 2018 20:13:31 +0000 (13:13 -0700)
commit9b7810f7658797ca0d0aea8623dea0ee2033f12a
tree762dd24e88fcf828b55b1700e970356cfcb7567e
parentbdc2669f92f0a5591efdfaac6f8b7282bb8bf55c
net/mlx5: Refactor fragmented buffer struct fields and init flow

Take struct mlx5_frag_buf out of mlx5_frag_buf_ctrl, as it is not
needed to manage and control the datapath of the fragmented buffers API.

struct mlx5_frag_buf contains control info to manage the allocation
and de-allocation of the fragmented buffer.
Its fields are not relevant for datapath, so here I take them out of the
struct mlx5_frag_buf_ctrl, except for the fragments array itself.

In addition, modified mlx5_fill_fbc to initialise the frags pointers
as well. This implies that the buffer must be allocated before the
function is called.

A set of type-specific *_get_byte_size() functions are replaced by
a generic one.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/net/ethernet/mellanox/mlx5/core/wq.c
include/linux/mlx5/driver.h