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 42D0FA0C43; Thu, 23 Sep 2021 12:10:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2ED6241263; Thu, 23 Sep 2021 12:10:00 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id DCB8741250 for ; Thu, 23 Sep 2021 12:09:58 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="220611618" X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="220611618" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2021 03:09:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="702663612" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 23 Sep 2021 03:09:57 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 03:09:57 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 03:09:56 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 23 Sep 2021 03:09:56 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 23 Sep 2021 03:09:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFA/v6rT3Onm9Xe/gcnejzUllmfh+0y/caX+lQhS9hnAcYT10p33og6K22ebepa7wxRllQUT5SGAVl9XHO4Whxe4ikvk25Syj4NduUosYAWUVu2KMEsjrYX6q2tHk0vqDjMIqW7amX6LbgHDD6w18JqdOTNynW21jiQB9s7frDIstqd2fB7UoSEJcK3Gux9U+krPY72hEiCVgG6XU/gLbVXQbNLlO/NLqtS0fdl/OAgYHyMSaPKdFIABCvcdT0VNCZjbQqE5AO8uTmd8Vq9DF0ecNmleD/ZWJFrvHZZ84n0rfvuJu+yjSr/GxRJ+4tdJ6iVPPBMIoT3J9cS2Atnt6Q== 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; bh=h6ML8XbcCSJvj+rRfmMj4ujFGE7X30ffHuI+Lk4bZ38=; b=ceKgnMILn0p8OVRyebx4bHNMnw/3wulXAj1y7ORvYJ4oPAT5fPS4t7wEt17xbjMW9wM1yKwTe8QP46qnpwocKsOKbYtLc0hGv3//p0vJiCkJQM84OI4eE7i2BNdp0yGBPxg7WM2IAmrucJ5MK07e3tnxm4y+FVrOPKPNdhf0Ypx0nf1SGFL+ZlLmZlwXnjJm9bJLYwJilZafDrICJJvbwSxp0GCMlgoMfNl42h+NAiP1RjmKiPR4MFQw25xgccraWH1U4VVkkm7ah8rgWtyF3r/5sCuZc6X0TpNXv+q6GqhzRGstY/+g6Zr8annkPa7Z4LlB5z+csm+LTcxxm9JK3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h6ML8XbcCSJvj+rRfmMj4ujFGE7X30ffHuI+Lk4bZ38=; b=n9GIdLKhunFcWRa/8U7p4lzLpgPPKp8IGl0qCI/35SWRh6vUl3k5SCudfxt0XUgPad6jbMiVAhBYDo1cw+NQZEJo1qBX18XS13l/G0IIWsINdR84NNNEMmWJhFr6ew58MEOlbed0X3rgHTOkmo01I/Rrzk45BU+5BcJcGcv/BCY= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4984.namprd11.prod.outlook.com (2603:10b6:510:34::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 10:09:55 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4544.015; Thu, 23 Sep 2021 10:09:55 +0000 To: Apeksha Gupta , , , CC: , , References: <20210909204314.1826-1-apeksha.gupta@nxp.com> <20210909204314.1826-2-apeksha.gupta@nxp.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Thu, 23 Sep 2021 11:09:49 +0100 In-Reply-To: <20210909204314.1826-2-apeksha.gupta@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR1001CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::25) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR1001CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13 via Frontend Transport; Thu, 23 Sep 2021 10:09:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d638aaaf-f2fb-469a-b233-08d97e7a4a9a X-MS-TrafficTypeDiagnostic: PH0PR11MB4984: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TR+9Stdi1j9zEeja8nwrBT8w4KHh5F6M5KEKKXn/TbSO/EUfRz42u7byxb19vydHfk8EJ8y9OW2s7FsiZo1bc5b55LzmmvcGBYT4PlvSSX9z9e8QtaEDQctjizNoiBFrMEgMwHJY3kVDsCwCHxnMSs2KzSujjtR323WXJf4OFES5JQ9xjzABKQLf9p+K8Rb4XYiQz68rEhviDoUISP3dIvC3kyP/uD+JOOpT5y2Jlt/mtnihQJk8yu7c4woto8Q1AyHLSK5izqptYQPV60atj8HXW5/VNqk+kkDcGMr5Wz9h9n1NOzDwlREb46gP6TOdlptDSmF5QUwYKpao7u7vAVpbCkG9hnq9M0DOBxTQAXpHZjR3O+aWMXpER0e8lS5nzjNzXCHx2W/IrYiaChyvwoJkwbYtG3iXdXCl/f8rYdheOUD8h7QLPM/7Hm+J+wkM/rozA5fFjiCmegS3qhb4k4QaueXjTwlpX5aXekxmgXZpVLgIUpve0ULgfPSi+II4spsfWuLiq3n/m+vg+cMRGWocmN56NHIWX9R3vo/3/9+IT5yfAQqU3bg+4mWYz1JSt3m3nW4x7UWj5aKL7mys5iqBngPCtK4YFEmxE8gdv24Gm/YheJ2fGJl6E5ZcMvaQvvb9yTOXwsDDmxFjAjG4iZa9uaC4Jq74XVXibcSs22jOwBujsQSTZb8no5FB/uUvyOS5mZ29Lf/w0CTgGIGR5q21nA7lmU3BBHXWwzi6OQReaLdJSS13u4dETWkWgIcgZ45nCFvs5WOKPSLJcBVyAPzJ0In+1zPRDPNv0NS8278= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6486002)(31696002)(36756003)(186003)(31686004)(8936002)(2906002)(38100700002)(26005)(86362001)(8676002)(6666004)(66556008)(5660300002)(508600001)(2616005)(53546011)(316002)(66476007)(16576012)(83380400001)(956004)(44832011)(4326008)(66946007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MXFYSTFvMnMyeWlrVFJxTENReHdKLzBVdDJpUmYzVThtSU84a0hFemt1d0hK?= =?utf-8?B?T2IvSTBsVHlnRmVhbGpDQ1ExOEhCMFpCZFpZNFlHQjgyV21PdTdOcGY2Mnlp?= =?utf-8?B?NEo4c0ZINlJndFUyWlFkeFZIdHp4eDdyL1VSdGZSYnh3cnJmalJtSFBQaGNJ?= =?utf-8?B?VWc4a0F5eUoveU85cDZEL0h1YWFRejIzeGhCd01iMVhmY25DZlU0L0NmZzFT?= =?utf-8?B?QzAvcDhpelVQUXgzNytWU2U5amJMWjhzU056WVVOK3A1a2VKVUdwcmhQZEFS?= =?utf-8?B?MkpvS3prTCtIWFRmVGZjNVZxN3JBZnRYUldwM0pUQ2Y2OFdsODVBQ2lZVDVQ?= =?utf-8?B?TCtoTkNsMEtJYjJiTSt5MWdveHRh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anFGaHR5VTZ4MTRoVUdxT2RLelBEVVBVaXMrQ2ZtZFBUMGdaWFNRL0JWNFZn?= =?utf-8?B?T3c0UmVFektISWxONG9NdXA0aGJITkdhOE43c3ZMWmowbkNLd00xQ1J0Q0dW?= =?utf-8?B?dEc4bG1KODdMMVdDeVNsbUNjMGFTYzBnVWNybDFtaGlnaHlKY0lIRTFFWGY0?= =?utf-8?B?MG1VUngxdk5xWXVRWXBLL1JFTFlpR0pFbkIzTVpmKzZpNUhHMDg2Ym92RW1P?= =?utf-8?B?WVRSWVNBWS9ZanQyWWkrd3RhbDdYcGFUU0lzRXBKM2dTdnRINE0wL2RKM29j?= =?utf-8?B?UUtxQTMzbElTT0p3NEJCeEV4Ym5Femg3NjgrdThIV3B4K0tpZ0RDbjhDZEZx?= =?utf-8?B?QlJxdGhzRTdFRVNESXV5RWJQOUZXWXNtQjdWSjN5TjNkOWpqYWpFQm5tajRM?= =?utf-8?B?YStEbXhqc2N1VnRSOFQrOWp3SXlmeDNpdS9XL1cvNlJtT0xudHAvYUFyK1Rp?= =?utf-8?Q?Al4cnCv+x4EjA1Px3MJAkg1K/LFzxzKDA9YWF4k?= X-MS-Exchange-CrossTenant-Network-Message-Id: d638aaaf-f2fb-469a-b233-08d97e7a4a9a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2021 10:09:55.3881 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: D/iZmJWQhwkqSoHKhya43bKdBT6w/zks03dlcPxTIjd0ddYmdJVWdGzBsLx6Z0+9pWKOpgWSsNyMCNa1NoNN0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4984 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/5] net/enetfec: introduce NXP ENETFEC driver 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 Sender: "dev" On 9/9/2021 9:43 PM, Apeksha Gupta wrote: > ENETFEC (Fast Ethernet Controller) is a network poll mode driver > for NXP SoC i.MX 8M Mini. > Hi Apeksha, Before going into details, I have some high level comments to start with, please find comments below. > This patch adds skeleton for enetfec driver with probe function. > > Signed-off-by: Sachin Saxena > Signed-off-by: Apeksha Gupta <...> > +++ b/doc/guides/nics/enetfec.rst > @@ -0,0 +1,122 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright 2021 NXP > + > +ENETFEC Poll Mode Driver > +======================== > + > +The ENETFEC NIC PMD (**librte_net_enetfec**) provides poll mode driver > +support for the inbuilt NIC found in the ** NXP i.MX 8M Mini** SoC. > + > +More information can be found at NXP Official Website > + > + > +ENETFEC > +------- > + > +This section provides an overview of the NXP ENETFEC and how it is > +integrated into the DPDK. > + > +Contents summary > + > +- ENETFEC overview > +- ENETFEC features > +- Supported ENETFEC SoCs > +- Prerequisites > +- Driver compilation and testing > +- Limitations > + > +ENETFEC Overview > +~~~~~~~~~~~~~~~~ > +The i.MX 8M Mini Media Applications Processor is built to achieve both high > +performance and low power consumption. ENETFEC is a hardware programmable > +packet forwarding engine to provide high performance Ethernet interface. It has 1Gbps interface, right? It can be good to give more details on the Ethernet interface. > +The diagram below shows a system level overview of ENETFEC: > + > + ====================================================+=============== > + US +-----------------------------------------+ | Kernel Space > + | | | > + | ENETFEC Driver | | > + +-----------------------------------------+ | > + ^ | | > + ENETFEC RXQ | | TXQ | > + PMD | | | > + | v | +----------+ > + +-------------+ | | fec-uio | > + | net_enetfec | | +----------+ > + +-------------+ | > + ^ | | > + TXQ | | RXQ | > + | | | > + | v | > + ===================================================+=============== > + +----------------------------------------+ > + | | HW > + | i.MX 8M MINI EVK | > + | +-----+ | > + | | MAC | | > + +---------------+-----+------------------+ > + | PHY | > + +-----+ > + > +ENETFEC Ethernet driver is traditional DPDK PMD driver running in the userspace. > +The MAC and PHY are the hardware blocks. 'fec-uio' is the UIO driver, ENETFEC PMD > +uses UIO interface to interact with kernel for PHY initialisation and for mapping > +the allocated memory of register & BD in kernel with DPDK which gives access to > +non-cacheable memory for BD. Why a specific uio driver, 'fec-uio', is required? I think this is the major issue to clarify to proceed. In DPDK we have full framework to support uio, to do the all memory mapping, interrupt configuration etc..., common to all drivers. But in this case driver is implemented as virtual driver and it handles its own uoi handling itself. Why the driver can't use existing support and implemented as physical driver? btw, what is 'BD'? > net_enetfec is logical Ethernet interface, created by > +ENETFEC driver. > + It is confusing to draw 'net_enetfec' as middle man between HW and driver, isn't it same entity as driver? Why the Rx/Tx notation is reverse before and after net_enetfec, as HW --TX--> net_enetfec --RX--> driver? > +- ENETFEC driver registers the device in virtual device driver. > +- RTE framework scans and will invoke the probe function of ENETFEC driver. > +- The probe function will set the basic device registers and also setups BD rings. > +- On packet Rx the respective BD Ring status bit is set which is then used for > + packet processing. > +- Then Tx is done first followed by Rx via logical interfaces. > + > +ENETFEC Features > +~~~~~~~~~~~~~~~~~ > + > +- Linux > +- ARMv8 > + > +Supported ENETFEC SoCs > +~~~~~~~~~~~~~~~~~~~~~~ > + > +- i.MX 8M Mini > + > +Prerequisites > +~~~~~~~~~~~~~ > + > +There are three main pre-requisites for executing ENETFEC PMD on a i.MX 8M Mini > +compatible board: > + > +1. **ARM 64 Tool Chain** > + > + For example, the `*aarch64* Linaro Toolchain `_. > + > +2. **Linux Kernel** > + > + It can be obtained from `NXP's Github hosting `_. > + There are multiple branches in that repo, is there more detail on which branch to use? > +3. **Rootfile system** > + > + Any *aarch64* supporting filesystem can be used. For example, > + Ubuntu 18.04 LTS (Bionic) or 20.04 LTS(Focal) userland which can be obtained > + from `here `_. > + > +4. The Ethernet device will be registered as virtual device, so ENETFEC has dependency on > + **rte_bus_vdev** library and it is mandatory to use `--vdev` with value `net_enetfec` to > + run DPDK application. > + > +Driver compilation and testing > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Follow instructions available in the document > +:ref:`compiling and testing a PMD for a NIC ` > +to launch **dpdk-testpmd** > + > +Limitations > +~~~~~~~~~~~ > + > +- Multi queue is not supported. > +- Link status is down always. This seems a big limitation, it can prevents some application to use the NIC. What prevents the having proper link status? > +- Single Ethernet interface. What does 'Single Ethernet interface' means, can you please elaborate? <...> > + > +#define ENETFEC_NAME_PMD net_enetfec > +#define ENETFEC_VDEV_GEM_ID_ARG "intf" Is this devarg used at all? <...> > +/* Common log type name prefix */ > +#define ENETFEC_LOGTYPE_PREFIX "pmd.net.enetfec." > + Is this macro used at all? <...> > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2021 NXP > + > +if not is_linux > + build = false > + reason = 'only supported on linux' > +endif > + > +deps += ['common_dpaax'] > + Why there is a dependency to dpaax?