summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <pkushwaha@marvell.com>2021-06-02 21:42:41 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-04 00:11:21 +0300
commitaf527935bd5a3eb88af425a2a973211e06df6423 (patch)
tree99ec5344ac2fa04512e63bd05be54d461cac1a93 /drivers
parent98a5097d1e08f473e2af13bd94e5b4533d51cfd5 (diff)
downloadlinux-af527935bd5a3eb88af425a2a973211e06df6423.tar.xz
nvme-fabrics: Expose nvmf_check_required_opts() globally
nvmf_check_required_opts() is used to check if user provided opts has the required_opts or not. if not, it will log which options are not provided. It can be leveraged by nvme-tcp-offload to check if provided opts are supported by this specific vendor driver or not. So expose nvmf_check_required_opts() globally. Acked-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: Omkar Kulkarni <okulkarni@marvell.com> Signed-off-by: Michal Kalderon <mkalderon@marvell.com> Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Shai Malin <smalin@marvell.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/fabrics.c5
-rw-r--r--drivers/nvme/host/fabrics.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index e1e05aa2fada..ceb263eb50fb 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -860,8 +860,8 @@ out:
return ret;
}
-static int nvmf_check_required_opts(struct nvmf_ctrl_options *opts,
- unsigned int required_opts)
+int nvmf_check_required_opts(struct nvmf_ctrl_options *opts,
+ unsigned int required_opts)
{
if ((opts->mask & required_opts) != required_opts) {
int i;
@@ -879,6 +879,7 @@ static int nvmf_check_required_opts(struct nvmf_ctrl_options *opts,
return 0;
}
+EXPORT_SYMBOL_GPL(nvmf_check_required_opts);
bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
struct nvmf_ctrl_options *opts)
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index ce7fe3a842b1..8399fcc063ef 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -193,5 +193,7 @@ int nvmf_get_address(struct nvme_ctrl *ctrl, char *buf, int size);
bool nvmf_should_reconnect(struct nvme_ctrl *ctrl);
bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
struct nvmf_ctrl_options *opts);
+int nvmf_check_required_opts(struct nvmf_ctrl_options *opts,
+ unsigned int required_opts);
#endif /* _NVME_FABRICS_H */