From patchwork Thu Mar 29 21:38:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 893022 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=opengridcomputing.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40BytP26D3z9s2R for ; Fri, 30 Mar 2018 08:43:41 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752238AbeC2Vni (ORCPT ); Thu, 29 Mar 2018 17:43:38 -0400 Received: from opengridcomputing.com ([70.118.0.34]:50392 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbeC2Vnh (ORCPT ); Thu, 29 Mar 2018 17:43:37 -0400 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id 8CE632BBEC; Thu, 29 Mar 2018 16:43:36 -0500 (CDT) Message-Id: From: Steve Wise Date: Thu, 29 Mar 2018 14:38:57 -0700 Subject: [PATCH v4 iproute2-next 0/7] cm_id, cq, mr, and pd resource tracking To: dsahern@gmail.com Cc: leon@kernel.org, stephen@networkplumber.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series enhances the iproute2 rdma tool to include dumping of connection manager id (cm_id), completion queue (cq), memory region (mr), and protection domain (pd) rdma resources. It is the user-space part of the kernel resource tracking series merged into rdma-next for 4.17 [1] and [2]. Changes since v3: - replaced rdma_cma.h inclusion with UAPI rdma_user_cm.h - display only device names instead of device/port for cq, mr, and pd since they are not associated with a specific port. Changes since v2: - pull in rdma-core:include/rdma/rdma_cma.h - 80 column reformat - add reviewed-by tags Changes since v1/RFC: - removed RFC tag - initialize rd properly to avoid passing a garbage port number - revert accidental change to qp_valid_filters - removed cm_id dev/network/transport types - cm_id ip addrs now passed up as __kernel_sockaddr_storage - cm_id ip address ports printed as "address:port" strings - only parse/display memory keys and iova if available - filter on "users" for cqs and pds - fixed memory leaks - removed PD_FLAGS attribute - filter on "mrlen" for mrs - filter on "poll-ctx" for cqs - don't require addrs or qp_type for parsing cm_ids - only filter optional attrs if they are present - remove PGSIZE MR attr to match kernel [1] https://www.spinics.net/lists/linux-rdma/msg61720.html [2] https://www.spinics.net/lists/linux-rdma/msg62979.html https://www.spinics.net/lists/linux-rdma/msg62980.html --- Steve Wise (7): rdma: update rdma_netlink.h rdma: add UAPI rdma_user_cm.h rdma: initialize the rd struct rdma: Add CM_ID resource tracking information rdma: Add CQ resource tracking information rdma: Add MR resource tracking information rdma: Add PD resource tracking information include/json_writer.h | 2 + lib/json_writer.c | 11 + rdma/include/uapi/rdma/rdma_netlink.h | 38 ++ rdma/include/uapi/rdma/rdma_user_cm.h | 324 +++++++++++++++++ rdma/rdma.c | 2 +- rdma/rdma.h | 2 + rdma/res.c | 633 +++++++++++++++++++++++++++++++++- rdma/utils.c | 16 + 8 files changed, 1026 insertions(+), 2 deletions(-) create mode 100644 rdma/include/uapi/rdma/rdma_user_cm.h