Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1373963pxk; Thu, 10 Sep 2020 13:47:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8WzExWtipKj9Apk0I+fyXcgbDOTv77aYgvfRtNmVEKFQYbhM4gAtBizqc0F6cysuJhFAM X-Received: by 2002:a17:906:c1d2:: with SMTP id bw18mr11188431ejb.240.1599770839364; Thu, 10 Sep 2020 13:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599770839; cv=none; d=google.com; s=arc-20160816; b=l0aiOkj96fjaKw3IIFCH0ym0bXrxtfdYcfQdo93aFS1doXnrCv/yBBXgSwBXTK3ck2 l/Ro+6HmSnC9MiZSbdngXRBLpiu6pATUPH98TnryKGz6rKiWDi26oZxf+W8X11fnF0nY fL1Il8FErxA6qEns0a1DsxnXRjj4YlORPlwh3byFbgogqduEQKFaHdlvmw8+B3rtNnJw sclNB2DKRjfQsBDnIvZLYFnF9LPX8YgTQvpS1vss/yXTcuC5YLmuqPTU5p8eYB8d36pL 2P7pr3YQhv0zNWaY6qgi3D3T7nH1H3eB1jNjFaHGLU32wduyhD87f0LJaMigVvLTQs0n 18Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=OBl7F0zBNPKzwEBsy5Gv6uVZ5J2YEr+ylfj+m0PbNcE=; b=CowdI5KFgN1Ai68rx3M+e2XR66/6/GGYqXUi0D3d7H9A5TEmBDXzpHciCWjOuZaK25 ypZ0IQ3eBaBCsaUfCACQxP5N1WAeFL24NToc3g6F+3SeVk24ze1HaR/sLO1TlldAP+ZE 9EznweEf5wxt8KtYN+89hGOePTFQpOY9vEu6qMh9BI2RD8i9LCUFKjgQpL/SH6jCOUex PLYwO3uRRF+A3vFiZnKc7g9axgOy4Dbz51gmCHggt+f0+OkXxGxdRGn8LPfNPxRyLT26 f3Uo3gmH59KeEWbBZ32y8hTRFWMnnmraIMtWi3fnOmARs62oFJWXB+WYT3mW7PiIVmcu dl0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WsTM7hlO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si4254210ejt.556.2020.09.10.13.46.56; Thu, 10 Sep 2020 13:47:19 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=WsTM7hlO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbgIJUqY (ORCPT + 99 others); Thu, 10 Sep 2020 16:46:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:55726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbgIJU2k (ORCPT ); Thu, 10 Sep 2020 16:28:40 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E3D1320BED; Thu, 10 Sep 2020 20:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599769718; bh=cyXH2m9SbRuw7AjC0kYLstZqv7BypKK9aZYMN9yTQBY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WsTM7hlODce3jLyshd/OIuWYBbW5Hl6gkfAQaPzbD1pKZklQmyFakMp/wn4q2jDCT OOkI5U8JXddYLqyGrcZFXIqPzbJuIKkeJ0szKPvWa65u9BDMmPS2w88TxbL4rxTlk2 nLIO5y0zyPGgsWLXf+Abz4t+xek4YXNDj+3M36yA= Date: Thu, 10 Sep 2020 13:28:35 -0700 From: Jakub Kicinski To: Oded Gabbay Cc: "Linux-Kernel@Vger. Kernel. Org" , netdev@vger.kernel.org, SW_Drivers , Greg Kroah-Hartman , "David S. Miller" Subject: Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver Message-ID: <20200910132835.1bf7b638@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20200910161126.30948-1-oded.gabbay@gmail.com> <20200910130112.1f6bd9e9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: > On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.h > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_dcbnl.c > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_debugfs.c > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_ethtool.c > > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_phy.c > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_masks.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_masks.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxb_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_masks.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_stat_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_tmr_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_masks.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_masks.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm0_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm1_regs.h > > > create mode 100644 drivers/misc/habanalabs/include/hw_ip/nic/nic_general.h > > > > The relevant code needs to live under drivers/net/(ethernet/). > > For one thing our automation won't trigger for drivers in random > > (/misc) part of the tree. > > Can you please elaborate on how to do this with a single driver that > is already in misc ? > As I mentioned in the cover letter, we are not developing a > stand-alone NIC. We have a deep-learning accelerator with a NIC > interface. > Therefore, we don't have a separate PCI physical function for the NIC > and I can't have a second driver registering to it. Is it not possible to move the files and still build them into a single module? > We did this design based on existing examples in the kernel > (registering to netdev), such as (just a few examples): > 1. sgi-xp driver in drivers/misc/sgi-xp (see file xpnet.c) > 2. bnx2fc in drivers/scsi/bnx2fc > > Thanks, > Oded