get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64593,
    "url": "http://patches.dpdk.org/api/patches/64593/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200114003920.17705-1-rmody@marvell.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": "<20200114003920.17705-1-rmody@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200114003920.17705-1-rmody@marvell.com",
    "date": "2020-01-14T00:39:18",
    "name": "[1/3] net/bnx2x: fix to use required mem barriers in Rx path",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "f4fc9d36d9916d537aa7978b39d0507c54200be0",
    "submitter": {
        "id": 1211,
        "url": "http://patches.dpdk.org/api/people/1211/?format=api",
        "name": "Rasesh Mody",
        "email": "rmody@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200114003920.17705-1-rmody@marvell.com/mbox/",
    "series": [
        {
            "id": 8094,
            "url": "http://patches.dpdk.org/api/series/8094/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8094",
            "date": "2020-01-14T00:39:18",
            "name": "[1/3] net/bnx2x: fix to use required mem barriers in Rx path",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8094/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64593/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64593/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B498BA04FD;\n\tTue, 14 Jan 2020 01:39:40 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3401B1C1D2;\n\tTue, 14 Jan 2020 01:39:40 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 0FC5D1C1CB;\n Tue, 14 Jan 2020 01:39:38 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 00E0Qg7l020730; Mon, 13 Jan 2020 16:39:38 -0800",
            "from sc-exch04.marvell.com ([199.233.58.184])\n by mx0a-0016f401.pphosted.com with ESMTP id 2xfckur0e1-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 13 Jan 2020 16:39:38 -0800",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com\n (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Jan\n 2020 16:39:36 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 13 Jan 2020 16:39:36 -0800",
            "from irv1user08.caveonetworks.com (unknown [10.104.116.105])\n by maili.marvell.com (Postfix) with ESMTP id 9A1943F703F;\n Mon, 13 Jan 2020 16:39:36 -0800 (PST)",
            "(from rmody@localhost)\n by irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id 00E0daPa017774;\n Mon, 13 Jan 2020 16:39:36 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-type; s=pfpt0818;\n bh=A1DkO320kLCFA+ZW59RmSQXxO0ih0ORnNbuJdSW+uvM=;\n b=ljcTaoDSbufTPQ415uTnl7maSK3pmDwkDYaST5RgGtyMl8vXllhk8NdMBX9ZJw/d1hC9\n JRFrikjVIsi1FCJmRCYrHZVWv3ZwLSEy15Gbwy/pY8cE3trp19gN3pS3rWuDuVYCMSYj\n Hpk1hXdZdZ0l22Lj8mySP2Qu4nQB+mG4p/RVgPNJS+mZfVDsOLV9S6bGPuQUKNnaapye\n rYMho+dwODTygq2VH4noDgnzd8zclh0wqVUNLplptCk3ZqTE8iqN+6ko7NxwX+Y7SrAy\n W6mxz4pD4L7+qz+D7zvegZPj0JAEACys0kGkHXQy1j3T0z4qCDQXMlNz0kktMg0/akjx yA==",
        "X-Authentication-Warning": "irv1user08.caveonetworks.com: rmody set sender to\n rmody@marvell.com using -f",
        "From": "Rasesh Mody <rmody@marvell.com>",
        "To": "<dev@dpdk.org>, <jerinj@marvell.com>, <ferruh.yigit@intel.com>",
        "CC": "Rasesh Mody <rmody@marvell.com>, <GR-Everest-DPDK-Dev@marvell.com>,\n <stable@dpdk.org>",
        "Date": "Mon, 13 Jan 2020 16:39:18 -0800",
        "Message-ID": "<20200114003920.17705-1-rmody@marvell.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-01-13_08:2020-01-13,\n 2020-01-13 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 1/3] net/bnx2x: fix to use required mem barriers\n\tin Rx path",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When handling RX completion queue PMD is not using required read/write\nbarriers before reading completion queue element (CQE) indices,\nupdating/writing hardware consumer and producer.\nThis patch adds appropriate read/write memory barriers in places which\nare required by driver and adapter to read or update indices.\n\nFixes: 540a211084a7 (\"bnx2x: driver core\")\nCc: stable@dpdk.org\n\nSigned-off-by: Rasesh Mody <rmody@marvell.com>\n---\n drivers/net/bnx2x/bnx2x.c      |  5 +++++\n drivers/net/bnx2x/bnx2x_rxtx.c | 22 ++++++++++++++++++++++\n 2 files changed, 27 insertions(+)",
    "diff": "diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c\nindex ed31335ac..9c5e7995d 100644\n--- a/drivers/net/bnx2x/bnx2x.c\n+++ b/drivers/net/bnx2x/bnx2x.c\n@@ -1255,6 +1255,11 @@ static uint8_t bnx2x_rxeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp)\n \t\treturn 0;\n \t}\n \n+\t/* Add memory barrier as status block fields can change. This memory\n+\t * barrier will flush out all the read/write operations to status block\n+\t * generated before the barrier. It will ensure stale data is not read\n+\t */\n+\tmb();\n \t/* CQ \"next element\" is of the size of the regular element */\n \thw_cq_cons = le16toh(*fp->rx_cq_cons_sb);\n \tif (unlikely((hw_cq_cons & USABLE_RCQ_ENTRIES_PER_PAGE) ==\ndiff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c\nindex ae97dfee3..b52f023ea 100644\n--- a/drivers/net/bnx2x/bnx2x_rxtx.c\n+++ b/drivers/net/bnx2x/bnx2x_rxtx.c\n@@ -324,11 +324,22 @@ bnx2x_upd_rx_prod_fast(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,\n \tstruct ustorm_eth_rx_producers rx_prods = { 0 };\n \tuint32_t *val = NULL;\n \n+\t/* Update producers */\n \trx_prods.bd_prod  = rx_bd_prod;\n \trx_prods.cqe_prod = rx_cq_prod;\n \n+\t/*\n+\t * Make sure that the BD and SGE data is updated before updating the\n+\t * producers since FW might read the BD/SGE right after the producer\n+\t * is updated.\n+\t * The following barrier is also mandatory since FW will assumes BDs\n+\t * must have buffers.\n+\t */\n+\twmb();\n \tval = (uint32_t *)&rx_prods;\n \tREG_WR(sc, fp->ustorm_rx_prods_offset, val[0]);\n+\n+\twmb();\t\t\t/* keep prod updates ordered */\n }\n \n static uint16_t\n@@ -346,6 +357,11 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \tuint16_t len, pad;\n \tstruct rte_mbuf *rx_mb = NULL;\n \n+\t/* Add memory barrier as status block fields can change. This memory\n+\t * barrier will flush out all the read/write operations to status block\n+\t * generated before the barrier. It will ensure stale data is not read\n+\t */\n+\tmb();\n \thw_cq_cons = le16toh(*fp->rx_cq_cons_sb);\n \tif ((hw_cq_cons & USABLE_RCQ_ENTRIES_PER_PAGE) ==\n \t\t\tUSABLE_RCQ_ENTRIES_PER_PAGE) {\n@@ -357,6 +373,12 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \tsw_cq_cons = rxq->rx_cq_head;\n \tsw_cq_prod = rxq->rx_cq_tail;\n \n+\t/*\n+\t * Memory barrier necessary as speculative reads of the Rx\n+\t * buffer can be ahead of the index in the status block\n+\t */\n+\trmb();\n+\n \tif (sw_cq_cons == hw_cq_cons)\n \t\treturn 0;\n \n",
    "prefixes": [
        "1/3"
    ]
}