Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/815121/?format=api
{ "id": 815121, "url": "http://patchwork.ozlabs.org/api/1.2/patches/815121/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170918191822.65142-6-jwi@linux.vnet.ibm.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20170918191822.65142-6-jwi@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-09-18T19:18:18", "name": "[net-next,5/9] s390/qeth: don't take queue lock in send_packet_fast()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b6a7cc9e192ecb8ccfb9cfb998368bd0d2371f77", "submitter": { "id": 71397, "url": "http://patchwork.ozlabs.org/api/1.2/people/71397/?format=api", "name": "Julian Wiedmann", "email": "jwi@linux.vnet.ibm.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170918191822.65142-6-jwi@linux.vnet.ibm.com/mbox/", "series": [ { "id": 3715, "url": "http://patchwork.ozlabs.org/api/1.2/series/3715/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=3715", "date": "2017-09-18T19:18:13", "name": "s390/qeth: updates 2017-09-18", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3715/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/815121/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/815121/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 3xwwnw0lh8z9s7v\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 05:20:36 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751410AbdIRTUE (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 18 Sep 2017 15:20:04 -0400", "from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39942 \"EHLO\n\tmx0a-001b2d01.pphosted.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1750790AbdIRTUD (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 18 Sep 2017 15:20:03 -0400", "from pps.filterd (m0098417.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8IJK0Ni091173\n\tfor <netdev@vger.kernel.org>; Mon, 18 Sep 2017 15:20:03 -0400", "from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d2ea07b0e-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <netdev@vger.kernel.org>; Mon, 18 Sep 2017 15:20:02 -0400", "from localhost\n\tby e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <netdev@vger.kernel.org> from <jwi@linux.vnet.ibm.com>;\n\tMon, 18 Sep 2017 20:19:27 +0100", "from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196)\n\tby e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tMon, 18 Sep 2017 20:19:24 +0100", "from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com\n\t[9.149.105.232])\n\tby b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8IJJOcd10485982; Mon, 18 Sep 2017 19:19:24 GMT", "from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id B87C052041;\n\tMon, 18 Sep 2017 19:14:24 +0100 (BST)", "from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9])\n\tby d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 7BC445203F; \n\tMon, 18 Sep 2017 19:14:24 +0100 (BST)" ], "From": "Julian Wiedmann <jwi@linux.vnet.ibm.com>", "To": "David Miller <davem@davemloft.net>", "Cc": "<netdev@vger.kernel.org>, <linux-s390@vger.kernel.org>,\n\tMartin Schwidefsky <schwidefsky@de.ibm.com>,\n\tHeiko Carstens <heiko.carstens@de.ibm.com>,\n\tStefan Raspl <raspl@linux.vnet.ibm.com>,\n\tUrsula Braun <ubraun@linux.vnet.ibm.com>,\n\tJulian Wiedmann <jwi@linux.vnet.ibm.com>", "Subject": "[PATCH net-next 5/9] s390/qeth: don't take queue lock in\n\tsend_packet_fast()", "Date": "Mon, 18 Sep 2017 21:18:18 +0200", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170918191822.65142-1-jwi@linux.vnet.ibm.com>", "References": "<20170918191822.65142-1-jwi@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17091819-0008-0000-0000-00000497DBEB", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17091819-0009-0000-0000-00001E2909C9", "Message-Id": "<20170918191822.65142-6-jwi@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-18_08:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\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-1709180272", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Locking the output queue prior to TX is needed on OSA devices,\nto synchronize against a packing flush from the TX completion code\n(via qeth_check_outbound_queue()).\nBut send_packet_fast() is only used for IQDs, which don't do packing.\nSo remove the locking, and apply some easy cleanups.\n\nSigned-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>\nReviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com>\n---\n drivers/s390/net/qeth_core.h | 3 +--\n drivers/s390/net/qeth_core_main.c | 22 +++++-----------------\n drivers/s390/net/qeth_l2_main.c | 2 +-\n drivers/s390/net/qeth_l3_main.c | 4 ++--\n 4 files changed, 9 insertions(+), 22 deletions(-)", "diff": "diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h\nindex e3d3609cd9e7..b7e8531625aa 100644\n--- a/drivers/s390/net/qeth_core.h\n+++ b/drivers/s390/net/qeth_core.h\n@@ -962,8 +962,7 @@ int qeth_get_priority_queue(struct qeth_card *, struct sk_buff *, int, int);\n int qeth_get_elements_no(struct qeth_card *card, struct sk_buff *skb,\n \t\t\t int extra_elems, int data_offset);\n int qeth_get_elements_for_frags(struct sk_buff *);\n-int qeth_do_send_packet_fast(struct qeth_card *card,\n-\t\t\t struct qeth_qdio_out_q *queue, struct sk_buff *skb,\n+int qeth_do_send_packet_fast(struct qeth_qdio_out_q *queue, struct sk_buff *skb,\n \t\t\t struct qeth_hdr *hdr, unsigned int offset,\n \t\t\t unsigned int hd_len);\n int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,\ndiff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c\nindex 77032801e30b..68e118f1202e 100644\n--- a/drivers/s390/net/qeth_core_main.c\n+++ b/drivers/s390/net/qeth_core_main.c\n@@ -4040,35 +4040,23 @@ static int qeth_fill_buffer(struct qeth_qdio_out_q *queue,\n \treturn flush_cnt;\n }\n \n-int qeth_do_send_packet_fast(struct qeth_card *card,\n-\t\t\t struct qeth_qdio_out_q *queue, struct sk_buff *skb,\n+int qeth_do_send_packet_fast(struct qeth_qdio_out_q *queue, struct sk_buff *skb,\n \t\t\t struct qeth_hdr *hdr, unsigned int offset,\n \t\t\t unsigned int hd_len)\n {\n-\tstruct qeth_qdio_out_buffer *buffer;\n-\tint index;\n+\tint index = queue->next_buf_to_fill;\n+\tstruct qeth_qdio_out_buffer *buffer = queue->bufs[index];\n \n-\t/* spin until we get the queue ... */\n-\twhile (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED,\n-\t\t\t QETH_OUT_Q_LOCKED) != QETH_OUT_Q_UNLOCKED);\n-\t/* ... now we've got the queue */\n-\tindex = queue->next_buf_to_fill;\n-\tbuffer = queue->bufs[queue->next_buf_to_fill];\n \t/*\n \t * check if buffer is empty to make sure that we do not 'overtake'\n \t * ourselves and try to fill a buffer that is already primed\n \t */\n \tif (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY)\n-\t\tgoto out;\n-\tqueue->next_buf_to_fill = (queue->next_buf_to_fill + 1) %\n-\t\t\t\t\t QDIO_MAX_BUFFERS_PER_Q;\n-\tatomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);\n+\t\treturn -EBUSY;\n+\tqueue->next_buf_to_fill = (index + 1) % QDIO_MAX_BUFFERS_PER_Q;\n \tqeth_fill_buffer(queue, buffer, skb, hdr, offset, hd_len);\n \tqeth_flush_buffers(queue, index, 1);\n \treturn 0;\n-out:\n-\tatomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);\n-\treturn -EBUSY;\n }\n EXPORT_SYMBOL_GPL(qeth_do_send_packet_fast);\n \ndiff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c\nindex 25a0f381bcd5..009de7248cc7 100644\n--- a/drivers/s390/net/qeth_l2_main.c\n+++ b/drivers/s390/net/qeth_l2_main.c\n@@ -698,7 +698,7 @@ static int qeth_l2_xmit_iqd(struct qeth_card *card, struct sk_buff *skb,\n \t\trc = -E2BIG;\n \t\tgoto out;\n \t}\n-\trc = qeth_do_send_packet_fast(card, queue, skb, hdr, data_offset,\n+\trc = qeth_do_send_packet_fast(queue, skb, hdr, data_offset,\n \t\t\t\t sizeof(*hdr) + data_offset);\n out:\n \tif (rc)\ndiff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c\nindex ab661a431f7c..733f94cbd4d4 100644\n--- a/drivers/s390/net/qeth_l3_main.c\n+++ b/drivers/s390/net/qeth_l3_main.c\n@@ -2771,8 +2771,8 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,\n \t\trc = qeth_do_send_packet(card, queue, new_skb, hdr, hd_len,\n \t\t\t\t\t hd_len, elements);\n \t} else\n-\t\trc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,\n-\t\t\t\t\t data_offset, hd_len);\n+\t\trc = qeth_do_send_packet_fast(queue, new_skb, hdr, data_offset,\n+\t\t\t\t\t hd_len);\n \n \tif (!rc) {\n \t\tcard->stats.tx_packets++;\n", "prefixes": [ "net-next", "5/9" ] }