Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7097472imm; Tue, 28 Aug 2018 06:25:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYnQ0xCVeNJp+/9XY1Scs8lOf6YhWa0QGs3RWg3OWfwWvA2Qg10VuqmvRNEaJLKpwd/8QqF X-Received: by 2002:a62:5302:: with SMTP id h2-v6mr1629848pfb.183.1535462720269; Tue, 28 Aug 2018 06:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535462720; cv=none; d=google.com; s=arc-20160816; b=ARyv4hSioo/ToaVioPzXT98G6Ytfi40blWx7KpTLrbH6PCGcgZ3Of+LkOpM7UEnrtB M3dgbFRXHOK/VLcJv4MM+TBC81LS5JoEQnsQ5iSz8FIQU1ARUhgdv2yTAf78n/Ai64O7 D8KA8DRzhBlnaQChw48h8yvUFxO56yEIXiKI6odF6i4CWUaQCb5tjTbwLB+bhi6Qvs9+ sGu0MK11nj3w7S1QTi2BSHwG/iiGUEK/U2EkjvwJi0WG3g05GAVtjow5HxzAS7redG35 THNWHl4FWFaY5b8j9HgLvlFRYJjIOppAYIvZI8aex3Ivn+indBa/3YEyC3skrE1gtDvX gADg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=KDB5UGECM9fpAuGLlbmJ1QkkSPVv+HvJdEBGQ/7Vm7M=; b=PAS6Fye+TEiL/XYHz3vlIb7qPcdqBZWBinzKSPK8dwGAmSOyB5FMMaKELV8Cb6eHPb 6cXw9r7R+t/hQG92NN5X+V7bC/SW2EItD/UDYRpIxS9CNmesu1UgRO6iBxsxdFVy8d0E jkfazJOex8BADpgdJQHlxmQqmB5zrWtRWiPFlZWGUe8iIIihSbPvxRHdD/9vG3N9lg9F +gQqqEIqXyokCFBpuiySatURNXvMNefLC3sP8MDZ6EIkA1DOFI4iE16AHpoJasSVwWss 7f2wsFr19LJpWFLSVmhMH5ln+bbtAzL53ekBfgETHKhSHrM0nUkA3JtZ8Abfk4XlO3qH jd8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WLXweYn6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si980072pfe.49.2018.08.28.06.25.04; Tue, 28 Aug 2018 06:25:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WLXweYn6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728132AbeH1RPg (ORCPT + 99 others); Tue, 28 Aug 2018 13:15:36 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38877 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbeH1RPg (ORCPT ); Tue, 28 Aug 2018 13:15:36 -0400 Received: by mail-wm0-f65.google.com with SMTP id t25-v6so2009232wmi.3; Tue, 28 Aug 2018 06:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KDB5UGECM9fpAuGLlbmJ1QkkSPVv+HvJdEBGQ/7Vm7M=; b=WLXweYn6urpyz4X/tAoNpw5nwvra7cWNt4iAPYJhIq4f5pBcmap+kZkWF+UjMPUZs/ 2SIlpirD3nulJgog9IlIdPNaKcalo5EKrMJYlPy8Y6NZ+6fnxQkvigHMOod6ormo2fXu ACDwfvsj8QrezxFfi4nNXhy0Zmvb/LTHxG5UVGu85m8xqUyU/MVSEo25UUfijxut4Gj6 OBnz9+KUQb41nSYkvQLqii+BuZ6K8z9Wfgh7P8u/gdIEqWfD+PrgvUbQdG6uTEBJYCDB qZ1hK3XeSpd5zfEGpcGo6iFh+t4p2FLddZpCb+m/tk7CpleXEcGhsQLn82Dc/mm60wl/ Xt3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KDB5UGECM9fpAuGLlbmJ1QkkSPVv+HvJdEBGQ/7Vm7M=; b=iAuqr1x1M++aQPrcOr9FXQ74fvn2EWagFYH2bTj4bnob9+X4uIjOeUmLDgqJlQed8Q /0TANOgn9zg+jzgoTJG+ESlM9W1rZ8ZsCWcSVIeOchSRrXFndVvUleRrmrEg+Pn+br8e /i0rz032hePxljnlhycS/3o4hXz98CY+ifNcS/cB39VrpjpO7jNMJAbz1EuMzmmbCXfy i8hvKUpbuIFxj7KuGdY9qVVfjvmRaxzB8VEPvESh7DG1rvAisRBNv87O1qK/mGV2v1Xt oiFSKq4aTyS/7J8b8ubJIzxbJ56VUORv+1z1n7i8q3Kf42Hq3bClhcT511Kf81ICOW4R AJDQ== X-Gm-Message-State: APzg51BKF/Vnx6dPBKniFmw8plz/RPN1qI+Ep3Z7+s4SwraRqDrJ8mo9 ehY8indcLQsCMWwV8MCEMHNzx7gFG4VFUTbzkOOAYg== X-Received: by 2002:a1c:1d87:: with SMTP id d129-v6mr1342228wmd.34.1535462635340; Tue, 28 Aug 2018 06:23:55 -0700 (PDT) MIME-Version: 1.0 References: <1535453838-12154-1-git-send-email-sunil.kovvuri@gmail.com> <1535453838-12154-5-git-send-email-sunil.kovvuri@gmail.com> In-Reply-To: From: Sunil Kovvuri Date: Tue, 28 Aug 2018 18:53:43 +0530 Message-ID: Subject: Re: [PATCH 04/15] soc: octeontx2: Add mailbox support infra To: Arnd Bergmann Cc: LKML , olof@lixom.net, LAKML , linux-soc@vger.kernel.org, Aleksey Makarov , Sunil Goutham , Lukasz Bartosik , Linux Netdev List , "David S. Miller" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 28, 2018 at 6:22 PM Arnd Bergmann wrote: > > On Tue, Aug 28, 2018 at 2:48 PM Sunil Kovvuri wrote: > > > > On Tue, Aug 28, 2018 at 5:33 PM Arnd Bergmann wrote: > > > > > > On Tue, Aug 28, 2018 at 12:57 PM wrote: > > > > > > > > From: Aleksey Makarov > > > > > > > > This patch adds mailbox support infrastructure APIs. > > > > Each RVU device has a dedicated 64KB mailbox region > > > > shared with it's peer for communication. RVU AF has > > > > a separate mailbox region shared with each of RVU PFs > > > > and a RVU PF has a separate region shared with each of > > > > it's VF. > > > > > > > > These set of APIs are used by this driver (RVU AF) and > > > > other RVU PF/VF drivers eg netdev, crypto e.t.c. > > > > > > > > Signed-off-by: Aleksey Makarov > > > > Signed-off-by: Sunil Goutham > > > > Signed-off-by: Lukasz Bartosik > > > > > > Why does this driver not use the drivers/mailbox/ infrastructure? > > > > > This is a common administrative software driver which will be handling requests > > from kernel drivers and as well as drivers in userspace applications. > > We had to keep mailbox communication infrastructure same across all usages. > > Can you explain more about the usage of userspace applications > and what interface you plan to use into the kernel? Any PCI device here irrespective in what domain (kernel or userspace) they are in use common mailbox communication. Which is # Write a mailbox msg (format is agreed between all parties) into shared (between AF and other PF/VFs) memory region and trigger a interrupt to admin function. # Admin function processes the msg and puts reply in the same memory region and trigger IRQ to the requesting device. If the device has a driver instance in kernel then it uses IRQ and userspace applications does polling on the IRQ status bit. > > Do you things like AF_XDP and virtual machines, or something else? I meant drivers in DPDK which may or may not use AF_XDP. And yes if a PCI device is attached to a virtual machine then that also uses the same mailbox communication. Sunil. > > Arnd