diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2019-07-14 17:50:51 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-08-01 12:33:31 -0700 |
commit | 7cf6f811b72aced0c48e1065fe059d604ef6363d (patch) | |
tree | fbb8a9111bdb17d7deca0d6dcdf1064c96288f5f /drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | |
parent | 6c085a8aab5183d8658c9a692bcfda3e24195b7a (diff) | |
download | linux-stable-7cf6f811b72aced0c48e1065fe059d604ef6363d.tar.gz linux-stable-7cf6f811b72aced0c48e1065fe059d604ef6363d.tar.bz2 linux-stable-7cf6f811b72aced0c48e1065fe059d604ef6363d.zip |
net/mlx5e: XDP, Slight enhancement for WQE fetch function
Instead of passing an output param, let function return the
WQE pointer.
In addition, pass &pi so it gets its value in the function,
and save the redundant assignment that comes after it.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c index 8cb98326531f..1ed5c33e022f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c @@ -187,14 +187,12 @@ static void mlx5e_xdp_mpwqe_session_start(struct mlx5e_xdpsq *sq) if (unlikely(contig_wqebbs < MLX5_SEND_WQE_MAX_WQEBBS)) mlx5e_fill_xdpsq_frag_edge(sq, wq, pi, contig_wqebbs); - mlx5e_xdpsq_fetch_wqe(sq, &session->wqe); + session->wqe = mlx5e_xdpsq_fetch_wqe(sq, &pi); prefetchw(session->wqe->data); session->ds_count = MLX5E_XDP_TX_EMPTY_DS_COUNT; session->pkt_count = 0; - pi = mlx5_wq_cyc_ctr2ix(wq, sq->pc); - mlx5e_xdp_update_inline_state(sq); stats->mpwqe++; |