Hi Yafang,

Thank you for the patch! Yet something to improve:

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

url:    
https://github.com/0day-ci/linux/commits/Yafang-Shao/net-tcp-track-all-TCP-IP-state-transition-in-tcp_set_state/20171112-203643
config: blackfin-allmodconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.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
        make.cross ARCH=blackfin 

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

   In file included from include/net/tcp.h:49:0,
                    from net/netfilter/ipvs/ip_vs_proto_tcp.c:27:
>> include/trace/events/tcp.h:12:31: error: expected identifier or '(' before 
>> '{' token
    #define tcp_state_name(state) { state, #state }
                                  ^
>> net/netfilter/ipvs/ip_vs_proto_tcp.c:424:21: note: in expansion of macro 
>> 'tcp_state_name'
    static const char * tcp_state_name(int state)
                        ^~~~~~~~~~~~~~
>> net/netfilter/ipvs/ip_vs_proto_tcp.c:425:1: error: expected identifier or 
>> '(' before '{' token
    {
    ^
   In file included from include/net/tcp.h:49:0,
                    from net/netfilter/ipvs/ip_vs_proto_tcp.c:27:
   net/netfilter/ipvs/ip_vs_proto_tcp.c: In function 'set_tcp_state':
>> include/trace/events/tcp.h:12:31: error: expected expression before '{' token
    #define tcp_state_name(state) { state, #state }
                                  ^
>> include/net/ip_vs.h:228:37: note: in expansion of macro 'tcp_state_name'
       printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \
                                        ^~~~~~~~~~~
>> net/netfilter/ipvs/ip_vs_proto_tcp.c:541:3: note: in expansion of macro 
>> 'IP_VS_DBG_BUF'
      IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->"
      ^~~~~~~~~~~~~
   net/netfilter/ipvs/ip_vs_proto_tcp.c: At top level:
>> net/netfilter/ipvs/ip_vs_proto_tcp.c:737:17: error: 'tcp_state_name' 
>> undeclared here (not in a function)
     .state_name =  tcp_state_name,
                    ^~~~~~~~~~~~~~
--
   In file included from include/net/tcp.h:49:0,
                    from net/netfilter//ipvs/ip_vs_proto_tcp.c:27:
>> include/trace/events/tcp.h:12:31: error: expected identifier or '(' before 
>> '{' token
    #define tcp_state_name(state) { state, #state }
                                  ^
   net/netfilter//ipvs/ip_vs_proto_tcp.c:424:21: note: in expansion of macro 
'tcp_state_name'
    static const char * tcp_state_name(int state)
                        ^~~~~~~~~~~~~~
   net/netfilter//ipvs/ip_vs_proto_tcp.c:425:1: error: expected identifier or 
'(' before '{' token
    {
    ^
   In file included from include/net/tcp.h:49:0,
                    from net/netfilter//ipvs/ip_vs_proto_tcp.c:27:
   net/netfilter//ipvs/ip_vs_proto_tcp.c: In function 'set_tcp_state':
>> include/trace/events/tcp.h:12:31: error: expected expression before '{' token
    #define tcp_state_name(state) { state, #state }
                                  ^
>> include/net/ip_vs.h:228:37: note: in expansion of macro 'tcp_state_name'
       printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \
                                        ^~~~~~~~~~~
   net/netfilter//ipvs/ip_vs_proto_tcp.c:541:3: note: in expansion of macro 
'IP_VS_DBG_BUF'
      IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->"
      ^~~~~~~~~~~~~
   net/netfilter//ipvs/ip_vs_proto_tcp.c: At top level:
   net/netfilter//ipvs/ip_vs_proto_tcp.c:737:17: error: 'tcp_state_name' 
undeclared here (not in a function)
     .state_name =  tcp_state_name,
                    ^~~~~~~~~~~~~~

vim +12 include/trace/events/tcp.h

e086101b Cong Wang 2017-10-13  11  
e8fce239 Song Liu  2017-10-23 @12  #define tcp_state_name(state)        { 
state, #state }
e8fce239 Song Liu  2017-10-23  13  #define show_tcp_state_name(val)             
        \
e8fce239 Song Liu  2017-10-23  14       __print_symbolic(val,                   
        \
e8fce239 Song Liu  2017-10-23  15               
tcp_state_name(TCP_ESTABLISHED),        \
e8fce239 Song Liu  2017-10-23  16               tcp_state_name(TCP_SYN_SENT),   
        \
e8fce239 Song Liu  2017-10-23  17               tcp_state_name(TCP_SYN_RECV),   
        \
e8fce239 Song Liu  2017-10-23  18               tcp_state_name(TCP_FIN_WAIT1),  
        \
e8fce239 Song Liu  2017-10-23  19               tcp_state_name(TCP_FIN_WAIT2),  
        \
e8fce239 Song Liu  2017-10-23  20               tcp_state_name(TCP_TIME_WAIT),  
        \
e8fce239 Song Liu  2017-10-23  21               tcp_state_name(TCP_CLOSE),      
        \
e8fce239 Song Liu  2017-10-23  22               tcp_state_name(TCP_CLOSE_WAIT), 
        \
e8fce239 Song Liu  2017-10-23  23               tcp_state_name(TCP_LAST_ACK),   
        \
e8fce239 Song Liu  2017-10-23  24               tcp_state_name(TCP_LISTEN),     
        \
e8fce239 Song Liu  2017-10-23  25               tcp_state_name(TCP_CLOSING),    
        \
e8fce239 Song Liu  2017-10-23  26               
tcp_state_name(TCP_NEW_SYN_RECV))
e8fce239 Song Liu  2017-10-23  27  

:::::: The code at line 12 was first introduced by commit
:::::: e8fce23946b7e7eadf25ad78d8207c22903dfe27 tcp: add tracepoint 
trace_tcp_set_state()

:::::: TO: Song Liu <songliubrav...@fb.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