Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/76538/?format=api
http://patches.dpdk.org/api/patches/76538/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200904082921.17400-4-hemant.agrawal@nxp.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": "<20200904082921.17400-4-hemant.agrawal@nxp.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200904082921.17400-4-hemant.agrawal@nxp.com", "date": "2020-09-04T08:29:18", "name": "[v7,4/7] bus/dpaa: add Virtual Storage Profile port init", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9e991130fbc8a157838e90b9a0b190407909fb5a", "submitter": { "id": 477, "url": "http://patches.dpdk.org/api/people/477/?format=api", "name": "Hemant Agrawal", "email": "hemant.agrawal@nxp.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200904082921.17400-4-hemant.agrawal@nxp.com/mbox/", "series": [ { "id": 11949, "url": "http://patches.dpdk.org/api/series/11949/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11949", "date": "2020-09-04T08:29:15", "name": "[v7,1/7] net/dpaa: add VSP support in FMLIB", "version": 7, "mbox": "http://patches.dpdk.org/series/11949/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/76538/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/76538/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 F0FDCA04B1;\n\tFri, 4 Sep 2020 10:36:06 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5DD1A1C10E;\n\tFri, 4 Sep 2020 10:35:41 +0200 (CEST)", "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by dpdk.org (Postfix) with ESMTP id BF7B81C0BF\n for <dev@dpdk.org>; Fri, 4 Sep 2020 10:35:36 +0200 (CEST)", "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 923CF201689;\n Fri, 4 Sep 2020 10:35:36 +0200 (CEST)", "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F165620192B;\n Fri, 4 Sep 2020 10:35:34 +0200 (CEST)", "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 78281402EB;\n Fri, 4 Sep 2020 10:35:32 +0200 (CEST)" ], "From": "Hemant Agrawal <hemant.agrawal@nxp.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com", "Date": "Fri, 4 Sep 2020 13:59:18 +0530", "Message-Id": "<20200904082921.17400-4-hemant.agrawal@nxp.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200904082921.17400-1-hemant.agrawal@nxp.com>", "References": "<20200901123650.29908-1-hemant.agrawal@nxp.com>\n <20200904082921.17400-1-hemant.agrawal@nxp.com>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Subject": "[dpdk-dev] [PATCH v7 4/7] bus/dpaa: add Virtual Storage Profile\n\tport init", "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": "This patch add support to initialize the VSP ports\nin the FMAN library.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/bus/dpaa/base/fman/fman.c | 57 +++++++++++++++++++++++++++++++\n drivers/bus/dpaa/include/fman.h | 3 ++\n 2 files changed, 60 insertions(+)", "diff": "diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c\nindex 3ae29bf06..39102bc1f 100644\n--- a/drivers/bus/dpaa/base/fman/fman.c\n+++ b/drivers/bus/dpaa/base/fman/fman.c\n@@ -145,6 +145,61 @@ fman_get_mac_index(uint64_t regs_addr_host, uint8_t *mac_idx)\n \treturn ret;\n }\n \n+static void fman_if_vsp_init(struct __fman_if *__if)\n+{\n+\tconst phandle *prop;\n+\tint cell_index;\n+\tconst struct device_node *dev;\n+\tsize_t lenp;\n+\tconst uint8_t mac_idx[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1};\n+\n+\tif (__if->__if.mac_type == fman_mac_1g) {\n+\t\tfor_each_compatible_node(dev, NULL,\n+\t\t\t\"fsl,fman-port-1g-rx-extended-args\") {\n+\t\t\tprop = of_get_property(dev, \"cell-index\", &lenp);\n+\t\t\tif (prop) {\n+\t\t\t\tcell_index = of_read_number(\n+\t\t\t\t\t\t&prop[0],\n+\t\t\t\t\t\tlenp / sizeof(phandle));\n+\t\t\t\tif (cell_index == mac_idx[__if->__if.mac_idx]) {\n+\t\t\t\t\tprop = of_get_property(\n+\t\t\t\t\t\t\tdev,\n+\t\t\t\t\t\t\t\"vsp-window\", &lenp);\n+\t\t\t\t\tif (prop) {\n+\t\t\t\t\t\t__if->__if.num_profiles =\n+\t\t\t\t\t\t\tof_read_number(\n+\t\t\t\t\t\t\t\t&prop[0], 1);\n+\t\t\t\t\t\t__if->__if.base_profile_id =\n+\t\t\t\t\t\t\tof_read_number(\n+\t\t\t\t\t\t\t\t&prop[1], 1);\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t} else if (__if->__if.mac_type == fman_mac_10g) {\n+\t\tfor_each_compatible_node(dev, NULL,\n+\t\t\t\"fsl,fman-port-10g-rx-extended-args\") {\n+\t\t\tprop = of_get_property(dev, \"cell-index\", &lenp);\n+\t\t\tif (prop) {\n+\t\t\t\tcell_index = of_read_number(\n+\t\t\t\t\t&prop[0], lenp / sizeof(phandle));\n+\t\t\t\tif (cell_index == mac_idx[__if->__if.mac_idx]) {\n+\t\t\t\t\tprop = of_get_property(\n+\t\t\t\t\t\tdev, \"vsp-window\", &lenp);\n+\t\t\t\t\tif (prop) {\n+\t\t\t\t\t\t__if->__if.num_profiles =\n+\t\t\t\t\t\t\tof_read_number(\n+\t\t\t\t\t\t\t\t&prop[0], 1);\n+\t\t\t\t\t\t__if->__if.base_profile_id =\n+\t\t\t\t\t\t\tof_read_number(\n+\t\t\t\t\t\t\t\t&prop[1], 1);\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+\n static int\n fman_if_init(const struct device_node *dpa_node)\n {\n@@ -519,6 +574,8 @@ fman_if_init(const struct device_node *dpa_node)\n \tif (is_shared)\n \t\t__if->__if.is_shared_mac = 1;\n \n+\tfman_if_vsp_init(__if);\n+\n \t/* Parsing of the network interface is complete, add it to the list */\n \tDPAA_BUS_LOG(DEBUG, \"Found %s, Tx Channel = %x, FMAN = %x,\"\n \t\t \"Port ID = %x\",\ndiff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h\nindex cb7f18ca2..dcf408372 100644\n--- a/drivers/bus/dpaa/include/fman.h\n+++ b/drivers/bus/dpaa/include/fman.h\n@@ -321,6 +321,9 @@ struct fman_if {\n \t/* The Qman channel to schedule Tx FQs to */\n \tu16 tx_channel_id;\n \n+\tuint8_t base_profile_id;\n+\tuint8_t num_profiles;\n+\n \tuint8_t is_shared_mac;\n \t/* The hard-coded FQIDs for this interface. Note: this doesn't cover\n \t * the PCD nor the \"Rx default\" FQIDs, which are configured via FMC\n", "prefixes": [ "v7", "4/7" ] }{ "id": 76538, "url": "