On 3/19/20 7:34 PM, YueHaibing wrote:
If BPF_STREAM_PARSER is not set, gcc warns: net/ipv4/tcp_bpf.c:483:12: warning: 'tcp_bpf_sendpage' defined but not used [-Wunused-function] net/ipv4/tcp_bpf.c:395:12: warning: 'tcp_bpf_sendmsg' defined but not used [-Wunused-function] net/ipv4/tcp_bpf.c:13:13: warning: 'tcp_bpf_stream_read' defined but not used [-Wunused-function] Moves the unused functions into the #ifdef
Maybe explicit "into the #ifdef CONFIG_BPF_STREAM_PARSER"?
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Fixes: f747632b608f ("bpf: sockmap: Move generic sockmap hooks from BPF TCP") Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Reviewed-by: Lorenz Bauer <lmb@xxxxxxxxxxxxxx> Reviewed-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>
Acked-by: Yonghong Song <yhs@xxxxxx>