From owner-freebsd-stable@freebsd.org Fri Sep 22 07:16:00 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 521BAE1B707 for ; Fri, 22 Sep 2017 07:16:00 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC1358158C for ; Fri, 22 Sep 2017 07:15:59 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id v109so214549wrc.1 for ; Fri, 22 Sep 2017 00:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+P0+2CXTKiPrHXu4zn28M/Q10jAw+VBFcZHAQNrqgIY=; b=hSsOxDt1LtH+3Gofqui6P2RjVh7xhDJfjbZdqkSz0keFYJEGa75lc4JGZXBizUMMld NEeRlPP+roMnbawN9GZC+THeEZcT3C6k91LzGY/5vwFqN4OVUQTQ4e39aXDtV2b/GnV4 nkRPT8L2vZlxmWjYs45IBOFCdYpFt3575kCLzHgDN2l9W/2OOgOMTLTIt2O/J66pRqmb sS8e2zZ4E9VneEp6shnqt3XugObdPXFHm9mShB+igllegtxvXe44q40YtD64g+3D9jVX vhyEoFLORufF/4d3BKB+02C8wzjw2JHUBlRCZm6Pi7FxhytA74iYSb4I2KVDTbESVABB Hycg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=+P0+2CXTKiPrHXu4zn28M/Q10jAw+VBFcZHAQNrqgIY=; b=d7CqLU0km9v+hPGIdc5sEYY5S26ah9JRQG0m0GtxEM1+Oy0dQ+4nuxDWCkhwPdt9nX E1kzqmIjg3k6yfdQ94yXMByCLmVI7o9JRWKn7Y0CNFYLmaNUKpTqGzvT3ogj/QDfK11H pFS8RJIy+CEcCFNUXmryMX/bbWcdurrx06hiPbP1zG5cCMe625E1CaJ6MkvENbULgUYe MJt4dnHNMFiCrW1uiyLXSzUCF72/bHQLdOGxrI5Pf1SfJ7QhMAHkPf/TWrfABA/LtWFE pP7E2Z9BLJClzdb9WgnkA89QVNQTLu2SNK5oKXxTUYTFvLPP0XrxVf6ah0AwrYHnk3HK oopQ== X-Gm-Message-State: AHPjjUgefXid1dL9K7siBCCBLHi0BfWFbu1sThWDcqsoN3AQE270vP3q pqTZ9R4HXijWdWp8xL5Ylz1oTw== X-Google-Smtp-Source: AOwi7QCO1RtGrNy2GIPL7JRu3/PYn32Eb1HiK1SROnxXW73gZTeuEzfnyU1L1RkV/9RTdm/pzA5uAQ== X-Received: by 10.223.170.202 with SMTP id i10mr4341006wrc.232.1506064558051; Fri, 22 Sep 2017 00:15:58 -0700 (PDT) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id 69sm4299212wmp.11.2017.09.22.00.15.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 00:15:56 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 22 Sep 2017 08:15:54 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: "Eugene M. Zheganin" Cc: freebsd-stable@freebsd.org Subject: Re: ctld: only 579 iSCSI targets can be created Message-ID: <20170922071554.GA3846@brick> Mail-Followup-To: "Eugene M. Zheganin" , freebsd-stable@freebsd.org References: <04e8820c2c6cc7a95d6ffdf257f00f7d@norman-vivat.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04e8820c2c6cc7a95d6ffdf257f00f7d@norman-vivat.ru> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 07:16:00 -0000 On 0922T1036, Eugene M. Zheganin wrote: > Hi, > > I have old 11-STABLE as an iSCSI server, but out of the blue I > encountered weird problem: only 579 targets can be created. I mean, I am > fully aware that the out-of-the-box limit is 128 targets, with is > enforced by the CTL_MAX_PORTS define, and I've set it to 1024 (and of > course rebuilt and installed a new kernel), but when I add more that 579 > targets I start to get the protocol errors: > > Sep 22 10:16:48 san1 ctld[8657]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x4 > Sep 22 10:16:48 san1 ctld[8658]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x46 > Sep 22 10:17:31 san1 ctld[8746]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x4 > Sep 22 10:17:31 san1 ctld[8747]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x46 > Sep 22 10:19:58 san1 ctld[9190]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x4 > Sep 22 10:19:58 san1 ctld[9191]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x46 > Sep 22 10:21:33 san1 ctld[9518]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x4 > Sep 22 10:21:33 san1 ctld[9519]: 10.0.3.127 > (iqn.1991-05.com.microsoft:worker296): protocol error: received invalid > opcode 0x46 There are two weird things here. First is that the error is coming from ctld(8) - the userspace daemon, not the kernel. The second is that those invalid opcodes are actually both valid - they are the Text Request, and the Logout Request with Immediate flag set, exectly what you'd expect for a discovery session. Do you have a way to do a packet dump?