linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James Smart <jsmart2021@gmail.com>
Cc: linux-nvme@lists.infradead.org
Subject: Re: [RFC 4/6] nvme: Add t_flags and pi_blkszs ctrl and ops attributes
Date: Tue, 21 Apr 2020 11:10:47 -0700	[thread overview]
Message-ID: <20200421181047.GD31265@infradead.org> (raw)
In-Reply-To: <20200224184859.20995-5-jsmart2021@gmail.com>

So I like moving the flags to the controller, but I'd just name the field
features.  Can we split any logic changes in the PI setup into a separate
patch or multiple patches (the pi_blksz is probably another one, and we
should only add that with an actual user).  Also please follow the normal
comment style.

> +	NVME_F_FABRICS			= 1 << 0,
> +	NVME_F_PCI_P2PDMA		= 1 << 1,
> +
> +	/* Metadata requires use of a separate blk_integrity_rq buffer */
> +	NVME_F_METADATA_SUPPORTED	= 1 << 8,
> +
> +	/*
> +	 * The PI types supported by the host transport, if it participates
> +	 * in PI checking or can insert/strip PI on behalf of the OS.
> +	 */
> +	NVME_F_PI_TYPE_MASK		= 0x7 << 9,
> +	NVME_F_PI_TYPE1_PROTECTION	= 1 << 9,
> +	NVME_F_PI_TYPE2_PROTECTION	= 1 << 10,
> +	NVME_F_PI_TYPE3_PROTECTION	= 1 << 11,
> +
> +	/* Indicates that the host transport can insert/strip PI for
> +	 * presentation to the controller. I.E. OS does not have metadata/PI.
> +	 * Transport will insert PI/meta on TX and strip PI/meta on RX.
> +	 * Similar to PRACT=1.
> +	 */
> +	NVME_F_PI_TXINSERT_RXSTRIP	= 1 << 12,

None of the NVME_F_PI_* flags are actually used in this patch, so I
don't think they should be added here.

> +	unsigned int flags;		/* see enum nvme_transport_flags */

And I think we should just initialize them in the controller, and avoid
duplicating them in the flags.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-04-21 18:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 18:48 [RFC 0/6] nvme: core layer metadata/pi support James Smart
2020-02-24 18:48 ` [RFC 1/6] nvme: Add ns to nvme_request struct James Smart
2020-04-21 18:03   ` Christoph Hellwig
2020-02-24 18:48 ` [RFC 2/6] nvme: make nvme_ns_has_pi accessible to transports James Smart
2020-04-21 18:03   ` Christoph Hellwig
2020-02-24 18:48 ` [RFC 3/6] nvme: Introduce max_meta_segments ctrl and ops attribute James Smart
2020-02-25  9:49   ` Max Gurtovoy
2020-04-21 18:04     ` Christoph Hellwig
2020-02-24 18:48 ` [RFC 4/6] nvme: Add t_flags and pi_blkszs ctrl and ops attributes James Smart
2020-04-21 18:10   ` Christoph Hellwig [this message]
2020-02-24 18:48 ` [RFC 5/6] nvme: Add pi_flags to nvme_request for transport pi support James Smart
2020-04-21 18:11   ` Christoph Hellwig
2020-02-24 18:48 ` [RFC 6/6] nvme: Introduce NVME_INLINE_PROT_SG_CNT James Smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200421181047.GD31265@infradead.org \
    --to=hch@infradead.org \
    --cc=jsmart2021@gmail.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).