get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65692,
    "url": "http://patches.dpdk.org/api/patches/65692/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200210114009.49590-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": "<20200210114009.49590-3-ciara.loftus@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200210114009.49590-3-ciara.loftus@intel.com",
    "date": "2020-02-10T11:40:08",
    "name": "[v3,2/3] net/af_xdp: use correct fill queue addresses",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20200210114009.49590-3-ciara.loftus@intel.com/mbox/",
    "series": [
        {
            "id": 8484,
            "url": "http://patches.dpdk.org/api/series/8484/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8484",
            "date": "2020-02-10T11:40:06",
            "name": "AF_XDP PMD Fixes",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/8484/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65692/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65692/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 B386BA052F;\n\tMon, 10 Feb 2020 12:39:31 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0A2421BF83;\n\tMon, 10 Feb 2020 12:39:18 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by dpdk.org (Postfix) with ESMTP id 414231BE90;\n Mon, 10 Feb 2020 12:39:16 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 10 Feb 2020 03:39:15 -0800",
            "from silpixa00373417.ir.intel.com (HELO\n silpixa00373417.ger.corp.intel.com) ([10.237.223.96])\n by fmsmga005.fm.intel.com with ESMTP; 10 Feb 2020 03:39:14 -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,424,1574150400\"; d=\"scan'208\";a=\"431573509\"",
        "From": "Ciara Loftus <ciara.loftus@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Ciara Loftus <ciara.loftus@intel.com>,\n\tstable@dpdk.org",
        "Date": "Mon, 10 Feb 2020 11:40:08 +0000",
        "Message-Id": "<20200210114009.49590-3-ciara.loftus@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200210114009.49590-1-ciara.loftus@intel.com>",
        "References": "<20200210114009.49590-1-ciara.loftus@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 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>\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 8b189119c..1e98cd44f 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -172,7 +172,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@@ -271,8 +272,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@@ -385,7 +389,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@@ -443,9 +448,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@@ -466,9 +473,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": [
        "v3",
        "2/3"
    ]
}