Closed PHCSJC closed 5 years ago
4.18.7内核报这个错误,armbian平台下:
CC [M] drivers/media/rc/keymaps/rc-streamzap.o
CC [M] sound/usb/6fire/midi.o
In file included from ./include/linux/list.h:9:0,
from ./include/linux/module.h:9,
from net/ipv4/tcp_bbrplus.c:59:
net/ipv4/tcp_bbrplus.c: In function ‘bbr_set_tso_segs_goal’:
net/ipv4/tcp_bbrplus.c:387:30: error: implicit declaration of function ‘tcp_tso_autosize’ [-Werror=implicit-function-declaration]
bbr->tso_segs_goal = min(tcp_tso_autosize(sk, tp->mss_cache, min_segs),
^
./include/linux/kernel.h:812:22: note: in definition of macro ‘typecheck’
(!!(sizeof((typeof(x) )1 == (typeof(y) )1)))
^
./include/linux/kernel.h:836:24: note: in expansion of macro ‘safe_cmp’
builtin_choose_expr(safe_cmp(x, y), \
^~~~~~
./include/linux/kernel.h:845:19: note: in expansion of macro ‘__careful_cmp’
^~~~~~~~~~~~~
net/ipv4/tcp_bbrplus.c:387:26: note: in expansion of macro ‘min’
bbr->tso_segs_goal = min(tcp_tso_autosize(sk, tp->mss_cache, min_segs),
^~~
./include/linux/kernel.h:812:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) )1 == (typeof(y) )1)))
^
./include/linux/kernel.h:826:4: note: in expansion of macro ‘typecheck’
(typecheck(x, y) && no_side_effects(x, y))
^~~
./include/linux/kernel.h:836:24: note: in expansion of macro ‘safe_cmp’
builtin_choose_expr(safe_cmp(x, y), \
^~~~~~
./include/linux/kernel.h:845:19: note: in expansion of macro ‘__careful_cmp’
^~~~~~~~~~~~~
net/ipv4/tcp_bbrplus.c:387:26: note: in expansion of macro ‘min’
bbr->tso_segs_goal = min(tcp_tso_autosize(sk, tp->mss_cache, min_segs),
^~~
CC [M] sound/usb/6fire/control.o
net/ipv4/tcp_bbrplus.c: At top level:
net/ipv4/tcp_bbrplus.c:1147:5: error: unknown field ‘tso_segs_goal’ specified in initializer
.tso_segs_goal = bbr_tso_segs_goal,
^
net/ipv4/tcp_bbrplus.c:1147:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.tso_segs_goal = bbr_tso_segs_goal,
^~~~~
net/ipv4/tcp_bbrplus.c:1147:23: note: (near initialization for ‘tcp_bbr_cong_ops.cong_avoid’)
cc1: some warnings being treated as errors
scripts/Makefile.build:323: recipe for target 'net/ipv4/tcp_bbrplus.o' failed
make[2]: [net/ipv4/tcp_bbrplus.o] Error 1
scripts/Makefile.build:558: recipe for target 'net/ipv4' failed
make[1]: [net/ipv4] Error 2
Makefile:1033: recipe for target 'net' failed
make: [net] Error 2
make: Waiting for unfinished jobs....
只能用于4.14.x内核,更高版本的tcp部分源码有改动,要移植到高版本内核你得自己研究
好吧,看来我可以放弃了,感谢!
修改/net/ipv4/tcp_output.c#L,1823行 tcp_snd_wnd_test函数大括号后} 换行添加EXPORT_SYMBOL(tcp_snd_wnd_test);
/ Does at least the first segment of SKB fit into the send window? / static bool tcp_snd_wnd_test(const struct tcp_sock tp, const struct sk_buff skb, unsigned int cur_mss) { u32 end_seq = TCP_SKB_CB(skb)->end_seq;
} EXPORT_SYMBOL(tcp_snd_wnd_test);