CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Dmytro SHYTYI <[email protected]> TO: [email protected] CC: Dmytro SHYTYI <[email protected]>
Hi Dmytro, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.16] [cannot apply to net-next/master linus/master next-20220116] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Dmytro-SHYTYI/net-mptcp-Fast-Open-Mechanism/20220116-081430 base: df0cc57e057f18e44dac8e6c18aba47ab53202f9 :::::: branch date: 18 hours ago :::::: commit date: 18 hours ago config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220117/[email protected]/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: net/ipv4/tcp_input.c:6960 tcp_conn_request() warn: ignoring unreachable code. vim +6960 net/ipv4/tcp_input.c 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6864 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6865 tcp_clear_options(&tmp_opt); 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6866 tmp_opt.mss_clamp = af_ops->mss_clamp; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6867 tmp_opt.user_mss = tp->rx_opt.user_mss; eed29f17f09ad7 Eric Dumazet 2017-06-07 6868 tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0, eed29f17f09ad7 Eric Dumazet 2017-06-07 6869 want_cookie ? NULL : &foc); 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6870 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6871 if (want_cookie && !tmp_opt.saw_tstamp) 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6872 tcp_clear_options(&tmp_opt); 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6873 bc58a1baf2a978 Hans Wippel 2018-03-23 6874 if (IS_ENABLED(CONFIG_SMC) && want_cookie) bc58a1baf2a978 Hans Wippel 2018-03-23 6875 tmp_opt.smc_ok = 0; bc58a1baf2a978 Hans Wippel 2018-03-23 6876 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6877 tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6878 tcp_openreq_init(req, &tmp_opt, skb, sk); 7a682575ad4829 KOVACS Krisztian 2016-09-23 6879 inet_rsk(req)->no_srccheck = inet_sk(sk)->transparent; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6880 16f86165bd0a94 Eric Dumazet 2015-03-13 6881 /* Note: tcp_v6_init_req() might override ir_iif for link locals */ 6dd9a14e92e548 David Ahern 2015-12-16 6882 inet_rsk(req)->ir_iif = inet_request_bound_dev_if(sk, skb); 16f86165bd0a94 Eric Dumazet 2015-03-13 6883 7ea851d19b2359 Florian Westphal 2020-11-30 6884 dst = af_ops->route_req(sk, skb, &fl, req); 7ea851d19b2359 Florian Westphal 2020-11-30 6885 if (!dst) 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6886 goto drop_and_free; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6887 84b114b98452c4 Eric Dumazet 2017-05-05 6888 if (tmp_opt.tstamp_ok) 5d2ed0521ac98f Eric Dumazet 2017-06-07 6889 tcp_rsk(req)->ts_off = af_ops->init_ts_off(net, skb); 95a22caee396ce Florian Westphal 2016-12-01 6890 f7b3bec6f5167e Florian Westphal 2014-11-03 6891 if (!want_cookie && !isn) { 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6892 /* Kill the following clause, if you dislike this way. */ 4396e46187ca50 Soheil Hassas Yeganeh 2017-03-15 6893 if (!net->ipv4.sysctl_tcp_syncookies && fee83d097b1620 Haishuang Yan 2016-12-28 6894 (net->ipv4.sysctl_max_syn_backlog - inet_csk_reqsk_queue_len(sk) < fee83d097b1620 Haishuang Yan 2016-12-28 6895 (net->ipv4.sysctl_max_syn_backlog >> 2)) && d82bae12dc38d7 Soheil Hassas Yeganeh 2017-03-15 6896 !tcp_peer_is_proven(req, dst)) { 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6897 /* Without syncookies last quarter of 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6898 * backlog is filled with destinations, 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6899 * proven to be alive. 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6900 * It means that we continue to communicate 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6901 * to destinations, already remembered 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6902 * to the moment of synflood. 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6903 */ 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6904 pr_drop_req(req, ntohs(tcp_hdr(skb)->source), 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6905 rsk_ops->family); 52c7bf82e2e91e Dmytro SHYTYI 2022-01-16 6906 //goto drop_and_release; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6907 } 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6908 84b114b98452c4 Eric Dumazet 2017-05-05 6909 isn = af_ops->init_seq(skb); 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6910 } 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6911 f7b3bec6f5167e Florian Westphal 2014-11-03 6912 tcp_ecn_create_request(req, skb, sk, dst); f7b3bec6f5167e Florian Westphal 2014-11-03 6913 f7b3bec6f5167e Florian Westphal 2014-11-03 6914 if (want_cookie) { f7b3bec6f5167e Florian Westphal 2014-11-03 6915 isn = cookie_init_sequence(af_ops, sk, skb, &req->mss); f7b3bec6f5167e Florian Westphal 2014-11-03 6916 if (!tmp_opt.tstamp_ok) f7b3bec6f5167e Florian Westphal 2014-11-03 6917 inet_rsk(req)->ecn_ok = 0; f7b3bec6f5167e Florian Westphal 2014-11-03 6918 } f7b3bec6f5167e Florian Westphal 2014-11-03 6919 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6920 tcp_rsk(req)->snt_isn = isn; 58d607d3e52f2b Eric Dumazet 2015-09-15 6921 tcp_rsk(req)->txhash = net_tx_rndhash(); e9b12edc133b54 Wei Wang 2020-09-09 6922 tcp_rsk(req)->syn_tos = TCP_SKB_CB(skb)->ip_dsfield; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6923 tcp_openreq_init_rwin(req, sk, dst); c6345ce7d361dc Amritha Nambiar 2018-06-29 6924 sk_rx_queue_set(req_to_sk(req), skb); ca6fb06518836e Eric Dumazet 2015-10-02 6925 if (!want_cookie) { ca6fb06518836e Eric Dumazet 2015-10-02 6926 tcp_reqsk_record_syn(sk, req, skb); 71c02379c762cb Christoph Paasch 2017-10-23 6927 fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc, dst); ca6fb06518836e Eric Dumazet 2015-10-02 6928 } 7c85af8810448d Eric Dumazet 2015-09-24 6929 if (fastopen_sk) { ca6fb06518836e Eric Dumazet 2015-10-02 6930 af_ops->send_synack(fastopen_sk, dst, &fl, req, 331fca4315efa3 Martin KaFai Lau 2020-08-20 6931 &foc, TCP_SYNACK_FASTOPEN, skb); 7656d842de93fd Eric Dumazet 2015-10-04 6932 /* Add the child socket directly into the accept queue */ 9d3e1368bb4589 Guillaume Nault 2019-03-08 6933 if (!inet_csk_reqsk_queue_add(sk, req, fastopen_sk)) { 9d3e1368bb4589 Guillaume Nault 2019-03-08 6934 reqsk_fastopen_remove(fastopen_sk, req, false); 9d3e1368bb4589 Guillaume Nault 2019-03-08 6935 bh_unlock_sock(fastopen_sk); 9d3e1368bb4589 Guillaume Nault 2019-03-08 6936 sock_put(fastopen_sk); 9403cf23025880 Guillaume Nault 2019-03-19 6937 goto drop_and_free; 9d3e1368bb4589 Guillaume Nault 2019-03-08 6938 } 7656d842de93fd Eric Dumazet 2015-10-04 6939 sk->sk_data_ready(sk); 7656d842de93fd Eric Dumazet 2015-10-04 6940 bh_unlock_sock(fastopen_sk); 7c85af8810448d Eric Dumazet 2015-09-24 6941 sock_put(fastopen_sk); 7c85af8810448d Eric Dumazet 2015-09-24 6942 } else { 9439ce00f208d9 Eric Dumazet 2015-03-17 6943 tcp_rsk(req)->tfo_listener = false; ca6fb06518836e Eric Dumazet 2015-10-02 6944 if (!want_cookie) 8550f328f45db6 Lawrence Brakmo 2017-06-30 6945 inet_csk_reqsk_queue_hash_add(sk, req, 8550f328f45db6 Lawrence Brakmo 2017-06-30 6946 tcp_timeout_init((struct sock *)req)); b3d051477cf94e Eric Dumazet 2016-04-13 6947 af_ops->send_synack(sk, dst, &fl, req, &foc, b3d051477cf94e Eric Dumazet 2016-04-13 6948 !want_cookie ? TCP_SYNACK_NORMAL : 331fca4315efa3 Martin KaFai Lau 2020-08-20 6949 TCP_SYNACK_COOKIE, 331fca4315efa3 Martin KaFai Lau 2020-08-20 6950 skb); 9caad864151e52 Eric Dumazet 2016-04-01 6951 if (want_cookie) { 9caad864151e52 Eric Dumazet 2016-04-01 6952 reqsk_free(req); 9caad864151e52 Eric Dumazet 2016-04-01 6953 return 0; 9caad864151e52 Eric Dumazet 2016-04-01 6954 } 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6955 } ca6fb06518836e Eric Dumazet 2015-10-02 6956 reqsk_put(req); 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6957 return 0; 1fb6f159fd21c6 Octavian Purdila 2014-06-25 6958 52c7bf82e2e91e Dmytro SHYTYI 2022-01-16 6959 //drop_and_release: 1fb6f159fd21c6 Octavian Purdila 2014-06-25 @6960 dst_release(dst); --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
