From owner-freebsd-scsi@freebsd.org Tue Apr 4 20:48:02 2017 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC209D2F2F9 for ; Tue, 4 Apr 2017 20:48:02 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94704BEE for ; Tue, 4 Apr 2017 20:48:02 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: by mail-yw0-x22b.google.com with SMTP id i203so67684344ywc.3 for ; Tue, 04 Apr 2017 13:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuffli-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yRcnwILIwttSwRVU08tSiqijk2PGDDBVG5hcyvzje98=; b=q+NQWOrrpXgRPeKT3/K3UnnByevQWXCZ/7eLM28s5X+84EZPtNWxVV3UyhyquieBbJ 0LoCytTsSzI78t8uujcPIeYHuwIrDoaexLDalhm+xopTPQ21pGxMi6T0zLHwgg0J7K+R nibFxydyImBqzrENBaV2bHr6hh1Jtvx0Mz+J8M7c21fRzfFMuqcU8StKV0HhxNdhD2g3 +wMNHAtXTalX6JVwBh/AESN+x6JNHRX8bbNRmaHu276vBZgUKgl5ug5H9FIlo/OtFtNB 8HcxqlGKezzIgDi9dmOCPdTDp+mXQrH9bUpx8Gtllu4SARnmOFDXdfzD8tPwD8W9NNJ1 zMxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yRcnwILIwttSwRVU08tSiqijk2PGDDBVG5hcyvzje98=; b=NtZ6kgcE5bOyxDb0bkqFBLrVmFhZz2j+UhRvS2QDZwgj2lMlgZh98Z6VofXKb3ObXR 8WHjAB0sJTVfQ1HVLYKdAGZiSDzlD6dHDtlafJb6BD1Ho2IITbs2ewy8XY7U2hWfQ9eY 3nH91LvB7HKmF9ZRhS5WG7Qaosh7LMDdItvNO3myVMm23Q31KNakzubJjhOrUjzCzh+h 51ign42h0bSaz6WqM2QsHrh7fX247h2rnwAw44UTsbLqDWlXMttIJ6bqWshgKBeUtYav dPRUGjPEiYCQw6EqT5zuEwZL7KmELuoZQmunXac/L2JIRvjhz8bzToi8M7mZNIFl+UQc dj6Q== X-Gm-Message-State: AFeK/H3E52fwuG3SwKbmftJi4yYfC3YeiOMq0Qnm0psG6vnA+SpDb3Lm5iq1sY9SkIK8Pje73pXkbYMhMYGR0Q== X-Received: by 10.129.172.79 with SMTP id z15mr15441362ywj.255.1491338881403; Tue, 04 Apr 2017 13:48:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.167.65 with HTTP; Tue, 4 Apr 2017 13:48:00 -0700 (PDT) In-Reply-To: References: From: Chuck Tuffli Date: Tue, 4 Apr 2017 13:48:00 -0700 Message-ID: Subject: Re: [RFC] CAM pass(4) patch for NVMe To: Warner Losh Cc: freebsd-scsi Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2017 20:48:02 -0000 On Tue, Apr 4, 2017 at 11:13 AM, Warner Losh wrote: ... > Fair Enough. I'd thought 0xffff was the magic number :). However, you > raise a good point. > > Grep tells me all the xflags are actually unused. So we could use it, > but after chatting with Scott Long, I'm not sure that we should. > > However, I think Jim's idea of having a separate command for commands > for the I/O queue and commands for the admin queue might be the better > part of valor here. I'd initially read Jim's mail as use #defines for > the xflags values, but that's not at all what he was saying. > > The code change would be a bit bigger, but not by a lot. It's super > easy to add new XPT_ function code. OK, I'll head down that path and add a new XPT opcode XPT_NVME_ADMIN and helper macro cam_fill_nvmeadmin() which would be used for Admin commands. The existing XPT_NVME_IO would be used for NVM/IO commands. Both opcodes would use the ccb_nvmeio structure unless there are objections .... ? --chuck