From patchwork Wed Dec 13 12:05:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121756 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5386231qgn; Wed, 13 Dec 2017 04:10:27 -0800 (PST) X-Google-Smtp-Source: ACJfBotYM54Mtdld+hwhI2Ox9PEzulR1DS8luEmuFSMzchhoKtULeP6YrMZbB5fgGsN7Zq4EZlPK X-Received: by 10.28.96.195 with SMTP id u186mr1690328wmb.121.1513167027601; Wed, 13 Dec 2017 04:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513167027; cv=none; d=google.com; s=arc-20160816; b=GydCXqoV5GesPmb+aNspMf/hFgzPwMeQmHBUVKUfzR6lle+IM7aAeQbcnMcfeM42aF A/ANdADIIV+ZsnJEWTvHqkj1izHgohgO5KNLgIEpghfBff0d3mbBIwfBjhgh6XJPt3/N Jk3Yb7xLbacX/fc/nqa07SNKWNrQ+UvNY8FzFnwhCuaoTxTGEBUE822eSBG/APWlc/oC pBDNPySCc1o0UZAy1VyyuVmc+uMVB9PVntETo/0SvixG8mHARj3G3nhXcpnq1yXd8ngi 5Eak20icYYYg4tmbMjpf+A3DHJR7qDVU+Z+pOWRgtV9RRSe6ajoV2VrfLslhHkIAbajG +tqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=gz5BIzG9ynerqilhy1cUgqmFu4BomVvQySnqpcR7kvg=; b=C6ayUKt2dXG6jwpDadZOkqJz7pMmeUKxlupcUi+sAMHbp0oDG7cc4G7gxTRnnh06V0 su8kfHp5HgBLVQhHa4IyIMZO0UA093pXKaMIScZAvICJFOATab7G8e/f/Cn1nKuGNmJH h5qhsl+DXYGL3j2rQnM8K9aRNKpIc13lk8lwsn5zNiozaqzY2XfxlzqCsPaqYyAYuwaT STGvUCZ+V98gKJxnmQ13PaiT9/yvjW+GOBDgWXGRcSupCswdqEw66nAni3mFlyRp3tJ/ Yc7pR00DSQHTPNwS4WfMWRw3O+xm8CdHYFqOf93BxMahD0FM5fsutTVyRQ/zMOuD5KmP a8zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id k20si1344788wmh.272.2017.12.13.04.10.27; Wed, 13 Dec 2017 04:10:27 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8B0B1B212; Wed, 13 Dec 2017 13:07:34 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0081.outbound.protection.outlook.com [104.47.33.81]) by dpdk.org (Postfix) with ESMTP id 53D811B1FE for ; Wed, 13 Dec 2017 13:07:30 +0100 (CET) Received: from BN6PR03CA0085.namprd03.prod.outlook.com (2603:10b6:405:6f::23) by SN2PR03MB2368.namprd03.prod.outlook.com (2603:10b6:804:e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 12:07:29 +0000 Received: from BL2FFO11OLC013.protection.gbl (2a01:111:f400:7c09::180) by BN6PR03CA0085.outlook.office365.com (2603:10b6:405:6f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 12:07:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11OLC013.mail.protection.outlook.com (10.173.160.161) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 12:07:22 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBDC6t9c008652; Wed, 13 Dec 2017 05:07:27 -0700 From: Hemant Agrawal To: CC: , Sunil Kumar Kori , Nipun Gupta Date: Wed, 13 Dec 2017 17:35:59 +0530 Message-ID: <1513166759-13466-19-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> References: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576404423818116; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(498600001)(104016004)(53936002)(8656006)(105606002)(356003)(2351001)(68736007)(4326008)(305945005)(106466001)(2906002)(5660300001)(97736004)(77096006)(81156014)(81166006)(8676002)(6916009)(6666003)(2950100002)(50226002)(51416003)(36756003)(76176011)(16586007)(8936002)(575784001)(54906003)(86362001)(316002)(50466002)(47776003)(48376002)(85426001)(59450400001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2368; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC013; 1:jMep2y7pMkusuOlC3Qb0KkOvuoQaKOyz59XfjtxPmpHStQs+dec9DFLIv3OEEeM1nr7d8l6OUWb4bERZoc6RCXU0SMMQ3U7LwDbsCgS3PCN1NioXWnV7OG1/q6ms587m MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 66aa29a2-845d-40d6-3b84-08d5422210f8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2368; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 3:TNL/P+IyosN/FUQWbnSeuU4JUZCGAHK9DwhCn7WNyVtGq1E4G3knxKhFjbhqdnMdnETcbW/LudX8UZpHoC2qw+RwfX1XLjZdVBAC7qRba1L9qdaWenGyborj0esh4X+uiEWlldWP6Hb8k5RmxFXW7fLy26vLIyQpt6Oy0UppfwgsPFDib5oDEfW1tk5XpPivpUuwZlo0N2jsrk3mKUzqNvFRecguFoTvIArYHvumpbbNgk8bLoMEN/oMTaLS902nm8RGvckK+WbhwyBTEMk0nU9jpeebLg/ye1yjhDeIQ5SOtk33HHy27+lmfQP5J5hqZ4H0ewUfhs6Vovn+CCSZQRyYu7+m3Q7igQefcORbkvM=; 25:lfG6Ec0A4uyje4W8QRJ5f4iZd5sO5SkxCmb7lrM4I5uaLU9Tne3J2tHj362pNPB9TZ9H++T40F7cKS1hwf4C2ujF/5O7CM5aZ6Z3XfnzhVtaj33Sb9A9RN51VpKnpHYBrPfnwPbOetjmG8kVX/c5UaxlKN0insIIajpFB3SF3cHszv29+K0TPqUlbbmdpW4OlUbfGVhB4jGWJ/3y2USWiLwaYgcH3OPbDH0PlTpnNIZ7yC0VaaDOfWQjWZRK0402qHrc+NLbw8r/PT3J9nEV6VWew1YWxDPG0B0dgNkRpIxIa9sLV2uGEpTxkl+D0rqTiCWO/hHJa3hcIhr8O1u0U7d7dkl7P56wIfKykzDdNeM= X-MS-TrafficTypeDiagnostic: SN2PR03MB2368: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 31:3UEOfhHdD3vN3r6AetbbTJztMKPW5sTCcNCHgl21vA2RGB4oK9xdpdyUUVzzrbotK/Vx7e4FpPbMKmoiKBNNLWfFtQr0LIhB8IBHrw8JyGoHhaX232FYr3do/LTauAHZ/kG0Q47psS8pyvclDI9+qJWrB6XN/KkstYWYFplg7VgxHOzby2jk+d9LLl6m1ETr5RxDDSXe/vAWOiOPRc1Emkv/DMplePWl4EnszTfCnJE=; 4:6SGRv1haAk1xvamwNpsE1Tk1drWosfdJe2P15GwIMaCtaz4tT8/PZ7XTzj0Ayk2q/yt5OHENcP/gShJVBmJBO+EQ7qsnZAFw7BjmGIGU1Hxy8BjObtmVBh44+j3Yrbq4SwuZN1UhnOUqHT+JcBAddISG6BMUl0HUKJsxvVmp6OB88+P68AP87NXfsyhzlKBYTw4Snd0B3Q/wMcbsJ3Nv4kguOh0VUD8/PEl8RblblCy98ZyNJJOExLYxLfMbJ8BIE9qupytXNd/aRzj4hPpISuxtS5//XZ5oPPMpyH3DjbjtUGGkQHQ7G82lDtwqz5f8rRZcE/nwR0JwHS2IRRZSwR7twv+QRB/FaeQEP38KIL3z7nlJMS7c3GTOO/NwJahc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(10201501046)(6055026)(6096035)(20161123559100)(20161123565025)(20161123561025)(20161123556025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(201708071742011); SRVR:SN2PR03MB2368; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2368; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2368; 23:oURrUCzmG+hiD3yi8JEtVcyHMyZoB4Uz6ZxAlWXiP?= fSkOfjpEZzOez8zlVjEqDk8k7hMOm3hgHrE79JzBCrD7fugK4XLJGVjd/9nfq9j9u9uMXo994DZozNgaJnlMDdzMkDrPICa5bermEvavxmKmgBWIjjt6j7qzrmubaJ/UzFRkl3eGtZRFrXflwX7Md5hVwL3XLfrDj1sB+7JgpJWTV0QlCRQHgJt8usyi/S16zFJ7WdpjayrMUnPNliUGlxGXjwVoH/NWzVkHYFzXEyqU9L31TUVRv5Q+id2JfBqRWV3QElPLdYCcbppqLDWKzzqV7y4eWtWGVudpELbq+ANGZouYhftwN5WV3H6WqHitVWgJMOwk/kXqCK+nbIsaT5tLTa13NLA8xsa3DpsihLt7D7L64ZmcAdUlYxZhqYm6IKvsLt1q0bvyFya8Oo8KH7feiT72f9/jC0+4dovTGZ7A0iZTypdkCQjOyx1YqYZ1DTYyDFImhobmmjzzFck1r8KrnKOaeR79fwUOIFrrqoy8OrsF7ysXoKSqd9U7JbP+8knfDe9qH9dVMH/E5Ljrnc52EDqcXD18IjC+rJPiwAjEFPtJmzi5hBpVLNgE+JYt/+CZI+eUcVnyOcTFyCS79f63G6AMPl8MxFeX0EG6EBpcuyaZhdEKDv8/8OURpbV7wow8LM5Z2capSbB6u/73of2Zy837tAhVQLvjr4BFPxn84E3fQPZ6uv5w7iTxbg+DQvS7R6Voopzepy5G5QkvT0yoMpL8+0VJT+WUpi5m1LjT6WdbX1czEyb5NSojU+B999IR9+U8mJC9d+JZoNX72+kqt4shyTVuomu3Dm6D0wd8i+RwUE6f5D/NbO283ZdrR4weaVSjJXdaqnFmO/1Gda6WoqF9GHmuVf6i0A2f0/F6nel0z/AkOXWEfApGmhTP/32NiVmmxbWGWn1IzP1VeDKcJYHLfASIfjseUpF0nxxVurOdCtVahOaNmXsUpN0mXCce836GQPbenWPL1auspWlyD/DGYaJworGoS0W8JZEMMfJnrJOWm0dMCu7UTB1r9PvMSwgFcv3p+KudECIrMLWydeGALWRyXJaBUOz5GoXU9RYURFczC4uXztZIEDz76o= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2368; 6:WvRoq4tllAgmOnAnVvWwgffBG2yYx0spQ6vGZcZkMb3UmayEk8fFo24GhNoM5IR9x9uq1vD6c0qquQPC7I2Hr7+1yBVOpjdhlKD5BpJNjcJL3TA4sS/KmCAtLk6x5GcXW094eaJKefHIUwIO4m7BkRyr1LtQXPbF+x/SCFNeF+sVXCoHvsHJHc6ZTGX2CzEwWiykJ+rk+PJriu4k8Pgagelu6OqmVF/uasH7SHW2C4sbcBh5NYYmsNIkE34kU39eRxTtqHOkLilVvgZoPrbEZig5cKEILABrmGdhEnz++a/B2vgzI/xfsRKYQX99yLZ7tPLj6Uy+kPStmkMpaPCTpEfJInsOnu6laysd0KljjwM=; 5:EBUZF0BpwBSqgAEshPoisXkeoCsLuNFIEkLUPBd4ospC+kOTVUd+QkunnZE8H0iX5i14zxwjuxqhWmklLg1LypqI4TJnoAmOW+n9cXLLxVJPLP8VRwKgvhO9smRJCvUS59AAM0iBfHRDbD638/E6Xi44wdQmAxRWxdjYHhsxROs=; 24:aRe46KnbJNdSbovoTbeSdE+wNXPeELNoMa5pAlsSmlwpXT8kq97Xgm/0ZWbxIdrHTqQnkDIjz2MOzQsDT4dBYgSbbXnbIAY8n/nSeWlRhRM=; 7:iXZPjacetEPO7vi64B8INTskbBXxfJW+QTfQUzFhLVVf0GM9OhPfexkPE+s3yq6sn/tByau0EDMJRxade9kF2eeVmg/8zIbjaPuB8wuQUK4tut5F2M9MNLBWDFoa5aiYTpN8rdwkth2moGB3+QRnSd44QTu6y+9DyvSmUFiYK902pskMcAvvP8QbqzgPDdw9rgUTBAEbAAuN4sFSMQRKoNkdctB8hNR1p4wYFJsqucXqzhEDB3+8sIPTRI44Wc1l SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 12:07:22.2102 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66aa29a2-845d-40d6-3b84-08d5422210f8 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2368 Subject: [dpdk-dev] [PATCH 18/18] net/dpaa: integrate the support of push mode in PMD 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Sunil Kumar Kori Signed-off-by: Hemant Agrawal Signed-off-by: Nipun Gupta --- doc/guides/nics/dpaa.rst | 11 ++++++++ drivers/net/dpaa/dpaa_ethdev.c | 62 ++++++++++++++++++++++++++++++++++++++---- drivers/net/dpaa/dpaa_ethdev.h | 2 +- drivers/net/dpaa/dpaa_rxtx.c | 34 +++++++++++++++++++++++ drivers/net/dpaa/dpaa_rxtx.h | 5 ++++ 5 files changed, 107 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst index d331c05..7b6a0b1 100644 --- a/doc/guides/nics/dpaa.rst +++ b/doc/guides/nics/dpaa.rst @@ -315,6 +315,17 @@ state during application initialization: In case the application is configured to use lesser number of queues than configured above, it might result in packet loss (because of distribution). +- ``DPAA_NUM_PUSH_QUEUES`` (default 4) + + This defines the number of High performance queues to be used for ethdev Rx. + These queues use one private HW portal per queue configured, so they are + limited in the system. The first configured ethdev queues will be + automatically be assigned from the these high perf PUSH queues. Any queue + configuration beyond that will be standard Rx queues. The application can + choose to change their number if HW portals are limited. + The valid values are from '0' to '4'. The valuse shall be set to '0' if the + application want to use eventdev with DPAA device. + Driver compilation and testing ------------------------------ diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index fcba929..7798994 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -73,6 +73,14 @@ /* Keep track of whether QMAN and BMAN have been globally initialized */ static int is_global_init; +/* At present we only allow up to 4 push mode queues - as each of this queue + * need dedicated portal and we are short of portals. + */ +#define DPAA_MAX_PUSH_MODE_QUEUE 4 + +static int dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE; +static int dpaa_push_queue_idx; /* Queue index which are in push mode*/ + /* Per FQ Taildrop in frame count */ static unsigned int td_threshold = CGR_RX_PERFQ_THRESH; @@ -460,6 +468,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, { struct dpaa_if *dpaa_intf = dev->data->dev_private; struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx]; + struct qm_mcc_initfq opts = {0}; + u32 flags = 0; + int ret; PMD_INIT_FUNC_TRACE(); @@ -495,7 +506,41 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, dpaa_intf->name, fd_offset, fman_if_get_fdoff(dpaa_intf->fif)); } - + /* checking if push mode only, no error check for now */ + if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) { + dpaa_push_queue_idx++; + opts.we_mask = QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_CONTEXTA; + opts.fqd.fq_ctrl = QM_FQCTRL_AVOIDBLOCK | + QM_FQCTRL_CTXASTASHING | + QM_FQCTRL_PREFERINCACHE; + opts.fqd.context_a.stashing.exclusive = 0; + opts.fqd.context_a.stashing.data_cl = DPAA_IF_RX_DATA_STASH; + opts.fqd.context_a.stashing.context_cl = + DPAA_IF_RX_CONTEXT_STASH; + if (dpaa_svr_family != SVR_LS1046A_FAMILY) + opts.fqd.context_a.stashing.annotation_cl = + DPAA_IF_RX_ANNOTATION_STASH; + + /*Create a channel and associate given queue with the channel*/ + qman_alloc_pool_range((u32 *)&rxq->ch_id, 1, 1, 0); + opts.we_mask = opts.we_mask | QM_INITFQ_WE_DESTWQ; + opts.fqd.dest.channel = rxq->ch_id; + opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY; + flags = QMAN_INITFQ_FLAG_SCHED; + + /* Configure tail drop */ + if (dpaa_intf->cgr_rx) { + opts.we_mask |= QM_INITFQ_WE_CGID; + opts.fqd.cgid = dpaa_intf->cgr_rx[queue_idx].cgrid; + opts.fqd.fq_ctrl |= QM_FQCTRL_CGE; + } + ret = qman_init_fq(rxq, flags, &opts); + if (ret) + DPAA_PMD_ERR("Channel/Queue association failed. fqid %d" + " ret: %d", rxq->fqid, ret); + rxq->cb.dqrr_dpdk_cb = dpaa_rx_cb; + rxq->is_static = true; + } dev->data->rx_queues[queue_idx] = rxq; /* configure the CGR size as per the desc size */ @@ -835,11 +880,8 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, fqid, ret); return ret; } - - opts.we_mask = QM_INITFQ_WE_DESTWQ | QM_INITFQ_WE_FQCTRL | - QM_INITFQ_WE_CONTEXTA; - - opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY; + fq->is_static = false; + opts.we_mask = QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_CONTEXTA; opts.fqd.fq_ctrl = QM_FQCTRL_AVOIDBLOCK | QM_FQCTRL_CTXASTASHING | QM_FQCTRL_PREFERINCACHE; opts.fqd.context_a.stashing.exclusive = 0; @@ -973,6 +1015,14 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) else num_rx_fqs = DPAA_DEFAULT_NUM_PCD_QUEUES; + /* Number of High perf push mode queues. */ + if (getenv("DPAA_NUM_PUSH_QUEUES")) { + dpaa_push_mode_max_queue = + atoi(getenv("DPAA_NUM_PUSH_QUEUES")); + if (dpaa_push_mode_max_queue > DPAA_MAX_PUSH_MODE_QUEUE) + dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE; + } + /* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX * queues. */ diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index 95d745e..c0a8430 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -80,7 +80,7 @@ #define DPAA_MAX_NUM_PCD_QUEUES 32 #define DPAA_IF_TX_PRIORITY 3 -#define DPAA_IF_RX_PRIORITY 4 +#define DPAA_IF_RX_PRIORITY 0 #define DPAA_IF_DEBUG_PRIORITY 7 #define DPAA_IF_RX_ANNOTATION_STASH 1 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 2609953..088fbe1 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -420,6 +420,37 @@ dpaa_eth_fd_to_mbuf(const struct qm_fd *fd, uint32_t ifid) return mbuf; } +enum qman_cb_dqrr_result dpaa_rx_cb(void *event __always_unused, + struct qman_portal *qm __always_unused, + struct qman_fq *fq, + const struct qm_dqrr_entry *dqrr, + void **bufs) +{ + const struct qm_fd *fd = &dqrr->fd; + + *bufs = dpaa_eth_fd_to_mbuf(fd, + ((struct dpaa_if *)fq->dpaa_intf)->ifid); + return qman_cb_dqrr_consume; +} + +static uint16_t +dpaa_eth_queue_portal_rx(struct qman_fq *fq, + struct rte_mbuf **bufs, + uint16_t nb_bufs) +{ + int ret; + + if (unlikely(fq->qp == NULL)) { + ret = rte_dpaa_portal_fq_init((void *)0, fq); + if (ret) { + DPAA_PMD_ERR("Failure in affining portal %d", ret); + return 0; + } + } + + return qman_portal_poll_rx(nb_bufs, (void **)bufs, fq->qp); +} + uint16_t dpaa_eth_queue_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) @@ -429,6 +460,9 @@ uint16_t dpaa_eth_queue_rx(void *q, uint32_t num_rx = 0, ifid = ((struct dpaa_if *)fq->dpaa_intf)->ifid; int ret; + if (likely(fq->is_static)) + return dpaa_eth_queue_portal_rx(fq, bufs, nb_bufs); + ret = rte_dpaa_portal_init((void *)0); if (ret) { DPAA_PMD_ERR("Failure in affining portal"); diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h index b434b6d..de65ebc 100644 --- a/drivers/net/dpaa/dpaa_rxtx.h +++ b/drivers/net/dpaa/dpaa_rxtx.h @@ -294,4 +294,9 @@ int dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf, struct qm_fd *fd, uint32_t bpid); +enum qman_cb_dqrr_result dpaa_rx_cb(void *event, + struct qman_portal *qm, + struct qman_fq *fq, + const struct qm_dqrr_entry *dqrr, + void **bd); #endif