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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 33B44C10F00 for ; Fri, 5 Apr 2019 12:46:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01A7A21872 for ; Fri, 5 Apr 2019 12:46:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="wrOwjhPQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729987AbfDEMq0 (ORCPT ); Fri, 5 Apr 2019 08:46:26 -0400 Received: from mail-eopbgr10042.outbound.protection.outlook.com ([40.107.1.42]:13057 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728762AbfDEMqZ (ORCPT ); Fri, 5 Apr 2019 08:46:25 -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=6d0LH+tPQe2BLM+TQCoRnHJPfWwi3U57UDXjAKONYyo=; b=wrOwjhPQ8uOyz0g9taVdpQyC6Ot3Ikra+0wc1fKrn7k/6UOP+p+it/DvC7ImPvwcQzyd7SPcob+1v05z4GD72KjhnJ2ewtmaFvYnfENS9/3X7n3Ap6SyD1o8ZfPefAMKX+6+VHDPeaXawQZFyQG8LWI/FpSFgwsv5AUcAoNd8Bc= Received: from VI1PR05MB6111.eurprd05.prod.outlook.com (20.178.204.213) by VI1PR05MB6255.eurprd05.prod.outlook.com (20.178.205.93) 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 12:46:22 +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 12:46:21 +0000 From: Ido Schimmel To: David Ahern CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , Jiri Pirko , David Ahern Subject: Re: [PATCH net-next 01/18] ipv6: Add fib6_nh_init and release to stubs Thread-Topic: [PATCH net-next 01/18] ipv6: Add fib6_nh_init and release to stubs Thread-Index: AQHU6w7UbOKEdlXEqkqaw+dFXNRokaYthQIA Date: Fri, 5 Apr 2019 12:46:21 +0000 Message-ID: <20190405124618.GA6739@splinter> References: <20190404175007.8150-1-dsahern@kernel.org> <20190404175007.8150-2-dsahern@kernel.org> In-Reply-To: <20190404175007.8150-2-dsahern@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P193CA0072.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::49) 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: caebe1f6-6ad5-42d2-5cc0-08d6b9c4b4ba 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:VI1PR05MB6255; x-ms-traffictypediagnostic: VI1PR05MB6255: x-microsoft-antispam-prvs: x-forefront-prvs: 0998671D02 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(136003)(39860400002)(376002)(346002)(366004)(396003)(199004)(189003)(106356001)(68736007)(186003)(316002)(256004)(6916009)(14454004)(1076003)(8676002)(8936002)(105586002)(81166006)(81156014)(33716001)(97736004)(26005)(229853002)(54906003)(478600001)(99286004)(6512007)(9686003)(6486002)(25786009)(305945005)(52116002)(446003)(76176011)(11346002)(7736002)(6436002)(53936002)(86362001)(6246003)(6506007)(476003)(386003)(6116002)(3846002)(486006)(2906002)(66066001)(5660300002)(4326008)(33656002)(102836004)(71190400001)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB6255;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: 32Mqj5I/DpM+QW2sR8Nt/YMfkKJ7uGR/L2Mhcu2XpLjDXMbPe2Vzq2O7UBEqRzi+e1cq1p3LgmkWVDbCDuQwmBR78P+baPE9ZF6aiytRu1Orn3Clhc4+pN10bDdfDYpfR2t4u2PKqDTTxsXNjeMmfrh4FpUo1ow8IIhSa1mHkcEdOPIdtxcFukC41CU0kb/B9OtWWGLIg679L0Ikps/g0fZm88OcnBW7xIHEL45LMuzjlNXZhrD4ivjY31+8dNAh39I5hEJXeIWxXcfRUhQ+7JUuo9x6pNT48U4QXa/vwfgf9phEBb0PViVXHKaZybKNhh3wCbo/x6WkpqJ6yJeCBqa5H3hVUx1KW4EyU+n9H7H8Hr1WfbuA7ckX+p8uQAO4KiiKpFSpPI7XohmWJNyso4sTUQUqKF/WuVODHn0fBHA= Content-Type: text/plain; charset="us-ascii" Content-ID: <5AFE08452EF0174A8CC01904DBE559A7@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: caebe1f6-6ad5-42d2-5cc0-08d6b9c4b4ba X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2019 12:46:21.9166 (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: VI1PR05MB6255 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:50AM -0700, David Ahern wrote: > From: David Ahern >=20 > Signed-off-by: David Ahern Reviewed-by: Ido Schimmel > +static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fi= b6_nh, > + struct fib6_config *cfg, gfp_t gfp_flags, > + struct netlink_ext_ack *extack) > +{ > + NL_SET_ERR_MSG(extack, "IPv6 support not enabled in kernel"); > + return -EAFNOSUPPORT; > +} > + > const struct ipv6_stub *ipv6_stub __read_mostly =3D &(struct ipv6_stub) = { > .ipv6_dst_lookup =3D eafnosupport_ipv6_dst_lookup, > .ipv6_route_input =3D eafnosupport_ipv6_route_input, > @@ -181,6 +189,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly =3D &= (struct ipv6_stub) { > .fib6_lookup =3D eafnosupport_fib6_lookup, > .fib6_multipath_select =3D eafnosupport_fib6_multipath_select, > .ip6_mtu_from_fib6 =3D eafnosupport_ip6_mtu_from_fib6, > + .fib6_nh_init =3D eafnosupport_fib6_nh_init, > }; I thought this would explode in fib_check_nh_v6_gw() if IPv6 is not enabled because fib6_nh_release() is NULL, but you actually check that earlier in fib_gw_from_via(), so it's fine. BTW, the error message in that case is "IPv6 support is not enabled in this kernel", which is a bit different from what you have here. Might be a good idea to be more consistent about it.