12 Mar, 2020
2 commits
-
iSCSI session destruction can be arbitrarily slow, since it might require
network operations and serialization inside the SCSI layer. This patch
adds a new user event to trigger the destruction work asynchronously,
releasing the rx_queue_mutex as soon as the operation is queued and before
it is performed. This change allows other operations to run in other
sessions in the meantime, removing one of the major iSCSI bottlenecks for
us.To prevent the session from being used after the destruction request, we
remove it immediately from the sesslist. This simplifies the locking
required during the asynchronous removal.Link: https://lore.kernel.org/r/20200227195945.761719-1-krisman@collabora.com
Co-developed-by: Gabriel Krisman Bertazi
Co-developed-by: Khazhismel Kumykov
Reviewed-by: Lee Duncan
Signed-off-by: Gabriel Krisman Bertazi
Signed-off-by: Frank Mayhar
Signed-off-by: Khazhismel Kumykov
Signed-off-by: Martin K. Petersen -
The current codebase makes use of the zero-length array language extension
to the C90 standard, but the preferred mechanism to declare variable-length
types such as these ones is a flexible array member[1][2], introduced in
C99:struct foo {
int stuff;
struct boo array[];
};By making use of the mechanism above, we will get a compiler warning in
case the flexible array does not occur last in the structure, which will
help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.Also, notice that, dynamic memory allocations won't be affected by this
change:"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")Link: https://lore.kernel.org/r/20200224161406.GA21454@embeddedor
Reviewed-by: Lee Duncan
Reviewed-by: Satish Kharat
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Martin K. Petersen
12 Jul, 2019
1 commit
-
Pull SCSI updates from James Bottomley:
"This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs,
mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the
removal of the osst driver (I heard from Willem privately that he
would like the driver removed because all his test hardware has
failed). Plus number of minor changes, spelling fixes and other
trivia.The big merge conflict this time around is the SPDX licence tags.
Following discussion on linux-next, we believe our version to be more
accurate than the one in the tree, so the resolution is to take our
version for all the SPDX conflicts"Note on the SPDX license tag conversion conflicts: the SCSI tree had
done its own SPDX conversion, which in some cases conflicted with the
treewide ones done by Thomas & co.In almost all cases, the conflicts were purely syntactic: the SCSI tree
used the old-style SPDX tags ("GPL-2.0" and "GPL-2.0+") while the
treewide conversion had used the new-style ones ("GPL-2.0-only" and
"GPL-2.0-or-later").In these cases I picked the new-style one.
In a few cases, the SPDX conversion was actually different, though. As
explained by James above, and in more detail in a pre-pull-request
thread:"The other problem is actually substantive: In the libsas code Luben
Tuikov originally specified gpl 2.0 only by dint of stating:* This file is licensed under GPLv2.
In all the libsas files, but then muddied the water by quoting GPLv2
verbatim (which includes the or later than language). So for these
files Christoph did the conversion to v2 only SPDX tags and Thomas
converted to v2 or later tags"So in those cases, where the spdx tag substantially mattered, I took the
SCSI tree conversion of it, but then also took the opportunity to turn
the old-style "GPL-2.0" into a new-style "GPL-2.0-only" tag.Similarly, when there were whitespace differences or other differences
to the comments around the copyright notices, I took the version from
the SCSI tree as being the more specific conversion.Finally, in the spdx conversions that had no conflicts (because the
treewide ones hadn't been done for those files), I just took the SCSI
tree version as-is, even if it was old-style. The old-style conversions
are perfectly valid, even if the "-only" and "-or-later" versions are
perhaps more descriptive.* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (185 commits)
scsi: qla2xxx: move IO flush to the front of NVME rport unregistration
scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition
scsi: qla2xxx: on session delete, return nvme cmd
scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices
scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1
scsi: megaraid_sas: Introduce various Aero performance modes
scsi: megaraid_sas: Use high IOPS queues based on IO workload
scsi: megaraid_sas: Set affinity for high IOPS reply queues
scsi: megaraid_sas: Enable coalescing for high IOPS queues
scsi: megaraid_sas: Add support for High IOPS queues
scsi: megaraid_sas: Add support for MPI toolbox commands
scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver
scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura
scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD
scsi: megaraid_sas: Handle sequence JBOD map failure at driver level
scsi: megaraid_sas: Don't send FPIO to RL Bypass queue
scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault
scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout
scsi: megaraid_sas: Call disable_irq from process IRQ poll
scsi: megaraid_sas: Remove few debug counters from IO path
...
31 May, 2019
1 commit
-
Based on 3 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more detailsthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] this program is distributed in the hope that
it will be useful but without any warranty without even the implied
warranty of merchantability or fitness for a particular purpose see
the gnu general public license for more detailsthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] this program is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Reviewed-by: Kate Stewart
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
1 commit
-
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen
24 Feb, 2016
1 commit
-
iscsi_port_speed and iscsi_port_speed_names have new entries for
25Gbps and 40Gbps link speeds.Signed-off-by: Jitendra Bhivare
Reviewed-by: Hannes Reinicke
Signed-off-by: Martin K. Petersen
01 Aug, 2014
1 commit
-
When a iscsi nop as ping timedout we were failing with the
common connection error code, ISCSI_ERR_CONN_FAILED. This
patch adds a new error code for this problem so can properly
track/distinguish in userspace.Signed-off-by: Mike Christie
Acked-by: Vikas Chaudhary
Reviewed-by: Hannes Reinecke
Signed-off-by: Christoph Hellwig
20 Dec, 2013
2 commits
-
This attribute specifies the local IP address used to establish connection.
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Add transport_iscsi hooks to get aggregate host statistics.
The statistics include MAC, TCP/IP & iSCSI statistics.Signed-off-by: Lalit Chandivade
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
17 Dec, 2013
2 commits
-
Added support to display and update additional network parameters
through iscsiadm.Signed-off-by: Harish Zunjarrao
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Remove explicit values assignment for net param enums.
Signed-off-by: Harish Zunjarrao
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
25 Oct, 2013
1 commit
-
For offload iSCSI like qla4xxx, CHAP entries are stored in adapter's
flash.
This patch adds support to add/update CHAP entries in adapter's flash
using iscsi tools, like Open-iSCSI.Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Signed-off-by: James Bottomley
24 Aug, 2013
1 commit
-
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
27 Jun, 2013
1 commit
-
This is the kernel part of the modification to extract the net params
from the ibft sysfs to the iface struct used for the connection
request upon sync_session in the open-iscsi util.Three new session sysfs params are defined:
boot_root - holds the name of the /sys/firmware/ibft or iscsi_rootN
boot_nic - holds the ethernetN name
boot_target - holds the targetN nameSigned-off-by: Eddie Wai
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
12 Apr, 2013
2 commits
-
Signed-off-by: Adheer Chandravanshi
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
This patch allows iscsiadm to manage iSCSI target information stored on
adapter flash on per host basis.The sysfs entries will look as cited below:
/sys/bus/iscsi_flashnode/devices/flashnode_sess-:/
/sys/bus/iscsi_flashnode/devices/flashnode_conn-::/Signed-off-by: Adheer Chandravanshi
Signed-off-by: Manish Rangankar
Signed-off-by: Vikas Chaudhary
Signed-off-by: James Bottomley
27 Mar, 2012
2 commits
-
We don't need to pack 'struct iscsi_chap_rec' as buffer is built
locally in the driver and pass to the user-space.Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Defined error codes for ping completion status.
This patch take care of Mike Christie's commets
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
01 Mar, 2012
2 commits
-
Signed-off-by: Mike Christie
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
For offload iSCSI like qla4xxx CHAP entries are stored in FLASH.
This patch adds support to list CHAP entries stored in FLASH and
delete specified CHAP entry from FLASH using iscsi tools.Signed-off-by: Nilesh Javali
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
19 Feb, 2012
3 commits
-
Added ping support for iscsi adapter, application can use this
interface for diagnostic network connection.Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Added support to post kernel host event to application using
netlink interface.Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
sysfs patch to view port_state:
/sys/class/iscsi_host/host*/port_statesysfs patch to view port_speed:
/sys/class/iscsi_host/host*/port_speedSigned-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
20 Oct, 2011
1 commit
-
Userspace was sending the priority/id part of the vlan tag
and sysfs was displaying the id in the vlan file. This
renames the vlan sysfs file to vlan_id to reflect that it
was showing the id and to match the vlan_priority file.
This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command
to relfect that we are sending down the vlan/priority
part of the tag.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
27 Aug, 2011
9 commits
-
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Signed-off-by: Vikas Chaudhary
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley -
Offload drivers like qla4xxx will offload the sending of the login/logout
pdus still, so this patch adds iscsi_conn_login_event which is
used by these types of drivers to notify userspace that the connection
has changed state.It also adds a iscsi_is_session_online helper so the lld
can query the sessions state field.Signed-off-by: Manish Rangankar
Signed-off-by: Lalit Chandivade
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
Add support to set vlan priority and enable/disble a vlan.
Patch based on code from Vikas Chaudhary.
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's host attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
We can replace the iface param mask with the
attr_is_visible callback.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's session attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
A iscsi host can have multiple interfaces. This patch
adds a new iface iscsi class for this. It exports the
network settings now, and will be extended to also
export iscsi initiator port settings like the isid
and initiator name for drivers that can support multiple
initiator ports.Based on patch from Lalit Chandivade.
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
Allows user space (iscsiadm) to send down network configuration
parameters for LLD to set private network configuration on the iSCSI
adapters.Based on patch from Lalit Chandivade.
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
31 Dec, 2010
1 commit
-
This adds a more informative error code and message
for the iscsi scsi eh session drop paths. This allows
you to distinguish if the session was dropped due to
a connection failure vs the iscsi layer dropping
the session due to scsi eh failure processing.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
28 Jul, 2010
1 commit
-
Signed-off-by: Vikas Chaudhary
Signed-off-by: Ravi Anand
Reviewed-by: Mike Christie
Signed-off-by: James Bottomley
05 Dec, 2009
1 commit
-
This implements warm target reset tmf support for
the scsi-ml target reset callback. Previously we would
just drop the session in that callback. This patch will
now try a target reset and if that fails drop the session.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
05 Sep, 2009
1 commit
-
If a target closed the connection, we will detect it in the
state_changed or data_ready callout. This adds a new conn
error value to use for this problem, so it is not confused
with when the initiator throws a conn error and drops
the connection.Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
09 Jun, 2009
1 commit
-
Add ISCSI_NETLINK messages for iSCSI NICs to get information such as
path from userspace. Original iscsid messages are now always sent as
multicast to group 1. The new messages are sent to group 2.The multicast changes were made by Mike Christie.
Signed-off-by: Michael Chan
Signed-off-by: Benjamin Li
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
24 May, 2009
1 commit
-
When we create the tcp/ip connection by calling ep_connect, we currently
just go by the routing table info.I think there are two problems with this.
1. Some drivers do not have access to a routing table. Some drivers like
qla4xxx do not even know about other ports.2. If you have two initiator ports on the same subnet, the user may have
set things up so that session1 was supposed to be run through port1. and
session2 was supposed to be run through port2. It looks like we could
end with both sessions going through one of the ports.Fixes for cxgb3i from Karen Xie.
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley