Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752822AbdHDPh1 (ORCPT ); Fri, 4 Aug 2017 11:37:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbdHDPhZ (ORCPT ); Fri, 4 Aug 2017 11:37:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 39A564A6FE Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dcbw@redhat.com Message-ID: <1501860967.939.6.camel@redhat.com> Subject: Re: [PATCH 0/6] In-kernel QMI handling From: Dan Williams To: Bjorn Andersson , "David S. Miller" , Andy Gross , David Brown Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 04 Aug 2017 10:36:07 -0500 In-Reply-To: <20170804145938.25427-1-bjorn.andersson@linaro.org> References: <20170804145938.25427-1-bjorn.andersson@linaro.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 04 Aug 2017 15:37:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2681 Lines: 63 On Fri, 2017-08-04 at 07:59 -0700, Bjorn Andersson wrote: > This series starts by moving the common definitions of the QMUX > protocol to the > uapi header, as they are shared with clients - both in kernel and > userspace. > > This series then introduces in-kernel helper functions for aiding the > handling > of QMI encoded messages in the kernel. QMI encoding is a wire-format > used in > exchanging messages between the majority of QRTR clients and > services. This raises a few red-flags for me. So far, we've kept almost everything QMI related in userspace and handled all QMI control-channel messages from libraries like libqmi or uqmi via the cdc-wdm driver and the "rmnet" interface via the qmi_wwan driver. The kernel drivers just serve as the transport. Can you describe what kinds of in-kernel drivers need to actually parse QMI messages as part of their operation? Dan > It then adds an abstractions to reduce the duplication of common code > in > drivers that needs to query the name server and send and receive > encoded > messages to a remote service. > > Finally it introduces a sample implementation for showing QRTR and > the QMI > helpers in action. The sample device instantiates in response to > finding the > "test service" and implements the "test protocol". > > Bjorn Andersson (6): >   net: qrtr: Invoke sk_error_report() after setting sk_err >   net: qrtr: Move constants to header file >   net: qrtr: Add control packet definition to uapi >   soc: qcom: Introduce QMI encoder/decoder >   soc: qcom: Introduce QMI helpers >   samples: Introduce Qualcomm QRTR sample client > >  drivers/soc/qcom/Kconfig          |   8 + >  drivers/soc/qcom/Makefile         |   3 + >  drivers/soc/qcom/qmi_encdec.c     | 812 > ++++++++++++++++++++++++++++++++++++++ >  drivers/soc/qcom/qmi_interface.c  | 540 +++++++++++++++++++++++++ >  include/linux/soc/qcom/qmi.h      | 249 ++++++++++++ >  include/uapi/linux/qrtr.h         |  35 ++ >  net/qrtr/qrtr.c                   |  16 +- >  samples/Kconfig                   |   8 + >  samples/Makefile                  |   2 +- >  samples/qrtr/Makefile             |   1 + >  samples/qrtr/qrtr_sample_client.c | 603 ++++++++++++++++++++++++++++ >  11 files changed, 2261 insertions(+), 16 deletions(-) >  create mode 100644 drivers/soc/qcom/qmi_encdec.c >  create mode 100644 drivers/soc/qcom/qmi_interface.c >  create mode 100644 include/linux/soc/qcom/qmi.h >  create mode 100644 samples/qrtr/Makefile >  create mode 100644 samples/qrtr/qrtr_sample_client.c >