Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/724871/?format=api
{ "id": 724871, "url": "http://patchwork.ozlabs.org/api/patches/724871/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170207022709.9864.74231.stgit@localhost.localdomain/", "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": "<20170207022709.9864.74231.stgit@localhost.localdomain>", "list_archive_url": null, "date": "2017-02-07T02:27:14", "name": "[next,v5,10/12] igb: Add support for padding packet", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e7c6cb03d763d5381da8a1e94683533c1b8ff356", "submitter": { "id": 252, "url": "http://patchwork.ozlabs.org/api/people/252/?format=api", "name": "Alexander Duyck", "email": "alexander.duyck@gmail.com" }, "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/20170207022709.9864.74231.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/724871/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/724871/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3vHSsl0DJYz9s2P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 7 Feb 2017 13:27:22 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 978652E82E;\n\tTue, 7 Feb 2017 02:27:20 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id QaBNtVY7CWaa; Tue, 7 Feb 2017 02:27:19 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 584E02680F;\n\tTue, 7 Feb 2017 02:27:19 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7611A1BFEC6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:27:17 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6D9BA873C4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:27:17 +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 UFzeNz1AjkmI for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:27:16 +0000 (UTC)", "from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 61FBA87364\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 7 Feb 2017 02:27:16 +0000 (UTC)", "by mail-pf0-f195.google.com with SMTP id e4so8102251pfg.0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 06 Feb 2017 18:27:16 -0800 (PST)", "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tu29sm5837142pfl.17.2017.02.06.18.27.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 06 Feb 2017 18:27:15 -0800 (PST)" ], "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MEyFVhrb\"; dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=TlguUiAXcaoi1zuklw+rbpSjOge5J+I0Dp5S8jsGCy4=;\n\tb=MEyFVhrbXLydL9rz+o2stBoC6LkYRw+AhLCN4DMOoYKnAb617Z1s4jaO3k6Rnr5lOa\n\txO6blGjC2Fk298hpD15dPJnmOeLtj7GFB6KVWjprnHNKvZ5YGSy08+7aJSrY/210AdrQ\n\tRxcrH7giRQnLfuRG1S2Fv0HUYJlCId0qH/mPoBxmTWY76+bp4KPRVTo8926xQUwcTk2v\n\t2iPvjvNk4qvSIC5v9fJT5CB6gJ5vOmdBO3YtYPU5D0nlJrU7EhXHN0yk/3N8PZFZZi56\n\txdvDp0jNkYZlos5M7uqieY6E4wYUfB6Dnh58esX4HdtOc7XQzwvP43fInImo6z8lNYT3\n\tsl1A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=TlguUiAXcaoi1zuklw+rbpSjOge5J+I0Dp5S8jsGCy4=;\n\tb=ihbPItDu0nj+Hobn7oBRT9w+gG3MLCdMUCGWpqyZcaVINZRRXV6sj/5N+tXgITVMPj\n\t0MCOq+OzdHIzYiO7Blu+0v53JVSaimDmgywowE3sfy9k6FY5LMWH/g0Jj7pab4gwBsq4\n\ta4injP3RqSGJ3a4i8RQCd4nAuMQf6WFh6UefWO42R6iSnc2319lO0zWM9LO9c0PIT5nL\n\tPxoXx+touNHLmpF+cnb/8vLT/tc1VaXxA+oEEqYeJmdH6SPtIUuKxbIm0pdUeXtj8pcW\n\tQkyEfsl2odLOiAfzjX7mn0XZKMY2XmEwqEHg2+Bpdz7Otf7mD1Rg68DW1sq8cXTwNEFt\n\t+m4Q==", "X-Gm-Message-State": "AIkVDXIEv6WGCsCaI+HoEk/mV/lfA+gLSbvnYS0k2ImgABiegZbUTjT6jo47HgbVQkB0Nw==", "X-Received": "by 10.98.130.206 with SMTP id w197mr16849745pfd.5.1486434435881; \n\tMon, 06 Feb 2017 18:27:15 -0800 (PST)", "From": "Alexander Duyck <alexander.duyck@gmail.com>", "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com", "Date": "Mon, 06 Feb 2017 18:27:14 -0800", "Message-ID": "<20170207022709.9864.74231.stgit@localhost.localdomain>", "In-Reply-To": "<20170207022339.9864.87863.stgit@localhost.localdomain>", "References": "<20170207022339.9864.87863.stgit@localhost.localdomain>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next PATCH v5 10/12] igb: Add support for\n\tpadding packet", "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>", "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": "From: Alexander Duyck <alexander.h.duyck@intel.com>\n\nWith the size of the frame limited we can now write to an offset within the\nbuffer instead of having to write at the very start of the buffer. The\nadvantage to this is that it allows us to leave padding room for things\nlike supporting XDP in the future.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\nv4: Split this code out of patch 6 of the original series.\n\n drivers/net/ethernet/intel/igb/igb.h | 11 +++++++++++\n drivers/net/ethernet/intel/igb/igb_main.c | 14 ++++++++++++--\n 2 files changed, 23 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h\nindex eb91c87e0c1d..dc6e2980718f 100644\n--- a/drivers/net/ethernet/intel/igb/igb.h\n+++ b/drivers/net/ethernet/intel/igb/igb.h\n@@ -314,6 +314,7 @@ struct igb_q_vector {\n \n enum e1000_ring_flags_t {\n \tIGB_RING_FLAG_RX_3K_BUFFER,\n+\tIGB_RING_FLAG_RX_BUILD_SKB_ENABLED,\n \tIGB_RING_FLAG_RX_SCTP_CSUM,\n \tIGB_RING_FLAG_RX_LB_VLAN_BSWAP,\n \tIGB_RING_FLAG_TX_CTX_IDX,\n@@ -327,11 +328,21 @@ enum e1000_ring_flags_t {\n #define clear_ring_uses_large_buffer(ring) \\\n \tclear_bit(IGB_RING_FLAG_RX_3K_BUFFER, &(ring)->flags)\n \n+#define ring_uses_build_skb(ring) \\\n+\ttest_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)\n+#define set_ring_build_skb_enabled(ring) \\\n+\tset_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)\n+#define clear_ring_build_skb_enabled(ring) \\\n+\tclear_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)\n+\n static inline unsigned int igb_rx_bufsz(struct igb_ring *ring)\n {\n #if (PAGE_SIZE < 8192)\n \tif (ring_uses_large_buffer(ring))\n \t\treturn IGB_RXBUFFER_3072;\n+\n+\tif (ring_uses_build_skb(ring))\n+\t\treturn IGB_MAX_FRAME_BUILD_SKB + IGB_TS_HDR_LEN;\n #endif\n \treturn IGB_RXBUFFER_2048;\n }\ndiff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex bdc21b00943c..2204b2f87261 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -3783,11 +3783,14 @@ static void igb_set_rx_buffer_len(struct igb_adapter *adapter,\n \t\t\t\t struct igb_ring *rx_ring)\n {\n \t/* set build_skb and buffer size flags */\n+\tclear_ring_build_skb_enabled(rx_ring);\n \tclear_ring_uses_large_buffer(rx_ring);\n \n \tif (adapter->flags & IGB_FLAG_RX_LEGACY)\n \t\treturn;\n \n+\tset_ring_build_skb_enabled(rx_ring);\n+\n #if (PAGE_SIZE < 8192)\n \tif (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)\n \t\treturn;\n@@ -6959,7 +6962,9 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = igb_rx_pg_size(rx_ring) / 2;\n #else\n-\tunsigned int truesize = SKB_DATA_ALIGN(size);\n+\tunsigned int truesize = ring_uses_build_skb(rx_ring) ?\n+\t\t\t\tSKB_DATA_ALIGN(IGB_SKB_PAD + size) :\n+\t\t\t\tSKB_DATA_ALIGN(size);\n #endif\n \tunsigned int pull_len;\n \n@@ -7295,6 +7300,11 @@ static int igb_clean_rx_irq(struct igb_q_vector *q_vector, const int budget)\n \treturn total_packets;\n }\n \n+static inline unsigned int igb_rx_offset(struct igb_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? IGB_SKB_PAD : 0;\n+}\n+\n static bool igb_alloc_mapped_page(struct igb_ring *rx_ring,\n \t\t\t\t struct igb_rx_buffer *bi)\n {\n@@ -7330,7 +7340,7 @@ static bool igb_alloc_mapped_page(struct igb_ring *rx_ring,\n \n \tbi->dma = dma;\n \tbi->page = page;\n-\tbi->page_offset = 0;\n+\tbi->page_offset = igb_rx_offset(rx_ring);\n \tbi->pagecnt_bias = 1;\n \n \treturn true;\n", "prefixes": [ "next", "v5", "10/12" ] }