Skip to content

Commit bfc63c9

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: Remove redundant page argument in mlx5e_xmit_xdp_buff()
Remove the page parameter, it can be derived from the xdp_buff. Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Dragos Tatulea <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 53ee914 commit bfc63c9

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+3
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ int mlx5e_xdp_max_mtu(struct mlx5e_params *params, struct mlx5e_xsk_param *xsk)
5757

5858
static inline bool
5959
mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
60-
struct page *page, struct xdp_buff *xdp)
60+
struct xdp_buff *xdp)
6161
{
62+
struct page *page = virt_to_page(xdp->data);
6263
struct skb_shared_info *sinfo = NULL;
6364
struct mlx5e_xmit_data xdptxd;
6465
struct mlx5e_xdp_info xdpi;
@@ -197,7 +198,7 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct page *page,
197198
case XDP_PASS:
198199
return false;
199200
case XDP_TX:
200-
if (unlikely(!mlx5e_xmit_xdp_buff(rq->xdpsq, rq, page, xdp)))
201+
if (unlikely(!mlx5e_xmit_xdp_buff(rq->xdpsq, rq, xdp)))
201202
goto xdp_abort;
202203
__set_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags); /* non-atomic */
203204
return true;

0 commit comments

Comments
 (0)