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 D3472C4360F for ; Fri, 5 Apr 2019 15:56:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B7F12146F for ; Fri, 5 Apr 2019 15:56:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="GaLb7AzF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731398AbfDEP4s (ORCPT ); Fri, 5 Apr 2019 11:56:48 -0400 Received: from mail-eopbgr20049.outbound.protection.outlook.com ([40.107.2.49]:40581 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726135AbfDEP4r (ORCPT ); Fri, 5 Apr 2019 11:56:47 -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=nR90MV6hUYityWvtGjk8Rk52nGrOSZOxFTrdybKSh+w=; b=GaLb7AzFIOEfvDOATh4RPwz2GHt5ikyctNK6fMGfC7ye4320EsXywLch+QzkgfFjGc6CyOcQGGZ7cAxrz7AeNk9Zri1EdfmrnuWJS7zkae7vD4c1RrNR0K7LOXN5dO5kHZw/NLNuqJP/AWnhFL2PGfv0dKRQ2MpDnYfSVYMnIUw= Received: from VI1PR05MB6111.eurprd05.prod.outlook.com (20.178.204.213) by VI1PR05MB3408.eurprd05.prod.outlook.com (10.170.239.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.16; Fri, 5 Apr 2019 15:56:43 +0000 Received: from VI1PR05MB6111.eurprd05.prod.outlook.com ([fe80::28c7:8df1:920b:ee0e]) by VI1PR05MB6111.eurprd05.prod.outlook.com ([fe80::28c7:8df1:920b:ee0e%5]) with mapi id 15.20.1771.016; Fri, 5 Apr 2019 15:56:43 +0000 From: Ido Schimmel To: David Ahern CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , Jiri Pirko , David Ahern Subject: Re: [PATCH net-next 00/18] ipv4: Enable support for IPv6 gateway with IPv4 routes Thread-Topic: [PATCH net-next 00/18] ipv4: Enable support for IPv6 gateway with IPv4 routes Thread-Index: AQHU6w7UDWUCsEceZk2xa6sm0treV6YtujIA Date: Fri, 5 Apr 2019 15:56:43 +0000 Message-ID: <20190405155640.GA3591@splinter> References: <20190404175007.8150-1-dsahern@kernel.org> In-Reply-To: <20190404175007.8150-1-dsahern@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0128.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::33) To VI1PR05MB6111.eurprd05.prod.outlook.com (2603:10a6:803:eb::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [79.176.7.115] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 05e72aa9-8619-4677-94d0-08d6b9df4c50 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR05MB3408; x-ms-traffictypediagnostic: VI1PR05MB3408: x-microsoft-antispam-prvs: x-forefront-prvs: 0998671D02 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(376002)(39860400002)(396003)(136003)(346002)(366004)(199004)(189003)(6916009)(386003)(26005)(256004)(14454004)(6506007)(14444005)(1076003)(25786009)(6512007)(6486002)(478600001)(81156014)(102836004)(106356001)(54906003)(229853002)(9686003)(33656002)(8676002)(2906002)(71190400001)(4326008)(68736007)(81166006)(53936002)(71200400001)(105586002)(446003)(476003)(11346002)(305945005)(186003)(66066001)(3846002)(52116002)(316002)(6246003)(7736002)(6116002)(97736004)(5660300002)(6436002)(486006)(33716001)(99286004)(76176011)(8936002)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB3408;H:VI1PR05MB6111.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: nqnmj9dgpZb2vFIAuERuInxPcfPmfpPEJhyXvV0+sRq9dmGAd/tv4QUj4SOOyPGN+60oKxlrBsInPxcOv9op5P5cooe6Od3G2BNUYY6EBcqnSZxWNbSaZbFDT2D7e6Qu0RfE1FfOIa5yAJFNtVSYsFM+USdyh0vonwd4ASnGUJBYDR34agFjEhbUdbJs1Dusw7gP4AnBkqtY1TaCHKVyFstr1A5KJAGHIavjWk6lie0jV7nT3f3h5beg4WNRN5x7yCDYgQ6/tR+uV2rs3s62cDRVH4VXYzQYJaN/QnRYyVVlInoG+QIqrFqTgLjQONEBVmMfw5/p2ha2yNCBJxoDZHAYARaWXk+xYkr50UG2l3QaceCIVUhPnXFR1eJMe/SyChgY++4s3bPaqmCK1e9PBkuhbbSHzbpzDRcaK52Hahw= Content-Type: text/plain; charset="us-ascii" Content-ID: <97825728CB67B54DAB539E4D0AB124D3@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05e72aa9-8619-4677-94d0-08d6b9df4c50 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2019 15:56:43.2401 (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: VI1PR05MB3408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Apr 04, 2019 at 10:49:49AM -0700, David Ahern wrote: > From: David Ahern >=20 > Last set of three with the end goal of enabling IPv6 gateways with IPv4 > routes. >=20 > This set adds fib6_nh_init and release to the IPv6 stubs, and adds neighb= or > helpers that IPv4 code invokes to resolve an IPv6 address. When using > an IPv6 neighbor entry the hh_cache is bypassed as it contains the wrong > ethernet header for an IPv4 packet. >=20 > The nh_common nhc_has_gw was a temporary field used to convert existing > code from fib{6}_nh to fib_nh_common. That field is now converted to > nhc_gw_family to differentiate the address family of the gateway entry > as opposed to the address family of the container of fib_nh_common. >=20 > Existing code for rtable and fib_config is refactored to prepare > for a v6 address and then support is added. From there various > miscellaneous functions are updated to handle a v6 gateway - from > validating the v6 address to lookups in bpf code to verifying the > nexthop state. >=20 > Offload drivers - mlxsw and rocker - are modified to detect the v6 > gateway and reject the route as 'unsupported'. e.g., >=20 > $ ip ro add 172.16.101.0/24 via inet6 fe80::202:ff:fe00:b dev swp1s0 > Error: mlxsw_spectrum: IPv6 gateway with IPv4 route is not supported. >=20 > This can be removed in time once support is added to each. >=20 > With the infrastructure changes in place, patch 17 enables it by adding > support for RTA_VIA to IPv4. RTA_VIA can be used for IPv4 addresses as > well. Only one of RTA_VIA and RTA_GATEWAY can be passed in a request. >=20 > Patch 18 adds a few test cases to fib_tests.sh. Reviewed-by: Ido Schimmel I also ran some tests and it looks good. Great work!