Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp455002ybh; Wed, 11 Mar 2020 04:29:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv+HvbS7Mw86N17Xf23y+qhe/pMZJXUpigSth2jUU/PZiC23iBz1VyDwlinxpyYL3AJRTtR X-Received: by 2002:a05:6808:1cf:: with SMTP id x15mr1636695oic.44.1583926153730; Wed, 11 Mar 2020 04:29:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1583926153; cv=pass; d=google.com; s=arc-20160816; b=VXJuPzMGi1CqLQ7IMYK16Tf26UdHEPE+xMwRyoKIeyv60x3aCnKb7uCVRa/DVlKRpM XOSekwai24IZrvF+wNAqsWo1AXy+bDfBmUjSd8x/XIV6gvW+NiwFEeYZ/rnzEY7NoKUP i1bBNzW6Qfz9Fx0UQpASgLgQGvjTpA7QGeCraHKf6nslUSzyjDsUsrYfFdWn5YMnaTFe 9FfcGXFlNpSJxVEHTfanaXQnrH3FK6PleYHATRdn6vfaey8NDWZ0W6i1LII9jB7Np1Q6 z9XQTX2fflzmAW1lJuA6du1yQnEyChdLvDvygj/PX30DvW+vBlqjgxVj1OaosLm5UdWO cVqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1FDCgK9QntRL0SGWTjUNlfiKCR6JSZKdt+pMYACSGPQ=; b=oHNQLTQUGW/CvHOtR88pIk4MewEOg/M1c+reIwqZ6clbu8F02wKSpCV1j9+G2uzKVW sESKVoyjgWhhW/emAoX6Ie9OlDIxPU0LF/nteW1SlpQYTrtYGUuxWbKtDAkQM3i1Ezbe em8m0NFOhyQpNyiMi/YXz4CtaUTyZFIoxJCNwRPIdoI3lwFKm4OY8ufqgsLKghvGDLgc 9gLmN84tc/qo/osqX/9lhrBdcD1HlIQ6GV6NTG4yrvSXUsUCs8bJWqS5nKQDB1Vt4pXq vV6VL0uzZQrCJprmhjcIToVsiB27+7152ySt0gRk9FGl0KJZb5yEAdHxZBqr1aWrXW+L RPcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=J6Jl8guI; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26si917202otk.156.2020.03.11.04.29.01; Wed, 11 Mar 2020 04:29:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=J6Jl8guI; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729084AbgCKL2k (ORCPT + 99 others); Wed, 11 Mar 2020 07:28:40 -0400 Received: from mail-eopbgr40070.outbound.protection.outlook.com ([40.107.4.70]:53987 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726672AbgCKL2j (ORCPT ); Wed, 11 Mar 2020 07:28:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hfUPBQ3YDh0GHbex+430nhADcTjFlTucrpAqCfaw1CiaERLmTsJR2BwSOCQEdfioBMVh9VsYVeKUoGsrDy19LKJCyXwBaHTRQWqq7Vi1CtTW1NyzBiBPl5g9BFC0ZJrm1KmYT6pfKqvki0I8Bhr4IlLDAP3NrwebOo9ZP30SPmQz+CEnks1dSuaIldgncYOWPjSb5xEe4IaSSNXiDA7HC5FxxqPrJRudEWLjyzZ49D1PHztBFeyljBjMKw1r0VIvTI9WJRJxpZRhS+r91rsiazV2NIAkCmqNhL8LfIPcMSoqJiW762DB57iuQLVmNAp4GIlhvNkoRQA3hceqMqDSkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1FDCgK9QntRL0SGWTjUNlfiKCR6JSZKdt+pMYACSGPQ=; b=AyyrIVhTyCfEukIoqtgpKMZu5seNin9etvAUfBsF5gzGW83FazLtP80HNg84IusfrXHVEn+QeNeo3Us24G356tQO914uAML2SkXryQb1hsathnDawATq7TfCq3cCLZbUig3n3N9iI0TWSUQiz21GsQyb9fomDGmGedopyYkx/F7WfDRGMZLvsTSXzWFBLtcIxxHc+klF7ayEEt6JniMe7okEdScml+Dn4496bY3MvAoM7ZvLYkXTBXv1xN1pOjF7Eu4nvpjy777H2BTuPbbMrGfRU35JuL+vdRACT7Iz9/f6QIRQLjO3p4hdpguvie1r9/TxO/Q9j8gofZgNmosmUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=1FDCgK9QntRL0SGWTjUNlfiKCR6JSZKdt+pMYACSGPQ=; b=J6Jl8guIvUo/2cXK8aNRskPBSf62bpGVhOrQbO/RAo7UWNl0wmGIP0vyXjKAIxkIy8WFLMX3TG8OHP2bDlU7epv7q0mI0kCB4/od8H/fl+A6lbeDs+ZYwbw2ubQe3bbJixb9n8ieDjAvu/3dhQj0Rzgh4fM6nXTgTwHlF7TFdNE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from AM0PR05MB6754.eurprd05.prod.outlook.com (10.186.174.71) by AM0PR05MB4258.eurprd05.prod.outlook.com (52.134.125.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 11:28:36 +0000 Received: from AM0PR05MB6754.eurprd05.prod.outlook.com ([fe80::6923:aafd:c994:bfa5]) by AM0PR05MB6754.eurprd05.prod.outlook.com ([fe80::6923:aafd:c994:bfa5%7]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 11:28:35 +0000 Date: Wed, 11 Mar 2020 13:28:33 +0200 From: Ido Schimmel To: Neil Horman Cc: Masahiro Yamada , jiri@mellanox.com, netdev@vger.kernel.org, "David S . Miller" , Stephen Rothwell , Nicolas Pitre , linux-kbuild@vger.kernel.org, Jakub Kicinski , linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report() Message-ID: <20200311112833.GA284417@splinter> References: <20200311062925.5163-1-masahiroy@kernel.org> <20200311093143.GB279080@splinter> <20200311104756.GA1972672@hmswarspite.think-freely.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311104756.GA1972672@hmswarspite.think-freely.org> X-ClientProxiedBy: AM3PR05CA0140.eurprd05.prod.outlook.com (2603:10a6:207:3::18) To AM0PR05MB6754.eurprd05.prod.outlook.com (2603:10a6:20b:15a::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (193.47.165.251) by AM3PR05CA0140.eurprd05.prod.outlook.com (2603:10a6:207:3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17 via Frontend Transport; Wed, 11 Mar 2020 11:28:35 +0000 X-Originating-IP: [193.47.165.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6dd838ad-a7ea-446f-e6c4-08d7c5af565f X-MS-TrafficTypeDiagnostic: AM0PR05MB4258:|AM0PR05MB4258: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7916004)(4636009)(366004)(346002)(39860400002)(396003)(376002)(136003)(199004)(86362001)(186003)(478600001)(33656002)(54906003)(2906002)(8676002)(8936002)(26005)(81156014)(16526019)(956004)(81166006)(6916009)(66476007)(52116002)(66946007)(33716001)(316002)(5660300002)(66556008)(1076003)(6486002)(6496006)(9686003)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB4258;H:AM0PR05MB6754.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vaueLhaj1plfy+nMW5Gp7MkOdRFME94v7D48RYsF7QD7Ilgzr7gdnKuaCeVOi6XOhZRYif2qUXxMiyYzcipFeHYD7hFqI8bsvlHAQzYgZDAQZmpv4VmHLGEBUGadw4Q9a/mVKd/9D6ozyFVtVmoVLFHkxUGDQAv7ffTD0SzYi2Ily5VM+8iY3KqqIlyE/vLYRiOQQfX02/cyONxMt1w4oXRVXH10Yz1bDa3Smoo6ho7Gh7jT1uJbk+6cKQ0Jo+E4aqf3PzKma4HMTDIFEyFT8Lq69noaYBQgoQbVWV6ikez4bAagD7seYmRFxM7aezaQzPv1c+Lo0Tu5ZMfwfnO/ZenaozaZ5kBTfz0Iy5cVIPIqNp/AU+StTFN98VV89V/FbXPFeTOeQYDmUE6qRTzvmMkmLSQK5ntdqco0FBTFIoOKVmi9g0oMECSK5NFOAVRV X-MS-Exchange-AntiSpam-MessageData: c9Kqqo4I9tr1EXUaDaZak2baA8ol2rIRP5DMykQFFtD1wAxxM1FLZW8mtqYxY/MM710CD4f+e96qBTtWmdcvFismNIM6RqlE7yn1wP7+f6v+gOG2hAr9Gm64mvFF2mJV3ngPR23NZivMT13J0xDjnA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dd838ad-a7ea-446f-e6c4-08d7c5af565f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 11:28:35.7927 (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-CrossTenant-UserPrincipalName: KobMHe5wkS4FS2umfT1FTH1r82EvGJ8OdHgtXQZ4Zv7U6wn8wxWMGfbx/bDQQ2wmGAPDwP1G+1cEnYBQN8oCjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4258 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 06:47:56AM -0400, Neil Horman wrote: > On Wed, Mar 11, 2020 at 11:31:43AM +0200, Ido Schimmel wrote: > > On Wed, Mar 11, 2020 at 03:29:25PM +0900, Masahiro Yamada wrote: > > > In net/Kconfig, NET_DEVLINK implies NET_DROP_MONITOR. > > > > > > The original behavior of the 'imply' keyword prevents NET_DROP_MONITOR > > > from being 'm' when NET_DEVLINK=y. > > > > > > With the planned Kconfig change that relaxes the 'imply', the > > > combination of NET_DEVLINK=y and NET_DROP_MONITOR=m would be allowed. > > > > > > Use IS_REACHABLE() to avoid the vmlinux link error for this case. > > > > > > Reported-by: Stephen Rothwell > > > Signed-off-by: Masahiro Yamada > > > > Thanks, Masahiro. > > > > Neil, Jiri, another option (long term) is to add a raw tracepoint (not > > part of ABI) in devlink and have drop monitor register its probe on it > > when monitoring. > > > > Two advantages: > > 1. Consistent with what drop monitor is already doing with kfree_skb() > > tracepoint > > 2. We can remove 'imply NET_DROP_MONITOR' altogether > > > > What do you think? > > > Agreed, I think I like this implementation better. OK, but I don't want to block Masahiro. I think we can go with his patch and then I'll add the raw tracepoint in the next release.