From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0060.outbound.protection.outlook.com [104.47.32.60]) by dpdk.org (Postfix) with ESMTP id 6C314FA4C for ; Tue, 21 Feb 2017 10:29:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fHERGpuCxkh4lUjSEVJ5YbkDrYS6au1FtckXW12g8+M=; b=Pla8Rsp3QCxLvtgdQD9a7rMbIxsDj52VNuyexxce5dfzMmXEv58zGBa5fUJfPdtWX5RRSgqVjHgyOwBjTm8YYHLrpTDfLietHkmg3uoaNg7aMPrIh9AA7prBYHpM7YoYzuG1f9UaRKG+MV6bmjJwCm+Cty6Kb4s8G/NoYfvtiBw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shijith.Thotton@cavium.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Tue, 21 Feb 2017 09:29:20 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Jerin Jacob , Derek Chickles , Venkat Koppula , Mallesham Jatharakonda Date: Tue, 21 Feb 2017 14:56:39 +0530 Message-Id: <1487669225-30091-25-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (10.174.56.29) To SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) X-MS-Office365-Filtering-Correlation-Id: b7ccfbfe-b59c-4bc3-d4cd-08d45a3c1eac X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:TGni4iu1iJVBLahFYW+an0OaGIE6bkSfPISUhZ0TiIcCS840OmtLnAdvtNfByekmlzw11SKavZk1PbbcV0gD5nAHBCvzWJWE+/VRRhPoAOFN04oNZrq2a031t85DTQnQcsJ39j6XNEmjf3bRBVSDVBTFiytl4j3wy1oFv5jzeWnM/lRPXZs4zgVb+PN0A80vX/1DlKLIpw28bk6BCOYZtVQ9WcOSWBabEOzc+Df5dg11VarC9AFYWQNSJ9SvfL7rcmZloCiY4IX4EU7o0EVfcw==; 25:gsFe+ZKH6AIoBSXiP5Q3KRKwxRo1py9Ff+wRl/JTmCVKjf/07z9Oo+IP1tcRcDGFatJPU08ek20pY6ql02FrJSnxFmPEKbdr6lnuEJ+OwZizAq7ST/Lfy2wwnplMWDXu7UzDq896tklP3FN86DngxjQ4tkoaSBtdTizyYLY3xV9JaHcpgyKlI4W37Gd9+SKNaqKR2QVKN7W6yprlzbSW53VOe/Py9ilP2/F0HZw8o4wXbfIPmJk+Te0GcfHQgZ2Ff2Yi0uBO0oTe7sudBPZXzNRfJnvOMIUP7njE4AP7rP/q/dfMociFgWsCcHz5LGtx1FiSy+A+6tsp+nAl7vXmslGJW2WBw7JR0pcCUWiz/jUFWxehgHiDBVoK7D778foUDgXsOwLpbMYD+e3wEniMOKG72O6vJE93N51LP1mAChnK2Et+cje358y5dxU7nzUsBSliEMKgKOHI6rIdVkAUzg== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:DEOBmUSpfBoFV3AjatdsUZXgX9XrgsBdVZJYpykXMJyc+/V1u52M+//G5mlh5dk0b6RR22tzEps32u8F6iMQpTcQ+YAaLjAALE7t4eEi4Gg8XiwyTatQVuJVSkDIWcORHLdN9NzT8yldhKjeoaZgqckBfSb1RNoQerIM2tw5T7Neo0X1qeoydLO8VmWHtgbLEbzOsVfkmto4T/ejWKyuZwRtGGFQ7ckHIlxiyMXVKzCQ0lqdG7qGFc8OM3IsiiGPDqTtriTihJJtqVS3ABjJuw==; 20:oK0aC8wEkpBH7zT89e0bKYGB+Ug/g906uwoJQnuf0iffe9JyA9lAX0z9kmeHfXTJ5AJRH1OhOKu0zKdiBkqnJU467X3jP6Kd40leJjYV8AFvuBZ8MpXq8J6rflMrcJOxWBqj7M7zOaDYi/cfU6PTxxQJU4kr/aPBycvxW10WXFQ1VM5jiGLifGWWXAA5W+8jnzPc9zhmFxXHEZ52Gwo1tWnKUmJ0OfjLYn3QVr7X68gWTSmDN0TD5OLAeT7N6+cET2QDAL9G9nhl8BAVrdmNjv+msWzYG9B6lcP/6tE9KfAnb8h+5riP+fFR3SS6zWqhHSWJIbfn8UICNu/QsRhhSh1of5qwWHZOPhlo9te2bJsbUrinqlyMPhhfpu+EG2Av45KPwF9bAMH014//jWR99sjWVM25jKcG1+j3PmSRyXx7K6QakpuoajxfRjom63Rafq8Q4z0amLKFOuOJI6xFBZgzu765O6qe/x6ap8VsiRCEYiPwH28Ld2WNXyAJ+44pJIoNyZ7G65OLn6bZXvoLccftyC1M2P7S0g1IPTtQTQXFQ5IenF37bIYOhAkPQP93OxvmVX+ur3ljVHmoCD8xmql0gp37W7GSKHZOlydGjMM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:SN1PR07MB2285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 4:cTdsVqJjXr0HXd5oy8sR9t0AdDh9SYMgt1F481kbXAd8ddFzY9eCccaufuSTS1Ugpfcln2f5vd+EWUFmkYfNPSPkdrCcuXctVEq9JaF7+GszPq7ht3TQhFupmtlVVmxTAreW1k4xayrT1X9RRZduThvyf+fJknfqS93ls0+M9J2wt5Fc4O4oC5DYNKhe7Wnzu1XX3YHUgGSOuBOPrKt5N8YyEhPvNIz//fHTjbhDW2Js8Q3Lb+WJTB7bZEBL7gCSqGk1pFC6f76Q0lbNw0aU70UxL1Z088Tm14nuALcOoto5WXgPFvV1/NKXoq6tG6KHnX5L/9F1CL6KVWHeuAivuynvb1+NyaC9zLi2pPU0UaiofspNcJ1QJY6j31KoS4SZPFBsirHXyQBDodcRR7njwXYXfAUqaoYPcqPj9glaRaZtRSe2YMtwCQhpMY02Y9i650k8BGhyZ7qEDwOExAYeD89HtkTJ5LaouVx0rfElQFtEutwvY2+h/7e3vKQ6RTkRrecv9d2uGL5ZSfFUjpa82nx4fFaMsYbzb6Q40Jn599rxfxo2vxnXUWqY7ywo8W/tTrJ6Dy/9yq4VBs6tpBPeAcTQBm5/17V1TwJ8QfPMW/w= X-Forefront-PRVS: 0225B0D5BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39410400002)(39830400002)(189002)(199003)(50226002)(81166006)(42186005)(2361001)(101416001)(81156014)(305945005)(3846002)(6116002)(5009440100003)(8676002)(105586002)(7736002)(53936002)(36756003)(110136004)(106356001)(6506006)(25786008)(38730400002)(2351001)(92566002)(48376002)(6486002)(97736004)(50466002)(5003940100001)(189998001)(68736007)(2906002)(4326007)(33646002)(76176999)(54906002)(5660300001)(6666003)(6916009)(50986999)(2950100002)(6512007)(4720700003)(42882006)(66066001)(47776003)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2285; H:lio357.in.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2285; 23:vL5tnYYBDvuI+/oMzuXziHpLDhoMHbrgEKqlDCw2y?= =?us-ascii?Q?tSKmNth4Ob0JD1TFpv+LXZpgBkz1a/9Upuh8UZEsa0lL3naiVmH50dw/o56K?= =?us-ascii?Q?HyH8fYFrUNXLe8yfPMGe/RWkkTEMk574NsutT7JiweZ5rBnf6Y5qoBFLHWER?= =?us-ascii?Q?YMMvNThtOfnETpHLqNK6C9AdsyXFFiNkQmxr47bDBj2EzxaJUUufS7n9ZZvg?= =?us-ascii?Q?u9LeWPcENL7KUmbZW1V7JBmuUjpOnSh8EsFoq3VUfVLKIPyISrgxBtOQdIXU?= =?us-ascii?Q?7toA+QLCrwMQK0rz5RRRQ0D1FFqGnV0XMXSma0IPs0swrjlPOwucp/OxkCDH?= =?us-ascii?Q?dQbnseMdOv0YmhvCsePyS8at8mC4z0H8XiU+ON9b9gOEt9avLmCc2xGDeseL?= =?us-ascii?Q?EtXlpb1c4QowzFuKhS48LjdaetZMYrcWB6Km/a3WcGGUlDHBHrJTmGHR6cP8?= =?us-ascii?Q?+D53XA3i/CFI/+ttWT7eC7BmIOUxdj5Av/5Qn/GTXUcPr00jQZYISVlt2o9L?= =?us-ascii?Q?HQmafju8w7P68BQPZr6AZGrDjC/cGB6hgRQRebhUehw+udiBzk+cSArDFfnC?= =?us-ascii?Q?nJbVx4Y8rcs/FS8i/0iTTLCPYmLuIKskeLdD/mqYl4ym7WnyKOkDdMy56Ncb?= =?us-ascii?Q?GKJbnuHShS94DqKMsfuBNjPwxcAefYO+zoLJjccZpYggH510hW74cCxGBK4T?= =?us-ascii?Q?CnrKbOU9+pDLYbPhm2SFBQBIn+XNmuli4218hnEjN31MxHrQXldOBBFe9P+1?= =?us-ascii?Q?q4JdKlMaZkKXTGewFFwQKTzbkgMCPJUd8P2BcZ3XCxOgfnIjrIzeBlMFQ2Vz?= =?us-ascii?Q?WgAyH7bZYyP4h6KcoEGOF9SdL8Z/C2YqFcNnFaQUL/9nrDblXiWic9TpEKoR?= =?us-ascii?Q?gTIwHsAAU61TjhnL0XohPRW2FfnEHH5v3LUnn0pqSMCP4oZAARUSIN0fzieH?= =?us-ascii?Q?2P8F7FgsRgelDm7Fmv1TJgHFL1RJ01hF/P3ekrboVTSRvmTQrLiUqmpprVem?= =?us-ascii?Q?KqSo3ZuNNvTLnA6763NmbKJNxmdrYPvSdkoL+73gWUSAVJQIf1ZalgwDFm+N?= =?us-ascii?Q?u1Ns9pxKyTPGS8mnNwq9tW+wLf+63kyPkTpsoKlZMty9LIscim/jjF4hbDbJ?= =?us-ascii?Q?KyaXWgEOwyBwOEWqAFV4enwOMbXOeQbqca3+dDHPCja9BjqYxyrpx62eQzAz?= =?us-ascii?Q?VWXFV6adZfXEtVXV6B2kusFEuOxrFQyq2o5qg/aO5iZjoRbAAY/vQ6MEChNX?= =?us-ascii?Q?+gCaYBXhOJyrBtykqEsjsjb4X50Zc8TCbLaV1EUKc7dBs3qkQ4UWJqBUV8yN?= =?us-ascii?Q?B2H8au71hlbsAZ5l1lf+Ck=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 6:cZXd5xog/s2eJ4vfCcXRVqY7XNWyoVuZh/BUtSDQ3QYAtfiDomjUtMV9TduEytN4xglrroGmdz72uVWj2/s1i+tVfp670b80dP/DnsqNaARqWwmRcbe24qpIzUKt2ic5IsntjNtIKcVSJvRy2x2Byr6TtVFKjHZjRfdz5MXwHPvoZaRVpPmNINSyodldCiDvjW7yCwTg9bug/VLxDo+A/TyQorWdKCabBUQ6CH0Rg3p+ovzvTC5RJTnmJzYSzrZ4a1U4MpdHUgVcp/kPdU/Iu2ZiPi3+DOXFy5M7mvds1AlY+KLe887tiAeXUOe05WAumXr9HZEn3CwfxfDjC+btgozY//fG9rOONb+h8bfZ8t5mNcsfu1A4yLhXzpWVYlxOFDpw+VbYwrWTY+D1iAbVlw==; 5:tdeUyZBHHITZCwLr+SFNF737ZrueDQ3rQ2gXvWXIceuzJBm6F6xSQ+s9ZfCGq9cyHn1KmIMVyYgxRfWIV9ntB6o3KR4a78yqj28dUUeTJwZkl7Alm72yBYGCmDH8aDtlJ4ne6y1/RaRZTpTSSFO0eA==; 24:IyG+7Jp0bBvWtimsIn+EGi6u0nb8Gmf6rZJkF5UPMrvc4mlH55gpgkcuWGBoYCEUeBoNkQ1/OnO63aSiC9GAN309CHKexPVkYbVamyTN7Bo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:xPmnIPYKV4NyF/ZmaEGd5PRDmII49ex74BNBIciTfV3StPqvxj6kAQad/HA3e36+D5K1RLvYV8cU9FmqcHEH5vVDEBF0pqg4jBNJNdJIlyr23zLySQrATb2i+icVzvOMKxFE36wz2pf/DbaoH2BilvShkvE3xrZKp/GNE9yvlQOnbLzbCkEl1gmPUydhnKfpyVDSpG5D1R9rliW0CezMtEQVnTl3nd6AHWZKlai7MtRHHX+U3cMUFv3HoVm2awKVAw8cngJDra6w4E03Eo1lNIUmm12OGGeEM6lJvc/8D4ZJdbuzN82/6j/NOyURwDYObg5w5Z5DnNkTcdFl/mnA1w== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2017 09:29:20.5106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 Subject: [dpdk-dev] [PATCH 24/50] net/liquidio: initialize Rx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 09:29:24 -0000 Initialize Rx queue registers and allocate packet buffers in Rx queue. Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/base/lio_23xx_vf.c | 22 ++++++++ drivers/net/liquidio/base/lio_hw_defs.h | 2 + drivers/net/liquidio/lio_rxtx.c | 96 +++++++++++++++++++++++++++++++++ drivers/net/liquidio/lio_rxtx.h | 20 +++++++ drivers/net/liquidio/lio_struct.h | 1 + 5 files changed, 141 insertions(+) diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index 181f830..44d90c0 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -233,6 +233,27 @@ } static void +cn23xx_vf_setup_oq_regs(struct lio_device *lio_dev, uint32_t oq_no) +{ + struct lio_droq *droq = lio_dev->droq[oq_no]; + + PMD_INIT_FUNC_TRACE(); + + lio_write_csr64(lio_dev, CN23XX_SLI_OQ_BASE_ADDR64(oq_no), + droq->desc_ring_dma); + lio_write_csr(lio_dev, CN23XX_SLI_OQ_SIZE(oq_no), droq->max_count); + + lio_write_csr(lio_dev, CN23XX_SLI_OQ_BUFF_INFO_SIZE(oq_no), + (droq->buffer_size | (OCTEON_RH_SIZE << 16))); + + /* Get the mapped address of the pkt_sent and pkts_credit regs */ + droq->pkts_sent_reg = (uint8_t *)lio_dev->hw_addr + + CN23XX_SLI_OQ_PKTS_SENT(oq_no); + droq->pkts_credit_reg = (uint8_t *)lio_dev->hw_addr + + CN23XX_SLI_OQ_PKTS_CREDIT(oq_no); +} + +static void cn23xx_vf_free_mbox(struct lio_device *lio_dev) { PMD_INIT_FUNC_TRACE(); @@ -436,6 +457,7 @@ return -1; lio_dev->fn_list.setup_iq_regs = cn23xx_vf_setup_iq_regs; + lio_dev->fn_list.setup_oq_regs = cn23xx_vf_setup_oq_regs; lio_dev->fn_list.setup_mbox = cn23xx_vf_setup_mbox; lio_dev->fn_list.free_mbox = cn23xx_vf_free_mbox; diff --git a/drivers/net/liquidio/base/lio_hw_defs.h b/drivers/net/liquidio/base/lio_hw_defs.h index a3ac954..912b8b9 100644 --- a/drivers/net/liquidio/base/lio_hw_defs.h +++ b/drivers/net/liquidio/base/lio_hw_defs.h @@ -116,6 +116,8 @@ enum octeon_tag_type { /* This subcode is sent by core PCI driver to indicate cores are ready. */ #define LIO_OPCODE_IF_CFG 0x09 +#define LIO_MAX_RX_PKTLEN (64 * 1024) + /* Interface flags communicated between host driver and core app. */ enum lio_ifflags { LIO_IFFLAG_UNICAST = 0x10 diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c index 60c895d..506a1db 100644 --- a/drivers/net/liquidio/lio_rxtx.c +++ b/drivers/net/liquidio/lio_rxtx.c @@ -41,6 +41,96 @@ #include "lio_rxtx.h" static void +lio_droq_compute_max_packet_bufs(struct lio_droq *droq) +{ + uint32_t count = 0; + + do { + count += droq->buffer_size; + } while (count < LIO_MAX_RX_PKTLEN); +} + +static void +lio_droq_reset_indices(struct lio_droq *droq) +{ + droq->read_idx = 0; + droq->write_idx = 0; + droq->refill_idx = 0; + droq->refill_count = 0; + rte_atomic64_set(&droq->pkts_pending, 0); +} + +static void +lio_droq_destroy_ring_buffers(struct lio_droq *droq) +{ + uint32_t i; + + for (i = 0; i < droq->max_count; i++) { + if (droq->recv_buf_list[i].buffer) { + rte_pktmbuf_free((struct rte_mbuf *) + droq->recv_buf_list[i].buffer); + droq->recv_buf_list[i].buffer = NULL; + } + } + + lio_droq_reset_indices(droq); +} + +static void * +lio_recv_buffer_alloc(struct lio_device *lio_dev, int q_no) +{ + struct lio_droq *droq = lio_dev->droq[q_no]; + struct rte_mempool *mpool = droq->mpool; + struct rte_mbuf *m; + + m = rte_pktmbuf_alloc(mpool); + if (m == NULL) { + lio_dev_err(lio_dev, "Cannot allocate\n"); + return NULL; + } + + rte_mbuf_refcnt_set(m, 1); + m->next = NULL; + m->data_off = RTE_PKTMBUF_HEADROOM; + m->nb_segs = 1; + m->pool = mpool; + + return m; +} + +static int +lio_droq_setup_ring_buffers(struct lio_device *lio_dev, + struct lio_droq *droq) +{ + struct lio_droq_desc *desc_ring = droq->desc_ring; + uint32_t i; + void *buf; + + for (i = 0; i < droq->max_count; i++) { + buf = lio_recv_buffer_alloc(lio_dev, droq->q_no); + if (buf == NULL) { + lio_dev_err(lio_dev, "buffer alloc failed\n"); + lio_droq_destroy_ring_buffers(droq); + return -ENOMEM; + } + + droq->recv_buf_list[i].buffer = buf; + droq->info_list[i].length = 0; + + /* map ring buffers into memory */ + desc_ring[i].info_ptr = lio_map_ring_info(droq, i); + desc_ring[i].buffer_ptr = + lio_map_ring(droq->recv_buf_list[i].buffer); + } + + lio_droq_reset_indices(droq); + + lio_droq_compute_max_packet_bufs(droq); + + return 0; +} + +static void lio_dma_zone_free(struct lio_device *lio_dev, const struct rte_memzone *mz) { const struct rte_memzone *mz_tmp; @@ -75,6 +165,7 @@ lio_dev_dbg(lio_dev, "OQ[%d]\n", q_no); + lio_droq_destroy_ring_buffers(droq); rte_free(droq->recv_buf_list); droq->recv_buf_list = NULL; lio_dma_zone_free(lio_dev, droq->info_mz); @@ -172,10 +263,15 @@ goto init_droq_fail; } + if (lio_droq_setup_ring_buffers(lio_dev, droq)) + goto init_droq_fail; + droq->refill_threshold = c_refill_threshold; rte_spinlock_init(&droq->lock); + lio_dev->fn_list.setup_oq_regs(lio_dev, q_no); + lio_dev->io_qmask.oq |= (1ULL << q_no); return 0; diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h index 938bf56..4d742de 100644 --- a/drivers/net/liquidio/lio_rxtx.h +++ b/drivers/net/liquidio/lio_rxtx.h @@ -495,6 +495,26 @@ enum { } } +static inline uint64_t +lio_map_ring(void *buf) +{ + phys_addr_t dma_addr; + + dma_addr = rte_mbuf_data_dma_addr_default(((struct rte_mbuf *)buf)); + + return (uint64_t)dma_addr; +} + +static inline uint64_t +lio_map_ring_info(struct lio_droq *droq, uint32_t i) +{ + phys_addr_t dma_addr; + + dma_addr = droq->info_list_dma + (i * LIO_DROQ_INFO_SIZE); + + return (uint64_t)dma_addr; +} + /* Macro to increment index. * Index is incremented by count; if the sum exceeds * max, index is wrapped-around to the start. diff --git a/drivers/net/liquidio/lio_struct.h b/drivers/net/liquidio/lio_struct.h index a2ba50d..bb4618f 100644 --- a/drivers/net/liquidio/lio_struct.h +++ b/drivers/net/liquidio/lio_struct.h @@ -306,6 +306,7 @@ struct lio_io_enable { struct lio_fn_list { void (*setup_iq_regs)(struct lio_device *, uint32_t); + void (*setup_oq_regs)(struct lio_device *, uint32_t); int (*setup_mbox)(struct lio_device *); void (*free_mbox)(struct lio_device *); -- 1.8.3.1