Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp343676lqp; Fri, 12 Apr 2024 22:47:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVYznlDNQFR2dCD36IG7e7hBA9Kd31f83fNbXYUnxVUrCJBWtK69XT9xKtN/PJbHuodQ7SaiAj4wgr+UhGXmqJqSwPP3oufDGVX2H1eqA== X-Google-Smtp-Source: AGHT+IHU2HpSKCVIS7dSH9Qo+vhbh0sSgW97QRaIZCny7zSAEkakThF2BOlPp+FcPnLpMgT/bbUz X-Received: by 2002:a05:622a:2890:b0:436:567a:1ed0 with SMTP id ke16-20020a05622a289000b00436567a1ed0mr8889131qtb.8.1712987271804; Fri, 12 Apr 2024 22:47:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712987271; cv=pass; d=google.com; s=arc-20160816; b=YiavspSnYfBYfO1Rgh273dB04A8eEmHrU3xlVu/JWKbca+nTL+x3dAj496Gfdn/Bd2 3MoCvapZ2nP4RaGIsaSEzp1krXddTDRgSdcK6vZbkorVDQRc0JSXz/MtiKFZp7CNtX/c VYtitSjqZ6bpxzUZdQMTPug65mmUD606Yle5yGzb6/LAVAb/FAw32bCkIXClAkJT2ZjY /Da+tYeEb9ICA7fqDTp8kDaFL/dAB6ydMLWAKeiG/C+od+AfNDh7t3oL0H2kXny28KWA nuXgyt9FokNETrS6v3Pz3UD2MgPxFcvI1cnuiBz3j881s8EXuyB9o9rcYxxCVnJxVL4b xb4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pqzPDRwzysEhpcx3Q01XUVAPA0hXVJuVxOofe080BCA=; fh=MY2PVltkHSzjjFTifoh8n/alBGaarJc8ZQHEs99HbPQ=; b=J3U32Qcxq3MCDMsRJ9AemCZSOPv8S2iS+83OMNlv5ndsYLbop76ex9oECxqNs+nwWG 2l2Ya19OfnnZJaWoocMtvMzJQzMVLj+TOo1/vhSsVg6Pzb2kdCZD3jvU5dIsvbDD9fyH vqUrR7DA2iS+QQ/eJFIJLGBDT8oU+OzvG8M5yXLODZaqGhWsRqbrviCHmc70V9Pol0T6 2/VdGmyZiT4v1Bz6Cz6G7i82QYUiR7JSzIu5gmBb7N2N7fzspsQ6pWP1cicEkMr6yb3r d76x0rI6UILKrcYw36yiBJ0Wm7KSgeWxs+u9lrh8bW+I0MFzY6oL0L1YMnZIyJdU5ERA UT6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QbRzaiBa; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-143588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g10-20020ac87d0a000000b004367220933asi4978094qtb.504.2024.04.12.22.47.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 22:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QbRzaiBa; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-143588-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143588-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C0C41C21E43 for ; Sat, 13 Apr 2024 05:47:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B35D81CA8B; Sat, 13 Apr 2024 05:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QbRzaiBa" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D43F71C6AF for ; Sat, 13 Apr 2024 05:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712987262; cv=none; b=RveHbpPyINge6YEoV/zvqWU0kQ8g7Xn4r3ho8nrsbq0DE1ckQ5pz5SPF3HnjsGzH3aDLVV8/P5i2B+bunaU9y3HLdDkfJggc8RFFSnMse8QXqwvL9vsz15SKSSuPTUWiw2ZenIs5hLlIsGuAzbgCiXTuOYuOArysya809RGuf+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712987262; c=relaxed/simple; bh=smXxqhrCIyKYh9BVyoQj+ORo/PcdBMh4Vmv/joiYeWQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LOVRscCj18+fCsI0jxXbKU9LIqFIZosSHn2PlAfS+guuYknoZyf0U+uaMGSiF/ZfCZApgCVKCouog56B4tvTFWr1QivbpvRlvd23Es60bPPdHU8iFyZl6A+r6FpqYu5sDGXLF5RPhQHjTBiGPJ7SjeWokEiHfSzIPUhQkL+kzIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QbRzaiBa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 473D1C113CD; Sat, 13 Apr 2024 05:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712987262; bh=smXxqhrCIyKYh9BVyoQj+ORo/PcdBMh4Vmv/joiYeWQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QbRzaiBauyX1zqKSk3xuzk/RaWSV71HlUGaxdNq+ubQNf5LJzhGMj0PjCEL7XvE7I V39aQGyEEjBCcwEFSRkq8h111LxzhtNaoDT2L/gpws9oRta+wb9LdXxF5lf9i2WPaf QP4gMRnjf5tYH5DEmNX0wnZTFpVr6uzoT80/mj0s= Date: Sat, 13 Apr 2024 07:47:36 +0200 From: Greg KH To: Vamsi Krishna Attunuru Cc: "arnd@arndb.de" , "linux-kernel@vger.kernel.org" , Jerin Jacob Subject: Re: [EXTERNAL] Re: [PATCH v5 1/1] misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver Message-ID: <2024041351-endowment-underrate-4b8d@gregkh> References: <20240412121005.1825881-1-vattunuru@marvell.com> <2024041250-nursing-tidy-db7e@gregkh> <2024041258-reminder-widely-00c0@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Apr 12, 2024 at 04:19:58PM +0000, Vamsi Krishna Attunuru wrote: > > > > -----Original Message----- > > From: Greg KH > > Sent: Friday, April 12, 2024 9:05 PM > > To: Vamsi Krishna Attunuru > > Cc: arnd@arndb.de; linux-kernel@vger.kernel.org > > Subject: Re: [EXTERNAL] Re: [PATCH v5 1/1] misc: mrvl-cn10k-dpi: add > > Octeon CN10K DPI administrative driver > > > > On Fri, Apr 12, 2024 at 01:56:36PM +0000, Vamsi Krishna Attunuru wrote: > > > > > > > > > > -----Original Message----- > > > > From: Greg KH > > > > Sent: Friday, April 12, 2024 5:57 PM > > > > To: Vamsi Krishna Attunuru > > > > Cc: arnd@arndb.de; linux-kernel@vger.kernel.org > > > > Subject: [EXTERNAL] Re: [PATCH v5 1/1] misc: mrvl-cn10k-dpi: add > > > > Octeon CN10K DPI administrative driver > > > > > > > > Prioritize security for external emails: Confirm sender and content > > > > safety before clicking links or opening attachments > > > > > > > > -------------------------------------------------------------------- > > > > -- On Fri, Apr 12, 2024 at 05:10:05AM -0700, Vamsi Attunuru wrote: > > > > > Adds a misc driver for Marvell CN10K DPI(DMA Engine) device's > > > > > physical function which initializes DPI DMA hardware's global > > > > > configuration and enables hardware mailbox channels between > > > > > physical function (PF) and it's virtual functions (VF). VF device > > > > > drivers (User space drivers) use this hw mailbox to communicate > > > > > any required device configuration on it's respective VF device. > > > > > Accordingly, this DPI PF driver provisions the VF device resources. > > > > > > > > > > At the hardware level, the DPI physical function (PF) acts as a > > > > > management interface to setup the VF device resources, VF devices > > > > > are only provisioned to handle or control the actual DMA Engine's > > > > > data transfer > > > > capabilities. > > > > > > > > No pointer to the userspace code that uses this? Why not? How are > > > > we supposed to be able to review this? > > > > > > Userspace code will use two functionalities (mailbox & ioctl) from > > > this driver. DPDK DMA driver uses the mailbox and the dpdk application > > > uses the ioctl to setup the device attributes. We are waiting for this > > > kernel driver get merged to update the corresponding support in DPDK > > driver and applications. I will provide the pointers to both the use cases in > > userspace code. > > > Meanwhile below is the current dpdk dma driver that uses sysfs based > > > scheme to convey mbox requests to the kernel DPI driver which gets > > replaced with hardware mailbox scheme once mrvl-cn10k-dpi kernel driver is > > merged. > > > https://urldefense.proofpoint.com/v2/url?u=https- > > 3A__github.com_DPDK_d > > > pdk_blob_main_drivers_common_cnxk_roc- > > 5Fdpi.c&d=DwIBAg&c=nKjWec2b6R0mO > > > > > yPaz7xtfQ&r=WllrYaumVkxaWjgKto6E_rtDQshhIhik2jkvzFyRhW8&m=o3EhoL > > s7dsod > > > -YHS438Wl2Pf_MKMBYegGSKteoX3qFTB0HV897ykpCVbTp- > > nmj4e&s=A6TJDFUtPm3ksJh > > > qop89CL8GgKj4sjkJIVi1-RdnUr8&e= > > > > So this is a DPDK thing? Ugh, do the networking people know about this? > > If not, why aren't they reviewing this? > > Actually, It's not networking related. Like the Linux kernel, DPDK also supports multiple subsystems like > network, scheduler, DMA, mempool etc. Regarding the usecases, the DPDK Marvell DMA/DPI VF driver > interacts(over hardware mailbox) with the mrvl-cn10k-dpi misc kernel driver(administrative driver) for setting > up the VF device resources. So this is something that the PCI core should be concerned about then? > DPDK is one example that uses this driver, there can be other userspace generic frameworks/applications > where the virtual functions are binded to userspace drivers and interact with physical/administrative function > driver running in the kernel. Are there other devices/drivers that do this today in Linux? Why make a device-specific api for this common functionality? thanks, greg k-h