get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 57350,
    "url": "https://patches.dpdk.org/api/patches/57350/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190801114536.318-1-mba@semihalf.com/",
    "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": "<20190801114536.318-1-mba@semihalf.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190801114536.318-1-mba@semihalf.com",
    "date": "2019-08-01T11:45:36",
    "name": "net/ena: fix L4 cksum flags condition for TX",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7567450250f4b350b2bf9f62907c835b6fb0399b",
    "submitter": {
        "id": 1379,
        "url": "https://patches.dpdk.org/api/people/1379/?format=api",
        "name": "Maciej Bielski",
        "email": "mba@semihalf.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190801114536.318-1-mba@semihalf.com/mbox/",
    "series": [
        {
            "id": 5871,
            "url": "https://patches.dpdk.org/api/series/5871/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5871",
            "date": "2019-08-01T11:45:36",
            "name": "net/ena: fix L4 cksum flags condition for TX",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/5871/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/57350/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/57350/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 9D5C81C1DA;\n\tThu,  1 Aug 2019 13:45:40 +0200 (CEST)",
            "from mail-lf1-f68.google.com (mail-lf1-f68.google.com\n\t[209.85.167.68]) by dpdk.org (Postfix) with ESMTP id AD51E1C1D6\n\tfor <dev@dpdk.org>; Thu,  1 Aug 2019 13:45:39 +0200 (CEST)",
            "by mail-lf1-f68.google.com with SMTP id z15so45742114lfh.13\n\tfor <dev@dpdk.org>; Thu, 01 Aug 2019 04:45:39 -0700 (PDT)",
            "from mba.sh (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173])\n\tby smtp.googlemail.com with ESMTPSA id\n\tp28sm12270438lfh.55.2019.08.01.04.45.37\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tThu, 01 Aug 2019 04:45:38 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=Rc/0KSOXFNkR3bl0JvEh+xVPaOaosXtXBSKKr/sVxfQ=;\n\tb=MzbLJrhkDPwhloNRImC62PzEuY9Ai4WljmeLpf8ogS0TUn1bfZcQawfegQl2RC0IPb\n\t/+LBRTV7EB2l4g6+JLBzq6T73mDZge9GQy+WGEKeQDT2ad7KZn/FR9bq34yOJ9BIPcFE\n\twK1Is9twOzVPj/NyLGMjGrTS1UM9qgxDsqEcSIk0v+KjMD++Y1cRmioB/bUk6rC5Q0Fk\n\tZcCaEyVi/+sHHHREtwrUGKmTgfU9z/3aPR3sXiYXg59J7HBUMMmmVFyWOcaYOfhg2XHg\n\tyLsWkuZ1cFvdqv/W8exw2pTY5Vl9rtU4UVlizpDvqUAtDDY/NFWsRqkyGzb+FqGUroOr\n\tMN8A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=Rc/0KSOXFNkR3bl0JvEh+xVPaOaosXtXBSKKr/sVxfQ=;\n\tb=tkM10UkXUGDfDmyyuIfm+2UdUZ4Di1wJr4NU0A/Xc6n1ZrL4SVq72Eu0ZzbKPk4AK1\n\t2JWGObBajMhpOk79cAp17vbBy9la0ZxnpdngNLUll8nOLnMy8t4And9eglSw6qxDBJ18\n\t4iCCGTad6oN91luikvG8fzBJwvnN8Kaffz0pAApHAjJD+jzNi29hoUHqdMnJtHIIRNre\n\tbL3K01GLsI/c3+TEB4WHhcbqx7ZAWr3V3dJs+aQUrT+a4lOjflI4GRhU4Qq1Zkk4O/SY\n\ttmMxEa8LYwp1zXx5LSO59cqK2ofhLw4sPXqwi9Z8iiRJw5EyzF4AyGsOSsGA19VHeTq+\n\tD/fw==",
        "X-Gm-Message-State": "APjAAAWWPhB/Yyxtray429KCIEnCDKgf97FfJhzQADOz7Bufe3qmbOdw\n\teMsDEp7uhCgk5HHdU/Y1+HqytPirvOg=",
        "X-Google-Smtp-Source": "APXvYqyDPShCvRfNSVyY2WLSwRN7VwgApWlAAa3zK11xU6Qo7QOvHIxV90IG8NCVI1X0ZSup6aOaeQ==",
        "X-Received": "by 2002:a19:48c5:: with SMTP id\n\tv188mr59850436lfa.69.1564659939014; \n\tThu, 01 Aug 2019 04:45:39 -0700 (PDT)",
        "From": "Maciej Bielski <mba@semihalf.com>",
        "To": "dev@dpdk.org",
        "Cc": "Maciej Bielski <mba@semihalf.com>, Michal Krawczyk <mk@semihalf.com>,\n\tMarcin Wojtas <mw@semihalf.com>, Guy Tzalik <gtzalik@amazon.com>,\n\tEvgeny Schemeilin <evgenys@amazon.com>,\n\tEduard Serra <eduser25@gmail.com>, igorc.mail@gmail.com, stable@dpdk.org",
        "Date": "Thu,  1 Aug 2019 13:45:36 +0200",
        "Message-Id": "<20190801114536.318-1-mba@semihalf.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH] net/ena: fix L4 cksum flags condition for TX",
        "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": "During an if-condition evaluation, a 2-bit flag evaluates to 'true' for\n'0x1', '0x2' and '0x3'. Thus, from this perspective these flags are\nindistinguishable. To make them distinct, respective bits must be\nextracted with a mask and then checked for strict equality.\n\nSpecifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the\nexpression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value\n'0x1') is evaluated first and the result is 'true'. In consequence, for\nUDP packets the execution flow enters an incorrect branch.\n\nFixes: 56b8b9b7e5d2 (net/ena: convert to new Tx offloads API)\nCc: stable@dpdk.org\n\nSigned-off-by: Maciej Bielski <mba@semihalf.com>\nReported-by: Eduard Serra <eduser25@gmail.com>\n---\n drivers/net/ena/ena_ethdev.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c\nindex f58334080..eb9d643f0 100644\n--- a/drivers/net/ena/ena_ethdev.c\n+++ b/drivers/net/ena/ena_ethdev.c\n@@ -330,12 +330,13 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,\n \t\t}\n \n \t\t/* check if L4 checksum is needed */\n-\t\tif ((mbuf->ol_flags & PKT_TX_TCP_CKSUM) &&\n+\t\tif (((mbuf->ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM) &&\n \t\t    (queue_offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) {\n \t\t\tena_tx_ctx->l4_proto = ENA_ETH_IO_L4_PROTO_TCP;\n \t\t\tena_tx_ctx->l4_csum_enable = true;\n-\t\t} else if ((mbuf->ol_flags & PKT_TX_UDP_CKSUM) &&\n-\t\t\t   (queue_offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) {\n+\t\t} else if (((mbuf->ol_flags & PKT_TX_L4_MASK) ==\n+\t\t\t\tPKT_TX_UDP_CKSUM) &&\n+\t\t\t\t(queue_offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) {\n \t\t\tena_tx_ctx->l4_proto = ENA_ETH_IO_L4_PROTO_UDP;\n \t\t\tena_tx_ctx->l4_csum_enable = true;\n \t\t} else {\n",
    "prefixes": []
}