From owner-freebsd-hackers@freebsd.org Wed Jul 1 05:47:44 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAF7836295D for ; Wed, 1 Jul 2020 05:47:44 +0000 (UTC) (envelope-from ekraju@gmail.com) Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xVcc1Jvgz3gL1 for ; Wed, 1 Jul 2020 05:47:43 +0000 (UTC) (envelope-from ekraju@gmail.com) Received: by mail-yb1-xb44.google.com with SMTP id y13so11359607ybj.10 for ; Tue, 30 Jun 2020 22:47:43 -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=fQlxWz0P/ba1ZCC+mWhdlnON4KyNT84ZFX4MQAdtyLU=; b=Hhbfe6/W2E2DVyQQ4bZPV0WNKZJlibT/JQOdYao7vNvYnQYV6olzUsGF+ImQ47blYr xgH3d0b00iX3BPDr7yMbqwkkvTXnaBWKrdm7MwnnhQ49wE7PZg6zTZHDfrkazWWZv+cn VjSU6UvrXVcE/LMP9olS8HzBm7j8UZGF3HMngkAcIiiLVUpgMSHWtovX0RQnga5mkKM5 F54De1slwZxlh2K3zOAKYl4bst4JjQ2xKASgp3tvQ8scmP0/4bJShcRoBaB0bQLErNFb B3Fy4eO37091x+33UwHTcupzsO0CCwxUO6uVhHFWuXeL49bpEJZbALmYurQHIu5QJGLc n77Q== 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=fQlxWz0P/ba1ZCC+mWhdlnON4KyNT84ZFX4MQAdtyLU=; b=I7Pfrjrl6irFG/rnVvXBebA/iG4MbWanSCM6/GgMJ5G5jOHbEeEx3MSlakHbWgUB98 6gCSQj7mcs9eeCUo+uUfPY+WopZi5asmPy4QnWGCIIEcUnxzMFV96J1Stil6SEtXK5a3 vafFaXoV8tMh0qzDiH4RA8BIHF4AC9ip4hQP67w3zVp01ysyKCrlMyv/7++SVYxw9q8Q sHbp4KkVHv2VpAUbxGyMrl6GVVK2EZnS28XBsY20o3JBD22lr+A+M0LkexF4VN5jj3zm X+nf5kmZXjjPMznxImZlk9iS7ZA99E1WHYE5wSccflVgCMPEx1YYNw6eY+/bYriEwgZI Ky6Q== X-Gm-Message-State: AOAM532usEuomGkxnWm0jSbAriYvJGUDCJ2Y4Tg93+cb36WSwD+rlrA7 bxtRpr97v5KNOmkrl/0CL8uCVRwfwIxctB4NHqx1qdPA X-Google-Smtp-Source: ABdhPJxSxCxQuMMkAdDb1N/aWzSxUDk574BiUrR8nRMDzzFTUuTNOhtmyAYbudnGjIGXOonFxlPjz15HyCX4T93DwEA= X-Received: by 2002:a25:1f55:: with SMTP id f82mr41134205ybf.103.1593582463280; Tue, 30 Jun 2020 22:47:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Krishnamraju Eraparaju Date: Wed, 1 Jul 2020 11:17:32 +0530 Message-ID: Subject: Re: how to set up a nvme target over RAMDISK backend To: Chuck Tuffli Cc: FreeBSD Hackers X-Rspamd-Queue-Id: 49xVcc1Jvgz3gL1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Hhbfe6/W; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ekraju@gmail.com designates 2607:f8b0:4864:20::b44 as permitted sender) smtp.mailfrom=ekraju@gmail.com X-Spamd-Result: default: False [-2.78 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.980]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_LONG(-1.01)[-1.013]; NEURAL_SPAM_SHORT(0.22)[0.216]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b44:from]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 05:47:45 -0000 Thank you very much Chuck! Will try bhyve alternative... On Tue, Jun 30, 2020 at 11:41 PM Chuck Tuffli wrote: > On Thu, Jun 25, 2020 at 9:01 PM Krishnamraju Eraparaju > wrote: > >> Hi All, >> >> >> Could someone please help me in setting up a nvme target over RAMDISK >> backend(or any pseudo disk). >> >> Equivalent in Linux would be as below: >> >> modprobe null_blk >> modprobe nvmet >> modprobe nvmet_rdma >> >> >> mkdir /sys/kernel/config/nvmet/subsystems/nvme-ram0 >> mkdir /sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1 >> >> echo -n /dev/ram1 >> >/sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1/device_path >> echo 1 > /sys/kernel/config/nvmet/subsystems/nvme-ram0/attr_allow_any_host >> echo 1 > /sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1/enable >> > > FreeBSD doesn't have a direct equivalent of this. It does support NVMe > device emulation in bhyve, but based on loading RDMA drivers above, I'm > guessing this won't meet your needs. Another option would be to use the > nvmf_tgt provided in SPDK (https://spdk.io/). This would give you the > similar functionality to the Linux NVMe target and supports multiple > transports including RoCE. > > --chuck >