aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iscsi
Commit message (Collapse)AuthorAgeFilesLines
* MFC r278237:Edward Tomasz Napierala2015-05-151-4/+6
| | | | | | | | | | | Don't call callout_drain() with iscsi mutex held; this fixes a warning that was introduced recently. While here, don't try to access is_terminating without lock. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=282955
* MFC r278233:Edward Tomasz Napierala2015-05-151-2/+4
| | | | | | | | | Fix error handling. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=282954
* Merge r263233 from HEAD to stable/10:Robert Watson2015-03-192-2/+2
| | | | | | | | | | | | Update kernel inclusions of capability.h to use capsicum.h instead; some further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h. Sponsored by: Google, Inc. Notes: svn path=/stable/10/; revision=280258
* MFC r274853:Alexander Motin2015-02-191-0/+2
| | | | | | | | | | | | | For both iSCSI initiator and target increase socket buffer sizes before establishing connection. This is a workaround for Chelsio TOE driver, that does not update socket buffer size in hardware after connection established, and unless that is done beforehand, kernel code will stuck, attempting to send/receive full PDU at once. Notes: svn path=/stable/10/; revision=279001
* MFC r278098, r278099: Add some fields and constants from RFC7144.Alexander Motin2015-02-091-2/+16
| | | | Notes: svn path=/stable/10/; revision=278439
* MFC r272765: Remove one second wait for threads exit from icl_conn_close().Alexander Motin2015-01-031-5/+3
| | | | | | | Switch it from polling with pause() to using cv_wait()/cv_signal(). Notes: svn path=/stable/10/; revision=276629
* MFC r274033 (by trasz):Alexander Motin2015-01-031-3/+3
| | | | | | | s/icl_pdu_new/icl_pdu_new_empty/g; no functional changes. Notes: svn path=/stable/10/; revision=276628
* MFC r274036 (by trasz):Alexander Motin2015-01-033-9/+9
| | | | | | | | s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little nicer code. Notes: svn path=/stable/10/; revision=276618
* MFC r275864: Make sequence numbers checks more strict.Alexander Motin2015-01-032-21/+31
| | | | | | | | | | | While we don't support MCS, hole in received sequence numbers may mean only PDU loss. While we don't support lost PDU recovery, terminate the connection to avoid stuck commands. While there, improve handling of sequence numbers wrap after 2^32 PDUs. Notes: svn path=/stable/10/; revision=276613
* MFC r275925: Slightly polish iSCSI parameters negotiation.Alexander Motin2014-12-261-0/+4
| | | | Notes: svn path=/stable/10/; revision=276234
* MFC r274843, r274845:Alexander Motin2014-12-061-52/+69
| | | | | | | | | | | Move icl_pdu_get_data() and xpt_done() out of initiator's session lock. During heavy reads data copying in icl_pdu_get_data() may consume large percent of CPU time. Moving it out of the lock significantly reduces lock hold time and respectively lock congestion on read operations. Notes: svn path=/stable/10/; revision=275559
* MFC r273164:Edward Tomasz Napierala2014-11-151-10/+8
| | | | | | | | | | | | When removing an iSCSI session, check whether all conditions match, not if any of them matches. This fixes "iscsictl -Rn" removing unrelated sessions. PR: 194034 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=274546
* MFC r272812: Make iSCSI connection close somewhat less aggressive.Alexander Motin2014-10-203-24/+5
| | | | | | | | | It allows to push out some final data from the send queue to the socket before its close. In particular, it increases chances for logout response to be delivered to the initiator. Notes: svn path=/stable/10/; revision=273313
* MFC r271395 (by trasz):Alexander Motin2014-10-201-2/+12
| | | | | | | | | | Make sure we handle less than zero timeouts in iSCSI initiator and target in a reasonable way. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=273307
* MFC r270282:Edward Tomasz Napierala2014-08-313-7/+7
| | | | | | | | | Use proper include paths in kernel iSCSI code. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=270891
* MFC r270279:Edward Tomasz Napierala2014-08-313-3/+9
| | | | | | | | | Make the iSCSI stack use __FBSDID() properly. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=270888
* MFC r269197:Edward Tomasz Napierala2014-08-131-1/+4
| | | | | | | Fix potential double free that could happen after connection error. Notes: svn path=/stable/10/; revision=269925
* MFC r267613 (by trasz):Alexander Motin2014-07-242-13/+71
| | | | | | | Implement redirection handling in initiator. Notes: svn path=/stable/10/; revision=269065
* Fix build on stable/10.Alexander Motin2014-07-151-1/+1
| | | | Notes: svn path=/stable/10/; revision=268707
* MFC r268388:Alexander Motin2014-07-151-23/+138
| | | | | | | | | Add XPT_ABORT support to iSCSI initiator. While CAM does not use it normally, it is useful for targets testing. Notes: svn path=/stable/10/; revision=268705
* MFC r268370:Alexander Motin2014-07-151-18/+36
| | | | | | | | Make XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled, but make couple changes to handle non-queued commands too, if happen. Notes: svn path=/stable/10/; revision=268704
* MFC r268326:Alexander Motin2014-07-153-6/+13
| | | | | | | | | | | Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects. Previously ISID was changed every time, that made impossible correct persistent reservation, because reconnected session was identified as completely new one. Notes: svn path=/stable/10/; revision=268703
* MFC r264355 by mav@:Edward Tomasz Napierala2014-05-072-10/+10
| | | | | | | Remove unused val argument value from SYSCTL_INT() calls. Notes: svn path=/stable/10/; revision=265531
* MFC r264549:Edward Tomasz Napierala2014-05-072-12/+24
| | | | | | | | | | | | Make it possible for the initiator side to operate in both proxy and normal mode; this makes it possible to compile with the former by default, but use it only when neccessary. That's especially important for the userland part. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265526
* MFC r264545:Edward Tomasz Napierala2014-05-071-1/+1
| | | | | | | | | Fix typo. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265525
* MFC r264348 by mav@:Edward Tomasz Napierala2014-05-071-13/+32
| | | | | | | | | | | | | | | | | | | | | | Improve use of socket buffer upcalls. Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups until we have enough data to read or space to write. Increase partial receive len from 1K to 128K to not wake up on every received packet. This significantly reduces locks congestion and CPU usage and improves throughput for large I/Os on NICs without TSO and LRO. MFC r264552 by mav@: Close the race in older code, that caused connection stuck after r264348. Sponsored by: iXsystems, Inc. Notes: svn path=/stable/10/; revision=265524
* MFC r264544:Edward Tomasz Napierala2014-05-071-63/+65
| | | | | | | | | | Add kern.iscsi.fail_on_disconnection; this is required for gmultipath to work. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265523
* MFC r264538:Edward Tomasz Napierala2014-05-071-1/+0
| | | | | | | | | Remove useless debug. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265522
* MFC r264537:Edward Tomasz Napierala2014-05-071-1/+4
| | | | | | | | | Be more strict with locking for is_waiting_for_iscsid variable. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265521
* MFC r264536:Edward Tomasz Napierala2014-05-072-31/+0
| | | | | | | | | | Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway, because of ISCSIDFAIL. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265520
* MFC r264530:Edward Tomasz Napierala2014-05-072-4/+7
| | | | | | | | | Properly pass the initiator address when running in proxy mode. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265513
* MFC r264526:Edward Tomasz Napierala2014-05-072-16/+21
| | | | | | | | | | Properly identify target portal when running in proxy mode. While here, remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265509
* MFC r264525:Edward Tomasz Napierala2014-05-071-0/+4
| | | | | | | | | | Add some stuff to make it easier to figure out for the system administrator whether the ICL_KERNEL_PROXY stuff got compiled in correctly. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265508
* MFC r263740:Edward Tomasz Napierala2014-05-072-24/+34
| | | | | | | | | Use a less unusual syntax in debug printfs. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265505
* MFC r264163:Edward Tomasz Napierala2014-05-071-3/+4
| | | | | | | | | Remove hack to pass STAILQ to a function and do it properly instead. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265503
* MFC r264122:Edward Tomasz Napierala2014-05-072-37/+169
| | | | | | | | | | Rework the iSCSI PDU transmit code to avoid lock contention and coalesce PDUs before sending. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265502
* MFC r264110:Edward Tomasz Napierala2014-05-072-9/+9
| | | | | | | | | All the iSCSI sysctls are also tunables; advertise that. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265501
* MFC r264109:Edward Tomasz Napierala2014-05-074-27/+27
| | | | | | | | | We don't need TAILQ for iSCSI PDUs; STAILQ is enough. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265500
* MFC r264026:Edward Tomasz Napierala2014-05-071-4/+1
| | | | | | | | | Enable a KASSERT. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265499
* MFC r264025:Edward Tomasz Napierala2014-05-071-11/+29
| | | | | | | | | | | | | | | Get rid of the "autoscaling", instead just set socket buffer sizes in the usual way. The only thing the old code did was making things less predictable. MFC r264058: Fix build, broken by r264025. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265498
* MFC r264023:Edward Tomasz Napierala2014-05-073-5/+9
| | | | | | | | | | Instead of "icltx" and "iclrx", use thread names with prefix from upper layer, so that one can see which side of the stack the threads are for. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265496
* MFC r264022:Edward Tomasz Napierala2014-05-073-13/+20
| | | | | | | | | | | Get rid of ICL lock; use upper-layer (initiator or target) lock instead. This avoids extra locking in icl_pdu_queue(); the upper layer needs to call it while holding its own lock anyway, to avoid sending PDUs out of order. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265495
* MFC r263743:Edward Tomasz Napierala2014-05-072-0/+10
| | | | | | | | | Move the ic_outstanding_count under #ifdef DIAGNOSTIC. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265488
* MFC r263742:Edward Tomasz Napierala2014-05-071-2/+2
| | | | | | | | | | Fix harmless warning after reconnecting a session and not doing anything with it. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=265487
* MFC r260389:Edward Tomasz Napierala2014-02-111-2/+2
| | | | | | | | | | | | Fix a rare "truncated checksums" problem, which manifested like this: WARNING: icl_pdu_check_data_digest: data digest check failed; got 0xf23b, should be 0xdb7f23b Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=261771
* MFC r260083:Edward Tomasz Napierala2014-02-111-2/+2
| | | | | | | | | | | | | Fix extremely slow operation with data digests enabled. This was caused by receive code waiting for data digest even when the data segment was empty. It didn't actually read it, but it waited until those four bytes become available in the socket buffer, i.e. until any other PDU (e.g. NOP) came in. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=261770
* MFC r259183:Edward Tomasz Napierala2013-12-131-0/+12
| | | | | | | | | | Properly refuse handoff requests on already connected sessions. Previously this would result in dropping the session. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=259306
* MFC r258790:Edward Tomasz Napierala2013-12-041-3/+5
| | | | | | | | | | Fix hang on reboot with active iSCSI connections. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=258915
* MFC r257061:Edward Tomasz Napierala2013-10-291-14/+12
| | | | | | | | | | | | Don't spin with mutex hold when there is not enough room in the send socket buffer. While here, make the code flow somewhat nicer. Thanks to mav@ for tracking it down. Approved by: re (glebius) Notes: svn path=/stable/10/; revision=257339
* Properly handle residual count in Data-In PDUs with S bit set.Edward Tomasz Napierala2013-10-091-12/+33
| | | | | | | | Approved by: re (gjb) Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=256238