From owner-freebsd-current@freebsd.org Tue Apr 3 07:27:30 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 511AAF897C0 for ; Tue, 3 Apr 2018 07:27:30 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Received: from mail-pl0-x236.google.com (mail-pl0-x236.google.com [IPv6:2607:f8b0:400e:c01::236]) (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 C0F326B1A8 for ; Tue, 3 Apr 2018 07:27:29 +0000 (UTC) (envelope-from maurizio1018@gmail.com) Received: by mail-pl0-x236.google.com with SMTP id u11-v6so7716965plq.1 for ; Tue, 03 Apr 2018 00:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=VkPpLpPx6r9JdQlFdiRtDO0T/ecHTepSHXSAW4iHPgQ=; b=hd4yi6gG47Zfm1iqJWihJhikw63o5ni1tZc1o+0Got5+Zw+GCF+netkn6DTb7p7QVk XlM6g5blgqeTHQl5tZVtLFLFs970a1phNq1Kp549BLGDGHWaoY3tWvoK7TUGVMZtGpPl 5Vk3OCeeTHRT3uDQ+g1eJVPJL9NPZFMlwzY7BjoZ465ycsR7EC4MQn5d8cp8j2wPAJz3 mVzZMg6tJETvhd0llifjnKfPR5kzz3OXyBuNHODK0MEpLw7w4Wk9xfBS6mkTk+y1qf0s +R9aPb6zxwRO3p9jrbNDJe5rbmPNFqCw1B3fOoVrF6cw1f8TvVxyF6+yRcZHd3gKu+yl JQrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VkPpLpPx6r9JdQlFdiRtDO0T/ecHTepSHXSAW4iHPgQ=; b=udY5D1cY7SS38h7UMrkbU6Y91KLEAiHKEeU20BIhw4RSkbnEf195wcDzQ4/Qb5+pZe 6btSffbwV3vcFV/5KTvYss9bt0W9EWMiu8wXmnuwtPolBY83B9iU1eeAqEM3a4mdL3cE wBkOVyMZqrpMxSnIPNBs8A3ipBH68uS5ZkFdbURD4IH6TvmsYZJDH8EidP8Qp5j+COCL pMfcpO7WlZvqiIMNXBFohd/esIPQUX/npEoSmBuElu5w0mOYfcjv/5wIWL5VV051huq/ VA7ugtVpQUtVwa2H8eWunq3t47pbNtmaurSIhS0+NI1YQg5W+B1wYfP+MHpRMg6YAhSy skdg== X-Gm-Message-State: AElRT7E0Lk2yaJSACMETtj/r1QYNg6paSrfZ5kCxb4oKXm6jZ4bzuvO+ bWD8ku9sXWpvgB2CSXBZ9k+zIH7UTfavZ7xDeHXKSQ== X-Google-Smtp-Source: AIpwx4/JM4JBvN+cQyHNqhxdK7RSEi/hYFw7mJ5TA5BJ0Dphn/IP0l8G9CpMYm8kWf/DU2HOzbGcBrrz4R6l6QmumS0= X-Received: by 2002:a17:902:7084:: with SMTP id z4-v6mr13384062plk.395.1522740448397; Tue, 03 Apr 2018 00:27:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.241.196 with HTTP; Tue, 3 Apr 2018 00:27:27 -0700 (PDT) From: Maurizio Vairani Date: Tue, 3 Apr 2018 09:27:27 +0200 Message-ID: Subject: net/isboot-kmod works with net/istgt but not with ctld(8) To: freebsd-current , John Nielsen , Daisuke Aoyama Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 07:27:30 -0000 I am successfully running a diskless TrueOS, a FreeBSD 12-CURRENT derivate, desktop with the net/istgt port installed in a FreeBSD 11-RELEASE server. I am using this setup without any error, but it is a bit slow. I want to test ctld on my server, but when the diskless PC loads the isboot driver it loops with a lot of these error messages: =E2=80=9Csoreceive BHS is not complete, remaining byte(s)=3D48 do login failed soreceive BHS is not complete, remaining byte(s)=3D48 do login failed=E2=80=9D The source code, of the isboot-kmod driver, that prints the error message is: /* BHS */ flags =3D MSG_WAITALL; uio.uio_resid =3D ISCSI_BHS_LEN; error =3D soreceive(sess->so, NULL, &uio, &mp, NULL, &flags); if (error) { ISBOOT_ERROR("soreceive BHS error %d\n", error); return (error); } if (uio.uio_resid !=3D 0) { ISBOOT_ERROR("soreceive BHS is not complete, remaining " "byte(s)=3D%d\n", (int) uio.uio_resid); return (EIO); } source file: iscsi.c, proc: isboot_recv_pdu() The ISCSI_BHS_LEN constant is 48 and seems that no bytes are read. On the server, in /var/log/messages, I can read a lots of messages like: =E2=80=9CMar 28 16:32:39 clover-nas2 ctld[59634]: 192.168.0.164: protocol e= rror: received invalid opcode 0x83 Mar 28 16:32:39 clover-nas2 ctld[40784]: child process 59634 terminated with exit status 1 Mar 28 16:32:40 clover-nas2 ctld[59637]: 192.168.0.164: protocol error: received invalid opcode 0x83 Mar 28 16:32:40 clover-nas2 ctld[40784]: child process 59637 terminated with exit status 1=E2=80=9D The isboot driver send an unrecognized opcode 0x83 to the cltd daemon ..., but I cannot continue, I need some help from the community. :-) Note: the patch for compiling and running isboot-kmod in FreeBSD 12 is at: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226982 Regards, Maurizio