Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    
https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt_en-Bug-fixes/20190817-155755
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.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=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 
'bnxt_tc_get_decap_handle':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:1047:9: warning: braces around 
>> scalar initializer
     struct bnxt_tc_l2_key l2_info = { {0} };
            ^~~~~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:1047:9: note: (near 
initialization for 'l2_info.dir')

vim +1047 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

8c95f773b4a367 Sathya Perla          2017-10-26  1040  
8c95f773b4a367 Sathya Perla          2017-10-26  1041  static int 
bnxt_tc_get_decap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow,
8c95f773b4a367 Sathya Perla          2017-10-26  1042                           
    struct bnxt_tc_flow_node *flow_node,
8c95f773b4a367 Sathya Perla          2017-10-26  1043                           
    __le32 *decap_filter_handle)
8c95f773b4a367 Sathya Perla          2017-10-26  1044  {
8c95f773b4a367 Sathya Perla          2017-10-26  1045   struct ip_tunnel_key 
*decap_key = &flow->tun_key;
cd66358e52f745 Sathya Perla          2017-10-26  1046   struct bnxt_tc_info 
*tc_info = bp->tc_info;
8c95f773b4a367 Sathya Perla          2017-10-26 @1047   struct bnxt_tc_l2_key 
l2_info = { {0} };
8c95f773b4a367 Sathya Perla          2017-10-26  1048   struct 
bnxt_tc_tunnel_node *decap_node;
8c95f773b4a367 Sathya Perla          2017-10-26  1049   struct ip_tunnel_key 
tun_key = { 0 };
8c95f773b4a367 Sathya Perla          2017-10-26  1050   struct bnxt_tc_l2_key 
*decap_l2_info;
8c95f773b4a367 Sathya Perla          2017-10-26  1051   __le32 ref_decap_handle;
8c95f773b4a367 Sathya Perla          2017-10-26  1052   int rc;
8c95f773b4a367 Sathya Perla          2017-10-26  1053  
8c95f773b4a367 Sathya Perla          2017-10-26  1054   /* Check if there's 
another flow using the same tunnel decap.
8c95f773b4a367 Sathya Perla          2017-10-26  1055    * If not, add this 
tunnel to the table and resolve the other
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1056    * tunnel header 
fileds. Ignore src_port in the tunnel_key,
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1057    * since it is not 
required for decap filters.
8c95f773b4a367 Sathya Perla          2017-10-26  1058    */
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1059   decap_key->tp_src = 0;
8c95f773b4a367 Sathya Perla          2017-10-26  1060   decap_node = 
bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table,
8c95f773b4a367 Sathya Perla          2017-10-26  1061                           
             &tc_info->decap_ht_params,
8c95f773b4a367 Sathya Perla          2017-10-26  1062                           
             decap_key);
