bpf, sockmap: Add sk_rmem_alloc check for sockmap
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8KU3B -------------------------------- A tcp socket in a sockmap. If the packets transmission rate is very fast and the packets receiving rate is very slow, a large number of packets are stacked in the ingress queue on the packets receiving side. As a result the memory is exhausted and the system ooms. To fix, we add sk_rmem_alloc while sk_msg queued in the ingress queue and subtract sk_rmem_alloc while sk_msg dequeued from the ingress queue and check sk_rmem_alloc at the beginning of bpf_tcp_ingress(). Signed-off-by:Wang Yufen <wangyufen@huawei.com> Signed-off-by:
Zhengchao Shao <shaozhengchao@huawei.com>
Loading
Please sign in to comment