aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iser
Commit message (Collapse)AuthorAgeFilesLines
* iser(4): Stop checking for failures from malloc(M_WAITOK)Zhenlei Huang2024-09-031-11/+0
| | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-165-5/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Fix various places which cast a pointer to a uint64_t or vice versa.John Baldwin2022-09-281-1/+1
| | | | | | | GCC warns about the mismatched sizes on 32-bit platforms. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D36752
* iscsi: Fetch limits based on a socket rather than assuming global limits.John Baldwin2022-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | cxgbei needs the ability to return different limits based on the connection (e.g. if the connection is over a T5 adapter or a T6 adapter as well as factoring in the MTU). This change plumbs through the changes in the ioctls without changing any of the backends. The limits callback passed to icl_register now accepts a second socket argument which holds the integer file descriptor. To support ABI compatiblity for old binaries, the callback should return "global" values if the socket fd is zero. The CTL_ISCSI_LIMITS argument used with CTL_ISCSI by ctld(8) now accepts the socket fd in a field that was previously part of a reserved spare field. Old binaries zero this request which results in passing a socket fd of 0 to the limits callback. The ISCSIDREQUEST ioctl no longer returns limits. Instead, iscsid(8) invokes a new ISCSIDLIMITS ioctl after establishing the connection via connect(2). For ABI compat, if the old ISCSIDREQUEST is invoked, the global limits are still fetched (with a socket fd of 0) and returned. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34928
* iscsi: Handle unmapped I/O requests.John Baldwin2022-03-101-0/+24
| | | | | | | | | | | | | | | | | | Don't assume that csio->data_ptr is pointer to a data buffer that can be passed to icl_get_pdu_data and icl_append_data. For unmapped I/O requests, csio->data_ptr is instead a pointer to a struct bio as indicated by CAM_DATA_BIO. To support these requests, add icl_pdu_append_bio and icl_pdu_get_bio methods which pass a pointer to the bio and an offset and length relative to the bio's buffer. Note that only backends supporting unmapped requests need to implement these hooks. Implement simple no-op hooks for the iser backend. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34382
* iser: Fix check for opcodes in iser_conn_pdu_append_data.John Baldwin2022-03-101-2/+4
| | | | | | Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34487
* iser: Remove redundant linuxkpi MODULE_DEPENDKa Ho Ng2021-11-151-1/+0
| | | | | | | | | | Since ibcore depends on linuxkpi, there is no need to pull in the linuxkpi dependency in iser. MFC after: 1 week Sponsored by: The FreeBSD Foundation Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D32977
* ibcore: Declare ib_post_send() and ib_post_recv() arguments constHans Petter Selasky2021-07-122-6/+10
| | | | | | | | | | | | | | | | | | | Since neither ib_post_send() nor ib_post_recv() modify the data structure their second argument points at, declare that argument const. This change makes it necessary to declare the 'bad_wr' argument const too and also to modify all ULPs that call ib_post_send(), ib_post_recv() or ib_post_srq_recv(). This patch does not change any functionality but makes it possible for the compiler to verify whether the ib_post_(send|recv|srq_recv) really do not modify the posted work request. Linux commit: f696bf6d64b195b83ca1bdb7cd33c999c9dcf514 7bb1fafc2f163ad03a2007295bb2f57cfdbfb630 d34ac5cd3a73aacd11009c4fc3ba15d7ea62c411 MFC after: 1 week Reviewed by: kib Sponsored by: Mellanox Technologies // NVIDIA Networking
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Merge ^/head r325999 through r326131.Hans Petter Selasky2017-11-231-3/+8
|\ | | | | | | Notes: svn path=/projects/bsd_rdma_4_9/; revision=326133
| * Make sure the iSCSI I/O limits are set properly so that the ISCSIDSEND IOCTLHans Petter Selasky2017-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values. Else the login PDU will fail when passing the "-r" option to "iscsictl" which means iSCSI over RDMA instead of TCP/IP. Discussed with: np@ and trasz@ Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=326127
| * Make sure all initialized mutexes are destroyed in the iser module,Hans Petter Selasky2017-11-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | else WITNESS will panic. Prefix all mutex names with "iser_" to prevent future WITNESS issues. Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=326058
* | The __internal_mr is freed as part of the protection domain, pd.Hans Petter Selasky2017-11-231-4/+1
| | | | | | | | | | | | | | | | | | | | There is no need to free this mr. This fixes an issue accessing freed memory in ISER. Sponsored by: Mellanox Technologies Notes: svn path=/projects/bsd_rdma_4_9/; revision=326124
* | Update iser backend code to use new ibcore APIs.Hans Petter Selasky2017-11-164-122/+39
|/ | | | | | | Sponsored by: Mellanox Technologies Notes: svn path=/projects/bsd_rdma_4_9/; revision=325891
* Make the iSCSI parameter negotiation more flexible.Navdeep Parhar2016-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | Decouple the send and receive limits on the amount of data in a single iSCSI PDU. MaxRecvDataSegmentLength is declarative, not negotiated, and is direction-specific so there is no reason for both ends to limit themselves to the same min(initiator, target) value in both directions. Allow iSCSI drivers to report their send, receive, first burst, and max burst limits explicitly instead of using hardcoded values or trying to derive all of them from the receive limit (which was the only limit reported by the drivers prior to this change). Display the send and receive limits separately in the userspace iSCSI utilities. Reviewed by: jpaetzel@ (earlier version), trasz@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7279 Notes: svn path=/head/; revision=304787
* Fix build on i386.Edward Tomasz Napierala2016-05-271-3/+5
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300837
* Fix crash on removal of an unconnected iSER session.Edward Tomasz Napierala2016-05-261-0/+3
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300734
* Make iser(4) buildable again by adjusting it for the recent changesEdward Tomasz Napierala2016-05-263-42/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ICL interface. - the ordering of parameters to icl_conn_task_setup is different, so that the "cookie" is last. - the icl_conn_connected() method is gone, replaced by much simpler mechanism. I'd rather keep the ICL interface as small as possible. - I don't really like the s/offload/driver/g. The "tcp" is not a driver; "iser" is not really a driver either. I'd prefer to leave it as it is. - the check for ic_session_type_discovery() in iser_conn_handoff() is gone, as handoff cannot happen for discovery sessions. - ic_session_login_phase() and ic_session_type_discovery() are gone. If you had your handoff method called - you're no longer in either of those. - the way maxtags is passed is different; now it's simply ic->ic_maxtags. It's cleaner, and the old way would cause weird things to happen if fail_on_disconnection=1 and the user changed the maxtags sysctl before reconnecting (basically the CAM idea of maxtags would be different from iSER one). - icl_hba_misc() is gone; declare support for PIM_UNMAPPED by setting ic->ic_unmapped flag. - the way we find the "iser" ICL module is rewritten - we have a flag for icl_register() that says if the module is iSER-capable or not. - icl_conn_release() is gone; iser_conn_release() is called from iser_conn_free() (no functional change in this case) and at the beginning of icl_conn_connect(), to handle reconnection. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300727
* The taskqueue_enqueue_fast() was removed in r296272.Edward Tomasz Napierala2016-05-261-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300724
* Bring in the Mellanox implementation of iSER (iSCSI over RDMA) initiator,Edward Tomasz Napierala2016-05-265-0/+2981
written by Sagi Grimberg <sagig at mellanox.com> and Max Gurtovoy <maxg at mellanox.com>. This code comes from https://github.com/sagigrimberg/iser-freebsd, branch iser-rebase-11-current-r291993. It's not connected to the build just yet; it still needs some tweaks to adapt to my changes to iSCSI infrastructure. Big thanks to Mellanox for their support for FreeBSD! Obtained from: Mellanox Technologies MFC after: 1 month Relnotes: yes Notes: svn path=/head/; revision=300723