Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp856833lqp; Sun, 14 Apr 2024 02:46:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwszxT0AnSJi2v6jRliX/blYtIg5oMYBpnczq28NW6vjfP3Ya+RC9hJcUvM7Q0r/SpVIMDDY6y9C+MuP4qqBBwPrXmu7VYMaVeW8MQow== X-Google-Smtp-Source: AGHT+IHQfkQ78LS9NaIgyGXva8e8Uq0g2QbaF8CiIP86UCC9dAAtcXVP8NpEDI4jaImBhLcBlplc X-Received: by 2002:a50:d4d4:0:b0:56e:6d9:7bd6 with SMTP id e20-20020a50d4d4000000b0056e06d97bd6mr4647551edj.34.1713087997841; Sun, 14 Apr 2024 02:46:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713087997; cv=pass; d=google.com; s=arc-20160816; b=JI4hpoQ2jG2ld9528XEv32KvdSgc/SM5bNfnFoDGQIJ4Tk+9/FyMtZDle7+yLFqMfs Brdvsv4Z/TNrIauHJKQ3SH6mSF+DH1xrcxk4Igaip872rPw0JjFDo2Bd9JOs52UWjg1q Z289OxdSFZv3qBiWSjinFaZ//+itXvK8Nr06Qi5ITyBPDHRtWIa7RWFNaL+9M67nI1M1 Eo8Gg8NiwkJbCMkWCpyisFANDliQYNBcF55YKx5jEQummCFLQDj0RT7bYGxEUoTi1vFg ET6rEZ134YJ332zQ/CXZcWCHpZtrcB0hrd0+j+Iwbka7KWRZTIIPa8wNeTbNcLY38WDy Sz9A== 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=pv/B5zyUh6UVSmYZg/tsVtuANcN9gV9OQ6jmHyb70Ew=; fh=uWlGFlI+hOoaiY0X2FSLMekuBOB9b2lbnh4dPpWV2Bk=; b=ludZ2yxMI/6ARf8Qbwzm1QqiIs/Awnoy2S1Nrrf9jwLrLPPkCWGf1nrQ3nTZQwpZR2 mU2lAXRDxRMr+lEMy28JSgLhBCM7Wyb5KICFxgwjyqU0PwJsLSo6dWDiB5j8HulMM3QE 3s8NEsHcAE3A9UMe15G37cZ/N1XuHX03zmi4RVG6gH3u8Esh4Fbg+Op55YCPoKYFlKzB hrL8e/Q6StM7iFbPECYG1GOi/GKepyZH30ZJKuECAo5ax0KTaYTVBzyFcEECbje07xds TTHnBKI3jlJv2LimQTzpfFmO1zMTBfGdPq3CzGjIRnCWRsjx8xDK0BacHuLTP+V6Ytqj S0BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=brXOj02v; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-144081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144081-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c15-20020a50d64f000000b0056fdbbcf0f7si3285750edj.146.2024.04.14.02.46.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 02:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=brXOj02v; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-144081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144081-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2D8351F215AE for ; Sun, 14 Apr 2024 09:46:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 965B823749; Sun, 14 Apr 2024 09:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="brXOj02v" 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 4314521A19 for ; Sun, 14 Apr 2024 09:46:28 +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=1713087989; cv=none; b=f/a6lpyh7dCubPWCJzra5VTRvTGUGTN2M472G37gB4y/ipjqlyZxtZTONQrUmvq1hsvr3vPXyRMePc4U5BHrYGdfvszgks8rQmIG9c75VykvIKFajCCSEj5kMP6hQjYp/8EvDPHu6y7M9pQpkg0XQTh9RRddrFO8TCBDE1We3/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713087989; c=relaxed/simple; bh=0zSoq5qVDWV1e93UmNWw6HasZ/G8cDLO5gr6MqwnptQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Vo0Is/nYCtvYCyVxueTTGqPAbG0exbWa3ImGWMpl2/K6fzKjeVVT/behMkPC9oQmBOJQHYnFh//EtR+/ZX8APkmm+Hz6YhtytENVYZVl6IbE11hS4Bw8ZLvy6oBHObSDKhBGhcBJBavZSb0sUZ1XQxCZm0H+paL9oU0G0QipuP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=brXOj02v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 710E0C072AA; Sun, 14 Apr 2024 09:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713087988; bh=0zSoq5qVDWV1e93UmNWw6HasZ/G8cDLO5gr6MqwnptQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=brXOj02vmKWNlhKPdtd6ZLtr9Ez3MeP8uJn/tI2W2bjWZntdOnuuLuYYTC78nk5rM Sl3kBkZwwP1whZLivLL6Z5f8sb/1fq5xmL+QnOmnRYbFsHr0VPywdqQj0TKnPrrvB+ qDYXZOwRsN0rs8PgJZx3xMf0Dy6MM0em99RZBzc4= Date: Sun, 14 Apr 2024 11:46:25 +0200 From: Greg Kroah-Hartman To: Vamsi Krishna Attunuru Cc: Arnd Bergmann , "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: <2024041458-directory-image-6a0c@gregkh> References: <2024041250-nursing-tidy-db7e@gregkh> <2024041258-reminder-widely-00c0@gregkh> <2024041351-endowment-underrate-4b8d@gregkh> <2024041310-bundle-patio-8a22@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 Sun, Apr 14, 2024 at 09:33:37AM +0000, Vamsi Krishna Attunuru wrote: > > > > -----Original Message----- > > From: Arnd Bergmann > > Sent: Sunday, April 14, 2024 12:41 AM > > To: Vamsi Krishna Attunuru ; Greg Kroah-Hartman > > > > Cc: 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 > > > > On Sat, Apr 13, 2024, at 18:17, Vamsi Krishna Attunuru wrote: > > > From: Greg KH > > >> On Sat, Apr 13, 2024 at 10:58:37AM +0000, Vamsi Krishna Attunuru wrote: > > >> > From: Greg KH > > >> > > > >> > No, it's a normal PCIe sriov capability implemented in all sriov > > >> > capable PCIe > > >> devices. > > >> > Our PF device aka this driver in kernel space service mailbox > > >> > requests from userspace applications via VF devices. For instance, > > >> > DPI VF device from user space writes into mailbox registers and the > > >> > DPI hardware > > >> triggers an interrupt to DPI PF device. > > >> > Upon PF interrupt, this driver services the mailbox requests. > > >> > > >> Isn't that a "normal" PCI thing? How is this different from other > > >> devices that have VF? > > > > > > Looks like there is a lot of confusion for this device. Let me explain > > > There are two aspects for this DPI PF device. > > > a) It's a PCIe device so it is "using" some of the PCI services > > > provided PCIe HW or PCI subsystem > > > b) It is "providing" non PCIe service(DPI HW administrative function) > > > by using (a) Let me enumerate PF device operations with above aspects. > > > 1) Means to create VF(s) from PF. It's category (a) service and driver > > > uses API (pci_sriov_configure_simple()) from PCI subsystem to > > > implement it. > > > 2) Means to get the interrupt(mailbox or any device specific > > > interrupt). It's category (a) service and driver uses API > > > (pci_alloc_irq_vectors()) from PCI subsystem to implement it. > > > 3) Means to get the mailbox content from VF by using (2). It's > > > category > > > (b) service. This service is not part of PCI specification. > > > DPI PF device has the mailbox registers(DPI_MBOX_PF_VF_DATA > > registers) > > > in its PCIe BAR space which are device specific. > > > 4) Upon receiving DPI HW administrative function mailbox request, > > > service it. Its category (b) service. This service is not part of PCI > > > specification. > > > For instance, dpi_queue_open & close are requests sent from DPI VF > > > device to DPI PF device for setting up the DPI VF queue resources. > > > Once its setup by DPI PF, then DPI VF device can use these queues. > > > These queues are not part of PCIe specification. These queues are used > > > for making DMA by DPI VF device/driver. > > > > It's not directly my area either, but as far as I can tell from reading the > > competing sr-iov based device drivers, these seem to handle all of the above > > in the network driver that owns the PF rather than a separate driver, e.g. for > > the first point: > > > > $ git grep -w sriov_configure.= drivers/net/ > > drivers/net/ethernet/amazon/ena/ena_netdev.c: .sriov_configure = > > pci_sriov_configure_simple, > > drivers/net/ethernet/amd/pds_core/main.c: .sriov_configure = > > pdsc_sriov_configure, > > drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: .sriov_configure = > > bnx2x_sriov_configure, > > drivers/net/ethernet/broadcom/bnxt/bnxt.c: .sriov_configure = > > bnxt_sriov_configure, > > drivers/net/ethernet/cavium/liquidio/lio_main.c: .sriov_configure = > > liquidio_enable_sriov, > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c: .sriov_configure = > > cxgb4_iov_configure, > > drivers/net/ethernet/emulex/benet/be_main.c: .sriov_configure = > > be_pci_sriov_configure, > > drivers/net/ethernet/freescale/enetc/enetc_pf.c: .sriov_configure = > > enetc_sriov_configure, > > drivers/net/ethernet/fungible/funeth/funeth_main.c: .sriov_configure = > > funeth_sriov_configure, > > drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: .sriov_configure = > > hns3_pci_sriov_configure, > > drivers/net/ethernet/huawei/hinic/hinic_main.c: .sriov_configure = > > hinic_pci_sriov_configure, > > drivers/net/ethernet/intel/fm10k/fm10k_pci.c: .sriov_configure = > > fm10k_iov_configure, > > drivers/net/ethernet/intel/i40e/i40e_main.c: .sriov_configure = > > i40e_pci_sriov_configure, > > drivers/net/ethernet/intel/ice/ice_main.c: .sriov_configure = > > ice_sriov_configure, > > drivers/net/ethernet/intel/idpf/idpf_main.c: .sriov_configure = > > idpf_sriov_configure, > > drivers/net/ethernet/intel/igb/igb_main.c: .sriov_configure = > > igb_pci_sriov_configure, > > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: .sriov_configure = > > ixgbe_pci_sriov_configure, > > drivers/net/ethernet/marvell/octeon_ep/octep_main.c: .sriov_configure = > > octep_sriov_configure, > > drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c: .sriov_configure = > > otx2_sriov_configure > > drivers/net/ethernet/netronome/nfp/nfp_main.c: .sriov_configure = > > nfp_pcie_sriov_configure, > > drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c: .sriov_configure = > > ionic_sriov_configure, > > drivers/net/ethernet/qlogic/qede/qede_main.c: .sriov_configure = > > qede_sriov_configure, > > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: .sriov_configure = > > qlcnic_pci_sriov_configure, > > drivers/net/ethernet/sfc/ef10.c: .sriov_configure = > > efx_ef10_sriov_configure, > > drivers/net/ethernet/sfc/ef100.c: .sriov_configure = > > ef100_pci_sriov_configure, > > drivers/net/ethernet/sfc/ef100_nic.c: .sriov_configure = > > IS_ENABLED(CONFIG_SFC_SRIOV) ? > > drivers/net/ethernet/sfc/efx.c: .sriov_configure = efx_pci_sriov_configure, > > drivers/net/ethernet/sfc/siena/efx.c: .sriov_configure = > > efx_pci_sriov_configure, > > drivers/net/ethernet/sfc/siena/siena.c: .sriov_configure = > > efx_siena_sriov_configure, > > > > In what way is your hardware different from all the others? > > All of above devices are network devices which implements struct net_device_ops. > i.e Those PCI devices are networking devices which are capable of sending/receiving network packets. > This device doesn't have networking functionality to implement struct net_device_ops, It's a simple PCIe PF > device enables it's VFs and services any mailbox requests. What driver handles the "mailbox requests"? What are these requests for? thanks, greg k-h