From patchwork Tue Aug 11 06:33:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 262613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97E1BC433E0 for ; Tue, 11 Aug 2020 06:33:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B03720774 for ; Tue, 11 Aug 2020 06:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597127604; bh=z1Ojr/Zecm9QJSnsyUBeo7c3xuI6Rz0wIo8MpL1zQpE=; h=From:To:Cc:Subject:Date:List-ID:From; b=k8VNio/ZgIKbR+JOOJxKvNnrMIe3ffbbmI6Vir/Raad0gt7+BXiLoeF+XU1nHW9fr IS0tsz4EGq9qSp3Ps/uBeIA9GuIk0oGo1bUS3oHjudyeSFtXeNq5Bs/bR6x93HjBRu RNB8Zf0Dn+Fxu8owhVTD5THYL/utw3oWHo7L9w1w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbgHKGdW (ORCPT ); Tue, 11 Aug 2020 02:33:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:50788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbgHKGdW (ORCPT ); Tue, 11 Aug 2020 02:33:22 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC24820774; Tue, 11 Aug 2020 06:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597127601; bh=z1Ojr/Zecm9QJSnsyUBeo7c3xuI6Rz0wIo8MpL1zQpE=; h=From:To:Cc:Subject:Date:From; b=zacbTdQjglT5kZNK/z9TF61YaPMayl504iWBjN/qZUDUshmEKohhQ0osvV7AXeC2h M2C5jx6rTLp73+0m4jD2QXwg/qUxpKzIjn9mfyiTeFiIF3SFKaLK/XfUrAIocUxcBl exo3f4TlCt9HkyvldSRaUvhBSmjhP90GwUhc8Qus= From: Leon Romanovsky To: Stephen Hemminger , David Ahern Cc: Leon Romanovsky , Doug Ledford , Jason Gunthorpe , linux-netdev , RDMA mailing list Subject: [PATCH iproute2-rc] rdma: Fix owner name for the kernel resources Date: Tue, 11 Aug 2020 09:33:04 +0300 Message-Id: <20200811063304.581395-1-leon@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Owner of kernel resources is printed in different format than user resources to easy with the reader by simply looking on the name. The kernel owner will have "[ ]" around the name. Before this change: [leonro@vm ~]$ rdma res show qp link rocep0s9/1 lqpn 1 type GSI state RTS sq-psn 58 comm ib_core After this change: [leonro@vm ~]$ rdma res show qp link rocep0s9/1 lqpn 1 type GSI state RTS sq-psn 58 comm [ib_core] Fixes: b0a688a542cd ("rdma: Rewrite custom JSON and prints logic to use common API") Signed-off-by: Leon Romanovsky --- rdma/res.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.2 diff --git a/rdma/res.c b/rdma/res.c index c99a1fcb..6eca87e5 100644 --- a/rdma/res.c +++ b/rdma/res.c @@ -161,7 +161,7 @@ void print_comm(struct rd *rd, const char *str, struct nlattr **nla_line) snprintf(tmp, sizeof(tmp), "%s", str); else snprintf(tmp, sizeof(tmp), "[%s]", str); - print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", str); + print_color_string(PRINT_ANY, COLOR_NONE, "comm", "comm %s ", tmp); } void print_dev(struct rd *rd, uint32_t idx, const char *name)