8c95f773b4a367 Sathya Perla          2017-10-26  1063   if (!decap_node)
8c95f773b4a367 Sathya Perla          2017-10-26  1064           return -ENOMEM;
8c95f773b4a367 Sathya Perla          2017-10-26  1065  
8c95f773b4a367 Sathya Perla          2017-10-26  1066   flow_node->decap_node = 
decap_node;
8c95f773b4a367 Sathya Perla          2017-10-26  1067  
8c95f773b4a367 Sathya Perla          2017-10-26  1068   if 
(decap_node->tunnel_handle != INVALID_TUNNEL_HANDLE)
8c95f773b4a367 Sathya Perla          2017-10-26  1069           goto done;
8c95f773b4a367 Sathya Perla          2017-10-26  1070  
8c95f773b4a367 Sathya Perla          2017-10-26  1071   /* Resolve the L2 
fields for tunnel decap
8c95f773b4a367 Sathya Perla          2017-10-26  1072    * Resolve the route 
for remote vtep (saddr) of the decap key
8c95f773b4a367 Sathya Perla          2017-10-26  1073    * Find it's next-hop 
mac addrs
8c95f773b4a367 Sathya Perla          2017-10-26  1074    */
8c95f773b4a367 Sathya Perla          2017-10-26  1075   tun_key.u.ipv4.dst = 
flow->tun_key.u.ipv4.src;
8c95f773b4a367 Sathya Perla          2017-10-26  1076   tun_key.tp_dst = 
flow->tun_key.tp_dst;
e9ecc731a87912 Sathya Perla          2017-12-01  1077   rc = 
bnxt_tc_resolve_tunnel_hdrs(bp, &tun_key, &l2_info);
8c95f773b4a367 Sathya Perla          2017-10-26  1078   if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1079           goto put_decap;
8c95f773b4a367 Sathya Perla          2017-10-26  1080  
8c95f773b4a367 Sathya Perla          2017-10-26  1081   decap_l2_info = 
&decap_node->l2_info;
c8fb7b8259c67b Sunil Challa          2017-12-01  1082   /* decap smac is 
wildcarded */
8c95f773b4a367 Sathya Perla          2017-10-26  1083   
ether_addr_copy(decap_l2_info->dmac, l2_info.smac);
8c95f773b4a367 Sathya Perla          2017-10-26  1084   if (l2_info.num_vlans) {
8c95f773b4a367 Sathya Perla          2017-10-26  1085           
decap_l2_info->num_vlans = l2_info.num_vlans;
8c95f773b4a367 Sathya Perla          2017-10-26  1086           
decap_l2_info->inner_vlan_tpid = l2_info.inner_vlan_tpid;
8c95f773b4a367 Sathya Perla          2017-10-26  1087           
decap_l2_info->inner_vlan_tci = l2_info.inner_vlan_tci;
8c95f773b4a367 Sathya Perla          2017-10-26  1088   }
8c95f773b4a367 Sathya Perla          2017-10-26  1089   flow->flags |= 
BNXT_TC_FLOW_FLAGS_TUNL_ETH_ADDRS;
8c95f773b4a367 Sathya Perla          2017-10-26  1090  
8c95f773b4a367 Sathya Perla          2017-10-26  1091   /* For getting a 
decap_filter_handle we first need to check if
8c95f773b4a367 Sathya Perla          2017-10-26  1092    * there are any other 
decap flows that share the same tunnel L2
8c95f773b4a367 Sathya Perla          2017-10-26  1093    * key and if so, pass 
that flow's decap_filter_handle as the
8c95f773b4a367 Sathya Perla          2017-10-26  1094    * ref_decap_handle for 
this flow.
8c95f773b4a367 Sathya Perla          2017-10-26  1095    */
8c95f773b4a367 Sathya Perla          2017-10-26  1096   rc = 
bnxt_tc_get_ref_decap_handle(bp, flow, decap_l2_info, flow_node,
8c95f773b4a367 Sathya Perla          2017-10-26  1097                           
          &ref_decap_handle);
8c95f773b4a367 Sathya Perla          2017-10-26  1098   if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1099           goto put_decap;
8c95f773b4a367 Sathya Perla          2017-10-26  1100  
8c95f773b4a367 Sathya Perla          2017-10-26  1101   /* Issue the hwrm cmd 
to allocate a decap filter handle */
8c95f773b4a367 Sathya Perla          2017-10-26  1102   rc = 
hwrm_cfa_decap_filter_alloc(bp, flow, decap_l2_info,
8c95f773b4a367 Sathya Perla          2017-10-26  1103                           
         ref_decap_handle,
8c95f773b4a367 Sathya Perla          2017-10-26  1104                           
         &decap_node->tunnel_handle);
8c95f773b4a367 Sathya Perla          2017-10-26  1105   if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1106           goto 
put_decap_l2;
8c95f773b4a367 Sathya Perla          2017-10-26  1107  
8c95f773b4a367 Sathya Perla          2017-10-26  1108  done:
8c95f773b4a367 Sathya Perla          2017-10-26  1109   *decap_filter_handle = 
decap_node->tunnel_handle;
8c95f773b4a367 Sathya Perla          2017-10-26  1110   return 0;
8c95f773b4a367 Sathya Perla          2017-10-26  1111  
8c95f773b4a367 Sathya Perla          2017-10-26  1112  put_decap_l2:
8c95f773b4a367 Sathya Perla          2017-10-26  1113   
bnxt_tc_put_decap_l2_node(bp, flow_node);
8c95f773b4a367 Sathya Perla          2017-10-26  1114  put_decap:
8c95f773b4a367 Sathya Perla          2017-10-26  1115   
bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table,
8c95f773b4a367 Sathya Perla          2017-10-26  1116                           
&tc_info->decap_ht_params,
8c95f773b4a367 Sathya Perla          2017-10-26  1117                           
flow_node->decap_node);
8c95f773b4a367 Sathya Perla          2017-10-26  1118   return rc;
8c95f773b4a367 Sathya Perla          2017-10-26  1119  }
8c95f773b4a367 Sathya Perla          2017-10-26  1120  

:::::: The code at line 1047 was first introduced by commit
:::::: 8c95f773b4a367f7b9bcca7ab5f85675cfc812e9 bnxt_en: add support for Flower 
based vxlan encap/decap offload

:::::: TO: Sathya Perla <sathya.pe...@broadcom.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