rdma.c (fcf73a804c7d6bbf0ea63531c6122aa363852e04) rdma.c (c7d792f9b8b0502c807ecda57aeb5eac70cc7ab9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * NVMe over Fabrics RDMA target.
4 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
5 */
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
7#include <linux/atomic.h>
8#include <linux/blk-integrity.h>

--- 1986 unchanged lines hidden (view full) ---

1995
1996static u8 nvmet_rdma_get_mdts(const struct nvmet_ctrl *ctrl)
1997{
1998 if (ctrl->pi_support)
1999 return NVMET_RDMA_MAX_METADATA_MDTS;
2000 return NVMET_RDMA_MAX_MDTS;
2001}
2002
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * NVMe over Fabrics RDMA target.
4 * Copyright (c) 2015-2016 HGST, a Western Digital Company.
5 */
6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
7#include <linux/atomic.h>
8#include <linux/blk-integrity.h>

--- 1986 unchanged lines hidden (view full) ---

1995
1996static u8 nvmet_rdma_get_mdts(const struct nvmet_ctrl *ctrl)
1997{
1998 if (ctrl->pi_support)
1999 return NVMET_RDMA_MAX_METADATA_MDTS;
2000 return NVMET_RDMA_MAX_MDTS;
2001}
2002
2003static u16 nvmet_rdma_get_max_queue_size(const struct nvmet_ctrl *ctrl)
2004{
2005 return NVME_RDMA_MAX_QUEUE_SIZE;
2006}
2007
2003static const struct nvmet_fabrics_ops nvmet_rdma_ops = {
2004 .owner = THIS_MODULE,
2005 .type = NVMF_TRTYPE_RDMA,
2006 .msdbd = 1,
2007 .flags = NVMF_KEYED_SGLS | NVMF_METADATA_SUPPORTED,
2008 .add_port = nvmet_rdma_add_port,
2009 .remove_port = nvmet_rdma_remove_port,
2010 .queue_response = nvmet_rdma_queue_response,
2011 .delete_ctrl = nvmet_rdma_delete_ctrl,
2012 .disc_traddr = nvmet_rdma_disc_port_addr,
2013 .get_mdts = nvmet_rdma_get_mdts,
2008static const struct nvmet_fabrics_ops nvmet_rdma_ops = {
2009 .owner = THIS_MODULE,
2010 .type = NVMF_TRTYPE_RDMA,
2011 .msdbd = 1,
2012 .flags = NVMF_KEYED_SGLS | NVMF_METADATA_SUPPORTED,
2013 .add_port = nvmet_rdma_add_port,
2014 .remove_port = nvmet_rdma_remove_port,
2015 .queue_response = nvmet_rdma_queue_response,
2016 .delete_ctrl = nvmet_rdma_delete_ctrl,
2017 .disc_traddr = nvmet_rdma_disc_port_addr,
2018 .get_mdts = nvmet_rdma_get_mdts,
2019 .get_max_queue_size = nvmet_rdma_get_max_queue_size,
2014};
2015
2016static void nvmet_rdma_remove_one(struct ib_device *ib_device, void *client_data)
2017{
2018 struct nvmet_rdma_queue *queue, *tmp;
2019 struct nvmet_rdma_device *ndev;
2020 bool found = false;
2021

--- 68 unchanged lines hidden ---
2020};
2021
2022static void nvmet_rdma_remove_one(struct ib_device *ib_device, void *client_data)
2023{
2024 struct nvmet_rdma_queue *queue, *tmp;
2025 struct nvmet_rdma_device *ndev;
2026 bool found = false;
2027

--- 68 unchanged lines hidden ---