Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757382AbdIIBzK (ORCPT ); Fri, 8 Sep 2017 21:55:10 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:54570 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757292AbdIIBzH (ORCPT ); Fri, 8 Sep 2017 21:55:07 -0400 Subject: Re: [PATCH 1/2] ip_tunnel: fix setting ttl and tos value in collect_md mode To: Haishuang Yan , "David S. Miller" References: <1504764515-13536-1-git-send-email-yanhaishuang@cmss.chinamobile.com> CC: , From: Alexei Starovoitov Message-ID: Date: Fri, 8 Sep 2017 18:54:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1504764515-13536-1-git-send-email-yanhaishuang@cmss.chinamobile.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:180::1:86e7] X-ClientProxiedBy: CO2PR04CA0007.namprd04.prod.outlook.com (2603:10b6:102:1::17) To BL2PR15MB0961.namprd15.prod.outlook.com (2603:10b6:201:15::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6edf1305-2f48-4b56-5ad1-08d4f725bb41 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BL2PR15MB0961; X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0961;3:CqAkcFIUkUf2gygAV8Lvr91lPiSBvOjTS+An3SJT3VaM83EiWB603oXAIqOgErKV01NjqCncndqjQgzoSxfqjftzhKi3ZpCqB2b5sB8b9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k/Pt4nVG56jaGbZBiMiITkjBovW51X1ZZSYhpBlpMHcWqw+9kjLlDgUwAaIzS/56tvwzvDTpN+lB0RYTT95iB4/x99uTVkQ+dPGRybLHOl/sxegwtEyKMVyR1Alemg8iX2MNXmTqRbOFYUM3QWNohPopdajFP4RYwnICZlnwU1Nugo/zWPSFsi+EexRYP7U/zs+iwDlyQaBF4dwsQuSOQR9uaR0kAOhzkSQl4596KPLpmBHtH7f;4:6BGCoARmuusWMqNK9mFOp8mechHdRkF0DK+SyJDUlIWIUJl9e7lwB2CB0CA+sBhsKhm7risO/BYvmnZwtGw0XFu9u8oQF/WGuwZbGJ0UvvanVALSz4v5vpSK530LScy2Clbm3SvC2QqJC53XNPpK+IDHb736seHXAIUSs7XEWslX6ozRkXZahgKhOtLszvLcIeyRKpoZdoFlBQ2hwHhb3Gfm3gMOF/e8/pSrSF/u1jtIkp5N+NeW7EFAIeLmWESd8H49OLeVGJ2sliiAgkHuMfw+h0rjH1Pse5ZHvV27AS0= X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BL2PR15MB0961;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BL2PR15MB0961; X-Forefront-PRVS: 0425A67DEF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(199003)(189002)(6116002)(478600001)(101416001)(97736004)(81166006)(230700001)(36756003)(8676002)(64126003)(1706002)(76176999)(23746002)(189998001)(106356001)(2906002)(105586002)(50986999)(4001350100001)(31696002)(86362001)(25786009)(83506001)(54356999)(42186005)(5660300001)(31686004)(81156014)(53936002)(65806001)(47776003)(65826007)(33646002)(8936002)(2950100002)(68736007)(6246003)(65956001)(6666003)(6486002)(305945005)(7736002)(50466002)(229853002)(53546010)(4326008)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR15MB0961;H:[IPv6:2620:10d:c081:1130::10d2];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BL2PR15MB0961;23:0Pand6jozYqaT4lrPtqBpmhQyFkLjl9HOUDpN?= =?Windows-1252?Q?EIJC18OuqsTqAMU0ZP91HMjO7iq0mL9pyfeWrAbn5Ho0nIt0dJYywLl+?= =?Windows-1252?Q?S3kopHY+/DZEuwpWuovz5F8nhu1R4eRq+2+7aORVhFSzYKSTeyV5lR53?= =?Windows-1252?Q?wVK3spqg8Rx5RzTm6Q4ra5bcpmAb2RWu0NefEoFspbciT6dcVc6LSjgI?= =?Windows-1252?Q?j+2p2RFqJoLScxmykrQDf7ivMpXk0Q+3DMgUws28gAk49xtU5PliZhWa?= =?Windows-1252?Q?5TsIR1ZzPd0jiGzON7zEgNCGbuLgtkQe6NeZfwezEroYIo76DvBzGJD4?= =?Windows-1252?Q?gCVuLiMYnD3JME+TN8n+L0G/FoLDYHTvDccUXCGuT7uZTP5Jq7HYaoCa?= =?Windows-1252?Q?zCeArTyAuU2W7+rti3K5b51vfYh9hGApqmhMSPc4RjIoKbRg6HgWDFcc?= =?Windows-1252?Q?034iVxt1C2Rfz2N1ooH0POtcTaxPZw/fWi0ZnfwOuY8WUwbAF/qw5F02?= =?Windows-1252?Q?TncV8XDQY09AbM+l/bvKQ22kiesGteRBz8bPNuOiUG/FNZS4TNVxT6Jx?= =?Windows-1252?Q?x4baH/FSUVInWuCpCet/5K0s9YDHcFKCvqQMPbU0aY7aO4iEPwIg2ndN?= =?Windows-1252?Q?C3Youj+F/2K711qfeO6nW7WgAewxX9nx0eM9QMqeTEh16+YoEsI87/lF?= =?Windows-1252?Q?2UBNmw/Kh2QFUVlpKKYM6dXGvevyef+6k2JoSF+TQ5oky+nvxxFiCYXE?= =?Windows-1252?Q?e8mG3Kl7LeVEfDZtz0+zK+o/efV6TdEqO5SI/9d0J14Vpa/o9lIhCKPt?= =?Windows-1252?Q?iOZBKicf3j0aQfUlPzi1KTKMqPTRfdwVqrNkRexIc4RQdYzF+fPYiGOp?= =?Windows-1252?Q?+cgvq8bCMvvd4JRkfal99Rqu08nj+69+Yrm+EJmBIx/iraR5byJNWlyc?= =?Windows-1252?Q?xSqb3QO+yO4QLKsjT7wkM+QZDTEdyeotkwFrq85yxq/ukbCHWzGrMAoN?= =?Windows-1252?Q?KWZnz3KrMGAf+FJDBZXpRMhKTQzJszHfGNkNOisa7qaPIKAptSNLuzlR?= =?Windows-1252?Q?dLFLsDebAAx4wG5vEobHnYIJo6uNquMvdRiX+f7ExLR7J46vehEhyCOc?= =?Windows-1252?Q?+b+d0mVyL/3aCODhbjShpxvPHLCqURsV/RW4JfzAiXJah33Et+aEvQAg?= =?Windows-1252?Q?LowhnbI5DAo3lhUQTVohqGwKuEHKbgsic3oO652avzOI75ReuMpQ6ZwY?= =?Windows-1252?Q?EJs6BDkA8HqkL4UXqQFu1wAEwNw16JnInqT1vk4AYDRC25uRFOFglaOq?= =?Windows-1252?Q?eKtPnLddEzMWH6zSmOLTxi+0A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0961;6:/obWpXyOMUGlWgCycR6HwfyhzSnl4+lHiHqa81jB64/gwHFc4dtPMqW7z2ICjeeIJ7F/8/ojAqXzL9BdTjfp1zs5ieFkswdYT+aV6LR8ZpAX0dfflP2AhOHneiESn56dZu4uL7c0VVmGVSNYtpcSN0gNO9KP5iB5TdudVboQ0ZLme0QqFbqoT3knIYvueMgVnPRmPQzQueIKu9BwcSGras0qhtJgfxGZyzqCEO8AlR7WyZ7o8OtSLTwH8HidoTlqYqKL6/GIORwz3LsE6Yv01PUqbglBnJPgexRAHxTfTLdArEtj5S0sU3LYZtOd7qTmkKRtMsHiCXDehhSTuPrPYw==;5:Di15Lo3wPwPnKiDnyH8uAUXHnBqrwQp8NTxtcDuH9jPckOXuSz1p6aeNA+WVMkRpr77jUw8QO9xGgCoiWsMIcgRm5tEWoyyg9sk7lonlHj5xXIWG/BjSSp7BQt/NzbzzSoeBQ5x3SJDnTBBfCZU/jA==;24:vNG+dq+2eiAqXrVGKR+uFzT/t6E7bLwfDNZg/q5dnr4V1aFovA8jOF4U9+7F8y5z7Iys0WVG2bUp18tSfNlBRyuC01dI2WDNAJyPT+XC0C4=;7:GJfDuhiws0sfaDxt+3FrWqxVlOW7qN0mBfC53qfOeLpUcaokW78wcwl82BBWX//l7XKL9AqljXVmMJpSu4cENzVQgPs9GVb0TXKdlAiI1h4lY9o8qfeGLLn35yVbuL2Zcx50pq/Mgbk1+cawhL7+Ih5ILSMP0rFknyzpttW0R/rbLb5Mvt+EB/rVH3U/3kTpB8bDGP/vLQRZiwOAPWFa2zY3kh2BJm7C43xsB5gF9aE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB0961;20:yfBdJuMgmNu2eqSTjzfkBt8z0TsORfArTCoCd2iVL7LXeC+YRvRmvoOtiWD05qb1uuu+JFSi9uLI3BVbl3CPnqkHcmtPP0tfQD/c7ym4avAO5eqR10BHzKLBQpyS+cO1NSbCw2oo0+y8FhqPBPREKmI5udWD7tgdj5V7UH2dXjU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 01:54:38.6211 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR15MB0961 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-09_01:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 26 On 9/6/17 11:08 PM, Haishuang Yan wrote: > ttl and tos variables are declared and assigned, but are not used in > iptunnel_xmit() function. > > Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel") > Cc: Alexei Starovoitov > Signed-off-by: Haishuang Yan > --- > net/ipv4/ip_tunnel.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c > index 129d1a3..e1856bf 100644 > --- a/net/ipv4/ip_tunnel.c > +++ b/net/ipv4/ip_tunnel.c > @@ -618,8 +618,8 @@ void ip_md_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, u8 proto) > ip_rt_put(rt); > goto tx_dropped; > } > - iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, key->tos, > - key->ttl, df, !net_eq(tunnel->net, dev_net(dev))); > + iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, proto, tos, ttl, > + df, !net_eq(tunnel->net, dev_net(dev))); indeed. good catch. thanks Acked-by: Alexei Starovoitov