Re: [PATCHv12 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 -= xdp_drop;
> 
> ... that is apparently what you really want.

I will fix this

> > +	if (dst && dst->xdp_prog && !bq->xdp_prog)
> > +		bq->xdp_prog = dst->xdp_prog;
> 
> 
> if you pass in xdp_prog through __xdp_enqueue you can reduce that to just:
> 
> 	if (!bq->xdp_prog)
> 		bq->xdp_prog = xdp_prog;

And this in the next PATCH version.

Thanks
Hangbin




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux