get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2345,
    "url": "https://patches.dpdk.org/api/patches/2345/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421637803-17034-5-git-send-email-helin.zhang@intel.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": "<1421637803-17034-5-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421637803-17034-5-git-send-email-helin.zhang@intel.com",
    "date": "2015-01-19T03:23:10",
    "name": "[dpdk-dev,RFC,04/17] ixgbe: support of unified packet type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "261d2872e16f6d5b096fdfe0c421d8f304e91609",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421637803-17034-5-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2345/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2345/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 C1A6B5A96;\n\tMon, 19 Jan 2015 04:24:10 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id A3C075A85\n\tfor <dev@dpdk.org>; Mon, 19 Jan 2015 04:23:41 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga103.jf.intel.com with ESMTP; 18 Jan 2015 19:19:48 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 18 Jan 2015 19:23:39 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0J3NafR008572;\n\tMon, 19 Jan 2015 11:23:36 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0J3NXGK017096; Mon, 19 Jan 2015 11:23:35 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0J3NXbe017092; \n\tMon, 19 Jan 2015 11:23:33 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,424,1418112000\"; d=\"scan'208\";a=\"663849785\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 19 Jan 2015 11:23:10 +0800",
        "Message-Id": "<1421637803-17034-5-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1421637803-17034-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1421637803-17034-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [RFC 04/17] ixgbe: support of unified packet type",
        "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": "To unify packet types among all PMDs, bit masks of packet type for\nol_flags are replaced by unified packet type for Vector PMD.\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 39 +++++++++++++++++++----------------\n 1 file changed, 21 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\nindex b54cb19..b3cf7dd 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c\n@@ -134,44 +134,35 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)\n  */\n #ifdef RTE_IXGBE_RX_OLFLAGS_ENABLE\n \n-#define OLFLAGS_MASK     ((uint16_t)(PKT_RX_VLAN_PKT | PKT_RX_IPV4_HDR |\\\n-\t\t\t\t     PKT_RX_IPV4_HDR_EXT | PKT_RX_IPV6_HDR |\\\n-\t\t\t\t     PKT_RX_IPV6_HDR_EXT))\n-#define OLFLAGS_MASK_V   (((uint64_t)OLFLAGS_MASK << 48) | \\\n-\t\t\t  ((uint64_t)OLFLAGS_MASK << 32) | \\\n-\t\t\t  ((uint64_t)OLFLAGS_MASK << 16) | \\\n-\t\t\t  ((uint64_t)OLFLAGS_MASK))\n-#define PTYPE_SHIFT    (1)\n+#define OLFLAGS_MASK_V   (((uint64_t)PKT_RX_VLAN_PKT << 48) | \\\n+\t\t\t  ((uint64_t)PKT_RX_VLAN_PKT << 32) | \\\n+\t\t\t  ((uint64_t)PKT_RX_VLAN_PKT << 16) | \\\n+\t\t\t  ((uint64_t)PKT_RX_VLAN_PKT))\n #define VTAG_SHIFT     (3)\n \n static inline void\n desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)\n {\n-\t__m128i ptype0, ptype1, vtag0, vtag1;\n+\t__m128i vtag0, vtag1;\n \tunion {\n \t\tuint16_t e[4];\n \t\tuint64_t dword;\n \t} vol;\n \n-\tptype0 = _mm_unpacklo_epi16(descs[0], descs[1]);\n-\tptype1 = _mm_unpacklo_epi16(descs[2], descs[3]);\n \tvtag0 = _mm_unpackhi_epi16(descs[0], descs[1]);\n \tvtag1 = _mm_unpackhi_epi16(descs[2], descs[3]);\n \n-\tptype1 = _mm_unpacklo_epi32(ptype0, ptype1);\n \tvtag1 = _mm_unpacklo_epi32(vtag0, vtag1);\n-\n-\tptype1 = _mm_slli_epi16(ptype1, PTYPE_SHIFT);\n \tvtag1 = _mm_srli_epi16(vtag1, VTAG_SHIFT);\n \n-\tptype1 = _mm_or_si128(ptype1, vtag1);\n-\tvol.dword = _mm_cvtsi128_si64(ptype1) & OLFLAGS_MASK_V;\n+\tvol.dword = _mm_cvtsi128_si64(vtag1) & OLFLAGS_MASK_V;\n \n \trx_pkts[0]->ol_flags = vol.e[0];\n \trx_pkts[1]->ol_flags = vol.e[1];\n \trx_pkts[2]->ol_flags = vol.e[2];\n \trx_pkts[3]->ol_flags = vol.e[3];\n }\n+\n #else\n #define desc_to_olflags_v(desc, rx_pkts) do {} while (0)\n #endif\n@@ -204,6 +195,8 @@ _recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,\n \t\t\t\t0            /* ignore pkt_type field */\n \t\t\t);\n \t__m128i dd_check, eop_check;\n+\t__m128i desc_mask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF,\n+\t\t\t\t\t  0xFFFFFFFF, 0xFFFF07F0);\n \n \tif (unlikely(nb_pkts < RTE_IXGBE_VPMD_RX_BURST))\n \t\treturn 0;\n@@ -239,7 +232,8 @@ _recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,\n \t\t0xFF, 0xFF,  /* skip high 16 bits pkt_len, zero out */\n \t\t13, 12,      /* octet 12~13, low 16 bits pkt_len */\n \t\t13, 12,      /* octet 12~13, 16 bits data_len */\n-\t\t0xFF, 0xFF   /* skip pkt_type field */\n+\t\t1,           /* octet 1, 8 bits pkt_type field */\n+\t\t0            /* octet 0, 4 bits offset 4 pkt_type field */\n \t\t);\n \n \t/* Cache is empty -> need to scan the buffer rings, but first move\n@@ -248,6 +242,7 @@ _recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,\n \n \t/*\n \t * A. load 4 packet in one loop\n+\t * [A*. mask out 4 unused dirty field in desc]\n \t * B. copy 4 mbuf point from swring to rx_pkts\n \t * C. calc the number of DD bits among the 4 packets\n \t * [C*. extract the end-of-packet bit, if requested]\n@@ -289,6 +284,14 @@ _recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,\n \t\t/* B.2 copy 2 mbuf point into rx_pkts  */\n \t\t_mm_storeu_si128((__m128i *)&rx_pkts[pos+2], mbp2);\n \n+\t\t/* A* mask out 0~3 bits RSS type */\n+\t\tdescs[3] = _mm_and_si128(descs[3], desc_mask);\n+\t\tdescs[2] = _mm_and_si128(descs[2], desc_mask);\n+\n+\t\t/* A* mask out 0~3 bits RSS type */\n+\t\tdescs[1] = _mm_and_si128(descs[1], desc_mask);\n+\t\tdescs[0] = _mm_and_si128(descs[0], desc_mask);\n+\n \t\t/* avoid compiler reorder optimization */\n \t\trte_compiler_barrier();\n \n@@ -301,7 +304,7 @@ _recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,\n \t\t/* C.1 4=>2 filter staterr info only */\n \t\tsterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]);\n \n-\t\t/* set ol_flags with packet type and vlan tag */\n+\t\t/* set ol_flags with vlan packet type */\n \t\tdesc_to_olflags_v(descs, &rx_pkts[pos]);\n \n \t\t/* D.2 pkt 3,4 set in_port/nb_seg and remove crc */\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "04/17"
    ]
}