nvmet: expose support for fabrics SQ flow control disable in treq
authorSagi Grimberg <sagi@grimberg.me>
Tue, 20 Nov 2018 09:34:19 +0000 (10:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:57 +0000 (22:26 -0700)
Technical Proposal introduces an indication for SQ flow control
disable support. Expose it since we are able to operate in this mode.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/configfs.c
include/linux/nvme.h

index 260a401db01ca1cba030e4e4f925ad2c007cb9fa..db2cb64be7ba3bb7d70ee38675bd0a4a1f5782aa 100644 (file)
@@ -1214,6 +1214,7 @@ static struct config_group *nvmet_ports_make(struct config_group *group,
        port->inline_data_size = -1;    /* < 0 == let the transport choose */
 
        port->disc_addr.portid = cpu_to_le16(portid);
+       port->disc_addr.treq = NVMF_TREQ_DISABLE_SQFLOW;
        config_group_init_type_name(&port->group, name, &nvmet_port_type);
 
        config_group_init_type_name(&port->subsys_group,
index 4fc48071e5eaa6d9cff84f847be0b6c6286e6334..c03973c215ad208037219068f7562fdf24b424e6 100644 (file)
@@ -58,11 +58,13 @@ enum {
 
 /* Transport Requirements codes for Discovery Log Page entry TREQ field */
 enum {
-       NVMF_TREQ_NOT_SPECIFIED = 0,    /* Not specified */
-       NVMF_TREQ_REQUIRED      = 1,    /* Required */
-       NVMF_TREQ_NOT_REQUIRED  = 2,    /* Not Required */
+       NVMF_TREQ_NOT_SPECIFIED = 0,            /* Not specified */
+       NVMF_TREQ_REQUIRED      = 1,            /* Required */
+       NVMF_TREQ_NOT_REQUIRED  = 2,            /* Not Required */
 #define NVME_TREQ_SECURE_CHANNEL_MASK \
        (NVMF_TREQ_REQUIRED | NVMF_TREQ_NOT_REQUIRED)
+
+       NVMF_TREQ_DISABLE_SQFLOW = (1 << 2),    /* Supports SQ flow control disable */
 };
 
 /* RDMA QP Service Type codes for Discovery Log Page entry TSAS