From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FAKE_REPLY_C,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72D6FC43381 for ; Mon, 25 Feb 2019 06:27:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B51B2087C for ; Mon, 25 Feb 2019 06:27:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="dmAjB12M" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726742AbfBYG11 (ORCPT ); Mon, 25 Feb 2019 01:27:27 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:42870 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfBYG10 (ORCPT ); Mon, 25 Feb 2019 01:27:26 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1P6ITqR115019; Mon, 25 Feb 2019 06:27:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=2aKA5W/vQBYLrpYL6+hoWrKeC4e/FLq/9g2n1k/1a2U=; b=dmAjB12MsO0RHdESsUXUVcrIol46G/O4GF3QW+oR6M+lvEkehTUTTRu6KhUvsOiWiPA3 Dp/SjLXnt3ZmGFSxxNxrcxG8aJBbyE1KMZiFSCKDdTTzKmYJU8VG/Q/3snD4x3kR6gZm +FMKKklANZHRP+7I2daHzhHEpXFiu99tIcb3gczd0G0zf/UTdnW8VPEJO1ZRf0tcWgjQ vRVnTdPbltgHp690DzF4noaic5RvdzLWg9FbT6Xv9MOmk1ptEXwXMd3tYVyy/Rs38JO0 955rZ4r7QLeuuCyrZ9hrjnbuTtN3ts4xIUVdxc1lbRbLjer/serUzIAUffrDFMZSMLQ5 Ng== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qtwktv3rt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Feb 2019 06:27:15 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1P6REqD007821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Feb 2019 06:27:14 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1P6RElZ006872; Mon, 25 Feb 2019 06:27:14 GMT Received: from kadam (/197.157.0.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Feb 2019 22:27:13 -0800 Date: Mon, 25 Feb 2019 09:27:06 +0300 From: Dan Carpenter To: kbuild@01.org, wenxu@ucloud.cn Cc: kbuild-all@01.org, netdev@vger.kernel.org, davem@davemloft.net Subject: Re: [PATCH] ip_tunnel: Add ip tunnel tunnel_info dst_cache in ip_tunnel_xmit Message-ID: <20190225062706.GC3982@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1550750930-27138-1-git-send-email-wenxu@ucloud.cn> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9177 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=6 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902250046 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi wenxu, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/ip_tunnel-Add-ip-tunnel-tunnel_info-dst_cache-in-ip_tunnel_xmit/20190224-065214 smatch warnings: net/ipv4/ip_tunnel.c:734 ip_tunnel_xmit() error: uninitialized symbol 'rt'. # https://github.com/0day-ci/linux/commit/fb0c8c40052c62033bf5f92559eabe4e7a98851e git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout fb0c8c40052c62033bf5f92559eabe4e7a98851e vim +/rt +734 net/ipv4/ip_tunnel.c 7d442fab0 Tom Herbert 2014-01-02 717 b0066da52 Petr Machata 2018-02-27 718 ip_tunnel_init_flow(&fl4, protocol, dst, tnl_params->saddr, 9830ad4c6 Craig Gallek 2017-04-19 719 tunnel->parms.o_key, RT_TOS(tos), tunnel->parms.link, 9830ad4c6 Craig Gallek 2017-04-19 720 tunnel->fwmark); 7d442fab0 Tom Herbert 2014-01-02 721 563284865 Tom Herbert 2014-09-17 722 if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0) 563284865 Tom Herbert 2014-09-17 723 goto tx_error; 563284865 Tom Herbert 2014-09-17 724 fb0c8c400 wenxu 2019-02-21 725 if (connected && md) { fb0c8c400 wenxu 2019-02-21 726 use_cache = ip_tunnel_dst_cache_usable(skb, tun_info); fb0c8c400 wenxu 2019-02-21 727 if (use_cache) fb0c8c400 wenxu 2019-02-21 728 rt = dst_cache_get_ip4(&tun_info->dst_cache, &fl4.saddr); What about if "use_cache" is false? "rt" is potentially not set. fb0c8c400 wenxu 2019-02-21 729 } else { e09acddf8 Paolo Abeni 2016-02-12 730 rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache, &fl4.saddr) : e09acddf8 Paolo Abeni 2016-02-12 731 NULL; fb0c8c400 wenxu 2019-02-21 732 } 7d442fab0 Tom Herbert 2014-01-02 733 7d442fab0 Tom Herbert 2014-01-02 @734 if (!rt) { ^^^ 7d442fab0 Tom Herbert 2014-01-02 735 rt = ip_route_output_key(tunnel->net, &fl4); c54419321 Pravin B Shelar 2013-03-25 736 c54419321 Pravin B Shelar 2013-03-25 737 if (IS_ERR(rt)) { c54419321 Pravin B Shelar 2013-03-25 738 dev->stats.tx_carrier_errors++; c54419321 Pravin B Shelar 2013-03-25 739 goto tx_error; c54419321 Pravin B Shelar 2013-03-25 740 } fb0c8c400 wenxu 2019-02-21 741 if (use_cache) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation