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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 5A481C4360F for ; Fri, 5 Apr 2019 13:38:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27C1221852 for ; Fri, 5 Apr 2019 13:38:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="hORu1CDA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbfDENi5 (ORCPT ); Fri, 5 Apr 2019 09:38:57 -0400 Received: from mail-eopbgr50081.outbound.protection.outlook.com ([40.107.5.81]:6407 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726291AbfDENi4 (ORCPT ); Fri, 5 Apr 2019 09:38:56 -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=iZPZ/uruf5qUaiZFPSTahADFkPz78zGKf6Qxo/Iz0j8=; b=hORu1CDACp71MBUtuRMZuMe4zStMQkcWSWNHzePlHK37Is2dXfCI1joiLV+V02utHIent3eCDyUrHBdXvV/2RXMyUmp9FsrubXQpIpHSAKpJ4JHNbSQkiDJJBA9unXw5wbXfxo6HNuR5ANCTImF5SKTF107IjOHxN6BuBK2ba3o= Received: from VI1PR05MB6111.eurprd05.prod.outlook.com (20.178.204.213) by VI1PR05MB5728.eurprd05.prod.outlook.com (20.178.121.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.17; Fri, 5 Apr 2019 13:38:52 +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 13:38:52 +0000 From: Ido Schimmel To: David Ahern CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , Jiri Pirko , David Ahern Subject: Re: [PATCH net-next 05/18] ipv4: Prepare fib_config for IPv6 gateway Thread-Topic: [PATCH net-next 05/18] ipv4: Prepare fib_config for IPv6 gateway Thread-Index: AQHU6w7V8Kxmf5B6Tk63e740EXvcUqYtk66A Date: Fri, 5 Apr 2019 13:38:52 +0000 Message-ID: <20190405133849.GE6739@splinter> References: <20190404175007.8150-1-dsahern@kernel.org> <20190404175007.8150-6-dsahern@kernel.org> In-Reply-To: <20190404175007.8150-6-dsahern@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P191CA0075.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::16) 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: 4f55c17d-9e88-4a71-0da2-08d6b9cc0a87 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:VI1PR05MB5728; x-ms-traffictypediagnostic: VI1PR05MB5728: x-microsoft-antispam-prvs: x-forefront-prvs: 0998671D02 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(346002)(39860400002)(136003)(376002)(396003)(366004)(199004)(189003)(86362001)(71200400001)(68736007)(26005)(102836004)(54906003)(8936002)(71190400001)(106356001)(2906002)(53936002)(81166006)(3846002)(66066001)(256004)(105586002)(6246003)(478600001)(6436002)(8676002)(97736004)(81156014)(316002)(6486002)(99286004)(11346002)(33716001)(14454004)(305945005)(476003)(486006)(6116002)(1076003)(33656002)(446003)(5660300002)(6512007)(229853002)(6916009)(25786009)(6506007)(7736002)(386003)(186003)(9686003)(52116002)(76176011)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB5728;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: 3SmAcLGpH/LWLZHLOtdz1Y9pBBePhf1I53gEBptETyFvLkRY0xN2H/KnMOgM6m6cFdYMx2siowmKwFRg0sf60uT6z9jz/m545m7C2nS6HQx++fjBCb6MNtbFGRmANIY14jaD3L5JskV6IDRMXrG3wSThohJQBjUkdQ0zkDKVGfyy6s3Lmu7H0JQcgTyAheNy7m859ecHWz6tSD4SRzdxhxBZnV0cHXal0B4h1DRD+YdXnWLumJXRzqvseJg4seBXtfJNyQEZDHC+8ZLT7Tdrgqdn5PHFtm1qAuuLyVlaS+IInMhw5l0yolKZioamwFlA9oYD/Ru+IndTpC54mXBt9OkrdwDrFYMnpXmn6XtS8SLLCjSzpq+W3oALquq7sFHmmIsEpgWqmlT9OfSxNOq9FeE4FxNJlUa1XQh8+RAVrZQ= Content-Type: text/plain; charset="us-ascii" Content-ID: <20BB25BF469E8A458768CE500F13F155@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f55c17d-9e88-4a71-0da2-08d6b9cc0a87 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2019 13:38:52.3535 (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: VI1PR05MB5728 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:54AM -0700, David Ahern wrote: > From: David Ahern >=20 > Similar to rtable, fib_config needs to allow the gateway to be either an > IPv4 or an IPv6 address. To that end, rename fc_gw to fc_gw4 to mean an > IPv4 address and add fc_gw_family. Check on 'is a gateway set' are change= d s/Check/Checks/ > to see if fc_gw_family is set. In the process prepare the code for a > fc_gw_family =3D=3D AF_INET6. >=20 > Signed-off-by: David Ahern Reviewed-by: Ido Schimmel See one note below > --- > include/net/ip_fib.h | 3 ++- > net/ipv4/fib_frontend.c | 8 +++++--- > net/ipv4/fib_semantics.c | 40 ++++++++++++++++++++++++++-------------- > 3 files changed, 33 insertions(+), 18 deletions(-) >=20 > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h > index c68a40435ee0..8dee23ae9bde 100644 > --- a/include/net/ip_fib.h > +++ b/include/net/ip_fib.h > @@ -32,10 +32,11 @@ struct fib_config { > u8 fc_protocol; > u8 fc_scope; > u8 fc_type; > + u8 fc_gw_family; > /* 3 bytes unused */ Should be: /* 2 bytes unused */ > u32 fc_table; > __be32 fc_dst; > - __be32 fc_gw; > + __be32 fc_gw4; > int fc_oif; > u32 fc_flags; > u32 fc_priority;