get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65784,
    "url": "http://patches.dpdk.org/api/patches/65784/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200213084914.54755-3-ciara.loftus@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200213084914.54755-3-ciara.loftus@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200213084914.54755-3-ciara.loftus@intel.com",
    "date": "2020-02-13T08:49:13",
    "name": "[v4,2/3] net/af_xdp: use correct fill queue addresses",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "643e3c99264787c42c4496a610ee360ece49f801",
    "submitter": {
        "id": 144,
        "url": "http://patches.dpdk.org/api/people/144/?format=api",
        "name": "Loftus, Ciara",
        "email": "ciara.loftus@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200213084914.54755-3-ciara.loftus@intel.com/mbox/",
    "series": [
        {
            "id": 8523,
            "url": "http://patches.dpdk.org/api/series/8523/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8523",
            "date": "2020-02-13T08:49:11",
            "name": "AF_XDP PMD Fixes",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8523/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65784/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65784/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 85754A0542;\n\tThu, 13 Feb 2020 09:48:25 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5DE021BFA7;\n\tThu, 13 Feb 2020 09:48:09 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id E06461BE9C;\n Thu, 13 Feb 2020 09:48:05 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 13 Feb 2020 00:48:04 -0800",
            "from silpixa00373417.ir.intel.com (HELO\n silpixa00373417.ger.corp.intel.com) ([10.237.223.96])\n by orsmga001.jf.intel.com with ESMTP; 13 Feb 2020 00:48:03 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,436,1574150400\"; d=\"scan'208\";a=\"313670542\"",
        "From": "Ciara Loftus <ciara.loftus@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "xiaolong.ye@intel.com, Ciara Loftus <ciara.loftus@intel.com>,\n stable@dpdk.org",
        "Date": "Thu, 13 Feb 2020 08:49:13 +0000",
        "Message-Id": "<20200213084914.54755-3-ciara.loftus@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200213084914.54755-1-ciara.loftus@intel.com>",
        "References": "<20200213084914.54755-1-ciara.loftus@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 2/3] net/af_xdp: use correct fill queue\n\taddresses",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The fill queue addresses should start at the beginning of the mempool\nobject instead of the beginning of the mbuf. This is because the umem\nframe headroom includes the mp hdrobj size. Starting at this point\nensures AF_XDP doesn't write past the available room in the frame, in\nthe case of larger packets which are close to the size of the mbuf.\n\nFixes: d8a210774e1d (\"net/af_xdp: support unaligned umem chunks\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\nReviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 25 +++++++++++++++++--------\n 1 file changed, 17 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex 111ab000cc..a0edfc3cd3 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -171,7 +171,8 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,\n \t\tuint64_t addr;\n \n \t\tfq_addr = xsk_ring_prod__fill_addr(fq, idx++);\n-\t\taddr = (uint64_t)bufs[i] - (uint64_t)umem->buffer;\n+\t\taddr = (uint64_t)bufs[i] - (uint64_t)umem->buffer -\n+\t\t\t\tumem->mb_pool->header_size;\n \t\t*fq_addr = addr;\n \t}\n \n@@ -270,8 +271,11 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\taddr = xsk_umem__extract_addr(addr);\n \n \t\tbufs[i] = (struct rte_mbuf *)\n-\t\t\t\txsk_umem__get_data(umem->buffer, addr);\n-\t\tbufs[i]->data_off = offset - sizeof(struct rte_mbuf);\n+\t\t\t\txsk_umem__get_data(umem->buffer, addr +\n+\t\t\t\t\tumem->mb_pool->header_size);\n+\t\tbufs[i]->data_off = offset - sizeof(struct rte_mbuf) -\n+\t\t\trte_pktmbuf_priv_size(umem->mb_pool) -\n+\t\t\tumem->mb_pool->header_size;\n \n \t\trte_pktmbuf_pkt_len(bufs[i]) = len;\n \t\trte_pktmbuf_data_len(bufs[i]) = len;\n@@ -384,7 +388,8 @@ pull_umem_cq(struct xsk_umem_info *umem, int size)\n #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)\n \t\taddr = xsk_umem__extract_addr(addr);\n \t\trte_pktmbuf_free((struct rte_mbuf *)\n-\t\t\t\t\txsk_umem__get_data(umem->buffer, addr));\n+\t\t\t\t\txsk_umem__get_data(umem->buffer,\n+\t\t\t\t\taddr + umem->mb_pool->header_size));\n #else\n \t\trte_ring_enqueue(umem->buf_ring, (void *)addr);\n #endif\n@@ -442,9 +447,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\t}\n \t\t\tdesc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);\n \t\t\tdesc->len = mbuf->pkt_len;\n-\t\t\taddr = (uint64_t)mbuf - (uint64_t)umem->buffer;\n+\t\t\taddr = (uint64_t)mbuf - (uint64_t)umem->buffer -\n+\t\t\t\t\tumem->mb_pool->header_size;\n \t\t\toffset = rte_pktmbuf_mtod(mbuf, uint64_t) -\n-\t\t\t\t\t(uint64_t)mbuf;\n+\t\t\t\t\t(uint64_t)mbuf +\n+\t\t\t\t\tumem->mb_pool->header_size;\n \t\t\toffset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;\n \t\t\tdesc->addr = addr | offset;\n \t\t\tcount++;\n@@ -465,9 +472,11 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\tdesc = xsk_ring_prod__tx_desc(&txq->tx, idx_tx);\n \t\t\tdesc->len = mbuf->pkt_len;\n \n-\t\t\taddr = (uint64_t)local_mbuf - (uint64_t)umem->buffer;\n+\t\t\taddr = (uint64_t)local_mbuf - (uint64_t)umem->buffer -\n+\t\t\t\t\tumem->mb_pool->header_size;\n \t\t\toffset = rte_pktmbuf_mtod(local_mbuf, uint64_t) -\n-\t\t\t\t\t(uint64_t)local_mbuf;\n+\t\t\t\t\t(uint64_t)local_mbuf +\n+\t\t\t\t\tumem->mb_pool->header_size;\n \t\t\tpkt = xsk_umem__get_data(umem->buffer, addr + offset);\n \t\t\toffset = offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT;\n \t\t\tdesc->addr = addr | offset;\n",
    "prefixes": [
        "v4",
        "2/3"
    ]
}