Hi Boris,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

Note: the 
linux-review/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 HEAD 
fbaef8a3b3a3283de49a7171144b7471e5c780d9 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:45:
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 
'base' has incomplete type
     struct tls_offload_context base;
                                ^~~~
   In file included from include/linux/kernel.h:10,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from include/net/sch_generic.h:5,
                    from include/net/act_api.h:9,
                    from include/net/tc_act/tc_gact.h:5,
                    from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h: In function 
'mlx5e_get_tls_tx_context':
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: error: 
'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you 
mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
           TLS_OFFLOAD_CONTEXT_SIZE);
           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in 
expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
     ^~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: note: each 
undeclared identifier is reported only once for each function it appears in
           TLS_OFFLOAD_CONTEXT_SIZE);
           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in 
expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
     ^~~~~~~~~~~~
   In file included from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from include/net/sch_generic.h:5,
                    from include/net/act_api.h:9,
                    from include/net/tc_act/tc_gact.h:5,
                    from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:22: error: 
>> implicit declaration of function 'tls_offload_ctx'; did you mean 
>> 'tls_offload_ctx_rx'? [-Werror=implicit-function-declaration]
     return container_of(tls_offload_ctx(tls_ctx),
                         ^~~~~~~~~~~~~~~
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/kernel.h:963:17: warning: cast to pointer from integer of 
different size [-Wint-to-pointer-cast]
     void *__mptr = (void *)(ptr);     \
                    ^
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   In file included from include/linux/kernel.h:10,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from include/net/sch_generic.h:5,
                    from include/net/act_api.h:9,
                    from include/net/tc_act/tc_gact.h:5,
                    from drivers/net/ethernet/mellanox/mlx5/core/en_main.c:33:
   include/linux/kernel.h:964:32: error: invalid type argument of unary '*' 
(have 'int')
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   include/linux/kernel.h:965:18: error: invalid type argument of unary '*' 
(have 'int')
        !__same_type(*(ptr), void),   \
                     ^~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
        !__same_type(*(ptr), void),   \
         ^~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:53:29: error: field 
'base' has incomplete type
     struct tls_offload_context base;
                                ^~~~
   In file included from include/linux/kernel.h:10,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from 
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h: In function 
'mlx5e_get_tls_tx_context':
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: error: 
'TLS_OFFLOAD_CONTEXT_SIZE' undeclared (first use in this function); did you 
mean 'TLS_OFFLOAD_CONTEXT_SIZE_TX'?
           TLS_OFFLOAD_CONTEXT_SIZE);
           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in 
expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
     ^~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:62:8: note: each 
undeclared identifier is reported only once for each function it appears in
           TLS_OFFLOAD_CONTEXT_SIZE);
           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:69:2: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:61:2: note: in 
expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(sizeof(struct mlx5e_tls_offload_context) >
     ^~~~~~~~~~~~
   In file included from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from 
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:22: error: 
>> implicit declaration of function 'tls_offload_ctx'; did you mean 
>> 'tls_offload_ctx_rx'? [-Werror=implicit-function-declaration]
     return container_of(tls_offload_ctx(tls_ctx),
                         ^~~~~~~~~~~~~~~
   include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
     void *__mptr = (void *)(ptr);     \
                             ^~~
   include/linux/kernel.h:963:17: warning: cast to pointer from integer of 
different size [-Wint-to-pointer-cast]
     void *__mptr = (void *)(ptr);     \
                    ^
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   In file included from include/linux/kernel.h:10,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:28,
                    from 
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:34:
   include/linux/kernel.h:964:32: error: invalid type argument of unary '*' 
(have 'int')
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   include/linux/kernel.h:965:18: error: invalid type argument of unary '*' 
(have 'int')
        !__same_type(*(ptr), void),   \
                     ^~~~~~
   include/linux/compiler.h:316:19: note: in definition of macro 
'__compiletime_assert'
      bool __cond = !(condition);    \
                      ^~~~~~~~~
   include/linux/compiler.h:339:2: note: in expansion of macro 
'_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 
'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:965:6: note: in expansion of macro '__same_type'
        !__same_type(*(ptr), void),   \
         ^~~~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:63:9: note: in 
expansion of macro 'container_of'
     return container_of(tls_offload_ctx(tls_ctx),
            ^~~~~~~~~~~~
   In file included from 
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c:36:
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h:66:1: warning: 
control reaches end of non-void function [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors

vim +63 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h

c83294b9 Ilya Lesokhin 2018-04-30  57  
c83294b9 Ilya Lesokhin 2018-04-30  58  static inline struct 
mlx5e_tls_offload_context *
c83294b9 Ilya Lesokhin 2018-04-30  59  mlx5e_get_tls_tx_context(struct 
tls_context *tls_ctx)
c83294b9 Ilya Lesokhin 2018-04-30  60  {
c83294b9 Ilya Lesokhin 2018-04-30 @61   BUILD_BUG_ON(sizeof(struct 
mlx5e_tls_offload_context) >
c83294b9 Ilya Lesokhin 2018-04-30  62                TLS_OFFLOAD_CONTEXT_SIZE);
c83294b9 Ilya Lesokhin 2018-04-30 @63   return 
container_of(tls_offload_ctx(tls_ctx),
c83294b9 Ilya Lesokhin 2018-04-30  64                       struct 
mlx5e_tls_offload_context,
c83294b9 Ilya Lesokhin 2018-04-30  65                       base);
c83294b9 Ilya Lesokhin 2018-04-30  66  }
c83294b9 Ilya Lesokhin 2018-04-30  67  

:::::: The code at line 63 was first introduced by commit
:::::: c83294b9efa51e19b582a5962e1366196f684dba net/mlx5e: TLS, Add Innova TLS 
TX support

:::::: TO: Ilya Lesokhin <il...@mellanox.com>
:::::: CC: David S. Miller <da...@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to