From patchwork Thu Jun 4 12:26:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wan, Kaike" X-Patchwork-Id: 6546261 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4D2B1C0020 for ; Thu, 4 Jun 2015 12:27:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B85A2074A for ; Thu, 4 Jun 2015 12:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7414520748 for ; Thu, 4 Jun 2015 12:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbbFDM1N (ORCPT ); Thu, 4 Jun 2015 08:27:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:4669 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbbFDM1L (ORCPT ); Thu, 4 Jun 2015 08:27:11 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 04 Jun 2015 05:27:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,552,1427785200"; d="scan'208";a="740881863" Received: from sedona.ch.intel.com ([143.182.228.65]) by orsmga002.jf.intel.com with ESMTP; 04 Jun 2015 05:27:10 -0700 Received: from phlsvlogin01.ph.intel.com (phlsvlogin01.ph.intel.com [10.228.195.36]) by sedona.ch.intel.com (8.13.6/8.14.3/Standard MailSET/Hub) with ESMTP id t54CR9NN025851; Thu, 4 Jun 2015 05:27:10 -0700 Received: from phlsvlogin01.ph.intel.com (localhost [127.0.0.1]) by phlsvlogin01.ph.intel.com with ESMTP id t54CR93V013581; Thu, 4 Jun 2015 08:27:09 -0400 Received: (from kaikewan@localhost) by phlsvlogin01.ph.intel.com with id t54CR8wh013577; Thu, 4 Jun 2015 08:27:09 -0400 X-Authentication-Warning: phlsvlogin01.ph.intel.com: kaikewan set sender to kaike.wan@intel.com using -f From: kaike.wan@intel.com To: linux-rdma@vger.kernel.org Cc: Kaike Wan , John Fleck , Ira Weiny Subject: [PATCH v3 1/4] IB/netlink: Add defines for local service requests through netlink Date: Thu, 4 Jun 2015 08:26:46 -0400 Message-Id: <1433420809-13529-2-git-send-email-kaike.wan@intel.com> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1433420809-13529-1-git-send-email-kaike.wan@intel.com> References: <1433420809-13529-1-git-send-email-kaike.wan@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kaike Wan This patch adds netlink defines for SA client, local service group, local service operations, and related attributes. Signed-off-by: Kaike Wan Signed-off-by: John Fleck Signed-off-by: Ira Weiny Reviewed-by: Sean Hefty --- include/uapi/rdma/rdma_netlink.h | 56 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h index 6e4bb42..bc30b90 100644 --- a/include/uapi/rdma/rdma_netlink.h +++ b/include/uapi/rdma/rdma_netlink.h @@ -7,12 +7,14 @@ enum { RDMA_NL_RDMA_CM = 1, RDMA_NL_NES, RDMA_NL_C4IW, + RDMA_NL_SA, RDMA_NL_NUM_CLIENTS }; enum { RDMA_NL_GROUP_CM = 1, RDMA_NL_GROUP_IWPM, + RDMA_NL_GROUP_LS, RDMA_NL_NUM_GROUPS }; @@ -128,5 +130,59 @@ enum { IWPM_NLA_ERR_MAX }; +/* Local service group opcodes */ +enum { + RDMA_NL_LS_OP_RESOLVE = 0, + RDMA_NL_LS_OP_SET_TIMEOUT, + RDMA_NL_LS_NUM_OPS +}; + +/* Local service netlink message flags */ +#define RDMA_NL_LS_F_OK 0x0100 /* Success response */ +#define RDMA_NL_LS_F_ERR 0x0200 /* Failed response */ + +/* Local service attribute type */ +enum { + LS_NLA_TYPE_STATUS = 0, + LS_NLA_TYPE_PATH_RECORD, + LS_NLA_TYPE_TIMEOUT, + LS_NLA_TYPE_MAX +}; + +/* Local service status attribute */ +enum { + LS_NLA_STATUS_SUCCESS = 0, + LS_NLA_STATUS_EINVAL, + LS_NLA_STATUS_ENODATA, + LS_NLA_STATUS_MAX +}; + +struct rdma_nla_ls_status { + __u32 status; +}; + +/* Local service pathrecord attribute */ +/* Flags for pathrecord */ +enum { + LS_NLA_PATH_F_GMP = 1, + LS_NLA_PATH_F_PRIMARY = (1<<1), + LS_NLA_PATH_F_ALTERNATE = (1<<2), + LS_NLA_PATH_F_OUTBOUND = (1<<3), + LS_NLA_PATH_F_INBOUND = (1<<4), + LS_NLA_PATH_F_INBOUND_REVERSE = (1<<5), + LS_NLA_PATH_F_BIDIRECTIONAL = (LS_NLA_PATH_F_OUTBOUND | + LS_NLA_PATH_F_INBOUND_REVERSE), + LS_NLA_PATH_F_USER = (1<<6) +}; + +struct rdma_nla_ls_path_rec { + __u32 flags; + __u32 path_rec[0]; +}; + +/* Local service timeout attribute */ +struct rdma_nla_ls_timeout { + __u32 timeout; +}; #endif /* _UAPI_RDMA_NETLINK_H */