From patchwork Thu Sep 7 06:03:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 111854 Delivered-To: patch@linaro.org Received: by 10.140.94.239 with SMTP id g102csp356727qge; Wed, 6 Sep 2017 23:03:43 -0700 (PDT) X-Received: by 10.98.197.134 with SMTP id j128mr1579916pfg.113.1504764223767; Wed, 06 Sep 2017 23:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504764223; cv=none; d=google.com; s=arc-20160816; b=prrgYFFqJbYP3m/fgo0Al2NMEXmIHHAKvNL1V9rNPkTCIGiZlcMP2U/0Po4pOZUG9S zlUm4KBAi8+qamYdRbEtjxb/naQkTl38SqhiXCVy7vaVJ3ptwLmoxN3Jbt4+mr5AxQHa HqKDeszMnIPeU//233r0QyhgM5FF08dcBYUUl2W+XWUH5pGBD2WBhqsF0xwRmnPHdr61 pQXdnm/K6v8tGG4cEZtGNSpQbIMkPKzul2lcsU2Se7DazwUg1tL4SA3STPjHMFIuPEO8 HP7BMXqDE4cd9EThO+KsOM6CCnwonejwsPtwB2Aj8qUqtw1dqUsZsBgOaKUiti0ffoG8 5oQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dI2k/tqzGnaNo/4By4SKI1P74utywY87tvsHIZjuhuk=; b=B4r42xdAx5UjHVQR8S7L1Be/zIjDFVzsfGcR/PJtPCqH8+t3/h65B4l8I11aEC4x5p ml6OHPbzYELCiRdZuX7rn+5Mk23KF2Mrzu5cUvs9057OmicABXoqGa1eqnevlJcquslS cPx4KhsGz7+tgLLjYynKlh6WlHjZHlLMIvQhcHDLYAr1qxkzyuB9skyVtMh8ElsGu6m/ +TFy3TfyEOx6A4kwbvNN9r5BjHnZhca40AXLJid+NA6i1gUgiE/dg12W40lbLbx85sbz m3vebAlNZle2ZNAtI4qnis7l60ZSXsBzvlql2BahsCAr8ThBGcDKWS5ukxqZf8wqyl4a q6BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Iw8e+e/6; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si1311369pfg.75.2017.09.06.23.03.43; Wed, 06 Sep 2017 23:03:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Iw8e+e/6; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754020AbdIGGDk (ORCPT + 9 others); Thu, 7 Sep 2017 02:03:40 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:38653 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbdIGGDh (ORCPT ); Thu, 7 Sep 2017 02:03:37 -0400 Received: by mail-pg0-f44.google.com with SMTP id v66so19132095pgb.5 for ; Wed, 06 Sep 2017 23:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ao85+WvXshKJdz1ShpFblPR3SPuwyblUXhsXJgp55nM=; b=Iw8e+e/6g9CpqRcQBS1uOF8BlUyxHGb15UXYIf7KN9UxSqr1wWZoRR9eoMdywMHry+ N1c2JwFSAJhLc4i/29eeSzv1vRDY1AcPp7WxP2nBvDEgeQ/Y3CFCF/6O5COkMwrYZyb+ q7Fo5WhsdGU77dJbkR+eXJtwfejC8xlYlPWiw= 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; bh=Ao85+WvXshKJdz1ShpFblPR3SPuwyblUXhsXJgp55nM=; b=gRCyBmQCEfuUqyxv4WgR1YHKAKhZZSWaoGVXoMj6UsGEGJjAzqlRWo0Y24Sygxnp9T 9dGXzqhnyfa0c/wbOunFFmlrLJ/6NzZmgMzicdXs8cpNaRGZc7obhV1BwRuyexqRv1sj 0P5r1UkznBxC2PMkI0Skt4NlfXxNl62TcE+epE/tY/wMWicW+IYQvwv2iPPHzI67rX59 EL0K6/3VtzdICdcUCqWtTcr9M3/SELpriCY44HzpWh0upeUpfiGv1GDJ4vURr/RGINsJ wCfmOz/5E7ajWQR4BGGtVUNHNhY7HSNFhg1gTFG+sbd7WOphdbG0jqYuM8FEPa2yRp8N HYOw== X-Gm-Message-State: AHPjjUixBqDlvj0r9ZSxc1zqfMAERKsxbYHC3d0AbH8JQKN/jZRPxJhZ KB3GyqnzQAitU2CS X-Google-Smtp-Source: ADKCNb7D/5twRCDho5/n6D5EH9fOAdlw2MVn0wdCrrLsUDmgO26oY1DCyI9ddq1G+gKyINDKOebuFQ== X-Received: by 10.99.122.29 with SMTP id v29mr1603935pgc.434.1504764217151; Wed, 06 Sep 2017 23:03:37 -0700 (PDT) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id s1sm2186650pfk.27.2017.09.06.23.03.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 23:03:36 -0700 (PDT) From: Bjorn Andersson To: "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Chris Lew Subject: [PATCH 3/7] net: qrtr: Add control packet definition to uapi Date: Wed, 6 Sep 2017 23:03:25 -0700 Message-Id: <20170907060329.32402-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170907060329.32402-1-bjorn.andersson@linaro.org> References: <20170907060329.32402-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The QMUX protocol specification defines structure of the special control packet messages being sent between handlers of the control port. Add these to the uapi header, as this structure and the associated types are shared between the kernel and all userspace handlers of control messages. Signed-off-by: Bjorn Andersson --- include/uapi/linux/qrtr.h | 32 ++++++++++++++++++++++++++++++++ net/qrtr/qrtr.c | 12 ------------ 2 files changed, 32 insertions(+), 12 deletions(-) -- 2.12.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/uapi/linux/qrtr.h b/include/uapi/linux/qrtr.h index 63e8803e4d90..179af64846e0 100644 --- a/include/uapi/linux/qrtr.h +++ b/include/uapi/linux/qrtr.h @@ -13,4 +13,36 @@ struct sockaddr_qrtr { __u32 sq_port; }; +enum qrtr_pkt_type { + QRTR_TYPE_DATA = 1, + QRTR_TYPE_HELLO = 2, + QRTR_TYPE_BYE = 3, + QRTR_TYPE_NEW_SERVER = 4, + QRTR_TYPE_DEL_SERVER = 5, + QRTR_TYPE_DEL_CLIENT = 6, + QRTR_TYPE_RESUME_TX = 7, + QRTR_TYPE_EXIT = 8, + QRTR_TYPE_PING = 9, + QRTR_TYPE_NEW_LOOKUP = 10, + QRTR_TYPE_DEL_LOOKUP = 11, +}; + +struct qrtr_ctrl_pkt { + __le32 cmd; + + union { + struct { + __le32 service; + __le32 instance; + __le32 node; + __le32 port; + } server; + + struct { + __le32 node; + __le32 port; + } client; + }; +} __packed; + #endif /* _LINUX_QRTR_H */ diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 0d7d3968414e..fac7cd6ea445 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -26,18 +26,6 @@ #define QRTR_MIN_EPH_SOCKET 0x4000 #define QRTR_MAX_EPH_SOCKET 0x7fff -enum qrtr_pkt_type { - QRTR_TYPE_DATA = 1, - QRTR_TYPE_HELLO = 2, - QRTR_TYPE_BYE = 3, - QRTR_TYPE_NEW_SERVER = 4, - QRTR_TYPE_DEL_SERVER = 5, - QRTR_TYPE_DEL_CLIENT = 6, - QRTR_TYPE_RESUME_TX = 7, - QRTR_TYPE_EXIT = 8, - QRTR_TYPE_PING = 9, -}; - /** * struct qrtr_hdr - (I|R)PCrouter packet header * @version: protocol version