On Fri, Apr 9, 2021 at 3:04 AM Eric Dumazet <eric.duma...@gmail.com> wrote: > > Note that pfmemalloc skbs are normally dropped in sk_filter_trim_cap() > > Simply make sure your protocol use it.
It seems "sk_filter_trim_cap" needs an "struct sock" argument. Some of my protocols act like a middle layer to another protocol and don't have any "struct sock". Also, I think this is a problem in net/core/dev.c, there are a lot of old protocols that are not aware of pfmemalloc skbs. I don't think it's a good idea to fix them one by one.