All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org
Cc: Mike Christie <michael.christie@oracle.com>
Subject: [PATCH 5/5] scsi: target: Export fabric driver direct submit settings
Date: Mon, 10 Jul 2023 16:44:42 -0500	[thread overview]
Message-ID: <20230710214442.6718-6-michael.christie@oracle.com> (raw)
In-Reply-To: <20230710214442.6718-1-michael.christie@oracle.com>

This exports the fabric driver's direct submit settings, so users know
what the driver supports. It will be helpful when they are exporting
a device through different targets and one doesn't support direct
submission.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 drivers/target/target_core_fabric_configfs.c | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
index b7c637644cd4..6fd6a9135dca 100644
--- a/drivers/target/target_core_fabric_configfs.c
+++ b/drivers/target/target_core_fabric_configfs.c
@@ -1065,8 +1065,30 @@ target_fabric_wwn_cmd_completion_affinity_store(struct config_item *item,
 }
 CONFIGFS_ATTR(target_fabric_wwn_, cmd_completion_affinity);
 
+static ssize_t
+target_fabric_wwn_default_to_direct_submit_show(struct config_item *item,
+						char *page)
+{
+	struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
+					  param_group);
+	return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->default_direct_submit);
+}
+CONFIGFS_ATTR_RO(target_fabric_wwn_, default_to_direct_submit);
+
+static ssize_t
+target_fabric_wwn_direct_submit_supported_show(struct config_item *item,
+					       char *page)
+{
+	struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
+					  param_group);
+	return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->direct_submit_supp);
+}
+CONFIGFS_ATTR_RO(target_fabric_wwn_, direct_submit_supported);
+
 static struct configfs_attribute *target_fabric_wwn_param_attrs[] = {
 	&target_fabric_wwn_attr_cmd_completion_affinity,
+	&target_fabric_wwn_attr_default_to_direct_submit,
+	&target_fabric_wwn_attr_direct_submit_supported,
 	NULL,
 };
 
-- 
2.34.1


  parent reply	other threads:[~2023-07-10 21:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 21:44 [PATCH 0/5] scsi: target: Allow userspace to config cmd submission Mike Christie
2023-07-10 21:44 ` [PATCH 1/5] scsi: target: Make write_pending_must_be_called a bit field Mike Christie
2023-07-10 21:44 ` [PATCH 2/5] scsi: target: Have drivers report if they support direct submissions Mike Christie
2023-07-10 21:44 ` [PATCH 3/5] scsi: target: Allow userspace to request " Mike Christie
2023-07-10 21:44 ` [PATCH 4/5] scsi: target: Unexport target_queue_submission Mike Christie
2023-07-10 21:44 ` Mike Christie [this message]
2023-07-13 13:06   ` [PATCH 5/5] scsi: target: Export fabric driver direct submit settings Konstantin Shelekhin
2023-07-13 15:50     ` Mike Christie

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=20230710214442.6718-6-michael.christie@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.