get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16543,
    "url": "http://patches.dpdk.org/api/patches/16543/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1476368171-18176-6-git-send-email-olivier.matz@6wind.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": "<1476368171-18176-6-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1476368171-18176-6-git-send-email-olivier.matz@6wind.com",
    "date": "2016-10-13T14:16:04",
    "name": "[dpdk-dev,v3,05/12] mbuf: add new Rx checksum mbuf flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2eb2a76c684e91ff4b446c051df554d1fd10ec84",
    "submitter": {
        "id": 8,
        "url": "http://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 355,
        "url": "http://patches.dpdk.org/api/users/355/?format=api",
        "username": "yliu",
        "first_name": "Yuanhan",
        "last_name": "Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1476368171-18176-6-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/16543/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/16543/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 6EBCC7F14;\n\tThu, 13 Oct 2016 16:16:54 +0200 (CEST)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 9A93D6CC1\n\tfor <dev@dpdk.org>; Thu, 13 Oct 2016 16:16:42 +0200 (CEST)",
            "from glumotte.dev.6wind.com (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 5E9D326C81;\n\tThu, 13 Oct 2016 16:16:38 +0200 (CEST)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org,\n\tyuanhan.liu@linux.intel.com",
        "Cc": "konstantin.ananyev@intel.com, sugesh.chandran@intel.com,\n\tbruce.richardson@intel.com, jianfeng.tan@intel.com,\n\thelin.zhang@intel.com, \n\tadrien.mazarguil@6wind.com, stephen@networkplumber.org,\n\tdprovan@bivio.net, xiao.w.wang@intel.com, maxime.coquelin@redhat.com",
        "Date": "Thu, 13 Oct 2016 16:16:04 +0200",
        "Message-Id": "<1476368171-18176-6-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.8.1",
        "In-Reply-To": "<1476368171-18176-1-git-send-email-olivier.matz@6wind.com>",
        "References": "<1469088510-7552-1-git-send-email-olivier.matz@6wind.com>\n\t<1476368171-18176-1-git-send-email-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v3 05/12] mbuf: add new Rx checksum mbuf flags",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Following discussions in [1] and [2], introduce a new bit to\ndescribe the Rx checksum status in mbuf.\n\nBefore this patch, only one flag was available:\n  PKT_RX_L4_CKSUM_BAD: L4 cksum of RX pkt. is not OK.\n\nAnd same for L3:\n  PKT_RX_IP_CKSUM_BAD: IP cksum of RX pkt. is not OK.\n\nThis had 2 issues:\n- it was not possible to differentiate \"checksum good\" from\n  \"checksum unknown\".\n- it was not possible for a virtual driver to say \"the checksum\n  in packet may be wrong, but data integrity is valid\".\n\nThis patch tries to solve this issue by having 4 states (2 bits)\nfor the IP and L4 Rx checksums. New values are:\n\n - PKT_RX_L4_CKSUM_UNKNOWN: no information about the RX L4 checksum\n   -> the application should verify the checksum by sw\n - PKT_RX_L4_CKSUM_BAD: the L4 checksum in the packet is wrong\n   -> the application can drop the packet without additional check\n - PKT_RX_L4_CKSUM_GOOD: the L4 checksum in the packet is valid\n   -> the application can accept the packet without verifying the\n      checksum by sw\n - PKT_RX_L4_CKSUM_NONE: the L4 checksum is not correct in the packet\n   data, but the integrity of the L4 data is verified.\n   -> the application can process the packet but must not verify the\n      checksum by sw. It has to take care to recalculate the cksum\n      if the packet is transmitted (either by sw or using tx offload)\n\n  And same for L3 (replace L4 by IP in description above).\n\nThis commit tries to be compatible with existing applications that\nonly check the existing flag (CKSUM_BAD).\n\n[1] http://dpdk.org/ml/archives/dev/2016-May/039920.html\n[2] http://dpdk.org/ml/archives/dev/2016-June/040007.html\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n doc/guides/rel_notes/release_16_11.rst |  6 ++++\n lib/librte_mbuf/rte_mbuf.c             | 16 +++++++++--\n lib/librte_mbuf/rte_mbuf.h             | 51 ++++++++++++++++++++++++++++++++--\n 3 files changed, 68 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst\nindex fbc0cbd..2ec63b2 100644\n--- a/doc/guides/rel_notes/release_16_11.rst\n+++ b/doc/guides/rel_notes/release_16_11.rst\n@@ -109,6 +109,12 @@ New Features\n   Added a new function ``rte_raw_cksum_mbuf()`` to process the checksum of\n   data embedded in an mbuf chain.\n \n+* **Added new Rx checksum mbuf flags.**\n+\n+  Added new Rx checksum flags in mbufs to describe more states: unknown,\n+  good, bad, or not present (useful for virtual drivers). This modification\n+  was done for IP and L4.\n+\n Resolved Issues\n ---------------\n \ndiff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c\nindex 4e1fdd1..8d9b875 100644\n--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -309,7 +309,11 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask)\n \tcase PKT_RX_RSS_HASH: return \"PKT_RX_RSS_HASH\";\n \tcase PKT_RX_FDIR: return \"PKT_RX_FDIR\";\n \tcase PKT_RX_L4_CKSUM_BAD: return \"PKT_RX_L4_CKSUM_BAD\";\n+\tcase PKT_RX_L4_CKSUM_GOOD: return \"PKT_RX_L4_CKSUM_GOOD\";\n+\tcase PKT_RX_L4_CKSUM_NONE: return \"PKT_RX_L4_CKSUM_NONE\";\n \tcase PKT_RX_IP_CKSUM_BAD: return \"PKT_RX_IP_CKSUM_BAD\";\n+\tcase PKT_RX_IP_CKSUM_GOOD: return \"PKT_RX_IP_CKSUM_GOOD\";\n+\tcase PKT_RX_IP_CKSUM_NONE: return \"PKT_RX_IP_CKSUM_NONE\";\n \tcase PKT_RX_EIP_CKSUM_BAD: return \"PKT_RX_EIP_CKSUM_BAD\";\n \tcase PKT_RX_VLAN_STRIPPED: return \"PKT_RX_VLAN_STRIPPED\";\n \tcase PKT_RX_IEEE1588_PTP: return \"PKT_RX_IEEE1588_PTP\";\n@@ -333,8 +337,16 @@ rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)\n \t\t{ PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT, NULL },\n \t\t{ PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, NULL },\n \t\t{ PKT_RX_FDIR, PKT_RX_FDIR, NULL },\n-\t\t{ PKT_RX_L4_CKSUM_BAD, PKT_RX_L4_CKSUM_BAD, NULL },\n-\t\t{ PKT_RX_IP_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, NULL },\n+\t\t{ PKT_RX_L4_CKSUM_BAD, PKT_RX_L4_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_L4_CKSUM_GOOD, PKT_RX_L4_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_L4_CKSUM_NONE, PKT_RX_L4_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_L4_CKSUM_UNKNOWN, PKT_RX_L4_CKSUM_MASK,\n+\t\t  \"PKT_RX_L4_CKSUM_UNKNOWN\" },\n+\t\t{ PKT_RX_IP_CKSUM_BAD, PKT_RX_IP_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_IP_CKSUM_GOOD, PKT_RX_IP_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_IP_CKSUM_NONE, PKT_RX_IP_CKSUM_MASK, NULL },\n+\t\t{ PKT_RX_IP_CKSUM_UNKNOWN, PKT_RX_IP_CKSUM_MASK,\n+\t\t  \"PKT_RX_IP_CKSUM_UNKNOWN\" },\n \t\t{ PKT_RX_EIP_CKSUM_BAD, PKT_RX_EIP_CKSUM_BAD, NULL },\n \t\t{ PKT_RX_VLAN_STRIPPED, PKT_RX_VLAN_STRIPPED, NULL },\n \t\t{ PKT_RX_IEEE1588_PTP, PKT_RX_IEEE1588_PTP, NULL },\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex 7541070..38022a3 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -91,8 +91,25 @@ extern \"C\" {\n \n #define PKT_RX_RSS_HASH      (1ULL << 1)  /**< RX packet with RSS hash result. */\n #define PKT_RX_FDIR          (1ULL << 2)  /**< RX packet with FDIR match indicate. */\n-#define PKT_RX_L4_CKSUM_BAD  (1ULL << 3)  /**< L4 cksum of RX pkt. is not OK. */\n-#define PKT_RX_IP_CKSUM_BAD  (1ULL << 4)  /**< IP cksum of RX pkt. is not OK. */\n+\n+/**\n+ * Deprecated.\n+ * Checking this flag alone is deprecated: check the 2 bits of\n+ * PKT_RX_L4_CKSUM_MASK.\n+ * This flag was set when the L4 checksum of a packet was detected as\n+ * wrong by the hardware.\n+ */\n+#define PKT_RX_L4_CKSUM_BAD  (1ULL << 3)\n+\n+/**\n+ * Deprecated.\n+ * Checking this flag alone is deprecated: check the 2 bits of\n+ * PKT_RX_IP_CKSUM_MASK.\n+ * This flag was set when the IP checksum of a packet was detected as\n+ * wrong by the hardware.\n+ */\n+#define PKT_RX_IP_CKSUM_BAD  (1ULL << 4)\n+\n #define PKT_RX_EIP_CKSUM_BAD (1ULL << 5)  /**< External IP header checksum error. */\n \n /**\n@@ -102,7 +119,35 @@ extern \"C\" {\n  */\n #define PKT_RX_VLAN_STRIPPED (1ULL << 6)\n \n-/* hole, some bits can be reused here  */\n+/**\n+ * Mask of bits used to determine the status of RX IP checksum.\n+ * - PKT_RX_IP_CKSUM_UNKNOWN: no information about the RX IP checksum\n+ * - PKT_RX_IP_CKSUM_BAD: the IP checksum in the packet is wrong\n+ * - PKT_RX_IP_CKSUM_GOOD: the IP checksum in the packet is valid\n+ * - PKT_RX_IP_CKSUM_NONE: the IP checksum is not correct in the packet\n+ *   data, but the integrity of the IP header is verified.\n+ */\n+#define PKT_RX_IP_CKSUM_MASK ((1ULL << 4) | (1ULL << 7))\n+\n+#define PKT_RX_IP_CKSUM_UNKNOWN 0\n+#define PKT_RX_IP_CKSUM_BAD     (1ULL << 4)\n+#define PKT_RX_IP_CKSUM_GOOD    (1ULL << 7)\n+#define PKT_RX_IP_CKSUM_NONE    ((1ULL << 4) | (1ULL << 7))\n+\n+/**\n+ * Mask of bits used to determine the status of RX L4 checksum.\n+ * - PKT_RX_L4_CKSUM_UNKNOWN: no information about the RX L4 checksum\n+ * - PKT_RX_L4_CKSUM_BAD: the L4 checksum in the packet is wrong\n+ * - PKT_RX_L4_CKSUM_GOOD: the L4 checksum in the packet is valid\n+ * - PKT_RX_L4_CKSUM_NONE: the L4 checksum is not correct in the packet\n+ *   data, but the integrity of the L4 data is verified.\n+ */\n+#define PKT_RX_L4_CKSUM_MASK ((1ULL << 3) | (1ULL << 8))\n+\n+#define PKT_RX_L4_CKSUM_UNKNOWN 0\n+#define PKT_RX_L4_CKSUM_BAD     (1ULL << 3)\n+#define PKT_RX_L4_CKSUM_GOOD    (1ULL << 8)\n+#define PKT_RX_L4_CKSUM_NONE    ((1ULL << 3) | (1ULL << 8))\n \n #define PKT_RX_IEEE1588_PTP  (1ULL << 9)  /**< RX IEEE1588 L2 Ethernet PT Packet. */\n #define PKT_RX_IEEE1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped packet.*/\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "05/12"
    ]
}