From owner-freebsd-infiniband@freebsd.org Tue Aug 16 20:32:08 2016 Return-Path: Delivered-To: freebsd-infiniband@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 033A4BBB00D for ; Tue, 16 Aug 2016 20:32:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 C32E71454 for ; Tue, 16 Aug 2016 20:32:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3DC911FE022; Tue, 16 Aug 2016 22:32:05 +0200 (CEST) Subject: Re: Set non blocking on /dev/rdma_cm To: Alex Bowden , "freebsd-infiniband@freebsd.org" References: From: Hans Petter Selasky Message-ID: <3a373d74-9822-ed46-2788-fbc8d169a8a6@selasky.org> Date: Tue, 16 Aug 2016 22:36:33 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-infiniband@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Infiniband on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2016 20:32:08 -0000 On 08/16/16 22:23, Alex Bowden wrote: > Hi all, > > > I've modified rping to set O_NONBLOCKING on /dev/rdma_cm on the event channel (rdma_create_event_channel) which fails like this: > > > 9997 rping CALL openat(AT_FDCWD,0x800a42708,0x100002,0) > 9997 rping NAMI "/dev/rdma_cm" > 9997 rping RET openat 3 > ..snip.. > > 9997 rping CALL fcntl(0x3,F_SETFL,0x6) > 9997 rping RET fcntl -1 errno 25 Inappropriate ioctl for device > > Is this not supported for some reason? This is with the latest OFED v3.2 patches by Hans. Hi Alex, I'll check the code tomorrow. Quick answer: F_SETFL should be translated into FIONBIO and FASYNC ioctls in the FreeBSD kernel. Maybe there is a missing "case FIONBIO: return (0); /* success */" somewhere in the /dev/rdma_cm implementation, because the "fflags" handling is factored out, and only returning success on the IOCTL is required. --HPS