mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
net/mlx5e: RX, Use indirect calls wrapper for posting descriptors
We can avoid an indirect call per NAPI cycle wrapping the RX descriptors posting call with the appropriate helper. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reviewed-by: Maxim Mikityanskiy <maximmi@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
6e0504c698
commit
2c8f80b3e3
@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/irq.h>
|
||||
#include <linux/indirect_call_wrapper.h>
|
||||
#include "en.h"
|
||||
#include "en/xdp.h"
|
||||
#include "en/xsk/rx.h"
|
||||
@ -99,7 +100,10 @@ static bool mlx5e_napi_xsk_post(struct mlx5e_xdpsq *xsksq, struct mlx5e_rq *xskr
|
||||
busy_xsk |= mlx5e_xsk_tx(xsksq, MLX5E_TX_XSK_POLL_BUDGET);
|
||||
mlx5e_xsk_update_tx_wakeup(xsksq);
|
||||
|
||||
xsk_rx_alloc_err = xskrq->post_wqes(xskrq);
|
||||
xsk_rx_alloc_err = INDIRECT_CALL_2(xskrq->post_wqes,
|
||||
mlx5e_post_rx_mpwqes,
|
||||
mlx5e_post_rx_wqes,
|
||||
xskrq);
|
||||
busy_xsk |= mlx5e_xsk_update_rx_wakeup(xskrq, xsk_rx_alloc_err);
|
||||
|
||||
return busy_xsk;
|
||||
@ -142,7 +146,10 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
mlx5e_poll_ico_cq(&c->icosq.cq);
|
||||
|
||||
busy |= rq->post_wqes(rq);
|
||||
busy |= INDIRECT_CALL_2(rq->post_wqes,
|
||||
mlx5e_post_rx_mpwqes,
|
||||
mlx5e_post_rx_wqes,
|
||||
rq);
|
||||
if (xsk_open) {
|
||||
mlx5e_poll_ico_cq(&c->xskicosq.cq);
|
||||
busy |= mlx5e_poll_xdpsq_cq(&xsksq->cq);
|
||||
|
Loading…
Reference in New Issue
Block a user