On 06/27/2018 04:46 AM, Saeed Mahameed wrote:
[...]
> @@ -935,11 +958,16 @@ static inline bool mlx5e_xdp_handle(struct mlx5e_rq *rq,
>               return false;
>  
>       xdp.data = va + *rx_headroom;
> -     xdp_set_data_meta_invalid(&xdp);
>       xdp.data_end = xdp.data + *len;
>       xdp.data_hard_start = va;
>       xdp.rxq = &rq->xdp_rxq;
>  
> +     if (rq->xdp.flags & XDP_FLAGS_META_ALL) {
> +             xdp_reset_data_meta(&xdp);
> +             mlx5e_xdp_fill_data_meta(rq->xdp.md_info, xdp.data_meta, cqe);
> +     } else
> +             xdp_set_data_meta_invalid(&xdp);
> +

Just a quick note on this one: would actually be great to not set
the xdp_set_data_meta_invalid() in the else path as this meta buffer
should also be usable independent of hw hints. Meaning, in any case
it would be great if mlx5 + mlx4 could implement the xdp->data_meta
support we have today, this might probably be a good first step
anyway; so far supported on i40e, ixgbe, ixgbevf, nfp.

>       act = bpf_prog_run_xdp(prog, &xdp);
>       switch (act) {
>       case XDP_PASS:
> 

Thanks,
Daniel

Reply via email to