From: "Michael S. Tsirkin" <mst@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: "Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org, llvm@lists.linux.dev,
oe-kbuild-all@lists.linux.dev,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>
Subject: Re: [PATCH net-next 8/8] vhost/net: enable gso over UDP tunnel support.
Date: Fri, 23 May 2025 15:54:14 -0400 [thread overview]
Message-ID: <20250523155259-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <202505221428.67HNn025-lkp@intel.com>
On Thu, May 22, 2025 at 02:43:50PM +0800, kernel test robot wrote:
> Hi Paolo,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on net-next/main]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Paolo-Abeni/virtio-introduce-virtio_features_t/20250521-183700
> base: net-next/main
> patch link: https://lore.kernel.org/r/f95716aed2c65d079cdb10518431088f3e103899.1747822866.git.pabeni%40redhat.com
> patch subject: [PATCH net-next 8/8] vhost/net: enable gso over UDP tunnel support.
> config: i386-buildonly-randconfig-001-20250522 (https://download.01.org/0day-ci/archive/20250522/202505221428.67HNn025-lkp@intel.com/config)
> compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250522/202505221428.67HNn025-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505221428.67HNn025-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/vhost/net.c:1633:30: warning: shift count >= width of type [-Wshift-count-overflow]
> 1633 | has_tunnel = !!(features & (VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/virtio_features.h:18:24: note: expanded from macro 'VIRTIO_BIT'
> 18 | #define VIRTIO_BIT(b) BIT_ULL(b)
> | ^~~~~~~~~~
> include/vdso/bits.h:8:30: note: expanded from macro 'BIT_ULL'
> 8 | #define BIT_ULL(nr) (ULL(1) << (nr))
> | ^ ~~~~
> drivers/vhost/net.c:1634:9: warning: shift count >= width of type [-Wshift-count-overflow]
> 1634 | VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO)));
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
yep, this is why I suggested making VIRTIO_BIT(any value > 63) simply 0 on 32 bit.
> include/linux/virtio_features.h:18:24: note: expanded from macro 'VIRTIO_BIT'
> 18 | #define VIRTIO_BIT(b) BIT_ULL(b)
> | ^~~~~~~~~~
> include/vdso/bits.h:8:30: note: expanded from macro 'BIT_ULL'
> 8 | #define BIT_ULL(nr) (ULL(1) << (nr))
> | ^ ~~~~
> 2 warnings generated.
>
>
> vim +1633 drivers/vhost/net.c
>
> 1622
> 1623 static int vhost_net_set_features(struct vhost_net *n, virtio_features_t features)
> 1624 {
> 1625 size_t vhost_hlen, sock_hlen, hdr_len;
> 1626 bool has_tunnel;
> 1627 int i;
> 1628
> 1629 hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
> 1630 (1ULL << VIRTIO_F_VERSION_1))) ?
> 1631 sizeof(struct virtio_net_hdr_mrg_rxbuf) :
> 1632 sizeof(struct virtio_net_hdr);
> > 1633 has_tunnel = !!(features & (VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
> 1634 VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO)));
> 1635 hdr_len += has_tunnel ? sizeof(struct virtio_net_hdr_tunnel) : 0;
> 1636 if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) {
> 1637 /* vhost provides vnet_hdr */
> 1638 vhost_hlen = hdr_len;
> 1639 sock_hlen = 0;
> 1640 } else {
> 1641 /* socket provides vnet_hdr */
> 1642 vhost_hlen = 0;
> 1643 sock_hlen = hdr_len;
> 1644 }
> 1645 mutex_lock(&n->dev.mutex);
> 1646 if ((features & (1 << VHOST_F_LOG_ALL)) &&
> 1647 !vhost_log_access_ok(&n->dev))
> 1648 goto out_unlock;
> 1649
> 1650 if ((features & (1ULL << VIRTIO_F_ACCESS_PLATFORM))) {
> 1651 if (vhost_init_device_iotlb(&n->dev))
> 1652 goto out_unlock;
> 1653 }
> 1654
> 1655 for (i = 0; i < VHOST_NET_VQ_MAX; ++i) {
> 1656 mutex_lock(&n->vqs[i].vq.mutex);
> 1657 n->vqs[i].vq.acked_features = features;
> 1658 n->vqs[i].vhost_hlen = vhost_hlen;
> 1659 n->vqs[i].sock_hlen = sock_hlen;
> 1660 mutex_unlock(&n->vqs[i].vq.mutex);
> 1661 }
> 1662 mutex_unlock(&n->dev.mutex);
> 1663 return 0;
> 1664
> 1665 out_unlock:
> 1666 mutex_unlock(&n->dev.mutex);
> 1667 return -EFAULT;
> 1668 }
> 1669
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-23 19:54 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 10:32 [PATCH net-next 0/8] virtio: introduce GSO over UDP tunnel Paolo Abeni
2025-05-21 10:32 ` [PATCH net-next 1/8] virtio: introduce virtio_features_t Paolo Abeni
2025-05-21 16:02 ` Michael S. Tsirkin
2025-05-22 7:29 ` Paolo Abeni
2025-05-22 15:26 ` Paolo Abeni
2025-05-23 19:50 ` Michael S. Tsirkin
2025-05-22 8:17 ` kernel test robot
2025-05-26 0:43 ` Jason Wang
2025-05-26 7:20 ` Paolo Abeni
2025-05-27 3:51 ` Jason Wang
2025-05-28 15:47 ` Paolo Abeni
2025-05-28 15:52 ` Michael S. Tsirkin
2025-05-29 2:15 ` Jason Wang
2025-05-27 14:14 ` Michael S. Tsirkin
2025-05-21 10:32 ` [PATCH net-next 2/8] virtio_pci_modern: allow setting configuring extended features Paolo Abeni
2025-05-26 0:49 ` Jason Wang
2025-05-26 10:53 ` Paolo Abeni
2025-05-27 3:04 ` Jason Wang
2025-05-28 16:02 ` Paolo Abeni
2025-05-29 2:22 ` Jason Wang
2025-05-29 11:07 ` Paolo Abeni
2025-05-29 14:28 ` Michael S. Tsirkin
2025-06-03 2:11 ` Jason Wang
2025-05-29 14:28 ` Michael S. Tsirkin
2025-05-21 10:32 ` [PATCH net-next 3/8] vhost-net: allow " Paolo Abeni
2025-05-26 0:47 ` Jason Wang
2025-05-26 10:57 ` Paolo Abeni
2025-05-27 3:56 ` Jason Wang
2025-05-29 11:10 ` Paolo Abeni
2025-06-03 2:11 ` Jason Wang
2025-05-21 10:32 ` [PATCH net-next 4/8] virtio_net: add supports for extended offloads Paolo Abeni
2025-05-26 1:01 ` Jason Wang
2025-05-21 10:32 ` [PATCH net-next 5/8] net: implement virtio helpers to handle UDP GSO tunneling Paolo Abeni
2025-05-22 22:29 ` Willem de Bruijn
2025-05-23 6:09 ` Paolo Abeni
2025-05-23 6:44 ` Paolo Abeni
2025-05-23 13:42 ` Willem de Bruijn
2025-05-23 14:00 ` Paolo Abeni
2025-05-26 4:40 ` Jason Wang
2025-05-29 11:55 ` Paolo Abeni
2025-05-30 8:43 ` Paolo Abeni
2025-06-03 2:11 ` Jason Wang
2025-05-29 15:30 ` Paolo Abeni
2025-06-03 2:11 ` Jason Wang
2025-05-21 10:32 ` [PATCH net-next 6/8] virtio_net: enable gso over UDP tunnel support Paolo Abeni
2025-05-22 8:38 ` kernel test robot
2025-05-22 22:33 ` Willem de Bruijn
2025-05-21 10:32 ` [PATCH net-next 7/8] tun: " Paolo Abeni
2025-05-26 4:40 ` Jason Wang
2025-05-26 11:20 ` Paolo Abeni
2025-05-27 4:19 ` Jason Wang
2025-05-29 16:17 ` Paolo Abeni
2025-06-03 2:11 ` Jason Wang
2025-05-21 10:32 ` [PATCH net-next 8/8] vhost/net: " Paolo Abeni
2025-05-22 6:43 ` kernel test robot
2025-05-23 19:54 ` Michael S. Tsirkin [this message]
2025-05-26 4:40 ` Jason Wang
2025-05-21 11:38 ` [PATCH net-next 0/8] virtio: introduce GSO over UDP tunnel Paolo Abeni
2025-05-21 15:52 ` Michael S. Tsirkin
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=20250523155259-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=xuanzhuo@linux.alibaba.com \
/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.