From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5749442844; Sun, 26 Mar 2023 11:07:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4EE1410FA; Sun, 26 Mar 2023 11:06:59 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by mails.dpdk.org (Postfix) with ESMTP id 6281940A8A for ; Sun, 26 Mar 2023 11:06:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cajbcITpkDGSD+kEuRyXWm2QN9A6HcCsX2CdTwOK/5sOWs0Yv6a22V5NRaqSPE5niuaxz44aErwyZLADBie5r4ej+TmACYy1/iJN0EHch2T1InYxKm/E0Ip23Ghr483G3BXYDut1+hDMZuIiYfhuHWKeXzYrP+aIvwJ47QCRwVQChzAm2ZpTkrAyzB616L9M3l2PBGU6btFDVm1orDiu7nlhm3jWRy2ASY+c593Jj93DZE37Pyopp6XjpOZlOfCI0Wv/s6LrIB984NunNnGyUEJ+8FctSZD3ANADfrH5JYxcUiNneoaSMbDyvpnBfj/m0+HQw0rCVie1odY6ZaPrmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WX9SV+CsNO4Aot/3ETJeLRgMFMiwO7Cof3FEEqw5l60=; b=hWSXi9zjpHJmzKHocfH4ZQiSolAcSVFbrZbvxnj9eOmTCM6bk4i/MzBgXuHb584DD059y+Aaxs4ecPfGlcK9XCQxuhjvYPhpvL7WU0yfqEkD5+m/AYeIVwjOT/ezvYYeCjOC8KMDTC3u6xCVeKqXghKXKNXrXpLipuIh2x0NS9B/Aw5JXNdOxez82oWaa3ZBFHJcLEYluOnQ1ht7t8YLpcXSrmSEOwonhcouF1g3BHXXxxf4dKp2yjfXpa8ygv5PmHiLYLuFL+nBKVJEP5BQ+w6XMW3lgQCxZAP92KT1ekIQJOGQNhxa/glwPJ+IO6dMFtYFJ4nhpHluv3NaokHMCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=solid-run.com; dmarc=pass action=none header.from=solid-run.com; dkim=pass header.d=solid-run.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solidrn.onmicrosoft.com; s=selector1-solidrn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WX9SV+CsNO4Aot/3ETJeLRgMFMiwO7Cof3FEEqw5l60=; b=lo0N/I/BmrGXaBH9qZa/WFtZj1E6lrJ0KOIPkNZBRoZEvY3sWAEpCMqR41bwJYhr0ythKoi+x/cxFTBm8Y5moPztwhwD7rzN1RbZQp9uTuQ7u14srD1b4WJHMto6m3RZthvWMKT466cb/rF8m4OPjnrhmDnx/1hwDe+oqJ9G5mU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=solid-run.com; Received: from AM0PR04MB4723.eurprd04.prod.outlook.com (2603:10a6:208:c0::20) by AM9PR04MB8065.eurprd04.prod.outlook.com (2603:10a6:20b:3ee::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.28; Sun, 26 Mar 2023 09:06:56 +0000 Received: from AM0PR04MB4723.eurprd04.prod.outlook.com ([fe80::b28a:f4f1:8415:221d]) by AM0PR04MB4723.eurprd04.prod.outlook.com ([fe80::b28a:f4f1:8415:221d%4]) with mapi id 15.20.6178.041; Sun, 26 Mar 2023 09:06:56 +0000 From: Alvaro Karsz To: g.singh@nxp.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Alvaro Karsz Subject: [PATCH] dma/dpaa2: set the vfa bit for rbp with vf Date: Sun, 26 Mar 2023 12:06:47 +0300 Message-Id: <20230326090647.74537-1-alvaro.karsz@solid-run.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: ZR0P278CA0033.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::20) To AM0PR04MB4723.eurprd04.prod.outlook.com (2603:10a6:208:c0::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB4723:EE_|AM9PR04MB8065:EE_ X-MS-Office365-Filtering-Correlation-Id: f427da25-f38b-4037-b089-08db2dd972c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h+EYG7fAWfAL/EpgL/LCK1J7mkXZ9mT8nHzlcjySIETbpGOWf45oiwLbYz9Bc0eHMzYtgy90qv4/Bb3XYia7q/8+/c65i7cVK2/a7XFYAaZ4nW3KEiae0lhNAYSNQMaqVlQM3OTJkqWcqXR+Ngcg76cXaWuAFKFQMF3iL2eT/NyB75Nn4zkRi9EuTj7ZIW5p/iudg3mhw7+cZBR6Uv25HKb5aG908n0reh031RtXFyguch2HAXvVku302E2+oGdyZ9F5V50NFZIQf69X1Dlw5y4VwOKSZXvnCamJiXNHw1olnfhepC4Gjmqq9z41Dy4Prf3AqPa7kdWPV6Vswbj1cqytcAS3kSNdpaImmP+A9QZCxDQVeWMcQcR9yC47tgH9ANhvDEqtp3d8dRoi/EarJoR5rKul6v8GEqwhOWbOIv1M/S67GZobWWolrWTMW39WOmi7QML+X5Odds21E6lVKsk9+vGkZTvFOG9OcVKbqA2iWQ3GBVZfnxt9cAa2TogZDQn6mWAI2fo7LaDwz5l5AFExgbCP5K2Gayd+dAL0B8qMACJ1ngoqAgM9kVvu4U+ss6y38vVVVJGX73U69+BOmj5UpAHWICzb8eq8p9r+vkAXciRtcOVtzXs8klwpuxEq X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4723.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(39830400003)(376002)(346002)(366004)(396003)(451199021)(83380400001)(2616005)(4326008)(66476007)(66946007)(66556008)(8676002)(6486002)(478600001)(52116002)(6512007)(6506007)(1076003)(26005)(186003)(316002)(107886003)(6666004)(2906002)(44832011)(36756003)(86362001)(41300700001)(38100700002)(38350700002)(5660300002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6g34JoXN9v17ausULWC+LtO6iXt8RBqGxGtefK0AKZqi9dS1EnE3zRfaR60Z?= =?us-ascii?Q?lByKLUo/65ALBaOfQzyExRPIUpXYwia+DRKj+8LJrtY+wmAvbJ7biskIDXZ3?= =?us-ascii?Q?ZDSN8gt+2l+X9E41lZwkqbKwm/xLAVAoZwDd+YzLk/q6j/344dn1TJ147bnm?= =?us-ascii?Q?IHA/yJ5YfzphFMjxvnEiVPK+lkjrtJcLJrDshjRKVA/ra2u68jfokJTb9//J?= =?us-ascii?Q?24kADGHu/HwjH41kPidhMm8/6g/5twbZ3a1TzYEv0EJY0kFyZAfh8h0aqkId?= =?us-ascii?Q?Rbnxim1EXOl2zwppZzZND1e2qN3u8UDdE2+naeUFP1Z3lNgsIh58fVlQsKCT?= =?us-ascii?Q?yB4DHuBew/d138P6wrKV/HQZ1BQBQRunNRVujfkq9M0qL/JhA3vHs+ptTvZt?= =?us-ascii?Q?qcMgEW8vqk7FMbYoLK6M84ciBPJyHilRCrvYyumkRxiYiypscIRuRBs0xoAo?= =?us-ascii?Q?3kXJPa3uGeNMjxexEyFlFTvb9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= =?us-ascii?Q?8HIwOY9Z8znb/FyNoqJkUZ9dZQnJGMQe67YKF5qkhRvwVHUZzXxUWiCeOAdc?= =?us-ascii?Q?O1TBOkLn7kzFUPvmwcBkR22S+uqPjt9fcMRLUIRzqckxsLlcxk0t29B/E/9l?= =?us-ascii?Q?nyrOUiMHJZghcEdpj4UgUY+1ZqX9IoS1GtJqeevQwMcxuVqd3czylMfqIa7j?= =?us-ascii?Q?sUOO7AT1dvzZiCt9NdIWqZvY2lRyugp+wlfydgijEKK9XRl/9F3oGvpNL8u1?= =?us-ascii?Q?0A=3D=3D?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: f427da25-f38b-4037-b089-08db2dd972c5 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4723.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2023 09:06:56.1956 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4a8aaf3-fd27-4e27-add2-604707ce5b82 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fungSc+0RJXL0gL8iiMQyMVM3OYDWAshlmjo6hUfOWPW/s5Og6rCF5/IQUPZO36QhqeP0KL6Qbsm5U1+Bmcif/+IlFYcH2aFe8YIXkVtYbY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8065 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Set the VFA (Virtual Function Active) bit in struct qdma_sdd -> rbpcmd_simple in order to use the route-by-port functionality with PCIe virtual functions. At the moment, a user wanting to enable route-by-port will call rte_dpaa2_qdma_vchan_rbp_enable with a rte_dpaa2_qdma_rbp struct. The struct includes the PCIe Physical and Virtual functions among other things, which are then copied to qdma_sdd -> rbpcmd_simple, but the vfa bit is never touched (the bit does exists in rbpcmd_simple), so route-by-port with virtual functions won't work.. In order to fix this, a vfa bit is added to struct rte_dpaa2_qdma_rbp, then is copied to qdma_sdd -> rbpcmd_simple. Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton") Signed-off-by: Alvaro Karsz --- drivers/dma/dpaa2/dpaa2_qdma.c | 2 ++ drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c index d5a5f08ecc..8968bb853b 100644 --- a/drivers/dma/dpaa2/dpaa2_qdma.c +++ b/drivers/dma/dpaa2/dpaa2_qdma.c @@ -117,6 +117,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, /* source */ sdd->read_cmd.portid = rbp->sportid; sdd->rbpcmd_simple.pfid = rbp->spfid; + sdd->rbpcmd_simple.vfa = rbp->vfa; sdd->rbpcmd_simple.vfid = rbp->svfid; if (rbp->srbp) { @@ -129,6 +130,7 @@ dpaa2_qdma_populate_fle(struct qbman_fle *fle, /* destination */ sdd->write_cmd.portid = rbp->dportid; sdd->rbpcmd_simple.pfid = rbp->dpfid; + sdd->rbpcmd_simple.vfa = rbp->vfa; sdd->rbpcmd_simple.vfid = rbp->dvfid; if (rbp->drbp) { diff --git a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h index dc8acb4aec..5a8da46d12 100644 --- a/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h +++ b/drivers/dma/dpaa2/rte_pmd_dpaa2_qdma.h @@ -44,7 +44,9 @@ struct rte_dpaa2_qdma_rbp { uint32_t svfid:6; /* using route by port for source */ uint32_t srbp:1; - uint32_t rsv:4; + /* Virtual Function Active */ + uint32_t vfa:1; + uint32_t rsv:3; }; /** Determines a QDMA job */ -- 2.34.1