On Wed, May 27, 2020 at 06:05:43PM +0300, Dmitry Yakunin wrote: > This patch adds support of SO_KEEPALIVE flag and TCP related options > to bpf_setsockopt() routine. This is helpful if we want to enable or tune > TCP keepalive for applications which don't do it in the userspace code. > In order to avoid copy-paste, common code from classic setsockopt was moved > to auxiliary functions in the headers. Thanks for refatoring some of the pieces. I suspect some more can be done. In the long run, I don't think this copy-and-paste is scalable. For most of the options (integer value and do not need ns_capable()), do_tcp_setsockopt() and sock_setsockopt() can be directly called with some refactoring. The change looks good. For this patch, Acked-by: Martin KaFai Lau <kafai@xxxxxx>