Hi David,
I just aware that,
On Thu, Dec 17, 2020 at 09:07:03AM -0700, David Ahern wrote:
> > +static int dev_map_bpf_prog_run(struct bpf_prog *xdp_prog,
> > + struct xdp_frame **frames, int n,
> > + struct net_device *dev)
> > +{
> > + struct
Hi David,
Thanks for the comment.
On Thu, Dec 17, 2020 at 09:07:03AM -0700, David Ahern wrote:
> > + return n - nframes; /* dropped frames count */
>
> just return nframes here, since ...
>
> > + xdp_drop = dev_map_bpf_prog_run(bq->xdp_prog, bq->q, cnt, dev);
> > + cnt -=
On 12/16/20 7:30 AM, Hangbin Liu wrote:
> @@ -327,40 +328,92 @@ bool dev_map_can_have_prog(struct bpf_map *map)
> return false;
> }
>
> +static int dev_map_bpf_prog_run(struct bpf_prog *xdp_prog,
> + struct xdp_frame **frames, int n,
> +
From: Jesper Dangaard Brouer
This changes the devmap XDP program support to run the program when the
bulk queue is flushed instead of before the frame is enqueued. This has
a couple of benefits:
- It "sorts" the packets by destination devmap entry, and then runs the
same BPF program on all the