Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/967/?format=api
{ "id": 967, "url": "http://patchwork.ozlabs.org/api/patches/967/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/200809222152.m8MLqQX5031987@imap1.linux-foundation.org/", "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": "<200809222152.m8MLqQX5031987@imap1.linux-foundation.org>", "list_archive_url": null, "date": "2008-09-22T21:52:26", "name": "[17/21] cxgb3: remove duplicate tests in lro", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "cfbfe4cf7211be7b44d7cd3229b2ddf26480e078", "submitter": { "id": 107, "url": "http://patchwork.ozlabs.org/api/people/107/?format=api", "name": "Andrew Morton", "email": "akpm@linux-foundation.org" }, "delegate": { "id": 36, "url": "http://patchwork.ozlabs.org/api/users/36/?format=api", "username": "jgarzik", "first_name": "Jeff", "last_name": "Garzik", "email": "jgarzik@pobox.com" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/200809222152.m8MLqQX5031987@imap1.linux-foundation.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/967/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/967/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.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 5D467DDF39\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 07:57:15 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753444AbYIVV5L (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 17:57:11 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1753636AbYIVV5L\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 17:57:11 -0400", "from smtp1.linux-foundation.org ([140.211.169.13]:34547 \"EHLO\n\tsmtp1.linux-foundation.org\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1753068AbYIVV5K (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 22 Sep 2008 17:57:10 -0400", "from imap1.linux-foundation.org (imap1.linux-foundation.org\n\t[140.211.169.55])\n\tby smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with\n\tESMTP id m8MLrDNp018507\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tMon, 22 Sep 2008 14:56:04 -0700", "from localhost.localdomain (localhost [127.0.0.1])\n\tby imap1.linux-foundation.org\n\t(8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id\n\tm8MLqQX5031987; Mon, 22 Sep 2008 14:52:26 -0700" ], "Message-Id": "<200809222152.m8MLqQX5031987@imap1.linux-foundation.org>", "Subject": "[patch 17/21] cxgb3: remove duplicate tests in lro", "To": "jeff@garzik.org", "Cc": "netdev@vger.kernel.org, akpm@linux-foundation.org, divy@chelsio.com", "From": "akpm@linux-foundation.org", "Date": "Mon, 22 Sep 2008 14:52:26 -0700", "X-Spam-Status": "No, hits=-3.359 required=5 tests=AWL, BAYES_00,\n\tOSDL_HEADER_SUBJECT_BRACKETED", "X-Spam-Checker-Version": "SpamAssassin 3.2.4-osdl_revision__1.47__", "X-MIMEDefang-Filter": "lf$Revision: 1.188 $", "X-Scanned-By": "MIMEDefang 2.63 on 140.211.169.13", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Divy Le Ray <divy@chelsio.com>\n\nThe generic lro code checks TCP flags/options. Remove duplicate tests\ndone in the driver.\n\nSigned-off-by: Divy Le Ray <divy@chelsio.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\n---\n\n drivers/net/cxgb3/sge.c | 35 -----------------------------------\n 1 file changed, 35 deletions(-)", "diff": "diff -puN drivers/net/cxgb3/sge.c~cxgb3-remove-duplicate-tests-in-lro drivers/net/cxgb3/sge.c\n--- a/drivers/net/cxgb3/sge.c~cxgb3-remove-duplicate-tests-in-lro\n+++ a/drivers/net/cxgb3/sge.c\n@@ -1937,38 +1937,6 @@ static inline int lro_frame_ok(const str\n \t\teh->h_proto == htons(ETH_P_IP) && ih->ihl == (sizeof(*ih) >> 2);\n }\n \n-#define TCP_FLAG_MASK (TCP_FLAG_CWR | TCP_FLAG_ECE | TCP_FLAG_URG |\\\n- TCP_FLAG_ACK | TCP_FLAG_PSH | TCP_FLAG_RST |\\\n-\t\t TCP_FLAG_SYN | TCP_FLAG_FIN)\n-#define TSTAMP_WORD ((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |\\\n- (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)\n-\n-/**\n- *\tlro_segment_ok - check if a TCP segment is eligible for LRO\n- *\t@tcph: the TCP header of the packet\n- *\n- *\tReturns true if a TCP packet is eligible for LRO. This requires that\n- *\tthe packet have only the ACK flag set and no TCP options besides\n- *\ttime stamps.\n- */\n-static inline int lro_segment_ok(const struct tcphdr *tcph)\n-{\n-\tint optlen;\n-\n-\tif (unlikely((tcp_flag_word(tcph) & TCP_FLAG_MASK) != TCP_FLAG_ACK))\n-\t\treturn 0;\n-\n-\toptlen = (tcph->doff << 2) - sizeof(*tcph);\n-\tif (optlen) {\n-\t\tconst u32 *opt = (const u32 *)(tcph + 1);\n-\n-\t\tif (optlen != TCPOLEN_TSTAMP_ALIGNED ||\n-\t\t *opt != htonl(TSTAMP_WORD) || !opt[2])\n-\t\t\treturn 0;\n-\t}\n-\treturn 1;\n-}\n-\n static int t3_get_lro_header(void **eh, void **iph, void **tcph,\n \t\t\t u64 *hdr_flags, void *priv)\n {\n@@ -1981,9 +1949,6 @@ static int t3_get_lro_header(void **eh, \n \t*iph = (struct iphdr *)((struct ethhdr *)*eh + 1);\n \t*tcph = (struct tcphdr *)((struct iphdr *)*iph + 1);\n \n-\t if (!lro_segment_ok(*tcph))\n-\t\treturn -1;\n-\n \t*hdr_flags = LRO_IPV4 | LRO_TCP;\n \treturn 0;\n }\n", "prefixes": [ "17/21" ] }