From: kernel test robot <lkp@intel.com>
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 [thread overview]
Message-ID: <202202092243.OLKO83i2-lkp@intel.com> (raw)
In-Reply-To: <20220208181510.787069-4-andrew@daynix.com>
[-- Attachment #1: Type: text/plain, Size: 6331 bytes --]
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 linus/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-support-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/archive/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/92ce7fd51cc1e4c8bd576ec43086416533212c26
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=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1209:43: sparse: sparse: incorrect type in argument 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 [usertype] hash
drivers/net/virtio_net.c:1209:43: sparse: got restricted __le32 [usertype] 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_queue *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 = 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 = receive_mergeable(dev, vi, rq, buf, ctx, len, xdp_xmit,
1178 stats);
1179 else if (vi->big_packets)
1180 skb = receive_big(dev, vi, rq, buf, len, stats);
1181 else
1182 skb = receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit, stats);
1183
1184 if (unlikely(!skb))
1185 return;
1186
1187 hdr = skb_vnet_hdr(skb);
1188 if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report) {
1189 hdr_hash = (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 = 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 = PKT_HASH_TYPE_L3;
1204 break;
1205 case VIRTIO_NET_HASH_REPORT_NONE:
1206 default:
1207 rss_hash_type = 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 = 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 = 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
next prev parent reply other threads:[~2022-02-09 15:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 18:15 [PATCH v3 0/4] RSS support for VirtioNet Andrew Melnychenko
2022-02-08 18:15 ` Andrew Melnychenko
2022-02-08 18:15 ` [PATCH v3 1/4] drivers/net/virtio_net: Fixed padded vheader to use v1 with hash Andrew Melnychenko
2022-02-08 18:15 ` Andrew Melnychenko
2022-02-08 18:15 ` [PATCH v3 2/4] drivers/net/virtio_net: Added basic RSS support Andrew Melnychenko
2022-02-08 18:15 ` Andrew Melnychenko
2022-02-08 20:36 ` Willem de Bruijn
2022-02-08 20:36 ` Willem de Bruijn
2022-02-13 17:01 ` Andrew Melnichenko
2022-02-13 17:01 ` Andrew Melnichenko
2022-02-13 22:09 ` Willem de Bruijn
2022-02-13 22:09 ` Willem de Bruijn
2022-02-17 19:02 ` Andrew Melnichenko
2022-02-17 19:02 ` Andrew Melnichenko
2022-02-18 15:43 ` Willem de Bruijn
2022-02-18 15:43 ` Willem de Bruijn
2022-02-20 13:17 ` Michael S. Tsirkin
2022-02-20 13:17 ` Michael S. Tsirkin
2022-02-08 18:15 ` [PATCH v3 3/4] drivers/net/virtio_net: Added RSS hash report Andrew Melnychenko
2022-02-08 18:15 ` Andrew Melnychenko
2022-02-08 20:54 ` Willem de Bruijn
2022-02-08 20:54 ` Willem de Bruijn
2022-02-13 17:08 ` Andrew Melnichenko
2022-02-13 17:08 ` Andrew Melnichenko
2022-02-09 15:09 ` kernel test robot [this message]
2022-02-08 18:15 ` [PATCH v3 4/4] drivers/net/virtio_net: Added RSS hash report control Andrew Melnychenko
2022-02-08 18:15 ` Andrew Melnychenko
2022-02-08 20:58 ` Willem de Bruijn
2022-02-08 20:58 ` Willem de Bruijn
2022-02-13 17:22 ` Andrew Melnichenko
2022-02-13 17:22 ` Andrew Melnichenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202202092243.OLKO83i2-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.