netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Michael Chan <michael.chan@broadcom.com>
Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key
Date: Sat, 17 Aug 2019 16:49:20 +0800	[thread overview]
Message-ID: <201908171601.0ggCoPtf%lkp@intel.com> (raw)
In-Reply-To: <1565994817-6328-7-git-send-email-michael.chan@broadcom.com>

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

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 <lkp@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.perla@broadcom.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58668 bytes --]

  reply	other threads:[~2019-08-17  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan
2019-08-16 22:33 ` [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence Michael Chan
2019-08-16 22:33 ` [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Michael Chan
2019-08-16 22:33 ` [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Michael Chan
2019-08-16 22:33 ` [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow Michael Chan
2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan
2019-08-17  8:49   ` kbuild test robot [this message]
2019-08-18 20:06 ` [PATCH net 0/6] bnxt_en: Bug fixes David Miller

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=201908171601.0ggCoPtf%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@01.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@broadcom.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).