Re: [net-next V8 PATCH 01/16] mlx5: basic XDP_REDIRECT forward support

Tariq Toukan
2018-04-01T08:47:06Z

On 31/03/2018 3:05 PM, Jesper Dangaard Brouer wrote:

..

> @@ -844,6 +851,15 @@ static inline int mlx5e_xdp_handle(struct mlx5e_rq *rq,
> if (unlikely(!mlx5e_xmit_xdp_frame(rq, di, &xdp)))
> trace_xdp_exception(rq->netdev, prog, act);
> return true;
> + case XDP_REDIRECT:
> + /* When XDP enabled then page-refcnt==1 here */
> + err = xdp_do_redirect(rq->netdev, &xdp, prog);
> + if (!err) {
> + rq->wqe.xdp_xmit = true; /* XDP xmit owns page */

boolean xdp_xmit does not exist anymore, it was removed recently by:
121e89275471 net/mlx5e: Refactor RQ XDP_TX indication

please replace with:
__set_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags);

> + rq->xdpsq.db.redirect_flush = true;
> + mlx5e_page_dma_unmap(rq, di);
> + }
> + return true;
> default:
> bpf_warn_invalid_xdp_action(act);