From patchwork Tue Feb 12 21:41:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1040845 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="W9CqhISl"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43zbkG3qzMz9s5c for ; Wed, 13 Feb 2019 08:43:18 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730924AbfBLVmB (ORCPT ); Tue, 12 Feb 2019 16:42:01 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:33702 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728269AbfBLVmA (ORCPT ); Tue, 12 Feb 2019 16:42:00 -0500 Received: by mail-ed1-f65.google.com with SMTP id a2so194400edi.0 for ; Tue, 12 Feb 2019 13:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s1ajbwFM2/cHMrtrC8SBFapOLKtmmpbqxTzxUukdDc0=; b=W9CqhISlgFAjnn8ydwLkvlcl4Pst0IwCsJ9yyo+RHykfgKUa+i2Q5yOfI3yLvYGuJZ 0ko58RgH0degqe36QmCwDRlGs3GDyNKe0vz7Pstd9XAAu2B8gJrJe7krRf5eBMTOMLzX MOr2lrGX4gQUFcjmmtFo6OXw2Gfta7pzZMwtc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s1ajbwFM2/cHMrtrC8SBFapOLKtmmpbqxTzxUukdDc0=; b=ibfeeuFvNLGd95pnrXfBAuRWrrAImw6kGhFhBJ2J2KQT+9jgqcOUjTtrKqGlb4ZGCh kzuqjgxn7RMAb7PHc1lH0dAwgzAR9sY8NjW2PIic2XjtctcUhwVu8IaBwRo9ZcCVhsmz 9b/3+qZUJy/VoWnjk3NtE3HEszdaXfa8u9zG/c0aZzpXwoqzIz/L0o54DDMoW9OE04RW 18mDUzHozSgp/b/wH4U6aZbrHxtZf92s2Jrvakfi/N++Fc/P2HEQI5DYeF/bvYJLbQuA lPp9IqeW9LHhe27ma/nn6xr5eHQ2lCemATuZX5lhnQAJ9g1IrwEnkCbDk3aKq6VGMkaU G60g== X-Gm-Message-State: AHQUAuaPqK/ngWoZ+Pr+SWDCCjN1+U2U4LUeIjQhUm3oPX7cFtxKVdyd X4wqQ/CRZQ3icnLhsnuvBGHM8lCWelljNRgu X-Google-Smtp-Source: AHgI3IZXwk3m8/+8AvOn+Xj5xliy5TDN3X/TfvxQ/8H2I/fMtorH4BxY2t9FQqLUjGM/OXGf2QtsEA== X-Received: by 2002:a50:d797:: with SMTP id w23mr4914465edi.19.1550007718433; Tue, 12 Feb 2019 13:41:58 -0800 (PST) Received: from prevas-ravi.waoo.dk (ip-5-186-119-174.cgn.fibianet.dk. [5.186.119.174]) by smtp.gmail.com with ESMTPSA id v1sm3697607eds.47.2019.02.12.13.41.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 13:41:57 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , netdev@vger.kernel.org Subject: [PATCH v4 02/14] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited Date: Tue, 12 Feb 2019 22:41:38 +0100 Message-Id: <20190212214150.4807-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212214150.4807-1-linux@rasmusvillemoes.dk> References: <20190212214150.4807-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org net_dbg_ratelimited tests the dynamic debug descriptor the old-fashioned way, and doesn't utilize the static key/jump label implementation when CONFIG_JUMP_LABEL is set. Use the DYNAMIC_DEBUG_BRANCH which is defined appropriately. Cc: netdev@vger.kernel.org Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/net.h b/include/linux/net.h index e0930678c8bf..651fca72286c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -263,7 +263,7 @@ do { \ #define net_dbg_ratelimited(fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ + if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ net_ratelimit()) \ __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ##__VA_ARGS__); \