ctl_frontend_iscsi.c (265497) | ctl_frontend_iscsi.c (265501) |
---|---|
1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 265497 2014-05-07 06:34:03Z trasz $ | 29 * $FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 265501 2014-05-07 06:46:59Z trasz $ |
30 */ 31 32/* 33 * CTL frontend for the iSCSI protocol. 34 */ 35 36#include <sys/cdefs.h> | 30 */ 31 32/* 33 * CTL frontend for the iSCSI protocol. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 265497 2014-05-07 06:34:03Z trasz $"); | 37__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c 265501 2014-05-07 06:46:59Z trasz $"); |
38 39#include <sys/param.h> 40#include <sys/capability.h> 41#include <sys/condvar.h> 42#include <sys/file.h> 43#include <sys/kernel.h> 44#include <sys/kthread.h> 45#include <sys/lock.h> --- 31 unchanged lines hidden (view full) --- 77 78static MALLOC_DEFINE(M_CFISCSI, "cfiscsi", "Memory used for CTL iSCSI frontend"); 79static uma_zone_t cfiscsi_data_wait_zone; 80 81SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, iscsi, CTLFLAG_RD, 0, 82 "CAM Target Layer iSCSI Frontend"); 83static int debug = 3; 84TUNABLE_INT("kern.cam.ctl.iscsi.debug", &debug); | 38 39#include <sys/param.h> 40#include <sys/capability.h> 41#include <sys/condvar.h> 42#include <sys/file.h> 43#include <sys/kernel.h> 44#include <sys/kthread.h> 45#include <sys/lock.h> --- 31 unchanged lines hidden (view full) --- 77 78static MALLOC_DEFINE(M_CFISCSI, "cfiscsi", "Memory used for CTL iSCSI frontend"); 79static uma_zone_t cfiscsi_data_wait_zone; 80 81SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, iscsi, CTLFLAG_RD, 0, 82 "CAM Target Layer iSCSI Frontend"); 83static int debug = 3; 84TUNABLE_INT("kern.cam.ctl.iscsi.debug", &debug); |
85SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RW, | 85SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, debug, CTLFLAG_RWTUN, |
86 &debug, 1, "Enable debug messages"); 87static int ping_timeout = 5; 88TUNABLE_INT("kern.cam.ctl.iscsi.ping_timeout", &ping_timeout); | 86 &debug, 1, "Enable debug messages"); 87static int ping_timeout = 5; 88TUNABLE_INT("kern.cam.ctl.iscsi.ping_timeout", &ping_timeout); |
89SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RW, | 89SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, ping_timeout, CTLFLAG_RWTUN, |
90 &ping_timeout, 5, "Interval between ping (NOP-Out) requests, in seconds"); 91static int login_timeout = 60; 92TUNABLE_INT("kern.cam.ctl.iscsi.login_timeout", &login_timeout); | 90 &ping_timeout, 5, "Interval between ping (NOP-Out) requests, in seconds"); 91static int login_timeout = 60; 92TUNABLE_INT("kern.cam.ctl.iscsi.login_timeout", &login_timeout); |
93SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, login_timeout, CTLFLAG_RW, | 93SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, login_timeout, CTLFLAG_RWTUN, |
94 &login_timeout, 60, "Time to wait for ctld(8) to finish Login Phase, in seconds"); 95static int maxcmdsn_delta = 256; 96TUNABLE_INT("kern.cam.ctl.iscsi.maxcmdsn_delta", &maxcmdsn_delta); | 94 &login_timeout, 60, "Time to wait for ctld(8) to finish Login Phase, in seconds"); 95static int maxcmdsn_delta = 256; 96TUNABLE_INT("kern.cam.ctl.iscsi.maxcmdsn_delta", &maxcmdsn_delta); |
97SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxcmdsn_delta, CTLFLAG_RW, | 97SYSCTL_INT(_kern_cam_ctl_iscsi, OID_AUTO, maxcmdsn_delta, CTLFLAG_RWTUN, |
98 &maxcmdsn_delta, 256, "Number of commands the initiator can send " 99 "without confirmation"); 100 101#define CFISCSI_DEBUG(X, ...) \ 102 if (debug > 1) { \ 103 printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ 104 } while (0) 105 --- 2682 unchanged lines hidden --- | 98 &maxcmdsn_delta, 256, "Number of commands the initiator can send " 99 "without confirmation"); 100 101#define CFISCSI_DEBUG(X, ...) \ 102 if (debug > 1) { \ 103 printf("%s: " X "\n", __func__, ## __VA_ARGS__);\ 104 } while (0) 105 --- 2682 unchanged lines hidden --- |