Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/535684/?format=api
{ "id": 535684, "url": "http://patchwork.ozlabs.org/api/patches/535684/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1445830859-4651-2-git-send-email-makita.toshiaki@lab.ntt.co.jp/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1445830859-4651-2-git-send-email-makita.toshiaki@lab.ntt.co.jp>", "list_archive_url": null, "date": "2015-10-26T03:40:56", "name": "[v2,net-next,1/4] net: Add ndo_enc_hdr_len to notify extra header room for encapsulated frames", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "1c594efda4328ee637e2d5c6d959d3ab12fefd0d", "submitter": { "id": 22461, "url": "http://patchwork.ozlabs.org/api/people/22461/?format=api", "name": "Toshiaki Makita", "email": "makita.toshiaki@lab.ntt.co.jp" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1445830859-4651-2-git-send-email-makita.toshiaki@lab.ntt.co.jp/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/535684/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/535684/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 7F68A141355\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 26 Oct 2015 14:41:37 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 89C6C8775A;\n\tMon, 26 Oct 2015 03:41:36 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id NU3_0AF7aPIL; Mon, 26 Oct 2015 03:41:34 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E6D96876CE;\n\tMon, 26 Oct 2015 03:41:34 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 85AE21C11D6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Oct 2015 03:41:33 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 81E628694A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Oct 2015 03:41:33 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rsz+LHIVUMyl for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Oct 2015 03:41:32 +0000 (UTC)", "from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 398D386525\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 26 Oct 2015 03:41:31 +0000 (UTC)", "from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153])\n\tby tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id t9Q3fRJf005146; \n\tMon, 26 Oct 2015 12:41:27 +0900", "from vc1.ecl.ntt.co.jp (localhost [127.0.0.1])\n\tby vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 3DCF25F623;\n\tMon, 26 Oct 2015 12:41:27 +0900 (JST)", "from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248])\n\tby vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 2F2FD5F611;\n\tMon, 26 Oct 2015 12:41:27 +0900 (JST)", "from ubuntu-vm-makita ([129.60.241.200])\n\tby imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id\n\tt9Q3fOkS018937; Mon, 26 Oct 2015 12:41:27 +0900", "by ubuntu-vm-makita (Postfix, from userid 1000)\n\tid 333C51E6EFA; Mon, 26 Oct 2015 12:41:22 +0900 (JST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>", "To": "\"David S . Miller\" <davem@davemloft.net>", "Date": "Mon, 26 Oct 2015 12:40:56 +0900", "Message-Id": "<1445830859-4651-2-git-send-email-makita.toshiaki@lab.ntt.co.jp>", "X-Mailer": "git-send-email 1.8.1.2", "In-Reply-To": "<1445830859-4651-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>", "References": "<1445830859-4651-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>", "X-TM-AS-MML": "disable", "Cc": "netdev@vger.kernel.org, Vlad Yasevich <vyasevich@gmail.com>,\n\ttoshiaki.makita1@gmail.com,\n\tStephen Hemminger <stephen@networkplumber.org>, \n\tintel-wired-lan@lists.osuosl.org,\n\tToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,\n\tPatrick McHardy <kaber@trash.net>", "Subject": "[Intel-wired-lan] [PATCH v2 net-next 1/4] net: Add ndo_enc_hdr_len\n\tto notify extra header room for encapsulated frames", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "Currently most NICs reserve 1522 bytes space for frames to handle 4\nbytes VLAN header in addition to 1518, maximum size of ethernet frame.\nThis is, however, not sufficient when stacked vlan or other encapsulation\nprotocols are used.\nTo accommodate this, add .ndo_enc_hdr_len() and inform drivers of needed\nencapsulation header size.\n\nSigned-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>\n---\n include/linux/netdevice.h | 9 +++++++++\n net/core/dev.c | 36 ++++++++++++++++++++++++++++++++++++\n 2 files changed, 45 insertions(+)", "diff": "diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h\nindex 4ac653b..1b2b587 100644\n--- a/include/linux/netdevice.h\n+++ b/include/linux/netdevice.h\n@@ -1059,6 +1059,10 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,\n *\tThis function is used to get egress tunnel information for given skb.\n *\tThis is useful for retrieving outer tunnel header parameters while\n *\tsampling packet.\n+ * int (*ndo_enc_hdr_len)(struct net_device *dev, int hdr_len);\n+ *\tCalled to notify addtional encapsulation header length to reserve.\n+ *\tImplements should reserve hdr_len room in addition to MTU to handle\n+ *\tencapsulated frames.\n *\n */\n struct net_device_ops {\n@@ -1236,6 +1240,8 @@ struct net_device_ops {\n \t\t\t\t\t\t\t bool proto_down);\n \tint\t\t\t(*ndo_fill_metadata_dst)(struct net_device *dev,\n \t\t\t\t\t\t struct sk_buff *skb);\n+\tint\t\t\t(*ndo_enc_hdr_len)(struct net_device *dev,\n+\t\t\t\t\t\t int hdr_len);\n };\n \n /**\n@@ -1396,6 +1402,7 @@ enum netdev_priv_flags {\n *\t@if_port:\tSelectable AUI, TP, ...\n *\t@dma:\t\tDMA channel\n *\t@mtu:\t\tInterface MTU value\n+ *\t@enc_hdr_len:\tAdditional encapsulation header length to MTU\n *\t@type:\t\tInterface hardware type\n *\t@hard_header_len: Hardware header length\n *\n@@ -1616,6 +1623,7 @@ struct net_device {\n \tunsigned char\t\tdma;\n \n \tunsigned int\t\tmtu;\n+\tunsigned int\t\tenc_hdr_len;\n \tunsigned short\t\ttype;\n \tunsigned short\t\thard_header_len;\n \n@@ -3031,6 +3039,7 @@ int dev_change_name(struct net_device *, const char *);\n int dev_set_alias(struct net_device *, const char *, size_t);\n int dev_change_net_namespace(struct net_device *, struct net *, const char *);\n int dev_set_mtu(struct net_device *, int);\n+int dev_set_enc_hdr_len(struct net_device *, int);\n void dev_set_group(struct net_device *, int);\n int dev_set_mac_address(struct net_device *, struct sockaddr *);\n int dev_change_carrier(struct net_device *, bool new_carrier);\ndiff --git a/net/core/dev.c b/net/core/dev.c\nindex 13f49f8..7c4114b 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -6051,6 +6051,42 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)\n EXPORT_SYMBOL(dev_set_mtu);\n \n /**\n+ *\tdev_set_enc_hdr_len - Expand encapsulation header room\n+ *\t@dev: device\n+ *\t@new_len: new length\n+ */\n+int dev_set_enc_hdr_len(struct net_device *dev, int new_len)\n+{\n+\tconst struct net_device_ops *ops = dev->netdev_ops;\n+\n+\tif (new_len < 0)\n+\t\treturn -EINVAL;\n+\n+\tif (!netif_device_present(dev))\n+\t\treturn -ENODEV;\n+\n+\tif (new_len <= dev->enc_hdr_len)\n+\t\treturn 0;\n+\n+\tif (ops->ndo_enc_hdr_len) {\n+\t\tint err;\n+\n+\t\t/* This function can be called from child user/net namespace */\n+\t\tif (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN))\n+\t\t\treturn -EPERM;\n+\n+\t\terr = ops->ndo_enc_hdr_len(dev, new_len);\n+\t\tif (err)\n+\t\t\treturn err;\n+\t}\n+\n+\tdev->enc_hdr_len = new_len;\n+\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(dev_set_enc_hdr_len);\n+\n+/**\n *\tdev_set_group - Change group this device belongs to\n *\t@dev: device\n *\t@new_group: group this device should belong to\n", "prefixes": [ "v2", "net-next", "1/4" ] }