Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp212603ybb; Fri, 3 Apr 2020 01:01:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIknnVfSUa5OldEtL2jkwSvjyFMWc21zFzHoWzvun36nB1dFuBBQZJ58cMwj36Yw6Fn6y3L X-Received: by 2002:a9d:7f19:: with SMTP id j25mr5545931otq.129.1585900903466; Fri, 03 Apr 2020 01:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585900903; cv=none; d=google.com; s=arc-20160816; b=V5JLWqH71NNgTtPnKS2OeW1/WBHJw4GBEByvkRG+ErS7Ij2LerPEXeFclPnTW3iMJ5 fHOTs95sbijc31+2NIfSMHaycTwITSW+gmVoLoQ3nlBrIuI0NfPXYBxvvZL3ogpTs8ij wKGrmSGg7RWaY4UI5YjwKhwdf2Wifr4DEgug73nT788qaitEmgtVzdiQxzXNBJ/1pAgO kX1VqcPjUlas07SysdiRgEP1PQ/qpPQFyUhf0D3sYc9j/1GzWciwz5jKzDsXbMFZrLDg sgP2q3ygy3FoIrUv31BNPLyCjmdCu2hCPFJRXhuVQUqF121iIDEN8ExL+WOgcR/kY+el yUFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=HkFftEmd1xByJ3L+7Q66Ss8hnA6ge5noLyBAo3i2apI=; b=MpG7+hruiAEnopykPpGsuGFbvnXWCSIFus+20NnCXLbHif9GmdMx3QOct6gfUTW+4F o7smn8PxAefEHj4TmLUirbPs9Kyi6yedeGDSJNe7I0CA09mfBMjZzkUnTvWIyD0qicuH nRYUZJOr2prHL+xA70ZuEXlXllwjCYHtO9gnfVHQLZIDEI2w38qRz+vtXNyfL+YZIug+ Ai6+jfUveyi4R0I2qUdQJ8MYYl126QKeXFKWjvp1n/bF43y9lAcOvkv5hOGTe2HCgm9G GIsu548glsHmTI/7vlcl14WSqYSder6zjU4BtL4v7p6RdnJGCzbnccr+G3ItXgcyjNFH 6OXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=owdPcNHL; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si3653532otk.242.2020.04.03.01.01.22; Fri, 03 Apr 2020 01:01:43 -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=@gmail.com header.s=20161025 header.b=owdPcNHL; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390267AbgDCH7l (ORCPT + 99 others); Fri, 3 Apr 2020 03:59:41 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46659 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732595AbgDCH7l (ORCPT ); Fri, 3 Apr 2020 03:59:41 -0400 Received: by mail-pl1-f193.google.com with SMTP id s23so2389199plq.13; Fri, 03 Apr 2020 00:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HkFftEmd1xByJ3L+7Q66Ss8hnA6ge5noLyBAo3i2apI=; b=owdPcNHLVrE6Ernuo3DIqVGM+J5Nqciv40IjY4XcWu6kUJXVDuppwYzvUm9xhzkGer 2RyZBP3uYHNjwRvtxkJcB/FYs3ct/0V3YBWr5k5LLix+qzWavz5paoVlgAvhoR7jJYEE mvvgY0d14n8bomLWQlFCr7FyU6IUbUfBrwkw6Pvy4NMU9ZF3KLO5XyV+dBokkDkCC0ot QQZIYeZEV1nseE8I+9SvwHqOryshuUpMFamfMArl1Th+4HqS//ZCJkeMwnbZUFvsZOOn GwvHh7kB2LDxYOFVy29uV+XjTjBI3wXmZucdYE2l4lIuPc0E9AHMW9gg7sp6agq5FJrJ dfUA== 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; bh=HkFftEmd1xByJ3L+7Q66Ss8hnA6ge5noLyBAo3i2apI=; b=RgbUCBc2+NLLTtv8hEGMbba8mpHUZQ9V6b+0G3rmSWWgqclzpIK9tYjRSrmBFT2RAp H+VOaVPckg6D7WFEw0jH6KclBu893fe6pBUVs5p2Bx1eQP1Co9TBqvXmErDZJZlT5EMO Q6dIF0nuphYLIEuBeqBU3RlUwJEDDuJcJb26aGhiTyJCoW3bju47o0EVuEndFtrVeF6m vwygaGGk18WFg2Q4thUiAwtKyRz9jNtuIECYN5u8kuqLs70oXMLSMFoXFJo1eAZ6wVoQ 4l38xZHuCyS6/+iXdKaZzYuJj+pcj5Jg3EN9v2pNnulmzeA5h218sirunAuXDXDaa5Hs skqg== X-Gm-Message-State: AGi0PubNJILFPw1P/2XZ/J7MywEHOY10oVOVHyhQKE21R+gulcwSUw9h CIa/cFfUJStUjsAaVf4+QHBCHeHn X-Received: by 2002:a17:90b:1118:: with SMTP id gi24mr7409859pjb.99.1585900780339; Fri, 03 Apr 2020 00:59:40 -0700 (PDT) Received: from localhost ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id x27sm5263837pff.200.2020.04.03.00.59.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2020 00:59:39 -0700 (PDT) From: Geliang Tang To: Mat Martineau , Matthieu Baerts , "David S. Miller" , Jakub Kicinski Cc: Geliang Tang , netdev@vger.kernel.org, mptcp@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH] mptcp: move pr_fmt defining to protocol.h Date: Fri, 3 Apr 2020 15:57:25 +0800 Message-Id: <34c83a5fe561739c7b85a3c4959eb44c3155d075.1585899578.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some of the mptcp logs didn't print out the format string "MPTCP": [ 129.185774] DSS [ 129.185774] data_fin=0 dsn64=1 use_map=1 ack64=1 use_ack=1 [ 129.185774] data_ack=5481534886531492085 [ 129.185775] data_seq=15725204003114694615 subflow_seq=1425409 data_len=5216 [ 129.185776] subflow=0000000093526a92 fully established=1 seq=0:0 remaining=28 [ 129.185776] MPTCP: msk=00000000d5a704a6 ssk=00000000b5aabc31 data_avail=0 skb=0000000088f05424 [ 129.185777] MPTCP: seq=15725204003114694615 is64=1 ssn=1425409 data_len=5216 data_fin=0 [ 129.185777] MPTCP: msk=00000000d5a704a6 ssk=00000000b5aabc31 status=0 [ 129.185778] MPTCP: msk ack_seq=da3b25b9a233c2c7 subflow ack_seq=da3b25b9a233c2c7 [ 129.185778] MPTCP: msk=00000000d5a704a6 ssk=00000000b5aabc31 data_avail=1 skb=000000000caed2cc [ 129.185779] subflow=0000000093526a92 fully established=1 seq=0:0 remaining=28 So this patch moves the pr_fmt defining from protocol.c to protocol.h, which is included by all the C files. Then we can get the same format string "MPTCP" in all mptcp logs like this: [ 141.854787] MPTCP: DSS [ 141.854788] MPTCP: data_fin=0 dsn64=1 use_map=1 ack64=1 use_ack=1 [ 141.854788] MPTCP: data_ack=18028325517710311871 [ 141.854788] MPTCP: data_seq=6163976859259356786 subflow_seq=3309569 data_len=8192 [ 141.854789] MPTCP: msk=000000005847a66a ssk=0000000022469903 data_avail=0 skb=00000000dd95efc3 [ 141.854789] MPTCP: seq=6163976859259356786 is64=1 ssn=3309569 data_len=8192 data_fin=0 [ 141.854790] MPTCP: msk=000000005847a66a ssk=0000000022469903 status=0 [ 141.854790] MPTCP: msk ack_seq=558ad84b9be1d162 subflow ack_seq=558ad84b9be1d162 [ 141.854791] MPTCP: msk=000000005847a66a ssk=0000000022469903 data_avail=1 skb=000000000b8926f6 [ 141.854791] MPTCP: subflow=00000000e4e4579c fully established=1 seq=0:0 remaining=28 [ 141.854792] MPTCP: subflow=00000000e4e4579c fully established=1 seq=0:dcdf2f3b remaining=28 Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 2 -- net/mptcp/protocol.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 72f3176dc924..cc86137cd04f 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -4,8 +4,6 @@ * Copyright (c) 2017 - 2019, Intel Corporation. */ -#define pr_fmt(fmt) "MPTCP: " fmt - #include #include #include diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 67448002a2d7..3eff041eeccf 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -7,6 +7,8 @@ #ifndef __MPTCP_PROTOCOL_H #define __MPTCP_PROTOCOL_H +#define pr_fmt(fmt) "MPTCP: " fmt + #include #include #include -- 2.17.1