Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp420707ybh; Wed, 11 Mar 2020 03:48:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsGwQyskexAjB4R9M9ikeuloJn3x4ocUYHY/qdT8DTrOcmyZPvoFCKB9KnxM1YboNG0dpn+ X-Received: by 2002:a9d:5c0c:: with SMTP id o12mr1829851otk.145.1583923721610; Wed, 11 Mar 2020 03:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583923721; cv=none; d=google.com; s=arc-20160816; b=GsAYzpDoC++7HjnuOfcSjUjwbY/cEKZRTR4k8ienvVEgeE9bQarCL9PqKx40uZVEQH KOyyuXuOKFOJi39YFDZ0wpo2H4OKbXqFc9hvdCkiPW0Ylcljz6/+qWhno55sIyp2r1/r Q4mCgCj7alZbleWmmpD444awj6um2BkCyNWqd052gCfTZ8jU/vaPyU8etj7TmNFilV9i b+lSKbdzYPGweCrUKXKRcRgGeQ+4HzK322Ad356qDe9jRKJwDfYH6h8MFdQ446xlI2jt KJgWueKcf8uhNLrCDM7NX9yEQ6uy8z9PuC+JHq8Nk8TablnkYvkTZ7aqfIFJ6LelPgMK RPrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DSDOT8lq8xTYjpZL6byk/jL/p/h5OFK59E9VrIE60PQ=; b=eWuNHlqfnOJI4QANcv6ah0DUfhr6XlCe+V6ZP4rf+mzG/DsWnS1G+7Wc4/1O97EWFh rYZO1zc5pFZNFdEiR2gBpQtjXWw6cUmYdiF2pNy3ZQpG6xHtAcCUcANbwClrM3hvKMsw LIRLY58TS63YyrW10WtH6j7XWKm267cBKEgUb8FcnXuWcRmd9NGzvUEe7voLcJf8o8fW YvZExaDZ6w96GyX8LQ0QB0ppXXy4RzKa0UTAipR/bUymJ7wk5p2aHv9A09X6CutKdKmm 428LqFBA7eGRTOzI7x+jVKsm2jv2UAOHGFqbX7O1s8BrFw/DaUacK2PmEhHapiS3quEF SJ5g== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si919813otm.146.2020.03.11.03.48.29; Wed, 11 Mar 2020 03:48:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729055AbgCKKsK (ORCPT + 99 others); Wed, 11 Mar 2020 06:48:10 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:50105 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgCKKsK (ORCPT ); Wed, 11 Mar 2020 06:48:10 -0400 Received: from 2606-a000-111b-43ee-0000-0000-0000-1bf2.inf6.spectrum.com ([2606:a000:111b:43ee::1bf2] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1jByu4-0006Kh-Se; Wed, 11 Mar 2020 06:48:03 -0400 Date: Wed, 11 Mar 2020 06:47:56 -0400 From: Neil Horman To: Ido Schimmel 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: <20200311104756.GA1972672@hmswarspite.think-freely.org> References: <20200311062925.5163-1-masahiroy@kernel.org> <20200311093143.GB279080@splinter> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311093143.GB279080@splinter> X-Spam-Score: -2.9 (--) X-Spam-Status: No 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 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. Neil