Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/132504/?format=api
http://patchwork.dpdk.org/api/patches/132504/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231011083643.528471-2-vattunuru@marvell.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20231011083643.528471-2-vattunuru@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231011083643.528471-2-vattunuru@marvell.com", "date": "2023-10-11T08:36:41", "name": "[v2,1/3] net/octeon_ep: support 32B IQ descriptor size", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b08b74555c40c5d058a42911c0b82b7fd5e8fa09", "submitter": { "id": 1277, "url": "http://patchwork.dpdk.org/api/people/1277/?format=api", "name": "Vamsi Krishna Attunuru", "email": "vattunuru@marvell.com" }, "delegate": { "id": 310, "url": "http://patchwork.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231011083643.528471-2-vattunuru@marvell.com/mbox/", "series": [ { "id": 29815, "url": "http://patchwork.dpdk.org/api/series/29815/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29815", "date": "2023-10-11T08:36:40", "name": "rewrite fastpath routines", "version": 2, "mbox": "http://patchwork.dpdk.org/series/29815/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/132504/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/132504/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BEAC84235E;\n\tWed, 11 Oct 2023 10:36:56 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6D6B8406B6;\n\tWed, 11 Oct 2023 10:36:54 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 3407640279\n for <dev@dpdk.org>; Wed, 11 Oct 2023 10:36:53 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 39B6VBgc020008 for <dev@dpdk.org>; Wed, 11 Oct 2023 01:36:52 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tnc2atdra-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 11 Oct 2023 01:36:52 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Wed, 11 Oct 2023 01:36:50 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Wed, 11 Oct 2023 01:36:50 -0700", "from localhost.localdomain (unknown [10.28.36.156])\n by maili.marvell.com (Postfix) with ESMTP id 1BD8E5B6939;\n Wed, 11 Oct 2023 01:36:48 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=Ox3Ww3RxoDZxqmbzBfXMG//eq0Z/0S8/krwPiQR/+O4=;\n b=NIFRNHM98rZa/6p9KkqkJcVSxK6lgXZNx+xjweluQpFmbpMe0yhUnSE7DBti/Elgl/Cv\n ic0xqdgT9MQwyRQNVr2fI01PUpOW1tR+W235p8WTnX+K4Vuzp/8sCn0CaEpxb78GiRJC\n eJJhlguqBgvM+F75rcd5lf36voLvQvdxdrk6JLmmsjyZUjq5i+1VWZ42XV3jnP/P/+iR\n UnD4JN3imGPO1HFQ8Dv3SBoHRnH48r3gHnB58DXeG/4cQMwSpJnbjjJRUgiv+zPungwm\n vE9oaykJC8u+5ZkNRXgxdLxWc5L1o4Rg7Hoye5V/bJmCVHAaK2TJ7bGP35D9DKq0mWhS +A==", "From": "Vamsi Attunuru <vattunuru@marvell.com>", "To": "<dev@dpdk.org>, <jerinj@marvell.com>", "CC": "<sthotton@marvell.com>", "Subject": "[PATCH v2 1/3] net/octeon_ep: support 32B IQ descriptor size", "Date": "Wed, 11 Oct 2023 01:36:41 -0700", "Message-ID": "<20231011083643.528471-2-vattunuru@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20231011083643.528471-1-vattunuru@marvell.com>", "References": "<20231011015054.524907-1-vattunuru@marvell.com>\n <20231011083643.528471-1-vattunuru@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "uzPy6DbUyfvjFg4q77PnOJu0jungjyUo", "X-Proofpoint-ORIG-GUID": "uzPy6DbUyfvjFg4q77PnOJu0jungjyUo", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-10-11_06,2023-10-10_01,2023-05-22_02", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "From: Shijith Thotton <sthotton@marvell.com>\n\nUpdate input queue setup to consider descriptor size in driver conf.\nThe default instruction size for otx2 and cnxk devices has been updated\nto 32 bytes.\n\nSigned-off-by: Shijith Thotton <sthotton@marvell.com>\n---\n drivers/net/octeon_ep/cnxk_ep_vf.c | 10 +++++++++-\n drivers/net/octeon_ep/meson.build | 10 ++++++++++\n drivers/net/octeon_ep/otx2_ep_vf.c | 10 +++++++++-\n drivers/net/octeon_ep/otx_ep_common.h | 4 ++++\n drivers/net/octeon_ep/otx_ep_rxtx.c | 8 +++-----\n drivers/net/octeon_ep/otx_ep_vf.c | 8 ++++++++\n 6 files changed, 43 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/octeon_ep/cnxk_ep_vf.c b/drivers/net/octeon_ep/cnxk_ep_vf.c\nindex 92c2d2ca5c..7b3669fe0c 100644\n--- a/drivers/net/octeon_ep/cnxk_ep_vf.c\n+++ b/drivers/net/octeon_ep/cnxk_ep_vf.c\n@@ -106,6 +106,14 @@ cnxk_ep_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)\n \t\treturn -EIO;\n \t}\n \n+\t/* Configure input queue instruction size. */\n+\tif (otx_ep->conf->iq.instr_type == OTX_EP_32BYTE_INSTR)\n+\t\treg_val &= ~(CNXK_EP_R_IN_CTL_IS_64B);\n+\telse\n+\t\treg_val |= CNXK_EP_R_IN_CTL_IS_64B;\n+\toct_ep_write64(reg_val, otx_ep->hw_addr + CNXK_EP_R_IN_CONTROL(iq_no));\n+\tiq->desc_size = otx_ep->conf->iq.instr_type;\n+\n \t/* Write the start of the input queue's ring and its size */\n \toct_ep_write64(iq->base_addr_dma, otx_ep->hw_addr + CNXK_EP_R_IN_INSTR_BADDR(iq_no));\n \toct_ep_write64(iq->nb_desc, otx_ep->hw_addr + CNXK_EP_R_IN_INSTR_RSIZE(iq_no));\n@@ -354,7 +362,7 @@ static const struct otx_ep_config default_cnxk_ep_conf = {\n \t/* IQ attributes */\n \t.iq = {\n \t\t.max_iqs = OTX_EP_CFG_IO_QUEUES,\n-\t\t.instr_type = OTX_EP_64BYTE_INSTR,\n+\t\t.instr_type = OTX_EP_32BYTE_INSTR,\n \t\t.pending_list_size = (OTX_EP_MAX_IQ_DESCRIPTORS *\n \t\t\t\t OTX_EP_CFG_IO_QUEUES),\n \t},\ndiff --git a/drivers/net/octeon_ep/meson.build b/drivers/net/octeon_ep/meson.build\nindex e698bf9792..4538c0396e 100644\n--- a/drivers/net/octeon_ep/meson.build\n+++ b/drivers/net/octeon_ep/meson.build\n@@ -10,3 +10,13 @@ sources = files(\n 'cnxk_ep_vf.c',\n 'otx_ep_mbox.c',\n )\n+\n+if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0'))\n+ error_cflags += ['-Wno-array-bounds']\n+endif\n+\n+foreach flag: error_cflags\n+ if cc.has_argument(flag)\n+ c_args += flag\n+ endif\n+endforeach\ndiff --git a/drivers/net/octeon_ep/otx2_ep_vf.c b/drivers/net/octeon_ep/otx2_ep_vf.c\nindex ced3a415a5..f72b8d25d7 100644\n--- a/drivers/net/octeon_ep/otx2_ep_vf.c\n+++ b/drivers/net/octeon_ep/otx2_ep_vf.c\n@@ -256,6 +256,14 @@ otx2_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)\n \t\treturn -EIO;\n \t}\n \n+\t/* Configure input queue instruction size. */\n+\tif (otx_ep->conf->iq.instr_type == OTX_EP_32BYTE_INSTR)\n+\t\treg_val &= ~(SDP_VF_R_IN_CTL_IS_64B);\n+\telse\n+\t\treg_val |= SDP_VF_R_IN_CTL_IS_64B;\n+\toct_ep_write64(reg_val, otx_ep->hw_addr + SDP_VF_R_IN_CONTROL(iq_no));\n+\tiq->desc_size = otx_ep->conf->iq.instr_type;\n+\n \t/* Write the start of the input queue's ring and its size */\n \toct_ep_write64(iq->base_addr_dma, otx_ep->hw_addr + SDP_VF_R_IN_INSTR_BADDR(iq_no));\n \toct_ep_write64(iq->nb_desc, otx_ep->hw_addr + SDP_VF_R_IN_INSTR_RSIZE(iq_no));\n@@ -500,7 +508,7 @@ static const struct otx_ep_config default_otx2_ep_conf = {\n \t/* IQ attributes */\n \t.iq = {\n \t\t.max_iqs = OTX_EP_CFG_IO_QUEUES,\n-\t\t.instr_type = OTX_EP_64BYTE_INSTR,\n+\t\t.instr_type = OTX_EP_32BYTE_INSTR,\n \t\t.pending_list_size = (OTX_EP_MAX_IQ_DESCRIPTORS *\n \t\t\t\t OTX_EP_CFG_IO_QUEUES),\n \t},\ndiff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h\nindex c150cbe619..90e059cad0 100644\n--- a/drivers/net/octeon_ep/otx_ep_common.h\n+++ b/drivers/net/octeon_ep/otx_ep_common.h\n@@ -11,6 +11,7 @@\n \n #define OTX_EP_MAX_RINGS_PER_VF (8)\n #define OTX_EP_CFG_IO_QUEUES OTX_EP_MAX_RINGS_PER_VF\n+#define OTX_EP_32BYTE_INSTR (32)\n #define OTX_EP_64BYTE_INSTR (64)\n /*\n * Backpressure for SDP is configured on Octeon, and the minimum queue sizes\n@@ -215,6 +216,9 @@ struct otx_ep_instr_queue {\n \t/* Number of descriptors in this ring. */\n \tuint32_t nb_desc;\n \n+\t/* Size of the descriptor. */\n+\tuint8_t desc_size;\n+\n \t/* Input ring index, where the driver should write the next packet */\n \tuint32_t host_write_index;\n \ndiff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c\nindex b37fc8109f..5b759d759b 100644\n--- a/drivers/net/octeon_ep/otx_ep_rxtx.c\n+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c\n@@ -484,7 +484,7 @@ otx_ep_ring_doorbell(struct otx_ep_device *otx_ep __rte_unused,\n static inline int\n post_iqcmd(struct otx_ep_instr_queue *iq, uint8_t *iqcmd)\n {\n-\tuint8_t *iqptr, cmdsize;\n+\tuint8_t *iqptr;\n \n \t/* This ensures that the read index does not wrap around to\n \t * the same position if queue gets full before OCTEON 9 could\n@@ -494,10 +494,8 @@ post_iqcmd(struct otx_ep_instr_queue *iq, uint8_t *iqcmd)\n \t\treturn OTX_EP_IQ_SEND_FAILED;\n \n \t/* Copy cmd into iq */\n-\tcmdsize = 64;\n-\tiqptr = iq->base_addr + (iq->host_write_index << 6);\n-\n-\trte_memcpy(iqptr, iqcmd, cmdsize);\n+\tiqptr = iq->base_addr + (iq->host_write_index * iq->desc_size);\n+\trte_memcpy(iqptr, iqcmd, iq->desc_size);\n \n \t/* Increment the host write index */\n \tiq->host_write_index =\ndiff --git a/drivers/net/octeon_ep/otx_ep_vf.c b/drivers/net/octeon_ep/otx_ep_vf.c\nindex 4f3538146b..236b7a874c 100644\n--- a/drivers/net/octeon_ep/otx_ep_vf.c\n+++ b/drivers/net/octeon_ep/otx_ep_vf.c\n@@ -120,6 +120,14 @@ otx_ep_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)\n \t\t\treturn -EIO;\n \t}\n \n+\t/* Configure input queue instruction size. */\n+\tif (iq->desc_size == OTX_EP_32BYTE_INSTR)\n+\t\treg_val &= ~(OTX_EP_R_IN_CTL_IS_64B);\n+\telse\n+\t\treg_val |= OTX_EP_R_IN_CTL_IS_64B;\n+\toct_ep_write64(reg_val, otx_ep->hw_addr + OTX_EP_R_IN_CONTROL(iq_no));\n+\tiq->desc_size = otx_ep->conf->iq.instr_type;\n+\n \t/* Write the start of the input queue's ring and its size */\n \totx_ep_write64(iq->base_addr_dma, otx_ep->hw_addr,\n \t\t OTX_EP_R_IN_INSTR_BADDR(iq_no));\n", "prefixes": [ "v2", "1/3" ] }{ "id": 132504, "url": "