Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1430212pxv; Fri, 23 Jul 2021 08:10:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWAw76VFoRK2RkeUMu+8XKVHsVhRhQL1YkfnlphEDm3HrHK7K1cvplD81s5oA/YpWacs9L X-Received: by 2002:aa7:c04e:: with SMTP id k14mr6003521edo.193.1627053002503; Fri, 23 Jul 2021 08:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627053002; cv=none; d=google.com; s=arc-20160816; b=DZKfK+GsPVeYv1HZvfkC+KVkelhaHXZVIwvIIyfrixHt+38dY2wkJW1wuUXQ5IBrjV BBaL3RBWR3J+EXlvtGRzBECamHx+KKPc7z3VsRlhgCELBwIqM239BGvUdDzT246IggQu DHuSjmKokd4OPfpHKYdTkBdVUqMV/HM1shgbJi4zpaXWFVezbwJcgGMDNE4sj1cXwdB4 011tAicE/Oywx+FhyPeVZghMmEVL6FAm/0YysnGJgo67DGu4jIHpaj52L/+bu1HJPCNQ TABLzFWebzwLwl68ZHOQC1bHMtXnksGKBpz3jygJkDMmPWWXGrWy2KjhM6QaM4b3Smj4 XQXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1IIJAihavKYSOTbbxlbfcwmBbTgQIn5q0R+uu8fCbwQ=; b=z2rLFljBWhUCBQui5u06CjETdQzPXylpOmfMNw/BJ586FvJEu0SvZjFbiMTP6R049t u4M5JafMcJqJEZ7KQZpQjlv8W6gCu2Rw0cIMXVo4rEr76Io3d51ZAQPXDc+1zWtVrJDM fdJ/ez7cEjCumWZqDhwW0v2jf3/s8EVAUxYtjYRz5ctlq2p0BmLYcXu0Y0rkcVg5R72a Hp+jqmFtl3c73ktt+sHWPBJj77c+OAuBZ9BED/0QvSsZppxQ+V8exmvPlpfXk0oCb4X0 oX2/qTjGm3vkhe23N6pl0sXsmDXr5rUY5aw+nlN2EmONL3xAscrBZdxooOE3j+cchGyV xUZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RwE3xnBU; 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 mp17si11870744ejc.449.2021.07.23.08.09.38; Fri, 23 Jul 2021 08:10:02 -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=k20201202 header.b=RwE3xnBU; 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 S235494AbhGWO1f (ORCPT + 99 others); Fri, 23 Jul 2021 10:27:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:34272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbhGWO1f (ORCPT ); Fri, 23 Jul 2021 10:27:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E875260EBC; Fri, 23 Jul 2021 15:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627052888; bh=QgDjEfpuy0APKmZWIXq1ynq1Oo4VifnevoiZPA+uy8k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RwE3xnBUH4mgZomNTeTmUIFAb9P0s4pApOLRObsCuXTi+kB88S6MNGykFqwhpjaqm NEGfDAB2i9Cz9RPXI4Wd5uGVSkS3HCSxkKGj4itwAYz9Ayd57kGv+h1pbRy0RWBrR0 CeI8nWoE8OPm8pFKt/PhdveXblQifatUqUSszKSDEoPJCkMETXItZyCU4LgpGvrq92 YBUihj5oR9hg+tAVJOZy5AnKGjGAkSj4ROnL7ObIkc4++nkh3NN9VUc5+RcVQ29p5O AoMZPKYjQqx169nTUvpidCqL5Yhn7XS6DV8pmbcQe98bYptRBbxdmX10GTWIpAiDwa vmYoucGbHqbbg== Date: Fri, 23 Jul 2021 08:08:06 -0700 From: Keith Busch To: Wedson Almeida Filho Cc: Matthew Wilcox , Finn Behrens , Greg Kroah-Hartman , Miguel Ojeda , Christoph Hellwig , Miguel Ojeda , Linus Torvalds , rust-for-linux , Linux Kbuild mailing list , Linux Doc Mailing List , linux-kernel Subject: Re: [PATCH 00/17] Rust support Message-ID: <20210723150806.GA2021417@dhcp-10-100-145-180.wdc.com> References: <20210704202756.29107-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 11:55:58PM +0100, Wedson Almeida Filho wrote: > On Thu, Jul 08, 2021 at 01:58:32AM +0100, Matthew Wilcox wrote: > > A simple NVMe driver is less than a thousand lines of C. > > I know the one in the kernel now is ridiculously complicated and has > > been thoroughly messed up with abstractions to support NVMeoF instead > > of having a separate driver, but it's really a simple interface at heart. > > The latest NVMe spec is 452 pages long, which seems to contradict your claim > that it's simple. In any case, translating less than 1K lines of C shouldn't be > too hard (after I've built the abstractions, of course). Would you mind sharing > the simple driver you mention above? You can use the 1.0 spec, which is much shorter. A 1.0 capable driver should be forward compatible with newer devices, too. The current nvme driver became less simple since blk-mq integration and has only gotten more complicated since then with other transports and more advanced features. For a simpler example, you can reference an in kernel version <= 3.16, and ignore the "nvme-scsi" parts.