oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next 4/5] gve: Add flow steering adminq commands
       [not found] <20240507225945.1408516-5-ziweixiao@google.com>
@ 2024-05-08 14:24 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-08 14:24 UTC (permalink / raw)
  To: Ziwei Xiao, netdev
  Cc: oe-kbuild-all, jeroendb, pkaligineedi, shailend, davem, edumazet,
	kuba, pabeni, willemb, hramamurthy, rushilg, ziweixiao, jfraker,
	linux-kernel

Hi Ziwei,

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/Ziwei-Xiao/gve-Add-adminq-mutex-lock/20240508-071419
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240507225945.1408516-5-ziweixiao%40google.com
patch subject: [PATCH net-next 4/5] gve: Add flow steering adminq commands
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20240508/202405082251.rL1Lk120-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405082251.rL1Lk120-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/202405082251.rL1Lk120-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/google/gve/gve_adminq.c: In function 'gve_adminq_process_flow_rules_query':
>> drivers/net/ethernet/google/gve/gve_adminq.c:1259:15: warning: variable 'descriptor_end' set but not used [-Wunused-but-set-variable]
    1259 |         void *descriptor_end, *rule_info;
         |               ^~~~~~~~~~~~~~


vim +/descriptor_end +1259 drivers/net/ethernet/google/gve/gve_adminq.c

  1248	
  1249	/* In the dma memory that the driver allocated for the device to query the flow rules, the device
  1250	 * will first write it with a struct of gve_query_flow_rules_descriptor. Next to it, the device
  1251	 * will write an array of rules or rule ids with the count that specified in the descriptor.
  1252	 * For GVE_FLOW_RULE_QUERY_STATS, the device will only write the descriptor.
  1253	 */
  1254	static int gve_adminq_process_flow_rules_query(struct gve_priv *priv, u16 query_opcode,
  1255						       struct gve_query_flow_rules_descriptor *descriptor)
  1256	{
  1257		struct gve_flow_rules_cache *flow_rules_cache = &priv->flow_rules_cache;
  1258		u32 num_queried_rules, total_memory_len, rule_info_len;
> 1259		void *descriptor_end, *rule_info;
  1260	
  1261		total_memory_len = be32_to_cpu(descriptor->total_length);
  1262		if (total_memory_len > GVE_ADMINQ_BUFFER_SIZE) {
  1263			dev_err(&priv->dev->dev, "flow rules query is out of memory.\n");
  1264			return -ENOMEM;
  1265		}
  1266	
  1267		num_queried_rules = be32_to_cpu(descriptor->num_queried_rules);
  1268		descriptor_end = (void *)descriptor + total_memory_len;
  1269		rule_info = (void *)(descriptor + 1);
  1270	
  1271		switch (query_opcode) {
  1272		case GVE_FLOW_RULE_QUERY_RULES:
  1273			rule_info_len = num_queried_rules * sizeof(*flow_rules_cache->rules_cache);
  1274	
  1275			memcpy(flow_rules_cache->rules_cache, rule_info, rule_info_len);
  1276			flow_rules_cache->rules_cache_num = num_queried_rules;
  1277			break;
  1278		case GVE_FLOW_RULE_QUERY_IDS:
  1279			rule_info_len = num_queried_rules * sizeof(*flow_rules_cache->rule_ids_cache);
  1280	
  1281			memcpy(flow_rules_cache->rule_ids_cache, rule_info, rule_info_len);
  1282			flow_rules_cache->rule_ids_cache_num = num_queried_rules;
  1283			break;
  1284		case GVE_FLOW_RULE_QUERY_STATS:
  1285			priv->num_flow_rules = be32_to_cpu(descriptor->num_flow_rules);
  1286			priv->max_flow_rules = be32_to_cpu(descriptor->max_flow_rules);
  1287			return 0;
  1288		default:
  1289			return -EINVAL;
  1290		}
  1291	
  1292		return  0;
  1293	}
  1294	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-08 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20240507225945.1408516-5-ziweixiao@google.com>
2024-05-08 14:24 ` [PATCH net-next 4/5] gve: Add flow steering adminq commands kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).