Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/816717/?format=api
{ "id": 816717, "url": "http://patchwork.ozlabs.org/api/patches/816717/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170921071634.16883-10-ubraun@linux.vnet.ibm.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170921071634.16883-10-ubraun@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-09-21T07:16:34", "name": "[net,9/9] net/smc: no close wait in case of process shut down", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0277bb3f00d3f1ffe87165561d2b3841a05bec04", "submitter": { "id": 2266, "url": "http://patchwork.ozlabs.org/api/people/2266/?format=api", "name": "Ursula Braun", "email": "ubraun@linux.vnet.ibm.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170921071634.16883-10-ubraun@linux.vnet.ibm.com/mbox/", "series": [ { "id": 4314, "url": "http://patchwork.ozlabs.org/api/series/4314/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4314", "date": "2017-09-21T07:16:25", "name": "net/smc: bug fixes 2017-09-20", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/4314/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/816717/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/816717/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xySbw495zz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 17:17:16 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751926AbdIUHRO (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 03:17:14 -0400", "from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44686 \"EHLO\n\tmx0a-001b2d01.pphosted.com\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751521AbdIUHQz (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 03:16:55 -0400", "from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8L7EDlN118650\n\tfor <netdev@vger.kernel.org>; Thu, 21 Sep 2017 03:16:54 -0400", "from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d48cx1932-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <netdev@vger.kernel.org>; Thu, 21 Sep 2017 03:16:54 -0400", "from localhost\n\tby e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <netdev@vger.kernel.org> from <ubraun@linux.vnet.ibm.com>;\n\tThu, 21 Sep 2017 08:16:52 +0100", "from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194)\n\tby e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tThu, 21 Sep 2017 08:16:49 +0100", "from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60])\n\tby b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8L7GmuL15007902; Thu, 21 Sep 2017 07:16:49 GMT", "from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id EAD1142041;\n\tThu, 21 Sep 2017 08:12:58 +0100 (BST)", "from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 9C70D4203F;\n\tThu, 21 Sep 2017 08:12:58 +0100 (BST)", "from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9])\n\tby d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS;\n\tThu, 21 Sep 2017 08:12:58 +0100 (BST)" ], "From": "Ursula Braun <ubraun@linux.vnet.ibm.com>", "To": "davem@davemloft.net", "Cc": "netdev@vger.kernel.org, linux-rdma@vger.kernel.org,\n\tlinux-s390@vger.kernel.org, jwi@linux.vnet.ibm.com,\n\tschwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,\n\traspl@linux.vnet.ibm.com, ubraun@linux.vnet.ibm.com", "Subject": "[PATCH net 9/9] net/smc: no close wait in case of process shut down", "Date": "Thu, 21 Sep 2017 09:16:34 +0200", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170921071634.16883-1-ubraun@linux.vnet.ibm.com>", "References": "<20170921071634.16883-1-ubraun@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17092107-0040-0000-0000-000003DBE3B7", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17092107-0041-0000-0000-000025DD1C73", "Message-Id": "<20170921071634.16883-10-ubraun@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-21_01:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709210099", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Usually socket closing is delayed if there is still data available in\nthe send buffer to be transmitted. If a process is killed, the delay\nshould be avoided.\n\nSigned-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>\n---\n net/smc/smc_close.c | 15 ++++++++-------\n 1 file changed, 8 insertions(+), 7 deletions(-)", "diff": "diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c\nindex 5201bc103bd8..f0d16fb825f7 100644\n--- a/net/smc/smc_close.c\n+++ b/net/smc/smc_close.c\n@@ -174,15 +174,15 @@ int smc_close_active(struct smc_sock *smc)\n {\n \tstruct smc_cdc_conn_state_flags *txflags =\n \t\t&smc->conn.local_tx_ctrl.conn_state_flags;\n-\tlong timeout = SMC_MAX_STREAM_WAIT_TIMEOUT;\n \tstruct smc_connection *conn = &smc->conn;\n \tstruct sock *sk = &smc->sk;\n \tint old_state;\n+\tlong timeout;\n \tint rc = 0;\n \n-\tif (sock_flag(sk, SOCK_LINGER) &&\n-\t !(current->flags & PF_EXITING))\n-\t\ttimeout = sk->sk_lingertime;\n+\ttimeout = current->flags & PF_EXITING ?\n+\t\t 0 : sock_flag(sk, SOCK_LINGER) ?\n+\t\t sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;\n \n again:\n \told_state = sk->sk_state;\n@@ -413,13 +413,14 @@ void smc_close_sock_put_work(struct work_struct *work)\n int smc_close_shutdown_write(struct smc_sock *smc)\n {\n \tstruct smc_connection *conn = &smc->conn;\n-\tlong timeout = SMC_MAX_STREAM_WAIT_TIMEOUT;\n \tstruct sock *sk = &smc->sk;\n \tint old_state;\n+\tlong timeout;\n \tint rc = 0;\n \n-\tif (sock_flag(sk, SOCK_LINGER))\n-\t\ttimeout = sk->sk_lingertime;\n+\ttimeout = current->flags & PF_EXITING ?\n+\t\t 0 : sock_flag(sk, SOCK_LINGER) ?\n+\t\t sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;\n \n again:\n \told_state = sk->sk_state;\n", "prefixes": [ "net", "9/9" ] }