Show a patch.

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

{
    "id": 44113,
    "url": "http://patches.dpdk.org/api/patches/44113/",
    "web_url": "http://patches.dpdk.org/patch/44113/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180831124404eucas1p20daff43600dfe450c9106616f886eab4~P_LLRV5aM1664316643eucas1p2w@eucas1p2.samsung.com>",
    "date": "2018-08-31T12:45:17",
    "name": "[RFC,2/2] drivers/net: use sleep delay by default for intel NICs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b5c92bbbff93eee40a078b6c87a8b0ca36981d01",
    "submitter": {
        "id": 323,
        "url": "http://patches.dpdk.org/api/people/323/",
        "name": "Ilya Maximets",
        "email": "i.maximets@samsung.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/44113/mbox/",
    "series": [
        {
            "id": 1137,
            "url": "http://patches.dpdk.org/api/series/1137/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1137",
            "date": "2018-08-31T12:45:15",
            "name": "CPU non-blocking delay",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1137/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44113/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44113/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "In-Reply-To": "<20180831124517.27619-1-i.maximets@samsung.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.17.1",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 74E3E5B40;\n\tFri, 31 Aug 2018 14:44:09 +0200 (CEST)",
            "from mailout2.w1.samsung.com (mailout2.w1.samsung.com\n\t[210.118.77.12]) by dpdk.org (Postfix) with ESMTP id D80A65A6A\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 14:44:06 +0200 (CEST)",
            "from eucas1p2.samsung.com (unknown [182.198.249.207])\n\tby mailout2.w1.samsung.com (KnoxPortal) with ESMTP id\n\t20180831124406euoutp029c301610790c6db6ba1e0a3749f6ea85~P_LMk4oXw1058710587euoutp02C\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 12:44:06 +0000 (GMT)",
            "from eusmges1new.samsung.com (unknown [203.254.199.242]) by\n\teucas1p2.samsung.com (KnoxPortal) with ESMTP id\n\t20180831124405eucas1p2dd4516b68c3c611b09028fcf10f9c507~P_LMEUVOn1664316643eucas1p2y;\n\tFri, 31 Aug 2018 12:44:05 +0000 (GMT)",
            "from eucas1p2.samsung.com ( [182.198.249.207]) by\n\teusmges1new.samsung.com (EUCPMTA) with SMTP id 23.D1.04441.518398B5;\n\tFri, 31 Aug 2018 13:44:05 +0100 (BST)",
            "from eusmtrp2.samsung.com (unknown [182.198.249.139]) by\n\teucas1p2.samsung.com (KnoxPortal) with ESMTPA id\n\t20180831124404eucas1p20daff43600dfe450c9106616f886eab4~P_LLRV5aM1664316643eucas1p2w;\n\tFri, 31 Aug 2018 12:44:04 +0000 (GMT)",
            "from eusmgms2.samsung.com (unknown [182.198.249.180]) by\n\teusmtrp2.samsung.com (KnoxPortal) with ESMTP id\n\t20180831124404eusmtrp2813a2f80a3807eb1c5e75f8f2be9d2db~P_LK-1cFf2459624596eusmtrp2Q;\n\tFri, 31 Aug 2018 12:44:04 +0000 (GMT)",
            "from eusmtip2.samsung.com ( [203.254.199.222]) by\n\teusmgms2.samsung.com (EUCPMTA) with SMTP id E0.EF.04128.418398B5;\n\tFri, 31 Aug 2018 13:44:04 +0100 (BST)",
            "from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by\n\teusmtip2.samsung.com (KnoxPortal) with ESMTPA id\n\t20180831124403eusmtip2ca9b82355b098641c2cdb99b7de53b13~P_LKYwmAf2134721347eusmtip2o;\n\tFri, 31 Aug 2018 12:44:03 +0000 (GMT)"
        ],
        "X-Brightmail-Tracker": [
            "H4sIAAAAAAAAA0VSa0hTYRjuO2eXs9HkNB2+rGiwTEi8JGSdH6IJRSszEoKogbX0NEdu2o4z\n\t9U/+MKdTUiQQV6R4DS200nmhSKdtaKIRZROT+hGJpk6d5i1nO55J/573uXzvw8tH4NJtnpzQ\n\tGbJpo0GToRSIeTbHxliEjCpRH58bklGli4UY5WqJpxaWuzDqs3lDSFXXehDl/lvHo6raywVU\n\t58g2ot5NDwhPi1SbtY18Vf2bGUz1sKMFXcavi2PT6AxdDm2MirspTh+ZrhZkPQnJdX2s4xeg\n\t9cMWJCKAPAFLQ2V8CxITUvIZAsewE+OGFQSPno76FQ+C1Xkzfy/yp2aAxwnNCFp/uXFuWEfw\n\tfHIFY10CMhyGWwcRi4NIEjwl9QLWhJPvMRi3VOGsEEieB+9Ez66JRx6F6Z05HrdCAa3tfbse\n\tERkLDc6C3VJAugXwoq9TyAoSMgfat0r9gTPw0uwWcjgQZp0dfnwIdnpqMA7fh++FM4h7qBhB\n\tld3rF+Kh4/eoL0D46h2Dtt4ojk6AxvkRjKWBDADX/AGWxn2w0sb2Z2kJFBdJOXcIbPU34xyW\n\tw8SCx99ABRs9X4XcgcoRtE014RVIYf2/rBahFhRMmxi9lmaiDfS9SEajZ0wGbWRqpv4V8n2K\n\tD17ncjda/XTLjkgCKfdL9rnNailfk8Pk6e0ICFwZJBGlF6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3nECJs+6y9R+pp/9MOJ\n\tn0XqN5RYijMSDbWYi4oTAVYas5xwAgAA"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;\n\ts=mail20170921; t=1535719446;\n\tbh=x5DJiHgTOSRaIMIzl3ZhcpnHsp4LmkUZFmIsRG1u078=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Oy59fWIErHQUgKbb8YOAo55ueBGDAGXVjrxqXi0VAhsKV97yePfYNeaVrK+dxaNKM\n\tPv9R94ajVrf5Uyllj3oZ2fRerMaBZrR6w8LSOciisgG/YvhmiailvpilAsTrH6kmFZ\n\tDkgExymfHtQgo66L4zU2oKH4W6y679D0JnIlKpEo=",
        "X-BeenThere": "dev@dpdk.org",
        "X-CMS-RootMailID": "20180831124404eucas1p20daff43600dfe450c9106616f886eab4",
        "Message-Id": "<20180831124404eucas1p20daff43600dfe450c9106616f886eab4~P_LLRV5aM1664316643eucas1p2w@eucas1p2.samsung.com>",
        "References": "<20180831124517.27619-1-i.maximets@samsung.com>\n\t<CGME20180831124404eucas1p20daff43600dfe450c9106616f886eab4@eucas1p2.samsung.com>",
        "X-RootMTR": "20180831124404eucas1p20daff43600dfe450c9106616f886eab4",
        "X-Msg-Generator": "CA",
        "Delivered-To": "patchwork@dpdk.org",
        "X-AuditID": "cbfec7f2-5c9ff70000001159-38-5b893815e416",
        "From": "Ilya Maximets <i.maximets@samsung.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Cc": "Jingjing Wu <jingjing.wu@intel.com>, Konstantin Ananyev\n\t<konstantin.ananyev@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>, Beilei\n\tXing <beilei.xing@intel.com>, Qi Zhang <qi.z.zhang@intel.com>, Xiao Wang\n\t<xiao.w.wang@intel.com>, Bruce Richardson <bruce.richardson@intel.com>,\n\tIlya Maximets <i.maximets@samsung.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-EPHeader": "CA",
        "To": "dev@dpdk.org",
        "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>",
        "X-CMS-MailID": "20180831124404eucas1p20daff43600dfe450c9106616f886eab4",
        "Subject": "[dpdk-dev] [RFC 2/2] drivers/net: use sleep delay by default for\n\tintel NICs",
        "CMS-TYPE": "201P",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com\n\t20180831124406euoutp029c301610790c6db6ba1e0a3749f6ea85~P_LMk4oXw1058710587euoutp02C",
        "Date": "Fri, 31 Aug 2018 15:45:17 +0300"
    },
    "content": "NICs uses different delays up to a second during their\nconfiguration. It makes no sense to busy-wait so long wasting\nCPU cycles and preventing any other threads to execute on the\nsame CPU core. These busy polling are the rudiments that came\nfrom the kernel drivers where you can not sleep in interrupt\ncontext, but as we're in userspace, we're able and should\nsleep to allow other threads to run.\nDelays never called on rx/tx path, so this should not affect\nperformance.\n\nSigned-off-by: Ilya Maximets <i.maximets@samsung.com>\n---\n drivers/net/avf/Makefile             | 1 +\n drivers/net/avf/base/avf_osdep.h     | 4 ++--\n drivers/net/e1000/Makefile           | 1 +\n drivers/net/e1000/base/e1000_osdep.h | 2 +-\n drivers/net/i40e/base/i40e_osdep.h   | 6 +++---\n drivers/net/ifc/base/ifcvf_osdep.h   | 2 +-\n drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-\n 7 files changed, 10 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile\nindex 3f815bbc4..8ee707529 100644\n--- a/drivers/net/avf/Makefile\n+++ b/drivers/net/avf/Makefile\n@@ -9,6 +9,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n LIB = librte_pmd_avf.a\n \n CFLAGS += -O3\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash\n LDLIBS += -lrte_bus_pci\ndiff --git a/drivers/net/avf/base/avf_osdep.h b/drivers/net/avf/base/avf_osdep.h\nindex 9ef45968e..442a5acd0 100644\n--- a/drivers/net/avf/base/avf_osdep.h\n+++ b/drivers/net/avf/base/avf_osdep.h\n@@ -93,8 +93,8 @@ typedef uint64_t        u64;\n #define avf_memset(a, b, c, d) memset((a), (b), (c))\n #define avf_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))\n \n-#define avf_usec_delay(x) rte_delay_us(x)\n-#define avf_msec_delay(x) rte_delay_us(1000*(x))\n+#define avf_usec_delay(x) rte_delay_us_sleep(x)\n+#define avf_msec_delay(x) avf_usec_delay(1000 * (x))\n \n #define AVF_PCI_REG(reg)\t\trte_read32(reg)\n #define AVF_PCI_REG_ADDR(a, reg) \\\ndiff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile\nindex 9c87e883b..0ed627656 100644\n--- a/drivers/net/e1000/Makefile\n+++ b/drivers/net/e1000/Makefile\n@@ -10,6 +10,7 @@ LIB = librte_pmd_e1000.a\n \n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs\n LDLIBS += -lrte_bus_pci\ndiff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h\nindex b8868049f..5958ea157 100644\n--- a/drivers/net/e1000/base/e1000_osdep.h\n+++ b/drivers/net/e1000/base/e1000_osdep.h\n@@ -48,7 +48,7 @@\n \n #include \"../e1000_logs.h\"\n \n-#define DELAY(x) rte_delay_us(x)\n+#define DELAY(x) rte_delay_us_sleep(x)\n #define usec_delay(x) DELAY(x)\n #define usec_delay_irq(x) DELAY(x)\n #define msec_delay(x) DELAY(1000*(x))\ndiff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h\nindex 8e5c593c9..a6072e153 100644\n--- a/drivers/net/i40e/base/i40e_osdep.h\n+++ b/drivers/net/i40e/base/i40e_osdep.h\n@@ -233,9 +233,9 @@ struct i40e_spinlock {\n #define i40e_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))\n \n #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))\n-#define DELAY(x) rte_delay_us(x)\n-#define i40e_usec_delay(x) rte_delay_us(x)\n-#define i40e_msec_delay(x) rte_delay_us(1000*(x))\n+#define DELAY(x) rte_delay_us_sleep(x)\n+#define i40e_usec_delay(x) DELAY(x)\n+#define i40e_msec_delay(x) DELAY(1000 * (x))\n #define udelay(x) DELAY(x)\n #define msleep(x) DELAY(1000*(x))\n #define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))\ndiff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h\nindex cf151ef52..6aef25ea4 100644\n--- a/drivers/net/ifc/base/ifcvf_osdep.h\n+++ b/drivers/net/ifc/base/ifcvf_osdep.h\n@@ -17,7 +17,7 @@\n #define DEBUGOUT(S, args...)    RTE_LOG(DEBUG, PMD, S, ##args)\n #define STATIC                  static\n \n-#define msec_delay\trte_delay_ms\n+#define msec_delay(x)\trte_delay_us_sleep(1000 * (x))\n \n #define IFCVF_READ_REG8(reg)\t\trte_read8(reg)\n #define IFCVF_WRITE_REG8(val, reg)\trte_write8((val), (reg))\ndiff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h\nindex bb5dfd2af..94ede9bc2 100644\n--- a/drivers/net/ixgbe/base/ixgbe_osdep.h\n+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h\n@@ -51,7 +51,7 @@\n \n #define ASSERT(x) if(!(x)) rte_panic(\"IXGBE: x\")\n \n-#define DELAY(x) rte_delay_us(x)\n+#define DELAY(x) rte_delay_us_sleep(x)\n #define usec_delay(x) DELAY(x)\n #define msec_delay(x) DELAY(1000*(x))\n \n",
    "prefixes": [
        "RFC",
        "2/2"
    ]
}