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 4C176A00C3; Tue, 20 Sep 2022 16:57:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41B9E40DFB; Tue, 20 Sep 2022 16:57:17 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2087.outbound.protection.outlook.com [40.107.220.87]) by mails.dpdk.org (Postfix) with ESMTP id 7E5D940E0F for ; Tue, 20 Sep 2022 16:57:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gLrHTtBwE8G4YnY5Cs/GFePwPJahHibIZojW9EIT/qZSfpJlXcyaGP23BDwUtxzCKiABLm4m+Q/alC4SM7dPWas5WxFhXy7EzNSuye6EJsJS9fFxwVTzKtJyL/AvMNuoQ2rDBRHrcHOX+hr29Xj7mXxKaskGkK1U5NSD6lhVH6I4TPEN5FVl5QQBAHALy9ZI9h5rQT4GdbSlBzsMMfcw/lLMKAj2zxn9DG2BsCeDEbnhLoP7hrPYo4n4GVViHC53oLrw30mkmA+GIp9T3no0PuEYKx/zBzYSzFOBiNBHctKF+rt5NQ8YHPlKBw+aN51MnuzzLtyEfwR4TeQDF6huZg== 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=dkzf6HvBaRxl2JbZ4NZCA2n0Oerf3j0VDQJxUeCZdgo=; b=LXDlMp2CcVyHnwDpbZDQZO5L/Z2DjLW3snLHuD/FTl0w8NknImjZs2JI3KFa6YCYhAqGhEpUoYgN7T/Tf0L2M0gSggc/rpZPvCfE8RnMFw4PFyMPK3OKdx4DnlLvduAz3E3TdpWIpgTYd+UNjmzbYtC8B1aZ+fyY1bB5DNtBlutC6U2ivuaopGMX8zZqGkmjpwI7y7jTDy1tk7pxGiJk9tyVG1ro8tutvNnOdYFxDXsQhMd9hP6H9MRlWSzRptxH0ni/twQ/g5TOGEjcChMEIGD+Y0GA/Wbao0ubACVoVsHifRlQFtTUhVlDV/tzHkE50FbFMetbD2qDFqPtgmwCZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=corigine.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dkzf6HvBaRxl2JbZ4NZCA2n0Oerf3j0VDQJxUeCZdgo=; b=QNELA+3OdsYvUTDcxiTMpF/IsdkXWtxgNLoGYYPvOGd+if9wLm0tiiH1wfXIY7Da1zBo6u7kgHCJcYuCeHVGEsY7yBi1PVesMjtQcV13QmIglx/SzIkA2G+WupnFfUfpadiy2FLJWzrgmQ/oT7XwVlZIrTJ2ZznBtPZ7OntcDxk= Received: from BN8PR16CA0028.namprd16.prod.outlook.com (2603:10b6:408:4c::41) by SN4PR0201MB8789.namprd02.prod.outlook.com (2603:10b6:806:200::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.21; Tue, 20 Sep 2022 14:57:14 +0000 Received: from BN1NAM02FT042.eop-nam02.prod.protection.outlook.com (2603:10b6:408:4c:cafe::de) by BN8PR16CA0028.outlook.office365.com (2603:10b6:408:4c::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.23 via Frontend Transport; Tue, 20 Sep 2022 14:57:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT042.mail.protection.outlook.com (10.13.2.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5632.12 via Frontend Transport; Tue, 20 Sep 2022 14:57:14 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 20 Sep 2022 15:57:13 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Tue, 20 Sep 2022 15:57:13 +0100 Envelope-to: chaoyong.he@corigine.com, dev@dpdk.org, ian.stokes@intel.com, david.marchand@redhat.com, oss-drivers@corigine.com, niklas.soderlund@corigine.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com Received: from [10.71.194.74] (port=20176) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oaegS-000371-Vx; Tue, 20 Sep 2022 15:57:13 +0100 Message-ID: Date: Tue, 20 Sep 2022 15:57:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v9 05/12] net/nfp: add flower PF setup logic Content-Language: en-US To: Chaoyong He , , Ian Stokes , David Marchand CC: , , Thomas Monjalon , Andrew Rybchenko , Jerin Jacob Kollanukkaran References: <1663238669-12244-1-git-send-email-chaoyong.he@corigine.com> <1663238669-12244-6-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1663238669-12244-6-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1NAM02FT042:EE_|SN4PR0201MB8789:EE_ X-MS-Office365-Filtering-Correlation-Id: 22ca3cfd-acf4-4ec8-2149-08da9b18675d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qCPgzf5Z3XhHNoRdpzD2YzhhvavsnOZmftF0xTuFv269Yhx/Rln+grn6QFKDY03afswKHEyDlJwm2SrkPEE2G4HEZ9Jxp9YOkCeIMgi6YHOjmLAJkXWM67IR6w1XhJTk+haqJ/WEVRvGoBMJNwyLP+utjwrx4sThCeLjoRN+ibrN7SbA3EnwA0uqgWVX7MEFVjdmitFR/AreJ4d2+D9RM7g08vosSrD7c1OSGYtep7Be2pyRoyAvMH6tEmviWckU6Ervt7yt6Rxigi8Kg2oBRPsbSMh0W3roNmCRnemzlp96yc1a5/F6/+80raRyeezV2ma+YLJv0zpA0sZlaCPzgo1m6wu4eIDPLDSmjRnif4KPq6uDiXS4T5kL2D5GPdiz8OuKU7XYunJQrH3FX7cA/w91E9bhUkQ5hFCUj/saraQdP3T1AEUJSvMJg0i+TX5abCRobjt3j29e9cmGsgMoWGN/Kax/SHOhuEQy7TaeJOhNB/OD8PmjjIOQSlaBmMHMffCxvwj4xJIPPU9i4WNKDOqFpX0KpQDZ8yqegCaYSF8rZ25/FZm5vL2QUpiOKY8W4wMsmRPDyUVVN42p/zRFNt5BQbBb5etao0ILFq0L/O9S/iPFUJgdH3FDpR2er8gghY01V1GYPp8gTqN4BBSqhXscMo8mCVrj6J9ySHW0OfCIz947ewoWAm0JJtAfSFd6XUhZXHfVx7J0Zzdx4z6m4HLSleLxWsbFKNoAq9qY26MFOdPgZnQmAAtowP5YRqe0N4/dLSWReOqfK2/WEDov9Q896ZtxDRcOAvtj0EexAxspvxX7ZRNluKYrmInOO01MZHon54C64iwwMv61bFmiuQ== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(396003)(136003)(39860400002)(451199015)(40470700004)(46966006)(36840700001)(31686004)(26005)(82740400003)(7636003)(31696002)(40480700001)(36860700001)(8676002)(4326008)(44832011)(54906003)(2906002)(2616005)(356005)(41300700001)(82310400005)(53546011)(186003)(47076005)(5660300002)(36756003)(478600001)(9786002)(8936002)(110136005)(426003)(336012)(70206006)(70586007)(40460700003)(316002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2022 14:57:14.0304 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22ca3cfd-acf4-4ec8-2149-08da9b18675d X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT042.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0201MB8789 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 On 9/15/2022 11:44 AM, Chaoyong He wrote: > Adds the vNIC initialization logic for the flower PF vNIC. The flower > firmware application exposes this vNIC for the purposes of fallback > traffic in the switchdev use-case. > > Adds minimal dev_ops for this PF vNIC device. Because the device is > being exposed externally to DPDK it needs to implements a minimal set > of dev_ops. > > Signed-off-by: Chaoyong He > Reviewed-by: Niklas Söderlund <...> > + > +struct dp_packet { > + struct rte_mbuf mbuf; > + uint32_t source; > +}; > + > +static void > +nfp_flower_pf_mp_init(__rte_unused struct rte_mempool *mp, > + __rte_unused void *opaque_arg, > + void *packet, > + __rte_unused unsigned int i) > +{ > + struct dp_packet *pkt = packet; > + /* Indicate that this pkt is from DPDK */ > + pkt->source = 3; > +} > + > +static struct rte_mempool * > +nfp_flower_pf_mp_create(void) > +{ > + uint32_t nb_mbufs; > + unsigned int numa_node; > + struct rte_mempool *pktmbuf_pool; > + uint32_t n_rxd = PF_VNIC_NB_DESC; > + uint32_t n_txd = PF_VNIC_NB_DESC; > + > + nb_mbufs = RTE_MAX(n_rxd + n_txd + MAX_PKT_BURST + MEMPOOL_CACHE_SIZE, 81920U); > + > + numa_node = rte_socket_id(); > + pktmbuf_pool = rte_pktmbuf_pool_create("flower_pf_mbuf_pool", nb_mbufs, > + MEMPOOL_CACHE_SIZE, MBUF_PRIV_SIZE, > + RTE_MBUF_DEFAULT_BUF_SIZE, numa_node); > + if (pktmbuf_pool == NULL) { > + PMD_INIT_LOG(ERR, "Cannot init pf vnic mbuf pool"); > + return NULL; > + } > + > + rte_mempool_obj_iter(pktmbuf_pool, nfp_flower_pf_mp_init, NULL); > + > + return pktmbuf_pool; > +} > + Hi Chaoyong, Again, similar comment to previous versions, what I understand is this new flower FW supports HW flow filter and intended use case is for OvS HW acceleration. But is DPDK driver need to know OvS data structures, like "struct dp_packet", can it be transparent to application, I am sure there are other devices offloading some OvS task to HW. @Ian, @David, Can you please comment on above usage, do you guys see any way to escape from OvS specific code in the driver?