Messages in this thread | | | From | Logan Gunthorpe <> | Date | Tue, 8 Aug 2017 12:26:23 -0600 | Subject | Re: [PATCH] NTB: ntb_tool: Add full multi-port NTB API support |
| |
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
| |