Content-Type: multipart/mixed; boundary="===============1657087668318321283==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next 2/3] net/smc: Limits backlog connections Date: Thu, 27 Jan 2022 23:52:44 +0800 Message-ID: <202201272349.KA4IX9hr-lkp@intel.com> In-Reply-To: <9b52fc3f11a2ae6f23224a178fd4cff9f9dd4eaa.1643284658.git.alibuda@linux.alibaba.com> List-Id: --===============1657087668318321283== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Wythe", Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/D-Wythe/Optimizing-perform= ance-in-short-lived/20220127-200912 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = fbb8295248e1d6f576d444309fcf79356008eac1 config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220127/= 202201272349.KA4IX9hr-lkp(a)intel.com/config) compiler: arceb-elf-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/718aff24f3fcc73ecb7bff17f= cbe029b799c6624 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review D-Wythe/Optimizing-performance-in-= short-lived/20220127-200912 git checkout 718aff24f3fcc73ecb7bff17fcbe029b799c6624 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darc SHELL=3D/bin/bash net/smc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): net/smc/af_smc.c: In function 'smc_listen': >> net/smc/af_smc.c:2202:25: warning: assignment discards 'const' qualifier= from pointer target type [-Wdiscarded-qualifiers] 2202 | smc->ori_af_ops =3D inet_csk(smc->clcsock->sk)->icsk_af_= ops; | ^ vim +/const +2202 net/smc/af_smc.c 2166 = 2167 static int smc_listen(struct socket *sock, int backlog) 2168 { 2169 struct sock *sk =3D sock->sk; 2170 struct smc_sock *smc; 2171 int rc; 2172 = 2173 smc =3D smc_sk(sk); 2174 lock_sock(sk); 2175 = 2176 rc =3D -EINVAL; 2177 if ((sk->sk_state !=3D SMC_INIT && sk->sk_state !=3D SMC_LISTEN) || 2178 smc->connect_nonblock) 2179 goto out; 2180 = 2181 rc =3D 0; 2182 if (sk->sk_state =3D=3D SMC_LISTEN) { 2183 sk->sk_max_ack_backlog =3D backlog; 2184 goto out; 2185 } 2186 /* some socket options are handled in core, so we could not apply 2187 * them to the clc socket -- copy smc socket options to clc socket 2188 */ 2189 smc_copy_sock_settings_to_clc(smc); 2190 if (!smc->use_fallback) 2191 tcp_sk(smc->clcsock->sk)->syn_smc =3D 1; 2192 = 2193 /* save original sk_data_ready function and establish 2194 * smc-specific sk_data_ready function 2195 */ 2196 smc->clcsk_data_ready =3D smc->clcsock->sk->sk_data_ready; 2197 smc->clcsock->sk->sk_data_ready =3D smc_clcsock_data_ready; 2198 smc->clcsock->sk->sk_user_data =3D 2199 (void *)((uintptr_t)smc | SK_USER_DATA_NOCOPY); 2200 = 2201 /* save origin ops */ > 2202 smc->ori_af_ops =3D inet_csk(smc->clcsock->sk)->icsk_af_ops; 2203 = 2204 smc->af_ops =3D *smc->ori_af_ops; 2205 smc->af_ops.syn_recv_sock =3D smc_tcp_syn_recv_sock; 2206 = 2207 inet_csk(smc->clcsock->sk)->icsk_af_ops =3D &smc->af_ops; 2208 = 2209 rc =3D kernel_listen(smc->clcsock, backlog); 2210 if (rc) { 2211 smc->clcsock->sk->sk_data_ready =3D smc->clcsk_data_ready; 2212 goto out; 2213 } 2214 sk->sk_max_ack_backlog =3D backlog; 2215 sk->sk_ack_backlog =3D 0; 2216 sk->sk_state =3D SMC_LISTEN; 2217 = 2218 out: 2219 release_sock(sk); 2220 return rc; 2221 } 2222 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1657087668318321283==--