get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 140021,
    "url": "http://patchwork.dpdk.org/api/patches/140021/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240510100358.18815-2-ciara.loftus@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20240510100358.18815-2-ciara.loftus@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240510100358.18815-2-ciara.loftus@intel.com",
    "date": "2024-05-10T10:03:57",
    "name": "[2/3] net/af_xdp: Fix mbuf alloc failed statistic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "928c9095086a181ba9143344ce9420ce88b2e6af",
    "submitter": {
        "id": 144,
        "url": "http://patchwork.dpdk.org/api/people/144/?format=api",
        "name": "Loftus, Ciara",
        "email": "ciara.loftus@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240510100358.18815-2-ciara.loftus@intel.com/mbox/",
    "series": [
        {
            "id": 31905,
            "url": "http://patchwork.dpdk.org/api/series/31905/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31905",
            "date": "2024-05-10T10:03:56",
            "name": "[1/3] net/af_xdp: Fix port id not set in rx mbuf",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/31905/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/140021/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/140021/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 10BFF43FEF;\n\tFri, 10 May 2024 12:04:27 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F32DC402EF;\n\tFri, 10 May 2024 12:04:26 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.13])\n by mails.dpdk.org (Postfix) with ESMTP id C9FEF402BB\n for <dev@dpdk.org>; Fri, 10 May 2024 12:04:24 +0200 (CEST)",
            "from orviesa009.jf.intel.com ([10.64.159.149])\n by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 May 2024 03:04:24 -0700",
            "from silpixa00401177.ir.intel.com (HELO vm177..) ([10.55.128.139])\n by orviesa009.jf.intel.com with ESMTP; 10 May 2024 03:04:23 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1715335465; x=1746871465;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=eIPM6CTtZnF+YyTVkTD5j+kd0Le1RPg+Et+ENbtc+jI=;\n b=RK3c/6NChVnDXaoqoqpe7zXtvcAGhr19hJR6LOkgsxnmNPijFEeiZN+g\n GdfePd1p/RTdpbBblE4Xgh1PAZxcv+FtPURD+7DAdS9ocHlQm/IbmsaNp\n VxAkg7OD9KnkHo55PfsG1GjcN0/yuhH20HujKxPv61+Ng/VN6PZold92k\n /HQNfb4IWsbAX1ZtG8SIA7ATSKKV2oOelMW1aLj+POQi82inqSNn3TCxX\n sImAB4j3Z49NBTLA/0+VZX1IWNLldcZHTu94ynseSnndFjPchz6H6u+pi\n /rPuRDmfiU1hUuJKav1CzlXyV7omsIq6/73aedVsTwOwn4lPQFlYYPIUM A==;",
        "X-CSE-ConnectionGUID": [
            "pb8TK21yQCeA+uQaoXhXig==",
            "1JfqTSTBQbqd5yIT8dDGsg=="
        ],
        "X-CSE-MsgGUID": [
            "gWHGDCLpT8q1jAHyV8hb3g==",
            "OysLYIRnTW+CCa23Nf01kw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,11068\"; a=\"22460633\"",
            "E=Sophos;i=\"6.08,150,1712646000\"; d=\"scan'208\";a=\"22460633\"",
            "E=Sophos;i=\"6.08,150,1712646000\"; d=\"scan'208\";a=\"29672606\""
        ],
        "X-ExtLoop1": "1",
        "From": "Ciara Loftus <ciara.loftus@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stephen@networkplumber.org, Ciara Loftus <ciara.loftus@intel.com>,\n stable@dpdk.og",
        "Subject": "[PATCH 2/3] net/af_xdp: Fix mbuf alloc failed statistic",
        "Date": "Fri, 10 May 2024 10:03:57 +0000",
        "Message-Id": "<20240510100358.18815-2-ciara.loftus@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240510100358.18815-1-ciara.loftus@intel.com>",
        "References": "<20240510100358.18815-1-ciara.loftus@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Failures to allocate mbufs in the receive path were not being\naccounted for in the ethdev statistics. Fix this.\n\nBugzilla ID: 1429\nFixes: f1debd77efaf (\"net/af_xdp: introduce AF_XDP PMD\")\ncc: stable@dpdk.og\n\nReported-by: Stephen Hemminger <stephen@networkplumber.org>\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++\n 1 file changed, 5 insertions(+)",
    "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex fee0d5d5f3..968bbf6d45 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -124,6 +124,7 @@ struct rx_stats {\n \tuint64_t rx_pkts;\n \tuint64_t rx_bytes;\n \tuint64_t rx_dropped;\n+\tuint64_t alloc_failed;\n };\n \n struct pkt_rx_queue {\n@@ -339,6 +340,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t * xsk_ring_cons__peek\n \t\t */\n \t\trx->cached_cons -= nb_pkts;\n+\t\trxq->stats.alloc_failed += nb_pkts;\n+\n \t\treturn 0;\n \t}\n \n@@ -408,6 +411,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t * xsk_ring_cons__peek\n \t\t */\n \t\trx->cached_cons -= nb_pkts;\n+\t\trxq->stats.alloc_failed += nb_pkts;\n \t\treturn 0;\n \t}\n \n@@ -872,6 +876,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \t\tstats->ibytes += stats->q_ibytes[i];\n \t\tstats->imissed += rxq->stats.rx_dropped;\n \t\tstats->oerrors += txq->stats.tx_dropped;\n+\t\tdev->data->rx_mbuf_alloc_failed += rxq->stats.alloc_failed;\n \t\tfd = process_private->rxq_xsk_fds[i];\n \t\tret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,\n \t\t\t\t\t   &xdp_stats, &optlen) : -1;\n",
    "prefixes": [
        "2/3"
    ]
}