linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gal Pressman <galpress@amazon.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Doug Ledford <dledford@redhat.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-rdma@vger.kernel.org,
	Alexander Matushevsky <matua@amazon.com>,
	Gal Pressman <galpress@amazon.com>,
	Shadi Ammouri <sammouri@amazon.com>,
	Yossi Leybovich <sleybo@amazon.com>
Subject: Re: [PATCH for-next v2 3/4] RDMA/efa: User/kernel compatibility handshake mechanism
Date: Tue, 21 Jul 2020 01:08:19 +0800	[thread overview]
Message-ID: <202007210118.fF0Xv5Jy%lkp@intel.com> (raw)
In-Reply-To: <20200720080113.13055-4-galpress@amazon.com>

[-- Attachment #1: Type: text/plain, Size: 8817 bytes --]

Hi Gal,

I love your patch! Yet something to improve:

[auto build test ERROR on 5f0b2a6093a4d9aab093964c65083fe801ef1e58]

url:    https://github.com/0day-ci/linux/commits/Gal-Pressman/Add-support-for-0xefa1-device/20200720-160419
base:    5f0b2a6093a4d9aab093964c65083fe801ef1e58
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cf1105069648446d58adfb7a6cc590013d6886ba)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> drivers/infiniband/hw/efa/efa_verbs.c:1533:3: error: function definition is not allowed here
                   DEFINE_COMP_HANDSHAKE(max_tx_batch, EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH),
                   ^
   drivers/infiniband/hw/efa/efa_verbs.c:1520:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           DEFINE_GET_DEV_ATTR_FUNC(_attr)                        \
                           ^
   drivers/infiniband/hw/efa/efa_verbs.c:1506:2: note: expanded from macro 'DEFINE_GET_DEV_ATTR_FUNC'
           {                                                                      \
           ^
>> drivers/infiniband/hw/efa/efa_verbs.c:1533:3: error: function definition is not allowed here
   drivers/infiniband/hw/efa/efa_verbs.c:1521:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           DEFINE_CHECK_COMP_FUNC(_attr, _mask)                   \
                           ^
   drivers/infiniband/hw/efa/efa_verbs.c:1512:2: note: expanded from macro 'DEFINE_CHECK_COMP_FUNC'
           {                                                                      \
           ^
>> drivers/infiniband/hw/efa/efa_verbs.c:1533:3: error: use of undeclared identifier 'check_comp_max_tx_batch'
   drivers/infiniband/hw/efa/efa_verbs.c:1522:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           check_comp_##_attr;                                    \
                           ^
   <scratch space>:191:1: note: expanded from here
   check_comp_max_tx_batch
   ^
   drivers/infiniband/hw/efa/efa_verbs.c:1534:3: error: function definition is not allowed here
                   DEFINE_COMP_HANDSHAKE(min_sq_depth, EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR),
                   ^
   drivers/infiniband/hw/efa/efa_verbs.c:1520:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           DEFINE_GET_DEV_ATTR_FUNC(_attr)                        \
                           ^
   drivers/infiniband/hw/efa/efa_verbs.c:1506:2: note: expanded from macro 'DEFINE_GET_DEV_ATTR_FUNC'
           {                                                                      \
           ^
   drivers/infiniband/hw/efa/efa_verbs.c:1534:3: error: function definition is not allowed here
   drivers/infiniband/hw/efa/efa_verbs.c:1521:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           DEFINE_CHECK_COMP_FUNC(_attr, _mask)                   \
                           ^
   drivers/infiniband/hw/efa/efa_verbs.c:1512:2: note: expanded from macro 'DEFINE_CHECK_COMP_FUNC'
           {                                                                      \
           ^
>> drivers/infiniband/hw/efa/efa_verbs.c:1534:3: error: use of undeclared identifier 'check_comp_min_sq_depth'
   drivers/infiniband/hw/efa/efa_verbs.c:1522:4: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                           check_comp_##_attr;                                    \
                           ^
   <scratch space>:196:1: note: expanded from here
   check_comp_min_sq_depth
   ^
>> drivers/infiniband/hw/efa/efa_verbs.c:1533:3: error: initializing 'bool (*)(const struct efa_dev *, u32)' (aka '_Bool (*)(const struct efa_dev *, unsigned int)') with an expression of incompatible type 'void'
                   DEFINE_COMP_HANDSHAKE(max_tx_batch, EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH),
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/efa/efa_verbs.c:1519:17: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                   .check_comp = ({                                               \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/efa/efa_verbs.c:1534:3: error: initializing 'bool (*)(const struct efa_dev *, u32)' (aka '_Bool (*)(const struct efa_dev *, unsigned int)') with an expression of incompatible type 'void'
                   DEFINE_COMP_HANDSHAKE(min_sq_depth, EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR),
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/efa/efa_verbs.c:1519:17: note: expanded from macro 'DEFINE_COMP_HANDSHAKE'
                   .check_comp = ({                                               \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/efa/efa_verbs.c:1539:18: error: invalid application of 'sizeof' to an incomplete type 'struct (anonymous struct at drivers/infiniband/hw/efa/efa_verbs.c:1529:2) []'
           for (i = 0; i < ARRAY_SIZE(user_comp_handshakes); i++) {
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:47:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
>> drivers/infiniband/hw/efa/efa_verbs.c:1526:5: warning: no previous prototype for function 'efa_user_comp_handshake' [-Wmissing-prototypes]
   int efa_user_comp_handshake(const struct ib_ucontext *ibucontext,
       ^
   drivers/infiniband/hw/efa/efa_verbs.c:1526:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int efa_user_comp_handshake(const struct ib_ucontext *ibucontext,
   ^
   static 
   1 warning and 9 errors generated.

vim +1533 drivers/infiniband/hw/efa/efa_verbs.c

  1503	
  1504	#define DEFINE_GET_DEV_ATTR_FUNC(_attr)                                        \
  1505		bool dev_attr_##_attr(const struct efa_dev *dev)                       \
  1506		{                                                                      \
  1507			return dev->dev_attr._attr;                                    \
  1508		}
  1509	
  1510	#define DEFINE_CHECK_COMP_FUNC(_attr, _mask)                                   \
  1511		bool check_comp_##_attr(const struct efa_dev *dev, u32 comp_mask)      \
  1512		{                                                                      \
  1513			return !dev_attr_##_attr(dev) || (comp_mask & (_mask));        \
  1514		}
  1515	
  1516	#define DEFINE_COMP_HANDSHAKE(_attr, _mask)                                    \
  1517		{                                                                      \
  1518			.attr = #_attr,                                                \
  1519			.check_comp = ({                                               \
  1520				DEFINE_GET_DEV_ATTR_FUNC(_attr)                        \
  1521				DEFINE_CHECK_COMP_FUNC(_attr, _mask)                   \
  1522				check_comp_##_attr;                                    \
  1523			}),                                                            \
  1524		}
  1525	
> 1526	int efa_user_comp_handshake(const struct ib_ucontext *ibucontext,
  1527				    const struct efa_ibv_alloc_ucontext_cmd *cmd)
  1528	{
  1529		struct {
  1530			char *attr;
  1531			bool (*check_comp)(const struct efa_dev *dev, u32 comp_mask);
  1532		} user_comp_handshakes[] = {
> 1533			DEFINE_COMP_HANDSHAKE(max_tx_batch, EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH),
> 1534			DEFINE_COMP_HANDSHAKE(min_sq_depth, EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR),
  1535		};
  1536		struct efa_dev *dev = to_edev(ibucontext->device);
  1537		int i;
  1538	
> 1539		for (i = 0; i < ARRAY_SIZE(user_comp_handshakes); i++) {
  1540			if (!user_comp_handshakes[i].check_comp(dev, cmd->comp_mask)) {
  1541				ibdev_dbg(&dev->ibdev,
  1542					  "Userspace handshake failed for %s attribute\n",
  1543					  user_comp_handshakes[i].attr);
  1544				return -EOPNOTSUPP;
  1545			}
  1546		}
  1547	
  1548		return 0;
  1549	}
  1550	

---
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: 75288 bytes --]

  reply	other threads:[~2020-07-20 17:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  8:01 [PATCH for-next v2 0/4] Add support for 0xefa1 device Gal Pressman
2020-07-20  8:01 ` [PATCH for-next v2 1/4] RDMA/efa: Expose maximum TX doorbell batch Gal Pressman
2020-07-20  8:01 ` [PATCH for-next v2 2/4] RDMA/efa: Expose minimum SQ size Gal Pressman
2020-07-20  8:01 ` [PATCH for-next v2 3/4] RDMA/efa: User/kernel compatibility handshake mechanism Gal Pressman
2020-07-20 17:08   ` kernel test robot [this message]
2020-07-21 11:26     ` Gal Pressman
2020-07-21 17:10       ` Nick Desaulniers
2020-07-22  6:35         ` Gal Pressman
2020-07-22 15:51           ` Nathan Chancellor
2020-07-20  8:01 ` [PATCH for-next v2 4/4] RDMA/efa: Add EFA 0xefa1 PCI ID Gal Pressman

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=202007210118.fF0Xv5Jy%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dledford@redhat.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matua@amazon.com \
    --cc=sammouri@amazon.com \
    --cc=sleybo@amazon.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 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).