Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp361912ybh; Wed, 11 Mar 2020 02:32:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu8cJ1FACUfiOHYmoYUDkKwfM3AfLWFKLQwO/nwVSpt1twLjGR/oQxbGsNeXgnCd7ooBv8h X-Received: by 2002:aca:c415:: with SMTP id u21mr1277870oif.49.1583919147645; Wed, 11 Mar 2020 02:32:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1583919147; cv=pass; d=google.com; s=arc-20160816; b=pJueA+xNvqJyCpLB/4gTJywH0pOCSad6mWuH5jTSbzZE2IeDk9TDR0ZIW3wFXnsecy 7q9cDyxj17o/k1bb7lRuzSHbLqSQuRMfL2sAHGEGlhv/f7SUFeHA7V5JBXoIHSzXSqeh gKM0OQlbHH+NE9QqFt5KZY4ix1ZwUeTZaPTLD2hWsW/g0Vu/nZd8DqMi7r0Po+SwqA2n hviS27suXyvIItdfwflH+xoyC4PBUdcxd31lKOBR3Y07/0sJb4XsxNLdKmV34qoBKvL2 b48fPQVeMnnn1GK3E2Nrzhy11X2rDKVJs0wxphMBCt7cQmWyq1oG6KawJoQlEPscZmgV hPFQ== 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=Y9/wpP3YFizt+2x6g5MAtAGm1D7DxR+cruxzmnUJXAI=; b=hQVlnMQYEH2uUC91ZyEtQpiiPjPA4A21Etd+4OG04x5b+Ok1IVqSRPVWIPATNlaK8l G4snV2xKE07h1izBgmYhGbnk9qC7u8EXs2lMJSRkIa3ajZQwkV8aQlP0KKmNyz57QMvG +KCy+GsBEHtnmNWy70EYsnJdXc6mjAFiY5JrPpxKr8Spvn4E5sknFiL2FcSQzgFqT0ry 1SWA1b0j/gtgYhyyB++rX+92WRVt5YS4ulfdfQKPQuqvgS1Vxx8EvKoneT8oCgxfZaKy 4erkEhI+7n3qFNR4i8NKxj4VRiqp1puwjFyoPOXiIz5UG2nq7MFCTPJeYfjHCIB5PDgI Bo5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=sDw8T31w; 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 r129si871834oib.123.2020.03.11.02.32.12; Wed, 11 Mar 2020 02:32:27 -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=sDw8T31w; 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 S1728953AbgCKJbu (ORCPT + 99 others); Wed, 11 Mar 2020 05:31:50 -0400 Received: from mail-vi1eur05on2062.outbound.protection.outlook.com ([40.107.21.62]:62625 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728932AbgCKJbs (ORCPT ); Wed, 11 Mar 2020 05:31:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7WQSbWrWsGkadN1PTiHBOxmlcPouBmjVG3sbmwvmXIBJh7lAy/o28yyH8HZRmiPLL2/wcvi/dZZSBxcOG7Xtaq1tvYSWDPHpPawCHCVBWBp31m3NM50aOAaWcrPXn8VT/waawebk6No6Bn8/Wq+fEHuk10A7s5DXHrzOn4Lhgx+LYBX6BsQl8ltVowdBFdjuJIuK2LXapNwvSx8hw5G47hYChT2CTWxzOvqqwjU1QGD1pA8wPPQa0rZMjqvTRQKfiZKfmAoS9nl7l5FKpBWSecbP9Ui2sHwY5TX4J9UP7qq3Oc5G9NBbmvGOZB2XRHSYRlYzttk1OTKexiynyjQoA== 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=Y9/wpP3YFizt+2x6g5MAtAGm1D7DxR+cruxzmnUJXAI=; b=mD9Os24dch4UlFsafmHkyTBuik56u8DftqBhqH567Gvrvm2Wv/qvCNYqdro91nO8DNre8YsuSMFnowX7iKxs9psmGAsCTOqGRtvQ6Y+/1MytLMCEC5k+5fx1GUUG3WqAxJBKNnstetujXLvQ8nTS7QZjPatg7xnklZc6ztPm6hzgJpbdpiCR9ArGuITVEjQQC1DowxTwMvl1ChXP7CegNraD88UQy8NayvRHLCVvtEtXt0DfE6k5X1VrkJ5MVb4l2MjyvZisDbwzqgvMPhigw8ca2/XHSM2HZ64BWXGo99BtpSRi0GPTSIP/qvaYv8Jyoqys7J1ab37543jgBIP8Rg== 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=Y9/wpP3YFizt+2x6g5MAtAGm1D7DxR+cruxzmnUJXAI=; b=sDw8T31wQ8NuA/QOxxoMmwMYVYbGeC0Bz3zNtWsyhXmllI+2z1gYezhE15EQtbGO/lJy/YiF3a555QrGyx+BT49nknjgZqiH4Lnpp18wB9lWl4n49gR4GGrsroOk8FvcKlUiPYRhu+QI98n1B2gqNwcjZNhvdkbH2y5FxCQf3DY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from AM0PR05MB6754.eurprd05.prod.outlook.com (10.186.174.71) by AM0PR05MB4689.eurprd05.prod.outlook.com (52.133.55.16) 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 09:31:45 +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 09:31:45 +0000 Date: Wed, 11 Mar 2020 11:31:43 +0200 From: Ido Schimmel To: Masahiro Yamada , nhorman@tuxdriver.com, jiri@mellanox.com Cc: 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: <20200311093143.GB279080@splinter> References: <20200311062925.5163-1-masahiroy@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311062925.5163-1-masahiroy@kernel.org> X-ClientProxiedBy: AM0PR10CA0054.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::34) 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 AM0PR10CA0054.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 09:31:45 +0000 X-Originating-IP: [193.47.165.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1d45942c-5260-46a9-b382-08d7c59f03e4 X-MS-TrafficTypeDiagnostic: AM0PR05MB4689:|AM0PR05MB4689: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7916004)(4636009)(366004)(346002)(376002)(136003)(396003)(39860400002)(199004)(81166006)(81156014)(33656002)(33716001)(4326008)(66946007)(1076003)(6636002)(8676002)(956004)(66556008)(66476007)(9686003)(26005)(54906003)(316002)(4744005)(6496006)(6486002)(86362001)(5660300002)(16526019)(186003)(52116002)(478600001)(2906002)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR05MB4689;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: hHguJD3c6oAbFBYOmZi3mrAn2S8WRwiBpmoxqydOjxGBDk/BuLFAxAAoUT9x2N+19mM42FiqLDT/WRCI42rI2NJVcvDFbNCZW5Tzbn7p6g4dBU95y00hyC8RCKtVybDCjBW4b6vNMZUQyEaE0V3bpGZrsZbT+ZbhxdZKuMU4c3gL5Bl3Ks/Y+fda3xuqX9Wmj26GZpRPYlIygvUNaysYiSOedUoBu8Joa47ECmo+0WFfRZmuFEoHm1R0bGMONwh7Rm31T9Y0x5vrauMgmtxQtPLlSj+DwgUTyxKDJCyc2dU/g7cjG4cZH09W4l0k59kwyc5QgDcyTphZD+t2fjYRbEZ0amQdEV9eudvBwm7eMqqY0YNP+Y4a+01gRwrrULevjMFICiOCw08SV/++wf876iis8h6AylKzH53gDDKrJPDwtqLFRMfHUKXlJkkJb24u X-MS-Exchange-AntiSpam-MessageData: nEYCmgcBcMMVv8AhyWBpGBHWDFQvvnbLFVRH2ly6566hIZQ6G00JoJBTcgXgQsXBDR7Nwcb3dgx4ffNmzy+eTuSfL5pPq6oVWRPIz6IxGtBswjw80wVJuVGmJy2p2bhi1M+bANgQRxeNq88JfTyDtg== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d45942c-5260-46a9-b382-08d7c59f03e4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 09:31:45.3579 (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: XVRJDoWXBruj/jhNnQSCTVV4FGCjw88ltfr5XUxednIm9XIAukZZ+p9a66s6bkKPILpucFi8gbSi1zOVmteASw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4689 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 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?