Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/581/?format=api
{ "id": 581, "url": "http://patchwork.ozlabs.org/api/patches/581/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20080919004337.10035.3409.stgit@localhost.localdomain/", "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": "<20080919004337.10035.3409.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2008-09-19T00:43:37", "name": "netdev: simple_tx_hash shouldn't hash inside fragments", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "bb54a7e351bdc38f286254fe07e8fe71ba0f7077", "submitter": { "id": 251, "url": "http://patchwork.ozlabs.org/api/people/251/?format=api", "name": "Duyck, Alexander H", "email": "alexander.h.duyck@intel.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/20080919004337.10035.3409.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/581/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/581/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 D5D2FDDEFD\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 19 Sep 2008 10:43:44 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1756101AbYISAnk (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 18 Sep 2008 20:43:40 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1756063AbYISAnj\n\t(ORCPT <rfc822; netdev-outgoing>); Thu, 18 Sep 2008 20:43:39 -0400", "from mga11.intel.com ([192.55.52.93]:43790 \"EHLO mga11.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1755822AbYISAnj (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tThu, 18 Sep 2008 20:43:39 -0400", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga102.fm.intel.com with ESMTP; 18 Sep 2008 17:40:47 -0700", "from azsmsx333.amr.corp.intel.com ([10.2.121.77])\n\tby fmsmga002.fm.intel.com with ESMTP; 18 Sep 2008 17:40:37 -0700", "from localhost.localdomain ([10.23.35.60]) by\n\tazsmsx333.amr.corp.intel.com with Microsoft\n\tSMTPSVC(6.0.3790.1830); Thu, 18 Sep 2008 17:43:38 -0700", "from localhost.localdomain (gitlad [127.0.0.1])\n\tby localhost.localdomain (8.14.2/8.14.2) with ESMTP id m8J0hbNS010065;\n\tThu, 18 Sep 2008 17:43:37 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"4.32,424,1217833200\"; d=\"scan'208\";a=\"381948214\"", "From": "Alexander Duyck <alexander.h.duyck@intel.com>", "Subject": "[PATCH] netdev: simple_tx_hash shouldn't hash inside fragments", "To": "netdev@vger.kernel.org", "Cc": "davem@davemloft.net", "Date": "Thu, 18 Sep 2008 17:43:37 -0700", "Message-ID": "<20080919004337.10035.3409.stgit@localhost.localdomain>", "User-Agent": "StGIT/0.14.2", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "X-OriginalArrivalTime": "19 Sep 2008 00:43:38.0403 (UTC)\n\tFILETIME=[C161D730:01C919F0]", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Currently simple_tx_hash is hashing inside of udp fragments. As a result\npackets are getting getting sent to all queues when they shouldn't be.\nThis causes a serious performance regression which can be seen by sending\nUDP frames larger than mtu on multiqueue devices. This change will make\nit so that fragments are hashed only as IP datagrams w/o any protocol\ninformation.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>", "diff": "diff --git a/net/core/dev.c b/net/core/dev.c\nindex 60c51f7..5d9fa1e 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -122,6 +122,7 @@\n #include <linux/if_arp.h>\n #include <linux/if_vlan.h>\n #include <linux/ip.h>\n+#include <net/ip.h>\n #include <linux/ipv6.h>\n #include <linux/in.h>\n #include <linux/jhash.h>\n@@ -1667,7 +1668,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)\n {\n \tu32 addr1, addr2, ports;\n \tu32 hash, ihl;\n-\tu8 ip_proto;\n+\tu8 ip_proto = 0;\n \n \tif (unlikely(!simple_tx_hashrnd_initialized)) {\n \t\tget_random_bytes(&simple_tx_hashrnd, 4);\n@@ -1676,7 +1677,8 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb)\n \n \tswitch (skb->protocol) {\n \tcase __constant_htons(ETH_P_IP):\n-\t\tip_proto = ip_hdr(skb)->protocol;\n+\t\tif (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)))\n+\t\t\tip_proto = ip_hdr(skb)->protocol;\n \t\taddr1 = ip_hdr(skb)->saddr;\n \t\taddr2 = ip_hdr(skb)->daddr;\n \t\tihl = ip_hdr(skb)->ihl;\n", "prefixes": [] }