I have QLE2564 (quad port) with portnames: 09:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) 09:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) 0a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) 0a:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) systool -c fc_host -v | grep port_name port_name = "0x15b0024ffaa536f" port_name = "0x115b0024ffaa536f" port_name = "0x215b0024ffaa536f" port_name = "0x315b0024ffaa536f" Same info from targetcli: /qla2xxx> info Fabric module name: qla2xxx ConfigFS path: /sys/kernel/config/target/qla2xxx Allowed WWN types: naa Allowed WWNs list: naa.215b0024ffaa536f, naa.15b0024ffaa536f, naa.315b0024ffaa536f, naa.115b0024ffaa536f Fabric module features: acls Corresponding kernel module: tcm_qla2xxx 2 NAA I have succefully added: naa.115b0024ffaa536f naa.215b0024ffaa536f but other two fails: /qla2xxx> create naa.315b0024ffaa536f WWN not valid as: naa
Hello, What is version of targetcli version used here?. Also can you provide message file when this error is seen. Thanks, -Himanshu
targetcli-2.1.fb43-2.fc25.noarch python3-rtslib-2.1.fb60-2.fc25.noarch I found possible reason and ugly workaround: in package RTSLib file utils.py change REGEXP to validate WWN 'naa': lambda wwn: re.match("naa\.[1235][0-9a-fA-F]{15}$", wwn), but I can't understnad why my QLogic card uses strange port names: 0x15b0024ffaa536f and 0x315b0024ffaa536f and why on quad ports card from port to port changes highest bit in portname
I would not know that part but from drive point of view any valid WWN should be fine.
From rtslib (naa wwn must start with 1 or 2 or 5): def normalize_wwn(wwn_types, wwn): ''' Take a WWN as given by the user and convert it to a standard text representation. Returns (normalized_wwn, wwn_type), or exception if invalid wwn. ''' wwn_test = { 'free': lambda wwn: True, 'iqn': lambda wwn: \ re.match("iqn\.[0-9]{4}-[0-1][0-9]\..*\..*", wwn) \ and not re.search(' ', wwn) \ and not re.search('_', wwn), 'naa': lambda wwn: re.match("naa\.[125][0-9a-fA-F]{15}$", wwn), 'eui': lambda wwn: re.match("eui\.[0-9a-f]{16}$", wwn), 'ib': lambda wwn: re.match("ib\.[0-9a-f]{32}$", wwn), 'unit_serial': lambda wwn: \ re.match("[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$", wwn), } for wwn_type in wwn_types: clean_wwn = _cleanse_wwn(wwn_type, wwn) found_type = wwn_test[wwn_type](clean_wwn) if found_type: break else: raise RTSLibError("WWN not valid as: %s" % ", ".join(wwn_types)) return (clean_wwn, wwn_type)
I've installed another 4-port card and got same issue - port names have variable part at highest bits. On 2-port card port names have variable part at lower bits: port_name = "0x21000024ff3bcb3e" port_name = "0x21000024ff3bcb3f" I'm trying to change a port name in NVRAM with FLASUTIL.EXE with no luck.
(In reply to Anthony from comment #5) > I've installed another 4-port card and got same issue - port names have > variable part at highest bits. On 2-port card port names have variable part > at lower bits: > port_name = "0x21000024ff3bcb3e" > port_name = "0x21000024ff3bcb3f" > I'm trying to change a port name in NVRAM with FLASUTIL.EXE with no luck. Hi Anthony, Can you please attach output of following command from your 4-port card. # lspci -vvv -s <pci_bus_for_each_port> So for example # lspci -vvv -s 09.00.0 and so on for each of the 4 ports of 4-port card. Thanks, Himanshu
Created attachment 255073 [details] Output lspci for 4-port card
I added output in text attachment. By construction this card have 3 PCI-E switches onboard.
(In reply to Anthony from comment #8) > I added output in text attachment. By construction this card have 3 PCI-E > switches onboard. Checking with our hardware/firmware team on what is going on with these cards. Thanks, Himanshu
Problem does not change with kernel updates. Any news about firmware?
This bug is still present on Linux 5.0 root@server:~# systool -c fc_host -v | grep port_name port_name = "0x18b0024ffb7bbf7" port_name = "0x118b0024ffb7bbf7" port_name = "0x218b0024ffb7bbf7" port_name = "0x318b0024ffb7bbf7" So the numbering of the first port swallows the 0 - resulting in a 14 char value. Also port number 4 (0x318...) results in targetcli in a WWN not valid as: naa While changing utils.py REGEXP to re.match("naa\.[1235][0-9a-fA-F]{15}$", wwn) it helps to add the 3rd port it does not solve the problem for the port number 1 (0x18... - which should be 0x018...) lspci -v 0f:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) Subsystem: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (QLE2564 PCI Express to 8Gb FC Quad Channel) Flags: bus master, fast devsel, latency 0, IRQ 102, NUMA node 0 I/O ports at 7000 [size=256] Memory at f7bf0000 (64-bit, non-prefetchable) [size=16K] Memory at f7a00000 (64-bit, non-prefetchable) [size=1M] [virtual] Expansion ROM at f7900000 [disabled] [size=256K] Capabilities: [44] Power Management version 3 Capabilities: [4c] Express Endpoint, MSI 00 Capabilities: [88] MSI: Enable- Count=1/32 Maskable- 64bit+ Capabilities: [98] Vital Product Data Capabilities: [a0] MSI-X: Enable+ Count=32 Masked- Capabilities: [100] Advanced Error Reporting Capabilities: [138] Power Budgeting <?> Kernel driver in use: qla2xxx Kernel modules: qla2xxx