RE: [PATCH] libbpf: add support for canceling cached_cons advance

2020-11-23 Thread Li,Rongqing
> -Original Message- > From: Magnus Karlsson [mailto:magnus.karls...@gmail.com] > Sent: Monday, November 23, 2020 5:40 PM > To: Li,Rongqing > Cc: Network Development ; bpf > > Subject: Re: [PATCH] libbpf: add support for canceling cached_cons advance > > O

Re: [PATCH] libbpf: add support for canceling cached_cons advance

2020-11-23 Thread Magnus Karlsson
On Sun, Nov 22, 2020 at 2:21 PM Li RongQing wrote: > > It is possible to fail receiving packets after calling > xsk_ring_cons__peek, at this condition, cached_cons has > been advanced, should be cancelled. Thanks RongQing, I have needed this myself in various situations, so I think we should add

Re: [PATCH] libbpf: add support for canceling cached_cons advance

2020-11-22 Thread kernel test robot
Hi Li, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] [also build test ERROR on bpf/master ipvs/master v5.10-rc4 next-20201120] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--ba

[PATCH] libbpf: add support for canceling cached_cons advance

2020-11-22 Thread Li RongQing
It is possible to fail receiving packets after calling xsk_ring_cons__peek, at this condition, cached_cons has been advanced, should be cancelled. Signed-off-by: Li RongQing --- tools/lib/bpf/xsk.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/lib/bpf/xsk.h b/tools/lib/bpf/xsk.