From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbdHHS01 (ORCPT ); Tue, 8 Aug 2017 14:26:27 -0400 Received: from ale.deltatee.com ([207.54.116.67]:57647 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232AbdHHS00 (ORCPT ); Tue, 8 Aug 2017 14:26:26 -0400 To: Serge Semin , jdmason@kudzu.us, dave.jiang@intel.com, Allen.Hubbe@emc.com, Shyam-sundar.S-k@amd.com, Xiangliang.Yu@amd.com, gary.hook@amd.com Cc: Sergey.Semin@t-platforms.ru, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org References: <20170808101147.24625-1-fancer.lancer@gmail.com> From: Logan Gunthorpe Message-ID: Date: Tue, 8 Aug 2017 12:26:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170808101147.24625-1-fancer.lancer@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Sergey.Semin@t-platforms.ru, gary.hook@amd.com, Xiangliang.Yu@amd.com, Shyam-sundar.S-k@amd.com, Allen.Hubbe@emc.com, dave.jiang@intel.com, jdmason@kudzu.us, fancer.lancer@gmail.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH] NTB: ntb_tool: Add full multi-port NTB API support X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/08/17 04:11 AM, Serge Semin wrote: > +static ssize_t tool_db_event_write(struct file *filep, > + const char __user *ubuf, > + size_t size, loff_t *offp) > +{ > + struct tool_ctx *tc = filep->private_data; > + u64 val; > + int ret; > + > + ret = kstrtou64_from_user(ubuf, size, 0, &val); > + if (ret) > + return ret; > + > + if (wait_event_interruptible(tc->db_wq, ntb_db_read(tc->ntb) == val)) > + return -ERESTART; > + > + return size; > +} Also, I like the fact that we are adding a db_event feature, however this really needs to be a separate commit as it's a completely different feature and not even mentioned in the commit message. There's a few of these instances. Logan