From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbdGDH0s (ORCPT ); Tue, 4 Jul 2017 03:26:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:48557 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752067AbdGDH0r (ORCPT ); Tue, 4 Jul 2017 03:26:47 -0400 Subject: Re: [PATCH v6 11/18] xen/pvcalls: implement accept command To: Stefano Stabellini , xen-devel@lists.xen.org Cc: linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, Stefano Stabellini References: <1499116119-15638-1-git-send-email-sstabellini@kernel.org> <1499116119-15638-11-git-send-email-sstabellini@kernel.org> From: Juergen Gross Message-ID: <0e61351f-c27f-6aba-cbd8-b919f3e7fbe3@suse.com> Date: Tue, 4 Jul 2017 09:26:45 +0200 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: <1499116119-15638-11-git-send-email-sstabellini@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/17 23:08, Stefano Stabellini wrote: > Implement the accept command by calling inet_accept. To avoid blocking > in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get > scheduled on sk_data_ready (for a passive socket, it means that there > are connections to accept). > > Use the reqcopy field to store the request. Accept the new socket from > the delayed work function, create a new sock_mapping for it, map > the indexes page and data ring, and reply to the other end. Allocate an > ioworker for the socket. > > Only support one outstanding blocking accept request for every socket at > any time. > > Add a field to sock_mapping to remember the passive socket from which an > active socket was created. > > Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Thanks, Juergen