diff options
author | Maxim Mikityanskiy <maximmi@nvidia.com> | 2022-01-27 17:42:18 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-03-17 21:51:55 +0300 |
commit | 064990d0b65fd99c6fb59006f928a8b631db5816 (patch) | |
tree | 8fc918b52cb96b4212fb1c838bbf52bfdd0949e3 /drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | |
parent | e26eceb90b01ed941a6d13419a890930adcac494 (diff) | |
download | linux-064990d0b65fd99c6fb59006f928a8b631db5816.tar.xz |
net/mlx5e: Drop the len output parameter from mlx5e_xdp_handle
The len parameter of mlx5e_xdp_handle is used to output the new packet
length after XDP has processed the packet and returned XDP_PASS.
However, this value can be calculated on the caller site, as the caller
knows if it was an XDP_PASS.
This commit drops the len parameter and moves the calculation to the
caller, reducing the number of parameters passed to the function and
preparing for XDP support in non-linear legacy RQ.
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h index 850540e94bb4..20d8af66c072 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h @@ -48,8 +48,7 @@ struct mlx5e_xsk_param; int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk); bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di, - struct bpf_prog *prog, - u32 *len, struct xdp_buff *xdp); + struct bpf_prog *prog, struct xdp_buff *xdp); void mlx5e_xdp_mpwqe_complete(struct mlx5e_xdpsq *sq); bool mlx5e_poll_xdpsq_cq(struct mlx5e_cq *cq); void mlx5e_free_xdpsq_descs(struct mlx5e_xdpsq *sq); |