Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1321032pxb; Wed, 4 Nov 2020 06:04:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaOG/bDZu+R8xqfpBg+zGIKxT9Tkzobr4A35xzwL2hI7V3twafhSfBssEXSwc6d7IzQy5f X-Received: by 2002:aa7:c792:: with SMTP id n18mr26940417eds.209.1604498677271; Wed, 04 Nov 2020 06:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604498677; cv=none; d=google.com; s=arc-20160816; b=LyjDf7e0+M+40SuACk2wFsuzMOY3X0mxgWdBWLzdc8bB3i4huba9nwMkRxkhaN9Etn +8XZ2kUEYueSs5EGbFGcuPmtrWo0eRyAmKr793xwlUn0auXIam6uFRKGouE4OdWSXF5E afbUREi53nvfvsr2Y0vQW5VODO5DdqkTOLn7sh4/nFA5X8dSZbfVd10nyRyxHh9TXYwl hGLbAJCAeRv4EGevmXwLG4TbmauO6pLzUW+L5q14W6OcNxz5bLnIXpr/rzGUzKqOGoDZ rAdc/yJtr/SlqZeVbFn2kWkt+uylqCZ62Zq1zQF8635DFay7L3iKFdal8iTsne8EU/Ye CG0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=GxDSX0z36N/hMdCVYYxUN+iO8yskkzcu7eJk7feps+I=; b=xK/80uJ4vwZyradKFhv6O4fi7mjGtKJiMduYvRLH756Dt46DsmRZyYwgxAdCgnQ428 FiK/KNMBKxsbsP7ufz0s4Wafi+Fo29s/W2JRVNdt6UYWFN/2dSESHmVZtgY6z3mShxZj 9LOcChxlqMip7vVKD7l//cUvGJR9f2rH6sA6PSmUoPdpgVU3VzZSIngeeZwJq4W09Y/0 9x4hfRwfuCvyvCUE722kN6LjBHlWFDc3G9J9DL3s1jYuXNxG5nh3oUsXDn/JcN3YUnLH CQAGlZFTDpX/E/zouutuODeGdKX02A4rFV0P4H4tpSwqAxVUmvRNM7wyaoszql4ZXOpE vtNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si1414974ejs.236.2020.11.04.06.04.06; Wed, 04 Nov 2020 06:04:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726952AbgKDOCI (ORCPT + 99 others); Wed, 4 Nov 2020 09:02:08 -0500 Received: from mga05.intel.com ([192.55.52.43]:11257 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbgKDOCI (ORCPT ); Wed, 4 Nov 2020 09:02:08 -0500 IronPort-SDR: Ck6oRT/9GSj30lwG4HgwlreZV33r5fowkYM1IfMsCEkLQoeolukgpEPNzKMmes71BQl1xTPlsm vKXPfWwaYkIw== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="253928618" X-IronPort-AV: E=Sophos;i="5.77,451,1596524400"; d="scan'208";a="253928618" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 06:01:56 -0800 IronPort-SDR: hXnJiNdbkWZLoYrlaTGLrYXR7Cn2+3f0uU0yDyEEepyNgeSNYWJ0I5TiXuj6LWli6jMDY3AIcM edHa46A1/tOg== X-IronPort-AV: E=Sophos;i="5.77,451,1596524400"; d="scan'208";a="538932865" Received: from gliakhov-mobl2.ger.corp.intel.com (HELO ubuntu) ([10.249.45.232]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 06:01:54 -0800 Date: Wed, 4 Nov 2020 15:01:44 +0100 From: Guennadi Liakhovetski To: Mathieu Poirier Cc: ohad@wizery.com, bjorn.andersson@linaro.org, arnaud.pouliquen@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 8/8] rpmsg: Turn name service into a stand alone driver Message-ID: <20201104140143.GA30197@ubuntu> References: <20201027175218.1033609-1-mathieu.poirier@linaro.org> <20201027175218.1033609-9-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027175218.1033609-9-mathieu.poirier@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathieu, Arnaud, I've tried the patch set with my VirtIO / vhost audio implementation, in general it worked quite well, but I did need one chamge, which should be improved in this patch: On Tue, Oct 27, 2020 at 11:52:18AM -0600, Mathieu Poirier wrote: > From: Arnaud Pouliquen > > Make the RPMSG name service announcement a stand alone driver so that it > can be reused by other subsystems. It is also the first step in making the > functionatlity transport independent, i.e that is not tied to virtIO. > > Co-developed-by: Mathieu Poirier > Signed-off-by: Arnaud Pouliquen > --- [snip] > diff --git a/include/linux/rpmsg_ns.h b/include/linux/rpmsg_ns.h > index bb479f430080..42786bb759b5 100644 > --- a/include/linux/rpmsg_ns.h > +++ b/include/linux/rpmsg_ns.h > @@ -39,4 +39,21 @@ enum rpmsg_ns_flags { > /* Address 53 is reserved for advertising remote services */ > #define RPMSG_NS_ADDR (53) > > +/** > + * rpmsg_ns_register_device() - register name service device based on rpdev > + * @rpdev: prepared rpdev to be used for creating endpoints > + * > + * This function wraps rpmsg_register_device() preparing the rpdev for use as > + * basis for the rpmsg name service device. > + */ > +static inline int rpmsg_ns_register_device(struct rpmsg_device *rpdev) > +{ > + strcpy(rpdev->id.name, "rpmsg_ns"); you need to #include in this file for rpdev definition. Or you could leave this function in rpmsg_ns.c, then it's enough to forward-declare struct rpdev here. Thanks Guennadi > + rpdev->driver_override = "rpmsg_ns"; > + rpdev->src = RPMSG_NS_ADDR; > + rpdev->dst = RPMSG_NS_ADDR; > + > + return rpmsg_register_device(rpdev); > +} > + > #endif > -- > 2.25.1 >