mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
net/mlx5e: xsk: Include XSK skb_from_cqe callbacks in INDIRECT_CALL
XSK is a performance-critical data path. To avoid an indirect function call with a retpoline, include XSK callbacks in the INDIRECT_CALL macro, so that they are called directly in XSK flows. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a2740f529d
commit
1ca6492ec9
@ -1709,9 +1709,10 @@ static void mlx5e_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
|
||||
goto free_wqe;
|
||||
}
|
||||
|
||||
skb = INDIRECT_CALL_2(rq->wqe.skb_from_cqe,
|
||||
skb = INDIRECT_CALL_3(rq->wqe.skb_from_cqe,
|
||||
mlx5e_skb_from_cqe_linear,
|
||||
mlx5e_skb_from_cqe_nonlinear,
|
||||
mlx5e_xsk_skb_from_cqe_linear,
|
||||
rq, wi, cqe_bcnt);
|
||||
if (!skb) {
|
||||
/* probably for XDP */
|
||||
@ -2180,9 +2181,10 @@ static void mlx5e_handle_rx_cqe_mpwrq(struct mlx5e_rq *rq, struct mlx5_cqe64 *cq
|
||||
|
||||
cqe_bcnt = mpwrq_get_cqe_byte_cnt(cqe);
|
||||
|
||||
skb = INDIRECT_CALL_2(rq->mpwqe.skb_from_cqe_mpwrq,
|
||||
skb = INDIRECT_CALL_3(rq->mpwqe.skb_from_cqe_mpwrq,
|
||||
mlx5e_skb_from_cqe_mpwrq_linear,
|
||||
mlx5e_skb_from_cqe_mpwrq_nonlinear,
|
||||
mlx5e_xsk_skb_from_cqe_mpwrq_linear,
|
||||
rq, wi, cqe_bcnt, head_offset, page_idx);
|
||||
if (!skb)
|
||||
goto mpwrq_cqe_out;
|
||||
|
Loading…
Reference in New Issue
Block a user