get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61458,
    "url": "https://patches.dpdk.org/api/patches/61458/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191017211952.6ebf0312@hermes.lan/",
    "project": {
        "id": 1,
        "url": "https://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": "<20191017211952.6ebf0312@hermes.lan>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191017211952.6ebf0312@hermes.lan",
    "date": "2019-10-18T04:19:52",
    "name": "ebpf issues with secondary process.",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "2766857dc0925bc5fcfb5ef7daec40fcebf4ac90",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20191017211952.6ebf0312@hermes.lan/mbox/",
    "series": [
        {
            "id": 6928,
            "url": "https://patches.dpdk.org/api/series/6928/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6928",
            "date": "2019-10-18T04:19:52",
            "name": "ebpf issues with secondary process.",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/6928/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/61458/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/61458/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AFB461BF27;\n\tFri, 18 Oct 2019 06:20:01 +0200 (CEST)",
            "from mail-pf1-f177.google.com (mail-pf1-f177.google.com\n\t[209.85.210.177]) by dpdk.org (Postfix) with ESMTP id 1EF19B62\n\tfor <dev@dpdk.org>; Fri, 18 Oct 2019 06:20:00 +0200 (CEST)",
            "by mail-pf1-f177.google.com with SMTP id y22so3027406pfr.3\n\tfor <dev@dpdk.org>; Thu, 17 Oct 2019 21:20:00 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\td5sm6325902pfa.180.2019.10.17.21.19.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 17 Oct 2019 21:19:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=GqULp09w03Ek7k7VtFlaeaXLOyfWXyfLCtovhmrGlEo=;\n\tb=uwe78rO8B657lM9222nudJcaPBdTpxi91iO253sqiHgy+EluHAq42MQH+ZsLRJz/tL\n\tl60Yf617gsnK1l17avj7Y3neCcSjy+cD1RIslBLO0Qu3r1eRJCdvOXJMOOPHDjHQqASP\n\tJhIE5i2m5Y4afGp+zZhh67wa2Spwcc67hpQhGVgjTT8mZb4E5Zm4JFM1FMRsRKamJBIw\n\tGJC4goiKAfcXGx4untNMtLZE/DiyeXqnqfYCxRZbE4gKA6zF/60rv0OATomOgd/fkDXB\n\t236JiV88gbeVD1kq68Q9VE2rouE7YQz2E8OqbUC3dsCp3VdkaYGhwZuUu+ySodR+w3xw\n\trYcQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=GqULp09w03Ek7k7VtFlaeaXLOyfWXyfLCtovhmrGlEo=;\n\tb=KcTAz06CUJfUgo3TU2/cLd9VBlPYn+48Qrd7I6KmA04+h8wrQKBypLoWvYKEU3DHfC\n\tZRuno25IaA6uGRIWpUKFbt1yYFaVIKiPZkS+yQ0zayBHNWP1Ke6BxugsnuOaGcxDmKGa\n\thS2pyIyxJqd/oU9/UDFcjOXJuhlhPCdAJOj9mUOweqxy/flDPbkYin1Ku4GXgba18i8z\n\taQognetOg6eNUMDxKD6wd6nsTh2pxltjTbk3zNhzAP7jIumJmzsFxc43bB7z75mI+lrI\n\tKvuIm2BfAELJGhQJ7TKWIWPgCFAlg83Yk8FzbK2woMTXKsGAqCo5kui+zUlVF66FZeYr\n\ti6Ag==",
        "X-Gm-Message-State": "APjAAAW19ZDZ0SShEf3JhfEfZBD3qxkg5JU0GYGhDyR03nYUcXhUWgZZ\n\tjGZ3NieA4kgWGmW/iFh5BpAfdnu2u+lSsQ==",
        "X-Google-Smtp-Source": "APXvYqywsxhGBGIJqMBg0CEYw6232jYZ57BlbtpxUAPG57dzZiTOMyMTyDatOF6+63k5eTGdOxNc/g==",
        "X-Received": "by 2002:a63:e1f:: with SMTP id d31mr7797215pgl.379.1571372399074;\n\tThu, 17 Oct 2019 21:19:59 -0700 (PDT)",
        "Date": "Thu, 17 Oct 2019 21:19:52 -0700",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "\"Ananyev, Konstantin\" <konstantin.ananyev@intel.com>",
        "Cc": "dev@dpdk.org",
        "Message-ID": "<20191017211952.6ebf0312@hermes.lan>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Content-Transfer-Encoding": "7bit",
        "Subject": "[dpdk-dev] ebpf issues with secondary process.",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Trying to use the existing BPF code in BPF for packet filter is possible.\nBut one road block is that capture wants to allow a secondary process to\ninsert a packet filter. The current code in bpf_load() won't work for that.\nThe BPF program needs to be in shared area to allow secondary process\nto work.\n\nWhy does the code use mmap() as an allocator instead of rte_malloc?\n\nSomething like the diff below (untested). JIT would have the same problem\nbut you would have issues with the mprotect stuff with huge pages.\n\nI also noticed that bpf code is not using rte_memcpy and it has unnecessary\ncasts to void *.",
    "diff": "diff --git a/lib/librte_bpf/bpf.c b/lib/librte_bpf/bpf.c\nindex 7e1879ffa5b5..d6995bbf0ba9 100644\n--- a/lib/librte_bpf/bpf.c\n+++ b/lib/librte_bpf/bpf.c\n@@ -22,7 +22,7 @@ rte_bpf_destroy(struct rte_bpf *bpf)\n \tif (bpf != NULL) {\n \t\tif (bpf->jit.func != NULL)\n \t\t\tmunmap(bpf->jit.func, bpf->jit.sz);\n-\t\tmunmap(bpf, bpf->sz);\n+\t\trte_free(bpf);\n \t}\n }\n \ndiff --git a/lib/librte_bpf/bpf_load.c b/lib/librte_bpf/bpf_load.c\nindex 2a3b901d74c3..9a8e438a8963 100644\n--- a/lib/librte_bpf/bpf_load.c\n+++ b/lib/librte_bpf/bpf_load.c\n@@ -32,9 +32,8 @@ bpf_load(const struct rte_bpf_prm *prm)\n \tbsz = sizeof(bpf[0]);\n \tsz = insz + xsz + bsz;\n \n-\tbuf = mmap(NULL, sz, PROT_READ | PROT_WRITE,\n-\t\tMAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n-\tif (buf == MAP_FAILED)\n+\tbuf = rte_malloc(\"bpf\", sz, 0);\n+\tif (buf == NULL)\n \t\treturn NULL;\n \n \tbpf = (void *)buf;\n",
    "prefixes": []
}