Skip to content
Snippets Groups Projects
Commit 29f834a9 authored by James Smart's avatar James Smart Committed by Christoph Hellwig
Browse files

Add fc transport support to nvmetcli


Add fc.json file for example FC configuration.
Small text update for FC in examples/documentation

Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 85bf98b8
No related branches found
No related tags found
No related merge requests found
...@@ -198,6 +198,19 @@ IANA assigned default port for NVMe over Fabrics using RDMA: ...@@ -198,6 +198,19 @@ IANA assigned default port for NVMe over Fabrics using RDMA:
...> create testnqn ...> create testnqn
-------------- --------------
* or create an FC port. traddr is the WWNN/WWPN of the FC port.
--------------
...> cd /ports/
...> create 3
...> cd 3/
...> set addr trtype=fc
...> set addr adrfam=fc
...> set addr traddr=nn-0x1000000044001123:pn-0x2000000055001123
...> set addr trsvcid=none
...> cd subsystems/
...> create testnqn
--------------
* Saving the NVMe Target configuration: * Saving the NVMe Target configuration:
-------------- --------------
./nvmetcli ./nvmetcli
......
...@@ -33,6 +33,12 @@ after you've ensured that the IP address in rdma.json fits your setup: ...@@ -33,6 +33,12 @@ after you've ensured that the IP address in rdma.json fits your setup:
./nvmetcli restore rdma.json ./nvmetcli restore rdma.json
Or to load the fc + no host authentication version do the following
after you've ensured that the port traddr FC address information in
fc.json fits your setup:
./nvmetcli restore fc.json
These files can also be edited directly using your favorite editor. These files can also be edited directly using your favorite editor.
Testing Testing
......
loop.json loop.json
rdma.json rdma.json
fc.json
{
"hosts": [
{
"nqn": "hostnqn"
}
],
"ports": [
{
"addr": {
"adrfam": "fc",
"traddr": "nn-0x1000000044001123:pn-0x2000000055001123",
"treq": "not specified",
"trsvcid": "none",
"trtype": "fc"
},
"portid": 3,
"referrals": [],
"subsystems": [
"testnqn"
]
}
],
"subsystems": [
{
"allowed_hosts": [],
"attr": {
"allow_any_host": "1"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a8",
"path": "/dev/nvme0n1"
},
"enable": 1,
"nsid": 1
}
],
"nqn": "testnqn"
}
]
}
fc.json 0 → 100644
{
"hosts": [
{
"nqn": "hostnqn"
}
],
"ports": [
{
"addr": {
"adrfam": "fc",
"traddr": "nn-0x1000000044001123:pn-0x2000000055001123",
"treq": "not specified",
"trsvcid": "none",
"trtype": "fc"
},
"portid": 3,
"referrals": [],
"subsystems": [
"testnqn"
]
}
],
"subsystems": [
{
"allowed_hosts": [],
"attr": {
"allow_any_host": "1"
},
"namespaces": [
{
"device": {
"nguid": "ef90689c-6c46-d44c-89c1-4067801309a8",
"path": "/dev/nvme0n1"
},
"enable": 1,
"nsid": 1
}
],
"nqn": "testnqn"
}
]
}
...@@ -341,11 +341,11 @@ class UIPortsNode(UINode): ...@@ -341,11 +341,11 @@ class UIPortsNode(UINode):
class UIPortNode(UINode): class UIPortNode(UINode):
ui_desc_addr = { ui_desc_addr = {
'adrfam': ('string', 'Address Family (e.g. ipv4)'), 'adrfam': ('string', 'Address Family (e.g. ipv4 or fc)'),
'treq': ('string', 'Transport Security Requirements'), 'treq': ('string', 'Transport Security Requirements'),
'traddr': ('string', 'Transport Address (e.g. IP Address)'), 'traddr': ('string', 'Transport Address (e.g. IP Address or FC wwnn:wwpn)'),
'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'), 'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'),
'trtype': ('string', 'Transport Type (e.g. rdma or loop)'), 'trtype': ('string', 'Transport Type (e.g. rdma or loop or fc)'),
} }
def __init__(self, parent, cfnode): def __init__(self, parent, cfnode):
...@@ -455,11 +455,11 @@ class UIReferralsNode(UINode): ...@@ -455,11 +455,11 @@ class UIReferralsNode(UINode):
class UIReferralNode(UINode): class UIReferralNode(UINode):
ui_desc_addr = { ui_desc_addr = {
'adrfam': ('string', 'Address Family (e.g. ipv4)'), 'adrfam': ('string', 'Address Family (e.g. ipv4 or fc)'),
'treq': ('string', 'Transport Security Requirements'), 'treq': ('string', 'Transport Security Requirements'),
'traddr': ('string', 'Transport Address (e.g. IP Address)'), 'traddr': ('string', 'Transport Address (e.g. IP Address or FC wwnn:wwpn)'),
'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'), 'trsvcid': ('string', 'Transport Service ID (e.g. IP Port)'),
'trtype': ('string', 'Transport Type (e.g. rdma or loop)'), 'trtype': ('string', 'Transport Type (e.g. rdma or loop or fc)'),
'portid': ('number', 'Port identifier'), 'portid': ('number', 'Port identifier'),
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment