[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202411081511.T7pLZhW4-lkp@intel.com>
Date: Fri, 8 Nov 2024 16:08:45 +0800
From: kernel test robot <lkp@...el.com>
To: Jacob Keller <jacob.e.keller@...el.com>,
Vladimir Oltean <olteanv@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Masahiro Yamada <masahiroy@...nel.org>,
netdev <netdev@...r.kernel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Linux Memory Management List <linux-mm@...ck.org>,
linux-kbuild@...r.kernel.org,
Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH net-next v3 6/9] ice: use <linux/packing.h> for Tx and Rx
queue context data
Hi Jacob,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a84e8c05f58305dfa808bc5465c5175c29d7c9b6]
url: https://github.com/intel-lab-lkp/linux/commits/Jacob-Keller/lib-packing-create-__pack-and-__unpack-variants-without-error-checking/20241108-040154
base: a84e8c05f58305dfa808bc5465c5175c29d7c9b6
patch link: https://lore.kernel.org/r/20241107-packing-pack-fields-and-ice-implementation-v3-6-27c566ac2436%40intel.com
patch subject: [PATCH net-next v3 6/9] ice: use <linux/packing.h> for Tx and Rx queue context data
config: x86_64-randconfig-122-20241108 (https://download.01.org/0day-ci/archive/20241108/202411081511.T7pLZhW4-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411081511.T7pLZhW4-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411081511.T7pLZhW4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/ice/ice_common.c:1393:1: sparse: sparse: symbol '__ice_rlan_ctx_fields_buffer_sz' was not declared. Should it be static?
>> drivers/net/ethernet/intel/ice/ice_common.c:1393:1: sparse: sparse: symbol 'ice_rlan_ctx_fields' was not declared. Should it be static?
>> drivers/net/ethernet/intel/ice/ice_common.c:1460:1: sparse: sparse: symbol '__ice_tlan_ctx_fields_buffer_sz' was not declared. Should it be static?
>> drivers/net/ethernet/intel/ice/ice_common.c:1460:1: sparse: sparse: symbol 'ice_tlan_ctx_fields' was not declared. Should it be static?
vim +/__ice_rlan_ctx_fields_buffer_sz +1393 drivers/net/ethernet/intel/ice/ice_common.c
1388
1389 #define ICE_CTX_STORE(struct_name, struct_field, width, lsb) \
1390 PACKED_FIELD((lsb) + (width) - 1, (lsb), struct struct_name, struct_field)
1391
1392 /* LAN Rx Queue Context */
> 1393 DECLARE_PACKED_FIELDS_S(ice_rlan_ctx_fields, ICE_RXQ_CTX_SZ) = {
1394 /* Field Width LSB */
1395 ICE_CTX_STORE(ice_rlan_ctx, head, 13, 0),
1396 ICE_CTX_STORE(ice_rlan_ctx, cpuid, 8, 13),
1397 ICE_CTX_STORE(ice_rlan_ctx, base, 57, 32),
1398 ICE_CTX_STORE(ice_rlan_ctx, qlen, 13, 89),
1399 ICE_CTX_STORE(ice_rlan_ctx, dbuf, 7, 102),
1400 ICE_CTX_STORE(ice_rlan_ctx, hbuf, 5, 109),
1401 ICE_CTX_STORE(ice_rlan_ctx, dtype, 2, 114),
1402 ICE_CTX_STORE(ice_rlan_ctx, dsize, 1, 116),
1403 ICE_CTX_STORE(ice_rlan_ctx, crcstrip, 1, 117),
1404 ICE_CTX_STORE(ice_rlan_ctx, l2tsel, 1, 119),
1405 ICE_CTX_STORE(ice_rlan_ctx, hsplit_0, 4, 120),
1406 ICE_CTX_STORE(ice_rlan_ctx, hsplit_1, 2, 124),
1407 ICE_CTX_STORE(ice_rlan_ctx, showiv, 1, 127),
1408 ICE_CTX_STORE(ice_rlan_ctx, rxmax, 14, 174),
1409 ICE_CTX_STORE(ice_rlan_ctx, tphrdesc_ena, 1, 193),
1410 ICE_CTX_STORE(ice_rlan_ctx, tphwdesc_ena, 1, 194),
1411 ICE_CTX_STORE(ice_rlan_ctx, tphdata_ena, 1, 195),
1412 ICE_CTX_STORE(ice_rlan_ctx, tphhead_ena, 1, 196),
1413 ICE_CTX_STORE(ice_rlan_ctx, lrxqthresh, 3, 198),
1414 ICE_CTX_STORE(ice_rlan_ctx, prefena, 1, 201),
1415 };
1416
1417 /**
1418 * ice_pack_rxq_ctx - Pack Rx queue context into a HW buffer
1419 * @ctx: the Rx queue context to pack
1420 * @buf: the HW buffer to pack into
1421 *
1422 * Pack the Rx queue context from the CPU-friendly unpacked buffer into its
1423 * bit-packed HW layout.
1424 */
1425 static void ice_pack_rxq_ctx(const struct ice_rlan_ctx *ctx,
1426 ice_rxq_ctx_buf_t *buf)
1427 {
1428 BUILD_BUG_ON(sizeof(*buf) != ICE_RXQ_CTX_SZ);
1429
1430 pack_fields(buf, sizeof(*buf), ctx, ice_rlan_ctx_fields,
1431 QUIRK_LITTLE_ENDIAN | QUIRK_LSW32_IS_FIRST);
1432 }
1433
1434 /**
1435 * ice_write_rxq_ctx
1436 * @hw: pointer to the hardware structure
1437 * @rlan_ctx: pointer to the rxq context
1438 * @rxq_index: the index of the Rx queue
1439 *
1440 * Converts rxq context from sparse to dense structure and then writes
1441 * it to HW register space and enables the hardware to prefetch descriptors
1442 * instead of only fetching them on demand
1443 */
1444 int ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx,
1445 u32 rxq_index)
1446 {
1447 ice_rxq_ctx_buf_t buf = {};
1448
1449 if (!rlan_ctx)
1450 return -EINVAL;
1451
1452 rlan_ctx->prefena = 1;
1453
1454 ice_pack_rxq_ctx(rlan_ctx, &buf);
1455
1456 return ice_copy_rxq_ctx_to_hw(hw, &buf, rxq_index);
1457 }
1458
1459 /* LAN Tx Queue Context */
> 1460 DECLARE_PACKED_FIELDS_S(ice_tlan_ctx_fields, ICE_TXQ_CTX_SZ) = {
1461 /* Field Width LSB */
1462 ICE_CTX_STORE(ice_tlan_ctx, base, 57, 0),
1463 ICE_CTX_STORE(ice_tlan_ctx, port_num, 3, 57),
1464 ICE_CTX_STORE(ice_tlan_ctx, cgd_num, 5, 60),
1465 ICE_CTX_STORE(ice_tlan_ctx, pf_num, 3, 65),
1466 ICE_CTX_STORE(ice_tlan_ctx, vmvf_num, 10, 68),
1467 ICE_CTX_STORE(ice_tlan_ctx, vmvf_type, 2, 78),
1468 ICE_CTX_STORE(ice_tlan_ctx, src_vsi, 10, 80),
1469 ICE_CTX_STORE(ice_tlan_ctx, tsyn_ena, 1, 90),
1470 ICE_CTX_STORE(ice_tlan_ctx, internal_usage_flag, 1, 91),
1471 ICE_CTX_STORE(ice_tlan_ctx, alt_vlan, 1, 92),
1472 ICE_CTX_STORE(ice_tlan_ctx, cpuid, 8, 93),
1473 ICE_CTX_STORE(ice_tlan_ctx, wb_mode, 1, 101),
1474 ICE_CTX_STORE(ice_tlan_ctx, tphrd_desc, 1, 102),
1475 ICE_CTX_STORE(ice_tlan_ctx, tphrd, 1, 103),
1476 ICE_CTX_STORE(ice_tlan_ctx, tphwr_desc, 1, 104),
1477 ICE_CTX_STORE(ice_tlan_ctx, cmpq_id, 9, 105),
1478 ICE_CTX_STORE(ice_tlan_ctx, qnum_in_func, 14, 114),
1479 ICE_CTX_STORE(ice_tlan_ctx, itr_notification_mode, 1, 128),
1480 ICE_CTX_STORE(ice_tlan_ctx, adjust_prof_id, 6, 129),
1481 ICE_CTX_STORE(ice_tlan_ctx, qlen, 13, 135),
1482 ICE_CTX_STORE(ice_tlan_ctx, quanta_prof_idx, 4, 148),
1483 ICE_CTX_STORE(ice_tlan_ctx, tso_ena, 1, 152),
1484 ICE_CTX_STORE(ice_tlan_ctx, tso_qnum, 11, 153),
1485 ICE_CTX_STORE(ice_tlan_ctx, legacy_int, 1, 164),
1486 ICE_CTX_STORE(ice_tlan_ctx, drop_ena, 1, 165),
1487 ICE_CTX_STORE(ice_tlan_ctx, cache_prof_idx, 2, 166),
1488 ICE_CTX_STORE(ice_tlan_ctx, pkt_shaper_prof_idx, 3, 168),
1489 };
1490
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists