get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2441,
    "url": "https://patches.dpdk.org/api/patches/2441/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-3-git-send-email-olivier.matz@6wind.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": "<1421883395-27235-3-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421883395-27235-3-git-send-email-olivier.matz@6wind.com",
    "date": "2015-01-21T23:36:21",
    "name": "[dpdk-dev,RFC,02/16] mbuf: enhance the API documentation of offload flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "34ca0b4ba6e55f8ce265aeed51f6bcf07e6d8eed",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-3-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2441/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2441/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 05DE95AA0;\n\tThu, 22 Jan 2015 00:36:52 +0100 (CET)",
            "from mail-wg0-f43.google.com (mail-wg0-f43.google.com\n\t[74.125.82.43]) by dpdk.org (Postfix) with ESMTP id CAAD15A97\n\tfor <dev@dpdk.org>; Thu, 22 Jan 2015 00:36:48 +0100 (CET)",
            "by mail-wg0-f43.google.com with SMTP id y19so317376wgg.2\n\tfor <dev@dpdk.org>; Wed, 21 Jan 2015 15:36:48 -0800 (PST)",
            "from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\twa5sm1710761wjc.8.2015.01.21.15.36.47\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 21 Jan 2015 15:36:48 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=eTn86vW36jvo7HLeBPvfecySL2bVDUU/GdtJ0oUOA6M=;\n\tb=KQItYCPeiKQ9Dl3B0DSLiPFv8EaBTvNCC9KxE3tS2oeZTZEYxZ1su5pKm3W2rCBL5F\n\tNInMxJE4Qeffti7q+RTekM87fnpVdc+HrR3iZ7Q5ryDeh/VzTbSB+7BSYu7KaiyMiATU\n\tdJSCqIcN/kfsznP+QDrNFJgENNYvc2wvPFOtSDKBZyLMbMHMOd+3vz4BVnwQPOl6ywc8\n\tC3vxpsf8Du3hc9LXYoUZ8hmkvRgTEKtgyxj5QJHZsJsFLMso0QiUwymujSXnr4RI+pg5\n\tN13eaKVPDPp/OSuRzV6DzHlWK+kA/aH0HcnUlmBfrn+jVFNyy93p+/SwhO75Da16HyIk\n\t8Kwg==",
        "X-Gm-Message-State": "ALoCoQnikwKKdS/h0h/kte0TqZAFVQHqjWQSpSliJ55Wy2gWK5Duic5wD+IB3C/sapQWKIpvJnyI",
        "X-Received": "by 10.181.13.105 with SMTP id ex9mr60486365wid.69.1421883408566; \n\tWed, 21 Jan 2015 15:36:48 -0800 (PST)",
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 22 Jan 2015 00:36:21 +0100",
        "Message-Id": "<1421883395-27235-3-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.1.3",
        "In-Reply-To": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "References": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [RFC 02/16] mbuf: enhance the API documentation of\n\toffload 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": "Based on http://dpdk.org/ml/archives/dev/2015-January/011127.html\n\nAlso adapt the csum forward engine code to the API.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test-pmd/csumonly.c    |  6 +++---\n lib/librte_mbuf/rte_mbuf.h | 43 ++++++++++++++++++++++++++++++++++++-------\n 2 files changed, 39 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c\nindex 41711fd..4b438d1 100644\n--- a/app/test-pmd/csumonly.c\n+++ b/app/test-pmd/csumonly.c\n@@ -183,16 +183,15 @@ process_inner_cksums(void *l3_hdr, uint16_t ethertype, uint16_t l3_len,\n \t\tipv4_hdr = l3_hdr;\n \t\tipv4_hdr->hdr_checksum = 0;\n \n+\t\tol_flags |= PKT_TX_IPV4;\n \t\tif (tso_segsz != 0 && l4_proto == IPPROTO_TCP) {\n \t\t\tol_flags |= PKT_TX_IP_CKSUM;\n \t\t} else {\n \t\t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM)\n \t\t\t\tol_flags |= PKT_TX_IP_CKSUM;\n-\t\t\telse {\n+\t\t\telse\n \t\t\t\tipv4_hdr->hdr_checksum =\n \t\t\t\t\trte_ipv4_cksum(ipv4_hdr);\n-\t\t\t\tol_flags |= PKT_TX_IPV4;\n-\t\t\t}\n \t\t}\n \t} else if (ethertype == _htons(ETHER_TYPE_IPv6))\n \t\tol_flags |= PKT_TX_IPV6;\n@@ -261,6 +260,7 @@ process_outer_cksums(void *outer_l3_hdr, uint16_t outer_ethertype,\n \n \tif (outer_ethertype == _htons(ETHER_TYPE_IPv4)) {\n \t\tipv4_hdr->hdr_checksum = 0;\n+\t\tol_flags |= PKT_TX_OUTER_IPV4;\n \n \t\tif (testpmd_ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM)\n \t\t\tol_flags |= PKT_TX_OUTER_IP_CKSUM;\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex a554247..191a42c 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -141,24 +141,53 @@ extern \"C\" {\n #define PKT_TX_UDP_CKSUM     (3ULL << 52) /**< UDP cksum of TX pkt. computed by NIC. */\n #define PKT_TX_L4_MASK       (3ULL << 52) /**< Mask for L4 cksum offload request. */\n \n-#define PKT_TX_IP_CKSUM      (1ULL << 54) /**< IP cksum of TX pkt. computed by NIC. */\n+/**\n+ * Offload the IP checksum in the hardware. The flag PKT_TX_IPV4 should\n+ * also be set by the application, altough a PMD will only check\n+ * PKT_TX_IP_CKSUM.\n+ *  - set the IP checksum field in the packet to 0\n+ *  - fill the mbuf offload information: l2_len, l3_len\n+ */\n+#define PKT_TX_IP_CKSUM      (1ULL << 54)\n \n-/** Packet is IPv4 without requiring IP checksum offload. */\n+/**\n+ * Packet is IPv4. This flag must be set when using any offload feature\n+ * (TSO, L3 or L4 checksum) to tell the NIC that the packet is an IPv4\n+ * packet.\n+ */\n #define PKT_TX_IPV4          (1ULL << 55)\n \n-/** Tell the NIC it's an IPv6 packet.*/\n+/**\n+ * Packet is IPv6. This flag must be set when using an offload feature\n+ * (TSO or L4 checksum) to tell the NIC that the packet is an IPv6\n+ * packet.\n+ */\n #define PKT_TX_IPV6          (1ULL << 56)\n \n #define PKT_TX_VLAN_PKT      (1ULL << 57) /**< TX packet is a 802.1q VLAN packet. */\n \n-/** Outer IP checksum of TX packet, computed by NIC for tunneling packet.\n- *  The tunnel type must also be specified, ex: PKT_TX_UDP_TUNNEL_PKT. */\n+/**\n+ * Offload the IP checksum of an external header in the hardware. The\n+ * flag PKT_TX_OUTER_IPV4 should also be set by the application, altough\n+ * a PMD will only check PKT_TX_IP_CKSUM.  The IP checksum field in the\n+ * packet must be set to 0.\n+ *  - set the outer IP checksum field in the packet to 0\n+ *  - fill the mbuf offload information: outer_l2_len, outer_l3_len\n+ */\n #define PKT_TX_OUTER_IP_CKSUM   (1ULL << 58)\n \n-/** Packet is outer IPv4 without requiring IP checksum offload for tunneling packet. */\n+/**\n+ * Packet outer header is IPv4. This flag must be set when using any\n+ * outer offload feature (L3 or L4 checksum) to tell the NIC that the\n+ * packet is an IPv4 packet.\n+ */\n #define PKT_TX_OUTER_IPV4   (1ULL << 59)\n \n-/** Tell the NIC it's an outer IPv6 packet for tunneling packet */\n+/**\n+ * Packet outer header is IPv6. This flag must be set when using any\n+ * outer offload feature (L4 checksum) to tell the NIC that the packet\n+ * is an IPv6 packet.\n+ */\n #define PKT_TX_OUTER_IPV6    (1ULL << 60)\n \n /* Use final bit of flags to indicate a control mbuf */\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "02/16"
    ]
}