All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Jurgens <danielj@nvidia.com>,
	netdev@vger.kernel.org, mst@redhat.com, jasowang@redhat.com,
	alex.williamson@redhat.com, virtualization@lists.linux.dev,
	pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, parav@nvidia.com,
	shshitrit@nvidia.com, yohadt@nvidia.com,
	Daniel Jurgens <danielj@nvidia.com>
Subject: Re: [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool flow rules
Date: Fri, 29 Aug 2025 06:27:55 +0800	[thread overview]
Message-ID: <202508290631.baVQplwA-lkp@intel.com> (raw)
In-Reply-To: <20250827183852.2471-7-danielj@nvidia.com>

Hi Daniel,

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/Daniel-Jurgens/virtio-pci-Expose-generic-device-capability-operations/20250828-024128
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250827183852.2471-7-danielj%40nvidia.com
patch subject: [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool flow rules
config: x86_64-randconfig-121-20250828 (https://download.01.org/0day-ci/archive/20250829/202508290631.baVQplwA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250829/202508290631.baVQplwA-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/202508290631.baVQplwA-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/net/virtio_net/virtio_net_ff.c: note: in included file (through include/linux/virtio_admin.h):
   include/uapi/linux/virtio_net_ff.h:47:48: sparse: sparse: array of flexible structures
   include/uapi/linux/virtio_net_ff.h:67:48: sparse: sparse: array of flexible structures
   drivers/net/virtio_net/virtio_net_ff.c:113:24: sparse: sparse: restricted __le32 degrades to integer
>> drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] vq_index @@     got unsigned long long @@
   drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse:     expected restricted __le16 [usertype] vq_index
   drivers/net/virtio_net/virtio_net_ff.c:189:27: sparse:     got unsigned long long
   drivers/net/virtio_net/virtio_net_ff.c:380:24: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:509:13: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/virtio_net/virtio_net_ff.c:509:13: sparse: sparse: cast to restricted __le32
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] groups_limit @@     got int @@
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse:     expected restricted __le32 [usertype] groups_limit
   drivers/net/virtio_net/virtio_net_ff.c:513:35: sparse:     got int

vim +189 drivers/net/virtio_net/virtio_net_ff.c

   163	
   164	static int insert_rule(struct virtnet_ff *ff,
   165			       struct virtnet_ethtool_rule *eth_rule,
   166			       u32 classifier_id,
   167			       const u8 *key,
   168			       size_t key_size)
   169	{
   170		struct ethtool_rx_flow_spec *fs = &eth_rule->flow_spec;
   171		struct virtio_net_resource_obj_ff_rule *ff_rule;
   172		int err;
   173	
   174		ff_rule = kzalloc(sizeof(*ff_rule) + key_size, GFP_KERNEL);
   175		if (!ff_rule) {
   176			err = -ENOMEM;
   177			goto err_eth_rule;
   178		}
   179		/*
   180		 * Intentionally leave the priority as 0. All rules have the same
   181		 * priority.
   182		 */
   183		ff_rule->group_id = cpu_to_le32(VIRTNET_FF_ETHTOOL_GROUP_PRIORITY);
   184		ff_rule->classifier_id = cpu_to_le32(classifier_id);
   185		ff_rule->key_length = (u8)key_size;
   186		ff_rule->action = fs->ring_cookie == RX_CLS_FLOW_DISC ?
   187						     VIRTIO_NET_FF_ACTION_DROP :
   188						     VIRTIO_NET_FF_ACTION_RX_VQ;
 > 189		ff_rule->vq_index = fs->ring_cookie != RX_CLS_FLOW_DISC ?
   190						       fs->ring_cookie : 0;
   191		memcpy(&ff_rule->keys, key, key_size);
   192	
   193		err = virtio_device_object_create(ff->vdev,
   194						  VIRTIO_NET_RESOURCE_OBJ_FF_RULE,
   195						  fs->location,
   196						  ff_rule,
   197						  sizeof(*ff_rule) + key_size);
   198		if (err)
   199			goto err_ff_rule;
   200	
   201		eth_rule->classifier_id = classifier_id;
   202		ff->ethtool.num_rules++;
   203		kfree(ff_rule);
   204	
   205		return 0;
   206	
   207	err_ff_rule:
   208		kfree(ff_rule);
   209	err_eth_rule:
   210		xa_erase(&ff->ethtool.rules, eth_rule->flow_spec.location);
   211		kfree(eth_rule);
   212	
   213		return err;
   214	}
   215	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-08-28 22:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 18:38 [PATCH net-next 00/11] virtio_net: Add ethtool flow rules support Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 01/11] virtio-pci: Expose generic device capability operations Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 02/11] virtio-pci: Expose object create and destroy API Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 03/11] virtio_net: Create virtio_net directory Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 04/11] virtio_net: Query and set flow filter caps Daniel Jurgens
2025-08-28  0:15   ` kernel test robot
2025-08-27 18:38 ` [PATCH net-next 05/11] virtio_net: Create a FF group for ethtool steering Daniel Jurgens
2025-08-28 20:52   ` kernel test robot
2025-08-27 18:38 ` [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool flow rules Daniel Jurgens
2025-08-28 22:27   ` kernel test robot [this message]
2025-08-29 18:39   ` ALOK TIWARI
2025-08-29 20:16     ` Dan Jurgens
2025-08-27 18:38 ` [PATCH net-next 07/11] virtio_net: Use existing classifier if possible Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 08/11] virtio_net: Implement IPv4 ethtool flow rules Daniel Jurgens
2025-08-29  0:27   ` kernel test robot
2025-08-27 18:38 ` [PATCH net-next 09/11] virtio_net: Add support for IPv6 ethtool steering Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 10/11] virtio_net: Add support for TCP and UDP ethtool rules Daniel Jurgens
2025-08-27 18:38 ` [PATCH net-next 11/11] virtio_net: Add get ethtool flow rules ops Daniel Jurgens
  -- strict thread matches above, loose matches on Subject: below --
2025-08-28 15:05 [PATCH net-next 06/11] virtio_net: Implement layer 2 ethtool flow rules kernel test robot

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=202508290631.baVQplwA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=danielj@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=parav@nvidia.com \
    --cc=shshitrit@nvidia.com \
    --cc=virtualization@lists.linux.dev \
    --cc=yohadt@nvidia.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.