From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3998410047332488502==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 3/4] drivers/net/virtio_net: Added RSS hash report. Date: Wed, 09 Feb 2022 23:09:28 +0800 Message-ID: <202202092243.OLKO83i2-lkp@intel.com> In-Reply-To: <20220208181510.787069-4-andrew@daynix.com> List-Id: --===============3998410047332488502== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Andrew, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on net/master horms-ipvs/master net-next/master li= nus/master v5.17-rc3 next-20220209] [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/Andrew-Melnychenko/RSS-sup= port-for-VirtioNet/20220209-021715 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux= -next config: arm64-randconfig-s032-20220208 (https://download.01.org/0day-ci/arc= hive/20220209/202202092243.OLKO83i2-lkp(a)intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/92ce7fd51cc1e4c8bd576ec43= 086416533212c26 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Andrew-Melnychenko/RSS-support-for= -VirtioNet/20220209-021715 git checkout 92ce7fd51cc1e4c8bd576ec43086416533212c26 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3Dbuild_dir ARCH=3Da= rm64 SHELL=3D/bin/bash drivers/net/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degr= ades to integer >> drivers/net/virtio_net.c:1209:43: sparse: sparse: incorrect type in argu= ment 2 (different base types) @@ expected unsigned int [usertype] hash = @@ got restricted __le32 [usertype] hash_value @@ drivers/net/virtio_net.c:1209:43: sparse: expected unsigned int [use= rtype] hash drivers/net/virtio_net.c:1209:43: sparse: got restricted __le32 [use= rtype] hash_value drivers/net/virtio_net.c:1568:13: sparse: sparse: context imbalance in '= virtnet_poll_cleantx' - different lock contexts for basic block vim +1191 drivers/net/virtio_net.c 1151 = 1152 static void receive_buf(struct virtnet_info *vi, struct receive_queu= e *rq, 1153 void *buf, unsigned int len, void **ctx, 1154 unsigned int *xdp_xmit, 1155 struct virtnet_rq_stats *stats) 1156 { 1157 struct net_device *dev =3D vi->dev; 1158 struct sk_buff *skb; 1159 struct virtio_net_hdr_mrg_rxbuf *hdr; 1160 struct virtio_net_hdr_v1_hash *hdr_hash; 1161 enum pkt_hash_types rss_hash_type; 1162 = 1163 if (unlikely(len < vi->hdr_len + ETH_HLEN)) { 1164 pr_debug("%s: short packet %i\n", dev->name, len); 1165 dev->stats.rx_length_errors++; 1166 if (vi->mergeable_rx_bufs) { 1167 put_page(virt_to_head_page(buf)); 1168 } else if (vi->big_packets) { 1169 give_pages(rq, buf); 1170 } else { 1171 put_page(virt_to_head_page(buf)); 1172 } 1173 return; 1174 } 1175 = 1176 if (vi->mergeable_rx_bufs) 1177 skb =3D receive_mergeable(dev, vi, rq, buf, ctx, len, xdp_xmit, 1178 stats); 1179 else if (vi->big_packets) 1180 skb =3D receive_big(dev, vi, rq, buf, len, stats); 1181 else 1182 skb =3D receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit, stats); 1183 = 1184 if (unlikely(!skb)) 1185 return; 1186 = 1187 hdr =3D skb_vnet_hdr(skb); 1188 if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report) { 1189 hdr_hash =3D (struct virtio_net_hdr_v1_hash *)(hdr); 1190 = > 1191 switch (hdr_hash->hash_report) { 1192 case VIRTIO_NET_HASH_REPORT_TCPv4: 1193 case VIRTIO_NET_HASH_REPORT_UDPv4: 1194 case VIRTIO_NET_HASH_REPORT_TCPv6: 1195 case VIRTIO_NET_HASH_REPORT_UDPv6: 1196 case VIRTIO_NET_HASH_REPORT_TCPv6_EX: 1197 case VIRTIO_NET_HASH_REPORT_UDPv6_EX: 1198 rss_hash_type =3D PKT_HASH_TYPE_L4; 1199 break; 1200 case VIRTIO_NET_HASH_REPORT_IPv4: 1201 case VIRTIO_NET_HASH_REPORT_IPv6: 1202 case VIRTIO_NET_HASH_REPORT_IPv6_EX: 1203 rss_hash_type =3D PKT_HASH_TYPE_L3; 1204 break; 1205 case VIRTIO_NET_HASH_REPORT_NONE: 1206 default: 1207 rss_hash_type =3D PKT_HASH_TYPE_NONE; 1208 } > 1209 skb_set_hash(skb, hdr_hash->hash_value, rss_hash_type); 1210 } 1211 = 1212 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) 1213 skb->ip_summed =3D CHECKSUM_UNNECESSARY; 1214 = 1215 if (virtio_net_hdr_to_skb(skb, &hdr->hdr, 1216 virtio_is_little_endian(vi->vdev))) { 1217 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n", 1218 dev->name, hdr->hdr.gso_type, 1219 hdr->hdr.gso_size); 1220 goto frame_err; 1221 } 1222 = 1223 skb_record_rx_queue(skb, vq2rxq(rq->vq)); 1224 skb->protocol =3D eth_type_trans(skb, dev); 1225 pr_debug("Receiving skb proto 0x%04x len %i type %i\n", 1226 ntohs(skb->protocol), skb->len, skb->pkt_type); 1227 = 1228 napi_gro_receive(&rq->napi, skb); 1229 return; 1230 = 1231 frame_err: 1232 dev->stats.rx_frame_errors++; 1233 dev_kfree_skb(skb); 1234 } 1235 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3998410047332488502==--