get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8465,
    "url": "https://patches.dpdk.org/api/patches/8465/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446231319-8185-2-git-send-email-adrien.mazarguil@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": "<1446231319-8185-2-git-send-email-adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446231319-8185-2-git-send-email-adrien.mazarguil@6wind.com",
    "date": "2015-10-30T18:55:04",
    "name": "[dpdk-dev,v2,01/16] mlx5: use fast Verbs interface for scattered RX operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "81292d044d4786c6241f5a5e1f70f281dbc2060b",
    "submitter": {
        "id": 165,
        "url": "https://patches.dpdk.org/api/people/165/?format=api",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446231319-8185-2-git-send-email-adrien.mazarguil@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8465/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8465/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 EBA38921C;\n\tFri, 30 Oct 2015 19:55:49 +0100 (CET)",
            "from mail-wm0-f53.google.com (mail-wm0-f53.google.com\n\t[74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 3CCAB91FF\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 19:55:44 +0100 (CET)",
            "by wmll128 with SMTP id l128so19302918wml.0\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 11:55:44 -0700 (PDT)",
            "from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by smtp.gmail.com with ESMTPSA id\n\td10sm8401800wje.14.2015.10.30.11.55.42\n\t(version=TLSv1.2 cipher=RC4-SHA bits=128/128);\n\tFri, 30 Oct 2015 11:55:43 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind_com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=Tj0n7NJNjA8hoe34DUE8Kedc/c5SJPTQXpEKbIPL5yI=;\n\tb=jLfBt+6d8q4BVahylQe7+XmABZ0g5hyQdkt8vvPuiotWkSBedR8+wOvR1/H4M/UTet\n\t+VRegZSDOYUNUjyI5iKaS1olQJWOlWC/MguE8wGCqM+yPYto0xZbbzxZgxxiSSdrPWm4\n\tJSmaLm0iA/nY1I8zQNqYwfURzIRCN/CT0UKTlhlE22ZFxAEox22Tu32H921JIP5Edvd6\n\t0ky6dcBck5ng95JRzPQEE4S8HRUnQCYq6192LeIlqjZAlTXiS+u3OkNweaAGsyXfScgh\n\t2Y2gfuCh2ITBvTgz7EYxavJNWliCW0WrFoft31RTA8Fui3ghXLIoUU4h1KfRd2YYDHhK\n\t1W0A==",
        "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=Tj0n7NJNjA8hoe34DUE8Kedc/c5SJPTQXpEKbIPL5yI=;\n\tb=V2zKo7yg4jTFsZHCMU+f9XypKrNQfPNay9L5ridzMU2d4QRnojj7X2RsZaqzZS1lf5\n\tkGYCOjG/cJgdCbdu3febY/p5Mkeh7QTzDLebBNLquUUP7fh4MRqSbubiBljHmkILVbS3\n\t0irarHfge7T+YRtdjQPpy/fMJ5ZsUXFMbR2ft5QZIKQpl/+TZgt+kWhIXNTV2gqSK7rn\n\t1gq7qdZBPwtwH7WtROGqpqrKizJbIOWKZwatbhuTSyhbkrYpMnely5rcbZebKMdDFurJ\n\tjwzn1lFU90y2IHnm87IkJP46+ZUTenTFF0KPcX/EMhGYtA2ITwKv1ZF1I+6TiwqssrUh\n\tDEpQ==",
        "X-Gm-Message-State": "ALoCoQnGMjsdGx4XaQ4HaSsN5RDOS5drYLeLD07zPsYyfnJy/xboCpbCg1+crZ0khwvsHMQfpCiV",
        "X-Received": "by 10.28.88.135 with SMTP id m129mr5525807wmb.67.1446231344085; \n\tFri, 30 Oct 2015 11:55:44 -0700 (PDT)",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 30 Oct 2015 19:55:04 +0100",
        "Message-Id": "<1446231319-8185-2-git-send-email-adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1446231319-8185-1-git-send-email-adrien.mazarguil@6wind.com>",
        "References": "<1444067692-29645-1-git-send-email-adrien.mazarguil@6wind.com>\n\t<1446231319-8185-1-git-send-email-adrien.mazarguil@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH v2 01/16] mlx5: use fast Verbs interface for\n\tscattered RX operation",
        "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": "This commit updates mlx5_rx_burst_sp() to use the fast verbs interface for\nposting RX buffers just like mlx5_rx_burst(). Doing so avoids a loop in\nlibmlx5 and an indirect function call through libibverbs.\n\nNote: recv_sg_list() is not implemented in the QP burst API, this commit is\nonly to prepare transition to the WQ-based API.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\nSigned-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/Makefile    |  4 ++++\n drivers/net/mlx5/mlx5_rxtx.c | 40 +++++++++++++++++-----------------------\n 2 files changed, 21 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile\nindex 8b1e32b..2969045 100644\n--- a/drivers/net/mlx5/Makefile\n+++ b/drivers/net/mlx5/Makefile\n@@ -119,6 +119,10 @@ mlx5_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh\n \t\tHAVE_EXP_QUERY_DEVICE \\\n \t\tinfiniband/verbs.h \\\n \t\ttype 'struct ibv_exp_device_attr' $(AUTOCONF_OUTPUT)\n+\t$Q sh -- '$<' '$@' \\\n+\t\tHAVE_EXP_QP_BURST_RECV_SG_LIST \\\n+\t\tinfiniband/verbs.h \\\n+\t\tfield 'struct ibv_exp_qp_burst_family.recv_sg_list' $(AUTOCONF_OUTPUT)\n \n mlx5.o: mlx5_autoconf.h\n \ndiff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 623219d..8872f19 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -35,6 +35,7 @@\n #include <stdint.h>\n #include <string.h>\n #include <stdlib.h>\n+#include <errno.h>\n \n /* Verbs header. */\n /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */\n@@ -60,6 +61,7 @@\n #endif\n \n #include \"mlx5.h\"\n+#include \"mlx5_autoconf.h\"\n #include \"mlx5_utils.h\"\n #include \"mlx5_rxtx.h\"\n #include \"mlx5_defs.h\"\n@@ -600,9 +602,6 @@ mlx5_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \tstruct rxq_elt_sp (*elts)[rxq->elts_n] = rxq->elts.sp;\n \tconst unsigned int elts_n = rxq->elts_n;\n \tunsigned int elts_head = rxq->elts_head;\n-\tstruct ibv_recv_wr head;\n-\tstruct ibv_recv_wr **next = &head.next;\n-\tstruct ibv_recv_wr *bad_wr;\n \tunsigned int i;\n \tunsigned int pkts_ret = 0;\n \tint ret;\n@@ -660,9 +659,6 @@ mlx5_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \t\t\t\t/* Increment dropped packets counter. */\n \t\t\t\t++rxq->stats.idropped;\n #endif\n-\t\t\t\t/* Link completed WRs together for repost. */\n-\t\t\t\t*next = wr;\n-\t\t\t\tnext = &wr->next;\n \t\t\t\tgoto repost;\n \t\t\t}\n \t\t\tret = wc.byte_len;\n@@ -671,9 +667,6 @@ mlx5_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \t\t\tbreak;\n \t\tlen = ret;\n \t\tpkt_buf_len = len;\n-\t\t/* Link completed WRs together for repost. */\n-\t\t*next = wr;\n-\t\tnext = &wr->next;\n \t\t/*\n \t\t * Replace spent segments with new ones, concatenate and\n \t\t * return them as pkt_buf.\n@@ -770,26 +763,27 @@ mlx5_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)\n \t\trxq->stats.ibytes += pkt_buf_len;\n #endif\n repost:\n+#ifdef HAVE_EXP_QP_BURST_RECV_SG_LIST\n+\t\tret = rxq->if_qp->recv_sg_list(rxq->qp,\n+\t\t\t\t\t       elt->sges,\n+\t\t\t\t\t       RTE_DIM(elt->sges));\n+#else /* HAVE_EXP_QP_BURST_RECV_SG_LIST */\n+\t\terrno = ENOSYS;\n+\t\tret = -1;\n+#endif /* HAVE_EXP_QP_BURST_RECV_SG_LIST */\n+\t\tif (unlikely(ret)) {\n+\t\t\t/* Inability to repost WRs is fatal. */\n+\t\t\tDEBUG(\"%p: recv_sg_list(): failed (ret=%d)\",\n+\t\t\t      (void *)rxq->priv,\n+\t\t\t      ret);\n+\t\t\tabort();\n+\t\t}\n \t\tif (++elts_head >= elts_n)\n \t\t\telts_head = 0;\n \t\tcontinue;\n \t}\n \tif (unlikely(i == 0))\n \t\treturn 0;\n-\t*next = NULL;\n-\t/* Repost WRs. */\n-#ifdef DEBUG_RECV\n-\tDEBUG(\"%p: reposting %d WRs\", (void *)rxq, i);\n-#endif\n-\tret = ibv_post_recv(rxq->qp, head.next, &bad_wr);\n-\tif (unlikely(ret)) {\n-\t\t/* Inability to repost WRs is fatal. */\n-\t\tDEBUG(\"%p: ibv_post_recv(): failed for WR %p: %s\",\n-\t\t      (void *)rxq->priv,\n-\t\t      (void *)bad_wr,\n-\t\t      strerror(ret));\n-\t\tabort();\n-\t}\n \trxq->elts_head = elts_head;\n #ifdef MLX5_PMD_SOFT_COUNTERS\n \t/* Increment packets counter. */\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "01/16"
    ]
}