Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651545
| Path | csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 11/18] xen/pvcalls: implement accept command |
| Date | Fri, 26 May 2017 20:20:02 +0200 |
| Message-ID | <tLs0a-Rn-5@gated-at.bofh.it> (permalink) |
| References | <tIZlE-Tg-7@gated-at.bofh.it> <tIZvj-Xm-3@gated-at.bofh.it> <tIZvl-Xm-47@gated-at.bofh.it> |
| X-Original-To | Stefano Stabellini <sstabellini@kernel.org>, xen-devel@lists.xen.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 7bit |
| X-Source-IP | aserv0021.oracle.com [141.146.126.233] |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, jgross@suse.com, Stefano Stabellini <stefano@aporeto.com> |
| X-Original-Date | Fri, 26 May 2017 14:18:07 -0400 |
| X-Original-Message-ID | <bb6fe01c-018c-811b-f728-2abef74cfb75@oracle.com> |
| X-Original-References | <alpine.DEB.2.10.1705191558430.18759@sstabellini-ThinkPad-X260> <1495236179-27776-1-git-send-email-sstabellini@kernel.org> <1495236179-27776-11-git-send-email-sstabellini@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1651545 |
Show key headers only | View raw
> static void __pvcalls_back_accept(struct work_struct *work)
> {
> + struct sockpass_mapping *mappass = container_of(
> + work, struct sockpass_mapping, register_work);
> + struct sock_mapping *map;
> + struct pvcalls_ioworker *iow;
> + struct pvcalls_back_priv *priv;
> + struct xen_pvcalls_response *rsp;
> + struct xen_pvcalls_request *req;
> + void *page = NULL;
> + int notify;
> + int ret = -EINVAL;
> + unsigned long flags;
> +
> + priv = mappass->priv;
> + /* We only need to check the value of "cmd" atomically on read. */
> + spin_lock_irqsave(&mappass->copy_lock, flags);
> + req = &mappass->reqcopy;
> + if (req->cmd != PVCALLS_ACCEPT) {
> + spin_unlock_irqrestore(&mappass->copy_lock, flags);
> + return;
> + }
> + spin_unlock_irqrestore(&mappass->copy_lock, flags);
> +
> + map = kzalloc(sizeof(*map), GFP_KERNEL);
From here on, the code looks almost identical to connect. Can this be
factored out?
-boris
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2 11/18] xen/pvcalls: implement accept command Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-05-26 20:20 +0200 Re: [PATCH v2 11/18] xen/pvcalls: implement accept command Stefano Stabellini <sstabellini@kernel.org> - 2017-06-02 21:30 +0200
csiph-web