Show a patch.

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

{
    "id": 44853,
    "url": "http://patches.dpdk.org/api/patches/44853/",
    "web_url": "http://patches.dpdk.org/patch/44853/",
    "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": "<1537277516-8876-11-git-send-email-hemant.agrawal@nxp.com>",
    "date": "2018-09-18T13:31:53",
    "name": "[v2,10/13] net/dpaa: separate Rx function for LS1046",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "001fd28a104173a42ca60855c90c09d8835e0be0",
    "submitter": {
        "id": 477,
        "url": "http://patches.dpdk.org/api/people/477/",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/44853/mbox/",
    "series": [
        {
            "id": 1371,
            "url": "http://patches.dpdk.org/api/series/1371/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1371",
            "date": "2018-09-18T13:31:43",
            "name": "NXP DPAA driver enhancements",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1371/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44853/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44853/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.7.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 14E845B40;\n\tTue, 18 Sep 2018 15:34:18 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n\tby dpdk.org (Postfix) with ESMTP id 6C67C532C\n\tfor <dev@dpdk.org>; Tue, 18 Sep 2018 15:34:07 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4AA5E1A013F;\n\tTue, 18 Sep 2018 15:34:07 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n\t[165.114.16.14])\n\tby inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EBEFF1A0138;\n\tTue, 18 Sep 2018 15:34:04 +0200 (CEST)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n\t[10.232.134.28])\n\tby invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0D44C402F7;\n\tTue, 18 Sep 2018 21:34:00 +0800 (SGT)"
        ],
        "References": "<1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com>\n\t<1537277516-8876-1-git-send-email-hemant.agrawal@nxp.com>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1537277516-8876-11-git-send-email-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list",
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net,\n\tferruh.yigit@intel.com",
        "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>",
        "Date": "Tue, 18 Sep 2018 19:01:53 +0530",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2 10/13] net/dpaa: separate Rx function for\n\tLS1046"
    },
    "content": "This is to avoid the checks in datapath and help in performance.\nLS1046 has different data stash settings.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/net/dpaa/dpaa_ethdev.c |  9 +++++--\n drivers/net/dpaa/dpaa_rxtx.c   | 60 +++++++++++++++++++++++++++++++++---------\n drivers/net/dpaa/dpaa_rxtx.h   |  3 +++\n 3 files changed, 58 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c\nindex c2d6f44..c430cac 100644\n--- a/drivers/net/dpaa/dpaa_ethdev.c\n+++ b/drivers/net/dpaa/dpaa_ethdev.c\n@@ -657,8 +657,13 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\t\t\t\"ret:%d(%s)\", rxq->fqid, ret, strerror(ret));\n \t\t\treturn ret;\n \t\t}\n-\t\trxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;\n-\t\trxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;\n+\t\tif (dpaa_svr_family == SVR_LS1043A_FAMILY) {\n+\t\t\trxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb_no_prefetch;\n+\t\t} else {\n+\t\t\trxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;\n+\t\t\trxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;\n+\t\t}\n+\n \t\trxq->is_static = true;\n \t}\n \tdev->data->rx_queues[queue_idx] = rxq;\ndiff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c\nindex 6698c97..2c57741 100644\n--- a/drivers/net/dpaa/dpaa_rxtx.c\n+++ b/drivers/net/dpaa/dpaa_rxtx.c\n@@ -398,8 +398,9 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid)\n \treturn mbuf;\n }\n \n+/* Specific for LS1043 */\n void\n-dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,\n+dpaa_rx_cb_no_prefetch(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,\n \t   void **bufs, int num_bufs)\n {\n \tstruct rte_mbuf *mbuf;\n@@ -411,17 +412,13 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,\n \tuint32_t length;\n \tuint8_t format;\n \n-\tif (dpaa_svr_family != SVR_LS1046A_FAMILY) {\n-\t\tbp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);\n-\t\tptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));\n-\t\trte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));\n-\t\tbufs[0] = (struct rte_mbuf *)((char *)ptr -\n-\t\t\t\tbp_info->meta_data_size);\n-\t}\n+\tbp_info = DPAA_BPID_TO_POOL_INFO(dqrr[0]->fd.bpid);\n+\tptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[0]->fd));\n+\trte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));\n+\tbufs[0] = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);\n \n \tfor (i = 0; i < num_bufs; i++) {\n-\t\tif (dpaa_svr_family != SVR_LS1046A_FAMILY &&\n-\t\t    i < num_bufs - 1) {\n+\t\tif (i < num_bufs - 1) {\n \t\t\tbp_info = DPAA_BPID_TO_POOL_INFO(dqrr[i + 1]->fd.bpid);\n \t\t\tptr = rte_dpaa_mem_ptov(qm_fd_addr(&dqrr[i + 1]->fd));\n \t\t\trte_prefetch0((void *)((uint8_t *)ptr +\n@@ -458,6 +455,46 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,\n \t}\n }\n \n+void\n+dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr,\n+\t   void **bufs, int num_bufs)\n+{\n+\tstruct rte_mbuf *mbuf;\n+\tconst struct qm_fd *fd;\n+\tstruct dpaa_if *dpaa_intf;\n+\tuint16_t offset, i;\n+\tuint32_t length;\n+\tuint8_t format;\n+\n+\tfor (i = 0; i < num_bufs; i++) {\n+\t\tfd = &dqrr[i]->fd;\n+\t\tdpaa_intf = fq[0]->dpaa_intf;\n+\n+\t\tformat = (fd->opaque & DPAA_FD_FORMAT_MASK) >>\n+\t\t\t\tDPAA_FD_FORMAT_SHIFT;\n+\t\tif (unlikely(format == qm_fd_sg)) {\n+\t\t\tbufs[i] = dpaa_eth_sg_to_mbuf(fd, dpaa_intf->ifid);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\toffset = (fd->opaque & DPAA_FD_OFFSET_MASK) >>\n+\t\t\t\tDPAA_FD_OFFSET_SHIFT;\n+\t\tlength = fd->opaque & DPAA_FD_LENGTH_MASK;\n+\n+\t\tmbuf = bufs[i];\n+\t\tmbuf->data_off = offset;\n+\t\tmbuf->data_len = length;\n+\t\tmbuf->pkt_len = length;\n+\t\tmbuf->port = dpaa_intf->ifid;\n+\n+\t\tmbuf->nb_segs = 1;\n+\t\tmbuf->ol_flags = 0;\n+\t\tmbuf->next = NULL;\n+\t\trte_mbuf_refcnt_set(mbuf, 1);\n+\t\tdpaa_eth_packet_info(mbuf, mbuf->buf_addr);\n+\t}\n+}\n+\n void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)\n {\n \tstruct dpaa_bp_info *bp_info = DPAA_BPID_TO_POOL_INFO(dq->fd.bpid);\n@@ -468,8 +505,7 @@ void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs)\n \t * So we prefetch the annoation beforehand, so that it is available\n \t * in cache when accessed.\n \t */\n-\tif (dpaa_svr_family == SVR_LS1046A_FAMILY)\n-\t\trte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));\n+\trte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF));\n \n \t*bufs = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size);\n }\ndiff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h\nindex 6de70a7..75b093c 100644\n--- a/drivers/net/dpaa/dpaa_rxtx.h\n+++ b/drivers/net/dpaa/dpaa_rxtx.h\n@@ -270,4 +270,7 @@ void dpaa_rx_cb(struct qman_fq **fq,\n \t\tstruct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);\n \n void dpaa_rx_cb_prepare(struct qm_dqrr_entry *dq, void **bufs);\n+\n+void dpaa_rx_cb_no_prefetch(struct qman_fq **fq,\n+\t\t    struct qm_dqrr_entry **dqrr, void **bufs, int num_bufs);\n #endif\n",
    "prefixes": [
        "v2",
        "10/13"
    ]
}