Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/350340/?format=api
{ "id": 350340, "url": "http://patchwork.ozlabs.org/api/patches/350340/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1400518800-6111-7-git-send-email-ezequiel.garcia@free-electrons.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": "<1400518800-6111-7-git-send-email-ezequiel.garcia@free-electrons.com>", "list_archive_url": null, "date": "2014-05-19T16:59:57", "name": "[6/9] net: mv643xx_eth: Avoid setting the initial TCP checksum", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a23826d5378ec7995bec1583920c57812b3e85a6", "submitter": { "id": 20433, "url": "http://patchwork.ozlabs.org/api/people/20433/?format=api", "name": "Ezequiel Garcia", "email": "ezequiel.garcia@free-electrons.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/1400518800-6111-7-git-send-email-ezequiel.garcia@free-electrons.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/350340/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/350340/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 84829140082\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 20 May 2014 03:01:28 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S964788AbaESRBR (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 19 May 2014 13:01:17 -0400", "from top.free-electrons.com ([176.31.233.9]:53617 \"EHLO\n\tmail.free-electrons.com\" rhost-flags-OK-OK-OK-FAIL) by\n\tvger.kernel.org with ESMTP id S964772AbaESRBN (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 19 May 2014 13:01:13 -0400", "by mail.free-electrons.com (Postfix, from userid 106)\n\tid 6057F899; Mon, 19 May 2014 19:01:17 +0200 (CEST)", "from localhost.localdomain (unknown [190.2.108.30])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id CA2087A9;\n\tMon, 19 May 2014 19:01:13 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.3.2 (2011-06-06) on\n\tmail.free-electrons.com", "X-Spam-Level": "", "X-Spam-Status": "No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.3.2", "From": "Ezequiel Garcia <ezequiel.garcia@free-electrons.com>", "To": "<netdev@vger.kernel.org>, David Miller <davem@davemloft.net>,\n\tEric Dumazet <eric.dumazet@gmail.com>", "Cc": "Willy Tarreau <w@1wt.eu>,\n\tThomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,\n\tTawfik Bayouk <tawfik@marvell.com>, Lior Amsalem <alior@marvell.com>,\n\tEzequiel Garcia <ezequiel.garcia@free-electrons.com>", "Subject": "[PATCH 6/9] net: mv643xx_eth: Avoid setting the initial TCP checksum", "Date": "Mon, 19 May 2014 13:59:57 -0300", "Message-Id": "<1400518800-6111-7-git-send-email-ezequiel.garcia@free-electrons.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1400518800-6111-1-git-send-email-ezequiel.garcia@free-electrons.com>", "References": "<1400518800-6111-1-git-send-email-ezequiel.garcia@free-electrons.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "As specified in the datasheet, the driver can set the \"L4Chk_Mode\" flag\n(bit 10) in the Tx descriptor command/status to specify that a frame is not\nIP fragmented and that the controller is in charge of generating the TCP/IP\nchecksum. This must be used together with the \"GL4chk\" flag (bit 17).\n\nThese two flags allow to avoid setting the initial TCP checksum in the l4i_chk\nfield of the Tx descriptor, which is needed to support software TSO.\n\nSigned-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>\n---\n drivers/net/ethernet/marvell/mv643xx_eth.c | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c\nindex 14a0dbb..5ad19d2 100644\n--- a/drivers/net/ethernet/marvell/mv643xx_eth.c\n+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c\n@@ -250,6 +250,7 @@ struct tx_desc {\n #define GEN_TCP_UDP_CHECKSUM\t\t0x00020000\n #define UDP_FRAME\t\t\t0x00010000\n #define MAC_HDR_EXTRA_4_BYTES\t\t0x00008000\n+#define GEN_TCP_UDP_CHK_FULL\t\t0x00000400\n #define MAC_HDR_EXTRA_8_BYTES\t\t0x00000200\n \n #define TX_IHL_SHIFT\t\t\t11\n@@ -695,17 +696,19 @@ static int skb_tx_csum(struct mv643xx_eth_private *mp, struct sk_buff *skb,\n \t\tif (tag_bytes & 8)\n \t\t\tcmd |= MAC_HDR_EXTRA_8_BYTES;\n \n-\t\tcmd |= GEN_TCP_UDP_CHECKSUM |\n+\t\tcmd |= GEN_TCP_UDP_CHECKSUM | GEN_TCP_UDP_CHK_FULL |\n \t\t\t GEN_IP_V4_CHECKSUM |\n \t\t\t ip_hdr(skb)->ihl << TX_IHL_SHIFT;\n \n+\t\t/* TODO: Revisit this. With the usage of GEN_TCP_UDP_CHK_FULL\n+\t\t * it seems we don't need to pass the initial checksum. */\n \t\tswitch (ip_hdr(skb)->protocol) {\n \t\tcase IPPROTO_UDP:\n \t\t\tcmd |= UDP_FRAME;\n-\t\t\t*l4i_chk = ntohs(sum16_as_be(udp_hdr(skb)->check));\n+\t\t\t*l4i_chk = 0;\n \t\t\tbreak;\n \t\tcase IPPROTO_TCP:\n-\t\t\t*l4i_chk = ntohs(sum16_as_be(tcp_hdr(skb)->check));\n+\t\t\t*l4i_chk = 0;\n \t\t\tbreak;\n \t\tdefault:\n \t\t\tWARN(1, \"protocol not supported\");\n", "prefixes": [ "6/9" ] }