From owner-svn-src-head@FreeBSD.ORG Thu Jul 17 21:16:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B06A82EA; Thu, 17 Jul 2014 21:16:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 918782282; Thu, 17 Jul 2014 21:16:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6HLGr7V002661; Thu, 17 Jul 2014 21:16:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6HLGqXE002653; Thu, 17 Jul 2014 21:16:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407172116.s6HLGqXE002653@svn.freebsd.org> From: Alexander Motin Date: Thu, 17 Jul 2014 21:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268808 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2014 21:16:53 -0000 Author: mav Date: Thu Jul 17 21:16:52 2014 New Revision: 268808 URL: http://svnweb.freebsd.org/changeset/base/268808 Log: Increase maximal number of SCSI ports in CTL from 32 to 128. After I gave each iSCSI target its own port, the old limit appeared to be not so big. This change almost proportionally increases per-LUN memory use, but it is still three times better then it was before r268807. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_ioctl.h head/sys/cam/ctl/ctl_private.h head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Jul 17 20:28:51 2014 (r268807) +++ head/sys/cam/ctl/ctl.c Thu Jul 17 21:16:52 2014 (r268808) @@ -8208,8 +8208,7 @@ ctl_pro_preempt(struct ctl_softc *softc, && lun->res_type != SPR_TYPE_EX_AC_AR) lun->pr_res_idx = residx; else - lun->pr_res_idx = - CTL_PR_ALL_REGISTRANTS; + lun->pr_res_idx = CTL_PR_ALL_REGISTRANTS; persis_io.hdr.nexus = ctsio->io_hdr.nexus; persis_io.hdr.msg_type = CTL_MSG_PERS_ACTION; Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Thu Jul 17 20:28:51 2014 (r268807) +++ head/sys/cam/ctl/ctl_io.h Thu Jul 17 21:16:52 2014 (r268808) @@ -407,7 +407,7 @@ struct ctl_pr_info { ctl_pr_action action; uint8_t sa_res_key[8]; uint8_t res_type; - uint16_t residx; + uint32_t residx; }; struct ctl_ha_msg_hdr { Modified: head/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- head/sys/cam/ctl/ctl_ioctl.h Thu Jul 17 20:28:51 2014 (r268807) +++ head/sys/cam/ctl/ctl_ioctl.h Thu Jul 17 21:16:52 2014 (r268808) @@ -70,7 +70,7 @@ /* * Maximum number of ports registered at one time. */ -#define CTL_MAX_PORTS 32 +#define CTL_MAX_PORTS 128 /* * Maximum number of initiators we support. Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Thu Jul 17 20:28:51 2014 (r268807) +++ head/sys/cam/ctl/ctl_private.h Thu Jul 17 21:16:52 2014 (r268808) @@ -355,8 +355,8 @@ struct ctl_per_res_info { uint8_t registered; }; -#define CTL_PR_ALL_REGISTRANTS 0xFFFF -#define CTL_PR_NO_RESERVATION 0xFFF0 +#define CTL_PR_ALL_REGISTRANTS 0xFFFFFFFF +#define CTL_PR_NO_RESERVATION 0xFFFFFFF0 struct ctl_devid { int len; @@ -398,7 +398,7 @@ struct ctl_lun { struct ctl_per_res_info per_res[2*CTL_MAX_INITIATORS]; unsigned int PRGeneration; int pr_key_count; - uint16_t pr_res_idx; + uint32_t pr_res_idx; uint8_t res_type; uint8_t write_buffer[262144]; struct ctl_devid *lun_devid; Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Thu Jul 17 20:28:51 2014 (r268807) +++ head/sys/cam/ctl/ctl_tpc.c Thu Jul 17 21:16:52 2014 (r268808) @@ -89,7 +89,7 @@ struct tpc_io { struct tpc_list { uint8_t service_action; int init_port; - uint16_t init_idx; + uint32_t init_idx; uint32_t list_id; uint8_t flags; uint8_t *params;