Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/816716/?format=api
{ "id": 816716, "url": "http://patchwork.ozlabs.org/api/patches/816716/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170921071634.16883-8-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-8-ubraun@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-09-21T07:16:32", "name": "[net,7/9] net/smc: terminate link group if out-of-sync is received", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "cb5b08f152b98ccba3babb03c93ff1b97bcaf1d6", "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-8-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/816716/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/816716/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 3xySbb4DRBz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 17:16:59 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751912AbdIUHQ5 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 03:16:57 -0400", "from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54776 \"EHLO\n\tmx0a-001b2d01.pphosted.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1751786AbdIUHQw (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 03:16:52 -0400", "from pps.filterd (m0098420.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8L7EDoq018540\n\tfor <netdev@vger.kernel.org>; Thu, 21 Sep 2017 03:16:51 -0400", "from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d48cghbmf-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:51 -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:49 +0100", "from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195)\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:46 +0100", "from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60])\n\tby b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8L7GkMo23789662; Thu, 21 Sep 2017 07:16:46 GMT", "from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 402384203F;\n\tThu, 21 Sep 2017 08:12:56 +0100 (BST)", "from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id ED44B42041;\n\tThu, 21 Sep 2017 08:12:55 +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:55 +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 7/9] net/smc: terminate link group if out-of-sync is\n\treceived", "Date": "Thu, 21 Sep 2017 09:16:32 +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-000003DBE3B4", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17092107-0041-0000-0000-000025DD1C6F", "Message-Id": "<20170921071634.16883-8-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=3\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": "An out-of-sync condition can just be detected by the client.\nIf the server receives a CLC DECLINE message indicating an out-of-sync\ncondition for the link groups, the server must clean up the out-of-sync\nlink group.\nThere is no need for an extra third parameter in smc_clc_send_decline().\n\nSigned-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>\n---\n net/smc/af_smc.c | 6 ++----\n net/smc/smc_clc.c | 10 +++++-----\n net/smc/smc_clc.h | 3 +--\n 3 files changed, 8 insertions(+), 11 deletions(-)", "diff": "diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c\nindex 2e8d2dabac0c..745f145d4c4d 100644\n--- a/net/smc/af_smc.c\n+++ b/net/smc/af_smc.c\n@@ -513,7 +513,7 @@ static int smc_connect_rdma(struct smc_sock *smc)\n \t/* RDMA setup failed, switch back to TCP */\n \tsmc->use_fallback = true;\n \tif (reason_code && (reason_code != SMC_CLC_DECL_REPLY)) {\n-\t\trc = smc_clc_send_decline(smc, reason_code, 0);\n+\t\trc = smc_clc_send_decline(smc, reason_code);\n \t\tif (rc < sizeof(struct smc_clc_msg_decline))\n \t\t\tgoto out_err;\n \t}\n@@ -808,8 +808,6 @@ static void smc_listen_work(struct work_struct *work)\n \t\trc = local_contact;\n \t\tif (rc == -ENOMEM)\n \t\t\treason_code = SMC_CLC_DECL_MEM;/* insufficient memory*/\n-\t\telse if (rc == -ENOLINK)\n-\t\t\treason_code = SMC_CLC_DECL_SYNCERR; /* synchr. error */\n \t\tgoto decline_rdma;\n \t}\n \tlink = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK];\n@@ -903,7 +901,7 @@ static void smc_listen_work(struct work_struct *work)\n \tsmc_conn_free(&new_smc->conn);\n \tnew_smc->use_fallback = true;\n \tif (reason_code && (reason_code != SMC_CLC_DECL_REPLY)) {\n-\t\trc = smc_clc_send_decline(new_smc, reason_code, 0);\n+\t\trc = smc_clc_send_decline(new_smc, reason_code);\n \t\tif (rc < sizeof(struct smc_clc_msg_decline))\n \t\t\tgoto out_err;\n \t}\ndiff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c\nindex 3934913ab835..b7dd2743fb5c 100644\n--- a/net/smc/smc_clc.c\n+++ b/net/smc/smc_clc.c\n@@ -95,9 +95,10 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,\n \t}\n \tif (clcm->type == SMC_CLC_DECLINE) {\n \t\treason_code = SMC_CLC_DECL_REPLY;\n-\t\tif (ntohl(((struct smc_clc_msg_decline *)buf)->peer_diagnosis)\n-\t\t\t== SMC_CLC_DECL_SYNCERR)\n+\t\tif (((struct smc_clc_msg_decline *)buf)->hdr.flag) {\n \t\t\tsmc->conn.lgr->sync_err = true;\n+\t\t\tsmc_lgr_terminate(smc->conn.lgr);\n+\t\t}\n \t}\n \n out:\n@@ -105,8 +106,7 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,\n }\n \n /* send CLC DECLINE message across internal TCP socket */\n-int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,\n-\t\t\t u8 out_of_sync)\n+int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info)\n {\n \tstruct smc_clc_msg_decline dclc;\n \tstruct msghdr msg;\n@@ -118,7 +118,7 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,\n \tdclc.hdr.type = SMC_CLC_DECLINE;\n \tdclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline));\n \tdclc.hdr.version = SMC_CLC_V1;\n-\tdclc.hdr.flag = out_of_sync ? 1 : 0;\n+\tdclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0;\n \tmemcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid));\n \tdclc.peer_diagnosis = htonl(peer_diag_info);\n \tmemcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER));\ndiff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h\nindex 13db8ce177c9..1c55414041d4 100644\n--- a/net/smc/smc_clc.h\n+++ b/net/smc/smc_clc.h\n@@ -106,8 +106,7 @@ struct smc_ib_device;\n \n int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,\n \t\t u8 expected_type);\n-int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,\n-\t\t\t u8 out_of_sync);\n+int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info);\n int smc_clc_send_proposal(struct smc_sock *smc, struct smc_ib_device *smcibdev,\n \t\t\t u8 ibport);\n int smc_clc_send_confirm(struct smc_sock *smc);\n", "prefixes": [ "net", "7/9" ] }