Content-Type: multipart/mixed; boundary="===============3716386777993956164==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next 09/15] net: increase MAX_SKB_FRAGS Date: Thu, 03 Feb 2022 13:43:57 +0800 Message-ID: <202202031344.0FFfnywX-lkp@intel.com> In-Reply-To: <20220203015140.3022854-10-eric.dumazet@gmail.com> List-Id: --===============3716386777993956164== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Eric, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/tcp-BIG-TCP-i= mplementation/20220203-095336 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git = 52dae93f3bad842c6d585700460a0dea4d70e096 config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220203/= 202202031344.0FFfnywX-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/64ec6b0260be94b2ed90ee6d1= 39591bdbd49c82d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Eric-Dumazet/tcp-BIG-TCP-implement= ation/20220203-095336 git checkout 64ec6b0260be94b2ed90ee6d139591bdbd49c82d # 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 drivers/net/ethernet/3com/ driv= ers/net/ethernet/agere/ drivers/net/ethernet/mellanox/mlx5/core/ drivers/ne= t/wireguard/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/net/wireguard/send.c: In function 'encrypt_packet': >> drivers/net/wireguard/send.c:219:1: warning: the frame size of 1064 byte= s is larger than 1024 bytes [-Wframe-larger-than=3D] 219 | } | ^ -- drivers/net/wireguard/receive.c: In function 'decrypt_packet': >> drivers/net/wireguard/receive.c:299:1: warning: the frame size of 1064 b= ytes is larger than 1024 bytes [-Wframe-larger-than=3D] 299 | } | ^ -- >> drivers/net/ethernet/3com/typhoon.c:142:2: warning: #warning Typhoon onl= y supports 32 entries in its SG list for TSO, disabling TSO [-Wcpp] 142 | #warning Typhoon only supports 32 entries in its SG list for TSO= , disabling TSO | ^~~~~~~ vim +219 drivers/net/wireguard/send.c e7096c131e5161 Jason A. Donenfeld 2019-12-09 161 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 162 static bool encrypt_pack= et(struct sk_buff *skb, struct noise_keypair *keypair) e7096c131e5161 Jason A. Donenfeld 2019-12-09 163 { e7096c131e5161 Jason A. Donenfeld 2019-12-09 164 unsigned int padding_le= n, plaintext_len, trailer_len; e7096c131e5161 Jason A. Donenfeld 2019-12-09 165 struct scatterlist sg[M= AX_SKB_FRAGS + 8]; e7096c131e5161 Jason A. Donenfeld 2019-12-09 166 struct message_data *he= ader; e7096c131e5161 Jason A. Donenfeld 2019-12-09 167 struct sk_buff *trailer; e7096c131e5161 Jason A. Donenfeld 2019-12-09 168 int num_frags; e7096c131e5161 Jason A. Donenfeld 2019-12-09 169 = c78a0b4a78839d Jason A. Donenfeld 2020-05-19 170 /* Force hash calculati= on before encryption so that flow analysis is c78a0b4a78839d Jason A. Donenfeld 2020-05-19 171 * consistent over the = inner packet. c78a0b4a78839d Jason A. Donenfeld 2020-05-19 172 */ c78a0b4a78839d Jason A. Donenfeld 2020-05-19 173 skb_get_hash(skb); c78a0b4a78839d Jason A. Donenfeld 2020-05-19 174 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 175 /* Calculate lengths. */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 176 padding_len =3D calcula= te_skb_padding(skb); e7096c131e5161 Jason A. Donenfeld 2019-12-09 177 trailer_len =3D padding= _len + noise_encrypted_len(0); e7096c131e5161 Jason A. Donenfeld 2019-12-09 178 plaintext_len =3D skb->= len + padding_len; e7096c131e5161 Jason A. Donenfeld 2019-12-09 179 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 180 /* Expand data section = to have room for padding and auth tag. */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 181 num_frags =3D skb_cow_d= ata(skb, trailer_len, &trailer); e7096c131e5161 Jason A. Donenfeld 2019-12-09 182 if (unlikely(num_frags = < 0 || num_frags > ARRAY_SIZE(sg))) e7096c131e5161 Jason A. Donenfeld 2019-12-09 183 return false; e7096c131e5161 Jason A. Donenfeld 2019-12-09 184 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 185 /* Set the padding to z= eros, and make sure it and the auth tag are part e7096c131e5161 Jason A. Donenfeld 2019-12-09 186 * of the skb. e7096c131e5161 Jason A. Donenfeld 2019-12-09 187 */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 188 memset(skb_tail_pointer= (trailer), 0, padding_len); e7096c131e5161 Jason A. Donenfeld 2019-12-09 189 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 190 /* Expand head section = to have room for our header and the network e7096c131e5161 Jason A. Donenfeld 2019-12-09 191 * stack's headers. e7096c131e5161 Jason A. Donenfeld 2019-12-09 192 */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 193 if (unlikely(skb_cow_he= ad(skb, DATA_PACKET_HEAD_ROOM) < 0)) e7096c131e5161 Jason A. Donenfeld 2019-12-09 194 return false; e7096c131e5161 Jason A. Donenfeld 2019-12-09 195 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 196 /* Finalize checksum ca= lculation for the inner packet, if required. */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 197 if (unlikely(skb->ip_su= mmed =3D=3D CHECKSUM_PARTIAL && e7096c131e5161 Jason A. Donenfeld 2019-12-09 198 skb_checksum_help= (skb))) e7096c131e5161 Jason A. Donenfeld 2019-12-09 199 return false; e7096c131e5161 Jason A. Donenfeld 2019-12-09 200 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 201 /* Only after checksumm= ing can we safely add on the padding at the end e7096c131e5161 Jason A. Donenfeld 2019-12-09 202 * and the header. e7096c131e5161 Jason A. Donenfeld 2019-12-09 203 */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 204 skb_set_inner_network_h= eader(skb, 0); e7096c131e5161 Jason A. Donenfeld 2019-12-09 205 header =3D (struct mess= age_data *)skb_push(skb, sizeof(*header)); e7096c131e5161 Jason A. Donenfeld 2019-12-09 206 header->header.type =3D= cpu_to_le32(MESSAGE_DATA); e7096c131e5161 Jason A. Donenfeld 2019-12-09 207 header->key_idx =3D key= pair->remote_index; e7096c131e5161 Jason A. Donenfeld 2019-12-09 208 header->counter =3D cpu= _to_le64(PACKET_CB(skb)->nonce); e7096c131e5161 Jason A. Donenfeld 2019-12-09 209 pskb_put(skb, trailer, = trailer_len); e7096c131e5161 Jason A. Donenfeld 2019-12-09 210 = e7096c131e5161 Jason A. Donenfeld 2019-12-09 211 /* Now we can encrypt t= he scattergather segments */ e7096c131e5161 Jason A. Donenfeld 2019-12-09 212 sg_init_table(sg, num_f= rags); e7096c131e5161 Jason A. Donenfeld 2019-12-09 213 if (skb_to_sgvec(skb, s= g, sizeof(struct message_data), e7096c131e5161 Jason A. Donenfeld 2019-12-09 214 noise_encrypted_len(= plaintext_len)) <=3D 0) e7096c131e5161 Jason A. Donenfeld 2019-12-09 215 return false; e7096c131e5161 Jason A. Donenfeld 2019-12-09 216 return chacha20poly1305= _encrypt_sg_inplace(sg, plaintext_len, NULL, 0, e7096c131e5161 Jason A. Donenfeld 2019-12-09 217 PACKET_CB(skb)-= >nonce, e7096c131e5161 Jason A. Donenfeld 2019-12-09 218 keypair->sendin= g.key); e7096c131e5161 Jason A. Donenfeld 2019-12-09 @219 } e7096c131e5161 Jason A. Donenfeld 2019-12-09 220 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3716386777993956164==--