Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/56052/?format=api
https://patches.dpdk.org/api/patches/56052/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190703234313.10782-3-rmody@marvell.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": "<20190703234313.10782-3-rmody@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190703234313.10782-3-rmody@marvell.com", "date": "2019-07-03T23:43:13", "name": "[3/3] net/bnx2x: fix fastpath SB allocation for SRIOV", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5c9401e8c618f74d208f2af6ae6fc1e75973dd23", "submitter": { "id": 1211, "url": "https://patches.dpdk.org/api/people/1211/?format=api", "name": "Rasesh Mody", "email": "rmody@marvell.com" }, "delegate": { "id": 310, "url": "https://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190703234313.10782-3-rmody@marvell.com/mbox/", "series": [ { "id": 5321, "url": "https://patches.dpdk.org/api/series/5321/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5321", "date": "2019-07-03T23:43:11", "name": "[1/3] net/bnx2x: fix read VF id", "version": 1, "mbox": "https://patches.dpdk.org/series/5321/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/56052/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/56052/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7581225D9;\n\tThu, 4 Jul 2019 01:44:15 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CAED02956;\n\tThu, 4 Jul 2019 01:44:11 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n\tby mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx63NeIgg021952; Wed, 3 Jul 2019 16:44:11 -0700", "from sc-exch01.marvell.com ([199.233.58.181])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2tgtf72vgt-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tWed, 03 Jul 2019 16:44:11 -0700", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tWed, 3 Jul 2019 16:44:08 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Wed, 3 Jul 2019 16:44:08 -0700", "from irv1user08.caveonetworks.com (unknown [10.104.116.105])\n\tby maili.marvell.com (Postfix) with ESMTP id C82753F7043;\n\tWed, 3 Jul 2019 16:44:08 -0700 (PDT)", "(from rmody@localhost)\n\tby irv1user08.caveonetworks.com (8.14.4/8.14.4/Submit) id\n\tx63Ni8Ks011800; Wed, 3 Jul 2019 16:44:08 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-type; s=pfpt0818;\n\tbh=v/0mhnYfRCrQ8N5fI8OELOGbMFJTGiUgDOyZIpBJFaM=; \n\tb=RuSe0BWXRXZG0pRHKg0tnOssXDBWLu9XIYsNdr+n3V+FM3nByNgUeprmwTQNuOBKtN7i\n\tI7zqJTsmndLH+/k+iOoEg+gd7bkVQuAZa8bcAFsL6UtF7us1gBPDtYXB19CvrU2YL7uW\n\txMDynXpUk64R9OTHqAGjXAubR40gy1O1IJIX6WU3DJP8FDQD+x5Wf/rAJ0+hNfWe63Q5\n\tuIcWSJQDOAyy8gDj/t588QdXjpGe9ZhZW5eFaUQI4nks7zEX1PxNi1yr7lEmvWHw/qzw\n\trj97xwnlNUeSsewODwAoizysl5RAE/bxBJXV5rGepCbUoivG/rPNnc7geVp/VJIAJV73\n\tkA== ", "X-Authentication-Warning": "irv1user08.caveonetworks.com: rmody set sender to\n\trmody@marvell.com using -f", "From": "Rasesh Mody <rmody@marvell.com>", "To": "<dev@dpdk.org>", "CC": "Rasesh Mody <rmody@marvell.com>, <ferruh.yigit@intel.com>,\n\t<GR-Everest-DPDK-Dev@marvell.com>, <stable@dpdk.org>", "Date": "Wed, 3 Jul 2019 16:43:13 -0700", "Message-ID": "<20190703234313.10782-3-rmody@marvell.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20190703234313.10782-1-rmody@marvell.com>", "References": "<20190703234313.10782-1-rmody@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-07-03_06:, , signatures=0", "Subject": "[dpdk-dev] [PATCH 3/3] net/bnx2x: fix fastpath SB allocation for\n\tSRIOV", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "For SRIOV, fastpath status blocks are not allocated resulting in\nsegfault. Separate out fastpath DMA allocation/free from rest of\nmemory allocation/free. It is now done as part of NIC load/unload.\n\nComment indentation changes in bnx2x_alloc_hsi_mem() and\nbnx2x_free_hsi_mem() APIs.\n\nFixes: f0219d98defd (\"net/bnx2x: fix interrupt flood\")\nCc: stable@dpdk.org\n\nSigned-off-by: Rasesh Mody <rmody@marvell.com>\n---\n drivers/net/bnx2x/bnx2x.c | 117 +++++++++++++++++++-------------------\n 1 file changed, 60 insertions(+), 57 deletions(-)", "diff": "diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c\nindex 877f5b73d..1a088269f 100644\n--- a/drivers/net/bnx2x/bnx2x.c\n+++ b/drivers/net/bnx2x/bnx2x.c\n@@ -2120,6 +2120,9 @@ bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link\n \t\tbnx2x_free_mem(sc);\n \t}\n \n+\t/* free the host hardware/software hsi structures */\n+\tbnx2x_free_hsi_mem(sc);\n+\n \tbnx2x_free_fw_stats_mem(sc);\n \n \tsc->state = BNX2X_STATE_CLOSED;\n@@ -2403,9 +2406,6 @@ static void bnx2x_free_mem(struct bnx2x_softc *sc)\n \tecore_ilt_mem_op(sc, ILT_MEMOP_FREE);\n \n \tbnx2x_free_ilt_lines_mem(sc);\n-\n-\t/* free the host hardware/software hsi structures */\n-\tbnx2x_free_hsi_mem(sc);\n }\n \n static int bnx2x_alloc_mem(struct bnx2x_softc *sc)\n@@ -2456,13 +2456,6 @@ static int bnx2x_alloc_mem(struct bnx2x_softc *sc)\n \t\treturn -1;\n \t}\n \n-\t/* allocate the host hardware/software hsi structures */\n-\tif (bnx2x_alloc_hsi_mem(sc) != 0) {\n-\t\tPMD_DRV_LOG(ERR, sc, \"bnx2x_alloc_hsi_mem was failed\");\n-\t\tbnx2x_free_mem(sc);\n-\t\treturn -ENXIO;\n-\t}\n-\n \treturn 0;\n }\n \n@@ -7242,6 +7235,14 @@ int bnx2x_nic_load(struct bnx2x_softc *sc)\n \t\t}\n \t}\n \n+\t/* allocate the host hardware/software hsi structures */\n+\tif (bnx2x_alloc_hsi_mem(sc) != 0) {\n+\t\tPMD_DRV_LOG(ERR, sc, \"bnx2x_alloc_hsi_mem was failed\");\n+\t\tsc->state = BNX2X_STATE_CLOSED;\n+\t\trc = -ENOMEM;\n+\t\tgoto bnx2x_nic_load_error0;\n+\t}\n+\n \tif (bnx2x_alloc_fw_stats_mem(sc) != 0) {\n \t\tsc->state = BNX2X_STATE_CLOSED;\n \t\trc = -ENOMEM;\n@@ -7457,6 +7458,7 @@ int bnx2x_nic_load(struct bnx2x_softc *sc)\n bnx2x_nic_load_error0:\n \n \tbnx2x_free_fw_stats_mem(sc);\n+\tbnx2x_free_hsi_mem(sc);\n \tbnx2x_free_mem(sc);\n \n \treturn rc;\n@@ -8902,9 +8904,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \tuint32_t i;\n \n \tif (IS_PF(sc)) {\n-/************************/\n-/* DEFAULT STATUS BLOCK */\n-/************************/\n+\t\t/************************/\n+\t\t/* DEFAULT STATUS BLOCK */\n+\t\t/************************/\n \n \t\tif (bnx2x_dma_alloc(sc, sizeof(struct host_sp_status_block),\n \t\t\t\t &sc->def_sb_dma, \"def_sb\",\n@@ -8914,9 +8916,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \n \t\tsc->def_sb =\n \t\t (struct host_sp_status_block *)sc->def_sb_dma.vaddr;\n-/***************/\n-/* EVENT QUEUE */\n-/***************/\n+\t\t/***************/\n+\t\t/* EVENT QUEUE */\n+\t\t/***************/\n \n \t\tif (bnx2x_dma_alloc(sc, BNX2X_PAGE_SIZE,\n \t\t\t\t &sc->eq_dma, \"ev_queue\",\n@@ -8927,9 +8929,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \n \t\tsc->eq = (union event_ring_elem *)sc->eq_dma.vaddr;\n \n-/*************/\n-/* SLOW PATH */\n-/*************/\n+\t\t/*************/\n+\t\t/* SLOW PATH */\n+\t\t/*************/\n \n \t\tif (bnx2x_dma_alloc(sc, sizeof(struct bnx2x_slowpath),\n \t\t\t\t &sc->sp_dma, \"sp\",\n@@ -8941,9 +8943,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \n \t\tsc->sp = (struct bnx2x_slowpath *)sc->sp_dma.vaddr;\n \n-/*******************/\n-/* SLOW PATH QUEUE */\n-/*******************/\n+\t\t/*******************/\n+\t\t/* SLOW PATH QUEUE */\n+\t\t/*******************/\n \n \t\tif (bnx2x_dma_alloc(sc, BNX2X_PAGE_SIZE,\n \t\t\t\t &sc->spq_dma, \"sp_queue\",\n@@ -8956,9 +8958,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \n \t\tsc->spq = (struct eth_spe *)sc->spq_dma.vaddr;\n \n-/***************************/\n-/* FW DECOMPRESSION BUFFER */\n-/***************************/\n+\t\t/***************************/\n+\t\t/* FW DECOMPRESSION BUFFER */\n+\t\t/***************************/\n \n \t\tif (bnx2x_dma_alloc(sc, FW_BUF_SIZE, &sc->gz_buf_dma,\n \t\t\t\t \"fw_buf\", RTE_CACHE_LINE_SIZE) != 0) {\n@@ -8982,9 +8984,9 @@ int bnx2x_alloc_hsi_mem(struct bnx2x_softc *sc)\n \t\tfp->sc = sc;\n \t\tfp->index = i;\n \n-/*******************/\n-/* FP STATUS BLOCK */\n-/*******************/\n+\t\t/*******************/\n+\t\t/* FP STATUS BLOCK */\n+\t\t/*******************/\n \n \t\tsnprintf(buf, sizeof(buf), \"fp_%d_sb\", i);\n \t\tif (bnx2x_dma_alloc(sc, sizeof(union bnx2x_host_hc_status_block),\n@@ -9015,49 +9017,50 @@ void bnx2x_free_hsi_mem(struct bnx2x_softc *sc)\n \tfor (i = 0; i < sc->num_queues; i++) {\n \t\tfp = &sc->fp[i];\n \n-/*******************/\n-/* FP STATUS BLOCK */\n-/*******************/\n+\t\t/*******************/\n+\t\t/* FP STATUS BLOCK */\n+\t\t/*******************/\n \n \t\tmemset(&fp->status_block, 0, sizeof(fp->status_block));\n \t\tbnx2x_dma_free(&fp->sb_dma);\n \t}\n \n-\t/***************************/\n-\t/* FW DECOMPRESSION BUFFER */\n-\t/***************************/\n-\n-\tbnx2x_dma_free(&sc->gz_buf_dma);\n-\tsc->gz_buf = NULL;\n+\tif (IS_PF(sc)) {\n+\t\t/***************************/\n+\t\t/* FW DECOMPRESSION BUFFER */\n+\t\t/***************************/\n \n-\t/*******************/\n-\t/* SLOW PATH QUEUE */\n-\t/*******************/\n+\t\tbnx2x_dma_free(&sc->gz_buf_dma);\n+\t\tsc->gz_buf = NULL;\n \n-\tbnx2x_dma_free(&sc->spq_dma);\n-\tsc->spq = NULL;\n+\t\t/*******************/\n+\t\t/* SLOW PATH QUEUE */\n+\t\t/*******************/\n \n-\t/*************/\n-\t/* SLOW PATH */\n-\t/*************/\n+\t\tbnx2x_dma_free(&sc->spq_dma);\n+\t\tsc->spq = NULL;\n \n-\tbnx2x_dma_free(&sc->sp_dma);\n-\tsc->sp = NULL;\n+\t\t/*************/\n+\t\t/* SLOW PATH */\n+\t\t/*************/\n \n-\t/***************/\n-\t/* EVENT QUEUE */\n-\t/***************/\n+\t\tbnx2x_dma_free(&sc->sp_dma);\n+\t\tsc->sp = NULL;\n \n-\tbnx2x_dma_free(&sc->eq_dma);\n-\tsc->eq = NULL;\n+\t\t/***************/\n+\t\t/* EVENT QUEUE */\n+\t\t/***************/\n \n-\t/************************/\n-\t/* DEFAULT STATUS BLOCK */\n-\t/************************/\n+\t\tbnx2x_dma_free(&sc->eq_dma);\n+\t\tsc->eq = NULL;\n \n-\tbnx2x_dma_free(&sc->def_sb_dma);\n-\tsc->def_sb = NULL;\n+\t\t/************************/\n+\t\t/* DEFAULT STATUS BLOCK */\n+\t\t/************************/\n \n+\t\tbnx2x_dma_free(&sc->def_sb_dma);\n+\t\tsc->def_sb = NULL;\n+\t}\n }\n \n /*\n", "prefixes": [ "3/3" ] }{ "id": 56052, "url": "