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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS 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 276E8C43381 for ; Wed, 27 Mar 2019 09:08:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5FBB2075D for ; Wed, 27 Mar 2019 09:08:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="iNRUNjoU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726344AbfC0JII (ORCPT ); Wed, 27 Mar 2019 05:08:08 -0400 Received: from mail-eopbgr130057.outbound.protection.outlook.com ([40.107.13.57]:41348 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725827AbfC0JIH (ORCPT ); Wed, 27 Mar 2019 05:08:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dCmUFcwRG7pcx8Ec0HV8i2JscjsWynuT/dAQBEF3wmc=; b=iNRUNjoUIvhDHC1KGeA7asRUuA82HT5tog8mh7e8jXf6vm37YcZdyKajVo3OGlmVcdBX9QgsbPLlw37E98o7alITuA2red5TOLFXj8bCeKcZ8EdVfj6RHbY+i0kGtJE0OF9/GlDH5zlVKUGT8XFs1IsWmjewD9P3ZaHP8ax8ec4= Received: from AM0PR05MB6100.eurprd05.prod.outlook.com (20.178.119.209) by AM0PR05MB5889.eurprd05.prod.outlook.com (20.178.202.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Wed, 27 Mar 2019 09:08:02 +0000 Received: from AM0PR05MB6100.eurprd05.prod.outlook.com ([fe80::85ee:723:721e:51f9]) by AM0PR05MB6100.eurprd05.prod.outlook.com ([fe80::85ee:723:721e:51f9%4]) with mapi id 15.20.1730.019; Wed, 27 Mar 2019 09:08:02 +0000 From: Ido Schimmel To: David Ahern CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , Jiri Pirko , Saeed Mahameed , David Ahern Subject: Re: [PATCH net-next 07/13] ipv6: Move gateway checks to a fib6_nh setting Thread-Topic: [PATCH net-next 07/13] ipv6: Move gateway checks to a fib6_nh setting Thread-Index: AQHU5E1ajfqn4ZoZA0eqYP5DPonYnaYfMIqA Date: Wed, 27 Mar 2019 09:08:02 +0000 Message-ID: <20190327090759.GB15127@splinter> References: <20190327032942.20473-1-dsahern@kernel.org> <20190327032942.20473-8-dsahern@kernel.org> In-Reply-To: <20190327032942.20473-8-dsahern@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0122.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::27) To AM0PR05MB6100.eurprd05.prod.outlook.com (2603:10a6:208:12e::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5afff7f1-7820-4357-6b5a-08d6b293b716 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM0PR05MB5889; x-ms-traffictypediagnostic: AM0PR05MB5889: x-microsoft-antispam-prvs: x-forefront-prvs: 0989A7979C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(39860400002)(396003)(376002)(136003)(346002)(366004)(189003)(199004)(54906003)(26005)(7736002)(486006)(33716001)(25786009)(6506007)(11346002)(4326008)(97736004)(186003)(71200400001)(476003)(71190400001)(102836004)(33656002)(316002)(106356001)(446003)(14454004)(386003)(1076003)(99286004)(68736007)(105586002)(53936002)(6436002)(5660300002)(229853002)(6116002)(478600001)(256004)(2906002)(76176011)(6512007)(9686003)(6486002)(52116002)(305945005)(6916009)(81166006)(3846002)(81156014)(86362001)(8676002)(66066001)(6246003)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB5889;H:AM0PR05MB6100.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: atCkGHfmXpVB6+9o0wddVZkI+nyifwyMafAHRYDohXRbJ9p+LEoiSVIOosLP3xAIG7r0GOpWue/jsuCVONp+8n52ENLsuMAkGIwJk4bahH7u8ZHoY+rm0RMWcOu5z4JewdEDV2TryPyDwqf0E92m7xdVfFGh3wFJhQTYXOCfGE8bb4JD3/s54+UDLFXuwPcZGR6FNoCe7v4yk2MBpm8EYmCLQTb1s7RJxRbYWRN7ii4Sgq475Bwo17EzekeIqiMrZxeMkiZF4/LnfovMcG911bvuggGUKM+221BgkocFp7UKgD9ri+g47Xi8iyWDA/zdqEJVUuQ56b7YU21KzpxBzVBqGMi9X/9GibTu1iGUwSh9Jxnfs1T2NQV5En82ojel47GW6RxTA174AmDTWXkLZlq48e8UkyNarC2Nf2vZ9a8= Content-Type: text/plain; charset="us-ascii" Content-ID: <93DCCD154AB0814AAFCB7716BC4CF915@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5afff7f1-7820-4357-6b5a-08d6b293b716 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2019 09:08:02.5073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5889 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 26, 2019 at 08:29:36PM -0700, David Ahern wrote: > @@ -989,8 +989,11 @@ static void ip6_rt_copy_init(struct rt6_info *rt, st= ruct fib6_info *ort) > =20 > rt->rt6i_dst =3D ort->fib6_dst; > rt->rt6i_idev =3D dev ? in6_dev_get(dev) : NULL; > - rt->rt6i_gateway =3D ort->fib6_nh.nh_gw; > rt->rt6i_flags =3D ort->fib6_flags; > + if (ort->fib6_nh.fib_nh_has_gw) { > + rt->rt6i_gateway =3D ort->fib6_nh.nh_gw; > + rt->rt6i_flags |=3D RTF_GATEWAY; Not sure I understand why this line is needed. Can you explain? > + } > rt6_set_from(rt, ort); > #ifdef CONFIG_IPV6_SUBTREES > rt->rt6i_src =3D ort->fib6_src; > @@ -1870,7 +1873,7 @@ struct rt6_info *ip6_pol_route(struct net *net, str= uct fib6_table *table, ... > @@ -3134,7 +3138,7 @@ static struct fib6_info *ip6_route_info_create(stru= ct fib6_config *cfg, > } else > rt->fib6_prefsrc.plen =3D 0; > =20 > - rt->fib6_flags =3D cfg->fc_flags; > + rt->fib6_flags =3D cfg->fc_flags & ~RTF_GATEWAY; This is going to break mlxsw. See: mlxsw_sp_fib6_rt_can_mp() mlxsw_sp_rt6_is_gateway() > =20 > return rt; > out: > @@ -3470,7 +3474,8 @@ static struct fib6_info *rt6_get_route_info(struct = net *net,