get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21532,
    "url": "http://patches.dpdk.org/api/patches/21532/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170307113217.11077-6-bruce.richardson@intel.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": "<20170307113217.11077-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170307113217.11077-6-bruce.richardson@intel.com",
    "date": "2017-03-07T11:32:08",
    "name": "[dpdk-dev,v2,05/14] ring: remove the yield when waiting for tail update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dd3e8d09df0d06455abaff055be642a20fffead2",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170307113217.11077-6-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/21532/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/21532/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 C8D086787;\n\tTue,  7 Mar 2017 12:33:30 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 4EB6A5589\n\tfor <dev@dpdk.org>; Tue,  7 Mar 2017 12:33:18 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Mar 2017 03:33:18 -0800",
            "from sivswdev01.ir.intel.com ([10.237.217.45])\n\tby FMSMGA003.fm.intel.com with ESMTP; 07 Mar 2017 03:33:16 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.35,258,1484035200\"; d=\"scan'208\";a=\"831864264\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "olivier.matz@6wind.com",
        "Cc": "jerin.jacob@caviumnetworks.com, dev@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Tue,  7 Mar 2017 11:32:08 +0000",
        "Message-Id": "<20170307113217.11077-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20170307113217.11077-1-bruce.richardson@intel.com>",
        "References": "<20170223172407.27664-1-bruce.richardson@intel.com>\n\t<20170307113217.11077-1-bruce.richardson@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 05/14] ring: remove the yield when waiting for\n\ttail update",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "There was a compile time setting to enable a ring to yield when\nit entered a loop in mp or mc rings waiting for the tail pointer update.\nBuild time settings are not recommended for enabling/disabling features,\nand since this was off by default, remove it completely. If needed, a\nruntime enabled equivalent can be used.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n config/common_base                              |  1 -\n doc/guides/prog_guide/env_abstraction_layer.rst |  5 ----\n doc/guides/rel_notes/release_17_05.rst          |  1 +\n lib/librte_ring/rte_ring.h                      | 35 +++++--------------------\n 4 files changed, 7 insertions(+), 35 deletions(-)",
    "diff": "diff --git a/config/common_base b/config/common_base\nindex b3d8272..d5beadd 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -447,7 +447,6 @@ CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=y\n # Compile librte_ring\n #\n CONFIG_RTE_LIBRTE_RING=y\n-CONFIG_RTE_RING_PAUSE_REP_COUNT=0\n \n #\n # Compile librte_mempool\ndiff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst\nindex 10a10a8..7c39cd2 100644\n--- a/doc/guides/prog_guide/env_abstraction_layer.rst\n+++ b/doc/guides/prog_guide/env_abstraction_layer.rst\n@@ -352,11 +352,6 @@ Known Issues\n \n   3. It MUST not be used by multi-producer/consumer pthreads, whose scheduling policies are SCHED_FIFO or SCHED_RR.\n \n-  ``RTE_RING_PAUSE_REP_COUNT`` is defined for rte_ring to reduce contention. It's mainly for case 2, a yield is issued after number of times pause repeat.\n-\n-  It adds a sched_yield() syscall if the thread spins for too long while waiting on the other thread to finish its operations on the ring.\n-  This gives the preempted thread a chance to proceed and finish with the ring enqueue/dequeue operation.\n-\n + rte_timer\n \n   Running  ``rte_timer_manager()`` on a non-EAL pthread is not allowed. However, resetting/stopping the timer from a non-EAL pthread is allowed.\ndiff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst\nindex e0ebd71..c69ca8f 100644\n--- a/doc/guides/rel_notes/release_17_05.rst\n+++ b/doc/guides/rel_notes/release_17_05.rst\n@@ -117,6 +117,7 @@ API Changes\n \n   * removed the build-time setting ``CONFIG_RTE_RING_SPLIT_PROD_CONS``\n   * removed the build-time setting ``CONFIG_RTE_LIBRTE_RING_DEBUG``\n+  * removed the build-time setting ``CONFIG_RTE_RING_PAUSE_REP_COUNT``\n \n ABI Changes\n -----------\ndiff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h\nindex af7b7d4..2177954 100644\n--- a/lib/librte_ring/rte_ring.h\n+++ b/lib/librte_ring/rte_ring.h\n@@ -114,11 +114,6 @@ enum rte_ring_queue_behavior {\n #define RTE_RING_NAMESIZE (RTE_MEMZONE_NAMESIZE - \\\n \t\t\t   sizeof(RTE_RING_MZ_PREFIX) + 1)\n \n-#ifndef RTE_RING_PAUSE_REP_COUNT\n-#define RTE_RING_PAUSE_REP_COUNT 0 /**< Yield after pause num of times, no yield\n-                                    *   if RTE_RING_PAUSE_REP not defined. */\n-#endif\n-\n struct rte_memzone; /* forward declaration, so as not to require memzone.h */\n \n #if RTE_CACHE_LINE_SIZE < 128\n@@ -396,7 +391,7 @@ __rte_ring_mp_do_enqueue(struct rte_ring *r, void * const *obj_table,\n \tuint32_t cons_tail, free_entries;\n \tconst unsigned max = n;\n \tint success;\n-\tunsigned i, rep = 0;\n+\tunsigned int i;\n \tuint32_t mask = r->mask;\n \tint ret;\n \n@@ -450,18 +445,9 @@ __rte_ring_mp_do_enqueue(struct rte_ring *r, void * const *obj_table,\n \t * If there are other enqueues in progress that preceded us,\n \t * we need to wait for them to complete\n \t */\n-\twhile (unlikely(r->prod.tail != prod_head)) {\n+\twhile (unlikely(r->prod.tail != prod_head))\n \t\trte_pause();\n \n-\t\t/* Set RTE_RING_PAUSE_REP_COUNT to avoid spin too long waiting\n-\t\t * for other thread finish. It gives pre-empted thread a chance\n-\t\t * to proceed and finish with ring dequeue operation. */\n-\t\tif (RTE_RING_PAUSE_REP_COUNT &&\n-\t\t    ++rep == RTE_RING_PAUSE_REP_COUNT) {\n-\t\t\trep = 0;\n-\t\t\tsched_yield();\n-\t\t}\n-\t}\n \tr->prod.tail = prod_next;\n \treturn ret;\n }\n@@ -494,7 +480,7 @@ __rte_ring_sp_do_enqueue(struct rte_ring *r, void * const *obj_table,\n {\n \tuint32_t prod_head, cons_tail;\n \tuint32_t prod_next, free_entries;\n-\tunsigned i;\n+\tunsigned int i;\n \tuint32_t mask = r->mask;\n \tint ret;\n \n@@ -571,7 +557,7 @@ __rte_ring_mc_do_dequeue(struct rte_ring *r, void **obj_table,\n \tuint32_t cons_next, entries;\n \tconst unsigned max = n;\n \tint success;\n-\tunsigned i, rep = 0;\n+\tunsigned int i;\n \tuint32_t mask = r->mask;\n \n \t/* Avoid the unnecessary cmpset operation below, which is also\n@@ -616,18 +602,9 @@ __rte_ring_mc_do_dequeue(struct rte_ring *r, void **obj_table,\n \t * If there are other dequeues in progress that preceded us,\n \t * we need to wait for them to complete\n \t */\n-\twhile (unlikely(r->cons.tail != cons_head)) {\n+\twhile (unlikely(r->cons.tail != cons_head))\n \t\trte_pause();\n \n-\t\t/* Set RTE_RING_PAUSE_REP_COUNT to avoid spin too long waiting\n-\t\t * for other thread finish. It gives pre-empted thread a chance\n-\t\t * to proceed and finish with ring dequeue operation. */\n-\t\tif (RTE_RING_PAUSE_REP_COUNT &&\n-\t\t    ++rep == RTE_RING_PAUSE_REP_COUNT) {\n-\t\t\trep = 0;\n-\t\t\tsched_yield();\n-\t\t}\n-\t}\n \tr->cons.tail = cons_next;\n \n \treturn behavior == RTE_RING_QUEUE_FIXED ? 0 : n;\n@@ -662,7 +639,7 @@ __rte_ring_sc_do_dequeue(struct rte_ring *r, void **obj_table,\n {\n \tuint32_t cons_head, prod_tail;\n \tuint32_t cons_next, entries;\n-\tunsigned i;\n+\tunsigned int i;\n \tuint32_t mask = r->mask;\n \n \tcons_head = r->cons.head;\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "05/14"
    ]
}