From: kernel test robot <lkp@intel.com> To: Anand Khoje <anand.a.khoje@oracle.com>, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, dledford@redhat.com, jgg@ziepe.ca, haakon.bugge@oracle.com, leon@kernel.org Subject: Re: [PATCH v4 for-next 3/3] IB/core: Obtain subnet_prefix from cache in IB devices Date: Thu, 17 Jun 2021 18:11:31 +0800 [thread overview] Message-ID: <202106171826.YTKVUpkW-lkp@intel.com> (raw) In-Reply-To: <20210616065213.987-4-anand.a.khoje@oracle.com> [-- Attachment #1: Type: text/plain, Size: 5663 bytes --] Hi Anand, Thank you for the patch! Yet something to improve: [auto build test ERROR on rdma/for-next] [also build test ERROR on next-20210616] [cannot apply to linux/master linus/master v5.13-rc6] [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/Anand-Khoje/IB-core-Obtaining-subnet_prefix-from-cache-in/20210617-102611 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: powerpc64-randconfig-r012-20210617 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # https://github.com/0day-ci/linux/commit/495253a987df586d8c5f4c525999cdf39c5823f0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Anand-Khoje/IB-core-Obtaining-subnet_prefix-from-cache-in/20210617-102611 git checkout 495253a987df586d8c5f4c525999cdf39c5823f0 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from drivers/infiniband/core/cache.c:36: In file included from include/linux/module.h:12: In file included from include/linux/list.h:9: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:32: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/infiniband/core/cache.c:1531:29: error: no member named 'cache' in 'struct ib_device' write_unlock_irq(&device->cache.lock); ~~~~~~ ^ include/linux/rwlock.h:108:55: note: expanded from macro 'write_unlock_irq' #define write_unlock_irq(lock) _raw_write_unlock_irq(lock) ^~~~ 1 warning and 1 error generated. vim +1531 drivers/infiniband/core/cache.c 1463 1464 static int 1465 ib_cache_update(struct ib_device *device, u32 port, bool update_gids, 1466 bool update_pkeys, bool enforce_security) 1467 { 1468 struct ib_port_attr *tprops = NULL; 1469 struct ib_pkey_cache *pkey_cache = NULL; 1470 struct ib_pkey_cache *old_pkey_cache = NULL; 1471 union ib_gid gid; 1472 int i; 1473 int ret; 1474 1475 if (!rdma_is_port_valid(device, port)) 1476 return -EINVAL; 1477 1478 tprops = kmalloc(sizeof *tprops, GFP_KERNEL); 1479 if (!tprops) 1480 return -ENOMEM; 1481 1482 ret = ib_query_port(device, port, tprops); 1483 if (ret) { 1484 dev_warn(&device->dev, "ib_query_port failed (%d)\n", ret); 1485 goto err; 1486 } 1487 1488 if (!rdma_protocol_roce(device, port) && update_gids) { 1489 ret = config_non_roce_gid_cache(device, port, 1490 tprops->gid_tbl_len); 1491 if (ret) 1492 goto err; 1493 } 1494 1495 update_pkeys &= !!tprops->pkey_tbl_len; 1496 1497 if (update_pkeys) { 1498 pkey_cache = kmalloc(struct_size(pkey_cache, table, 1499 tprops->pkey_tbl_len), 1500 GFP_KERNEL); 1501 if (!pkey_cache) { 1502 ret = -ENOMEM; 1503 goto err; 1504 } 1505 1506 pkey_cache->table_len = tprops->pkey_tbl_len; 1507 1508 for (i = 0; i < pkey_cache->table_len; ++i) { 1509 ret = ib_query_pkey(device, port, i, 1510 pkey_cache->table + i); 1511 if (ret) { 1512 dev_warn(&device->dev, 1513 "ib_query_pkey failed (%d) for index %d\n", 1514 ret, i); 1515 goto err; 1516 } 1517 } 1518 } 1519 1520 write_lock_irq(&device->cache_lock); 1521 1522 if (update_pkeys) { 1523 old_pkey_cache = device->port_data[port].cache.pkey; 1524 device->port_data[port].cache.pkey = pkey_cache; 1525 } 1526 device->port_data[port].cache.lmc = tprops->lmc; 1527 device->port_data[port].cache.port_state = tprops->state; 1528 1529 ret = rdma_query_gid(device, port, 0, &gid); 1530 if (ret) { > 1531 write_unlock_irq(&device->cache.lock); 1532 goto err; 1533 } 1534 1535 device->port_data[port].cache.subnet_prefix = 1536 be64_to_cpu(gid.global.subnet_prefix); 1537 1538 write_unlock_irq(&device->cache_lock); 1539 1540 if (enforce_security) 1541 ib_security_cache_change(device, 1542 port, 1543 be64_to_cpu(gid.global.subnet_prefix)); 1544 1545 kfree(old_pkey_cache); 1546 kfree(tprops); 1547 return 0; 1548 1549 err: 1550 kfree(pkey_cache); 1551 kfree(tprops); 1552 return ret; 1553 } 1554 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 46577 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH v4 for-next 3/3] IB/core: Obtain subnet_prefix from cache in IB devices Date: Thu, 17 Jun 2021 18:11:31 +0800 [thread overview] Message-ID: <202106171826.YTKVUpkW-lkp@intel.com> (raw) In-Reply-To: <20210616065213.987-4-anand.a.khoje@oracle.com> [-- Attachment #1: Type: text/plain, Size: 5816 bytes --] Hi Anand, Thank you for the patch! Yet something to improve: [auto build test ERROR on rdma/for-next] [also build test ERROR on next-20210616] [cannot apply to linux/master linus/master v5.13-rc6] [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/Anand-Khoje/IB-core-Obtaining-subnet_prefix-from-cache-in/20210617-102611 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: powerpc64-randconfig-r012-20210617 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # https://github.com/0day-ci/linux/commit/495253a987df586d8c5f4c525999cdf39c5823f0 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Anand-Khoje/IB-core-Obtaining-subnet_prefix-from-cache-in/20210617-102611 git checkout 495253a987df586d8c5f4c525999cdf39c5823f0 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from drivers/infiniband/core/cache.c:36: In file included from include/linux/module.h:12: In file included from include/linux/list.h:9: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:32: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/infiniband/core/cache.c:1531:29: error: no member named 'cache' in 'struct ib_device' write_unlock_irq(&device->cache.lock); ~~~~~~ ^ include/linux/rwlock.h:108:55: note: expanded from macro 'write_unlock_irq' #define write_unlock_irq(lock) _raw_write_unlock_irq(lock) ^~~~ 1 warning and 1 error generated. vim +1531 drivers/infiniband/core/cache.c 1463 1464 static int 1465 ib_cache_update(struct ib_device *device, u32 port, bool update_gids, 1466 bool update_pkeys, bool enforce_security) 1467 { 1468 struct ib_port_attr *tprops = NULL; 1469 struct ib_pkey_cache *pkey_cache = NULL; 1470 struct ib_pkey_cache *old_pkey_cache = NULL; 1471 union ib_gid gid; 1472 int i; 1473 int ret; 1474 1475 if (!rdma_is_port_valid(device, port)) 1476 return -EINVAL; 1477 1478 tprops = kmalloc(sizeof *tprops, GFP_KERNEL); 1479 if (!tprops) 1480 return -ENOMEM; 1481 1482 ret = ib_query_port(device, port, tprops); 1483 if (ret) { 1484 dev_warn(&device->dev, "ib_query_port failed (%d)\n", ret); 1485 goto err; 1486 } 1487 1488 if (!rdma_protocol_roce(device, port) && update_gids) { 1489 ret = config_non_roce_gid_cache(device, port, 1490 tprops->gid_tbl_len); 1491 if (ret) 1492 goto err; 1493 } 1494 1495 update_pkeys &= !!tprops->pkey_tbl_len; 1496 1497 if (update_pkeys) { 1498 pkey_cache = kmalloc(struct_size(pkey_cache, table, 1499 tprops->pkey_tbl_len), 1500 GFP_KERNEL); 1501 if (!pkey_cache) { 1502 ret = -ENOMEM; 1503 goto err; 1504 } 1505 1506 pkey_cache->table_len = tprops->pkey_tbl_len; 1507 1508 for (i = 0; i < pkey_cache->table_len; ++i) { 1509 ret = ib_query_pkey(device, port, i, 1510 pkey_cache->table + i); 1511 if (ret) { 1512 dev_warn(&device->dev, 1513 "ib_query_pkey failed (%d) for index %d\n", 1514 ret, i); 1515 goto err; 1516 } 1517 } 1518 } 1519 1520 write_lock_irq(&device->cache_lock); 1521 1522 if (update_pkeys) { 1523 old_pkey_cache = device->port_data[port].cache.pkey; 1524 device->port_data[port].cache.pkey = pkey_cache; 1525 } 1526 device->port_data[port].cache.lmc = tprops->lmc; 1527 device->port_data[port].cache.port_state = tprops->state; 1528 1529 ret = rdma_query_gid(device, port, 0, &gid); 1530 if (ret) { > 1531 write_unlock_irq(&device->cache.lock); 1532 goto err; 1533 } 1534 1535 device->port_data[port].cache.subnet_prefix = 1536 be64_to_cpu(gid.global.subnet_prefix); 1537 1538 write_unlock_irq(&device->cache_lock); 1539 1540 if (enforce_security) 1541 ib_security_cache_change(device, 1542 port, 1543 be64_to_cpu(gid.global.subnet_prefix)); 1544 1545 kfree(old_pkey_cache); 1546 kfree(tprops); 1547 return 0; 1548 1549 err: 1550 kfree(pkey_cache); 1551 kfree(tprops); 1552 return ret; 1553 } 1554 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 46577 bytes --]
next prev parent reply other threads:[~2021-06-17 10:12 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-16 6:52 [PATCH v4 for-next 0/3] IB/core: Obtaining subnet_prefix from cache in Anand Khoje 2021-06-16 6:52 ` [PATCH v4 for-next 1/3] IB/core: Removed port validity check from ib_get_cached_subnet_prefix Anand Khoje 2021-06-16 6:52 ` [PATCH v4 for-next 2/3] IB/core: Shuffle locks in ib_port_data to save memory Anand Khoje 2021-06-16 6:52 ` [PATCH v4 for-next 3/3] IB/core: Obtain subnet_prefix from cache in IB devices Anand Khoje 2021-06-16 7:27 ` Leon Romanovsky 2021-06-16 7:42 ` Anand Khoje 2021-06-16 8:05 ` Anand Khoje 2021-06-16 8:41 ` Leon Romanovsky 2021-06-16 7:30 ` Leon Romanovsky 2021-06-16 7:43 ` Anand Khoje 2021-06-17 10:05 ` kernel test robot 2021-06-17 10:05 ` kernel test robot 2021-06-17 10:11 ` kernel test robot [this message] 2021-06-17 10:11 ` 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=202106171826.YTKVUpkW-lkp@intel.com \ --to=lkp@intel.com \ --cc=anand.a.khoje@oracle.com \ --cc=clang-built-linux@googlegroups.com \ --cc=dledford@redhat.com \ --cc=haakon.bugge@oracle.com \ --cc=jgg@ziepe.ca \ --cc=kbuild-all@lists.01.org \ --cc=leon@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rdma@vger.kernel.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: linkBe 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.