Re: [PATCH bpf-next v2 4/8] xsk: make xskmap flush_list common for all map instances

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

 



On Tue, 7 Jan 2020 at 18:54, John Fastabend <john.fastabend@xxxxxxxxx> wrote:
>
> Björn Töpel wrote:
> > From: Björn Töpel <bjorn.topel@xxxxxxxxx>
> >
> > The xskmap flush list is used to track entries that need to flushed
> > from via the xdp_do_flush_map() function. This list used to be
> > per-map, but there is really no reason for that. Instead make the
> > flush list global for all xskmaps, which simplifies __xsk_map_flush()
> > and xsk_map_alloc().
> >
> > Acked-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
> > Signed-off-by: Björn Töpel <bjorn.topel@xxxxxxxxx>
> > ---
>
> Just to check. The reason this is OK is because xdp_do_flush_map()
> is called from NAPI context and is per CPU so the only entries on
> the list will be from the current cpu napi context?

Correct!

> Even in the case
> where multiple xskmaps exist we can't have entries from more than
> a single map on any list at the same time by my reading.
>

No, there can be entries from different (XSK) maps. Instead of
focusing on maps to flush, focus on *entries* to flush. At the end of
the poll function, all entries (regardless of map origin) will be
flushed. Makes sense?


Björn


> LGTM,
> Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>




[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