get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/700228/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 700228,
    "url": "http://patchwork.ozlabs.org/api/patches/700228/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1480377971-23412-11-git-send-email-bimmy.pujari@intel.com/",
    "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": "<1480377971-23412-11-git-send-email-bimmy.pujari@intel.com>",
    "list_archive_url": null,
    "date": "2016-11-29T00:06:07",
    "name": "[next,S55,10/14] i40e/i40evf: Limit dma sync of RX buffers to actual packet size",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "3411b5ec35352ed45ee3212a94067f08ae2a2842",
    "submitter": {
        "id": 68919,
        "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api",
        "name": "Pujari, Bimmy",
        "email": "bimmy.pujari@intel.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/1480377971-23412-11-git-send-email-bimmy.pujari@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/700228/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/700228/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3tSP5J3TdPz9tlW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Nov 2016 11:08:04 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 04627888D7;\n\tTue, 29 Nov 2016 00:08:03 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id CyAE8u45oS0k; Tue, 29 Nov 2016 00:07:59 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CC208888DD;\n\tTue, 29 Nov 2016 00:07:53 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1756C1C0975\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Nov 2016 00:07:50 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 138EA93ACD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Nov 2016 00:07:50 +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 rzhdvz46k35q for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Nov 2016 00:07:49 +0000 (UTC)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 041AC93AA9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Nov 2016 00:07:48 +0000 (UTC)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga104.jf.intel.com with ESMTP; 28 Nov 2016 16:07:47 -0800",
            "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.167])\n\tby orsmga004.jf.intel.com with ESMTP; 28 Nov 2016 16:07:47 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,565,1473145200\"; d=\"scan'208\";a=\"35284070\"",
        "From": "Bimmy Pujari <bimmy.pujari@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 28 Nov 2016 16:06:07 -0800",
        "Message-Id": "<1480377971-23412-11-git-send-email-bimmy.pujari@intel.com>",
        "X-Mailer": "git-send-email 2.4.11",
        "In-Reply-To": "<1480377971-23412-1-git-send-email-bimmy.pujari@intel.com>",
        "References": "<1480377971-23412-1-git-send-email-bimmy.pujari@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S55 10/14] i40e/i40evf: Limit dma\n\tsync of RX buffers to actual packet size",
        "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": "From: \"Scott Peterson\" <scott.d.peterson@intel.com>\n\nOn packet RX, we perform a dma sync for cpu before passing the\npacket up.  Here we limit that sync to the actual length of the\nincoming packet, rather than always syncing the entire buffer.\n\nSigned-off-by: Scott Peterson <scott.d.peterson@intel.com>\nChange-ID: I626aaf6c37275a8ce9e81efcaa773f327b331487\n---\nTesting Hints:\nVerify traffic is still passed correctly with the same or better\nperformance as before this patch\n\n drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 16 +++++++++-------\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 16 +++++++++-------\n 2 files changed, 18 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex a347d08..7b96ccb 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1525,7 +1525,7 @@ static inline bool i40e_page_is_reserved(struct page *page)\n  * i40e_add_rx_frag - Add contents of Rx buffer to sk_buff\n  * @rx_ring: rx descriptor ring to transact packets on\n  * @rx_buffer: buffer containing page to add\n- * @rx_desc: descriptor containing length of buffer written by hardware\n+ * @size: packet length from rx_desc\n  * @skb: sk_buff to place the data into\n  *\n  * This function will add the data contained in rx_buffer->page to the skb.\n@@ -1538,13 +1538,10 @@ static inline bool i40e_page_is_reserved(struct page *page)\n  **/\n static bool i40e_add_rx_frag(struct i40e_ring *rx_ring,\n \t\t\t     struct i40e_rx_buffer *rx_buffer,\n-\t\t\t     union i40e_rx_desc *rx_desc,\n+\t\t\t     unsigned int size,\n \t\t\t     struct sk_buff *skb)\n {\n \tstruct page *page = rx_buffer->page;\n-\tu64 qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);\n-\tunsigned int size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>\n-\t\t\t    I40E_RXD_QW1_LENGTH_PBUF_SHIFT;\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = I40E_RXBUFFER_2048;\n #else\n@@ -1613,6 +1610,11 @@ static inline\n struct sk_buff *i40e_fetch_rx_buffer(struct i40e_ring *rx_ring,\n \t\t\t\t     union i40e_rx_desc *rx_desc)\n {\n+\tu64 local_status_error_len =\n+\t\tle64_to_cpu(rx_desc->wb.qword1.status_error_len);\n+\tunsigned int size =\n+\t\t(local_status_error_len & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>\n+\t\tI40E_RXD_QW1_LENGTH_PBUF_SHIFT;\n \tstruct i40e_rx_buffer *rx_buffer;\n \tstruct sk_buff *skb;\n \tstruct page *page;\n@@ -1654,11 +1656,11 @@ struct sk_buff *i40e_fetch_rx_buffer(struct i40e_ring *rx_ring,\n \tdma_sync_single_range_for_cpu(rx_ring->dev,\n \t\t\t\t      rx_buffer->dma,\n \t\t\t\t      rx_buffer->page_offset,\n-\t\t\t\t      I40E_RXBUFFER_2048,\n+\t\t\t\t      size,\n \t\t\t\t      DMA_FROM_DEVICE);\n \n \t/* pull page into skb */\n-\tif (i40e_add_rx_frag(rx_ring, rx_buffer, rx_desc, skb)) {\n+\tif (i40e_add_rx_frag(rx_ring, rx_buffer, size, skb)) {\n \t\t/* hand second half of page back to the ring */\n \t\ti40e_reuse_rx_page(rx_ring, rx_buffer);\n \t\trx_ring->rx_stats.page_reuse_count++;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 1818cdf..bb498c3 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -1003,7 +1003,7 @@ static inline bool i40e_page_is_reserved(struct page *page)\n  * i40e_add_rx_frag - Add contents of Rx buffer to sk_buff\n  * @rx_ring: rx descriptor ring to transact packets on\n  * @rx_buffer: buffer containing page to add\n- * @rx_desc: descriptor containing length of buffer written by hardware\n+ * @size: packet length from rx_desc\n  * @skb: sk_buff to place the data into\n  *\n  * This function will add the data contained in rx_buffer->page to the skb.\n@@ -1016,13 +1016,10 @@ static inline bool i40e_page_is_reserved(struct page *page)\n  **/\n static bool i40e_add_rx_frag(struct i40e_ring *rx_ring,\n \t\t\t     struct i40e_rx_buffer *rx_buffer,\n-\t\t\t     union i40e_rx_desc *rx_desc,\n+\t\t\t     unsigned int size,\n \t\t\t     struct sk_buff *skb)\n {\n \tstruct page *page = rx_buffer->page;\n-\tu64 qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);\n-\tunsigned int size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>\n-\t\t\t    I40E_RXD_QW1_LENGTH_PBUF_SHIFT;\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = I40E_RXBUFFER_2048;\n #else\n@@ -1091,6 +1088,11 @@ static inline\n struct sk_buff *i40evf_fetch_rx_buffer(struct i40e_ring *rx_ring,\n \t\t\t\t       union i40e_rx_desc *rx_desc)\n {\n+\tu64 local_status_error_len =\n+\t\tle64_to_cpu(rx_desc->wb.qword1.status_error_len);\n+\tunsigned int size =\n+\t\t(local_status_error_len & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>\n+\t\tI40E_RXD_QW1_LENGTH_PBUF_SHIFT;\n \tstruct i40e_rx_buffer *rx_buffer;\n \tstruct sk_buff *skb;\n \tstruct page *page;\n@@ -1132,11 +1134,11 @@ struct sk_buff *i40evf_fetch_rx_buffer(struct i40e_ring *rx_ring,\n \tdma_sync_single_range_for_cpu(rx_ring->dev,\n \t\t\t\t      rx_buffer->dma,\n \t\t\t\t      rx_buffer->page_offset,\n-\t\t\t\t      I40E_RXBUFFER_2048,\n+\t\t\t\t      size,\n \t\t\t\t      DMA_FROM_DEVICE);\n \n \t/* pull page into skb */\n-\tif (i40e_add_rx_frag(rx_ring, rx_buffer, rx_desc, skb)) {\n+\tif (i40e_add_rx_frag(rx_ring, rx_buffer, size, skb)) {\n \t\t/* hand second half of page back to the ring */\n \t\ti40e_reuse_rx_page(rx_ring, rx_buffer);\n \t\trx_ring->rx_stats.page_reuse_count++;\n",
    "prefixes": [
        "next",
        "S55",
        "10/14"
    ]
}