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 7FF58A0C4E; Mon, 8 Nov 2021 20:13:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0123B40151; Mon, 8 Nov 2021 20:13:24 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40089.outbound.protection.outlook.com [40.107.4.89]) by mails.dpdk.org (Postfix) with ESMTP id 501DC40040 for ; Mon, 8 Nov 2021 20:13:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fAg2MO2PnzkpqxPkKlRxyZGcr74Qvcm1XPJC2TskbjkvtjQO6v5CsmN8MEj4n+mGur3FSLsaFLNVTGMeLyi3aDIzCX8ZXVfNzvXyfEesqXBj+V8bwdSOgT6LMRrRblcaaCAiR3Pz6da4csoSiGKHjdzsXvRcBJuIp+IPX/suxG9s7KJ908LZBw5LrkD3DrgPFiFfkrwb5sAkIZKtyUlfbz24HOVYhcUEZuHbgtqN0V5mr63/RN8EP//mH4HIuQXpfbVzHcznqEOmVp0vjJLXmTlHuojLJCMu8MV9sC4igupKCxLDyWPptyrdUwjyqYzTpBHvHikXHIj/kzc7rJ4//g== 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=l1dfC0pPwyKwDAfSYjbCdu0w21UUOft9ZSYWVfD9bto=; b=S+dQpmtkPYoQ15AUTvkGvXzKa9mvsnkb2T66hehlVcH+865ODrmBhBh0Gk2hIG+HHVJq8q8CDUr23JgbnUuF7FkRc2zhhKdbvcIqooLyrLw1YqaWQxIrhR07n01aqPPQfm3EB1zDHzQUtNTdaxs/EyJ+VzXyf2Fx+o80gNJjl7VlmPsLtQnQNUDSeH2syui2OAG77WFpbGfmmLwX7kDteCQYq0HxSRpm/e7/TsHyUiRST4H7ikwBWwjRmctcVyygerRtpVlDz88JKz+r0tLw5McTYjHRYcIyPJ9yoyk9nml9CUkIJHi9ZEn8Bz3PgtuEZS6q4CY47MrPcKFq/3j0ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l1dfC0pPwyKwDAfSYjbCdu0w21UUOft9ZSYWVfD9bto=; b=gLJC5aWRlw/CB70gIQa3q/aQavhVOA/Ieyhm9F9PHLaSZK8CfSotRfX6rqtYPVQuE3vLPmBhXfjcPw2FGLIMbqBqhu4Q2LLq22/SNJWvmP4mpLP1ietgWgsG0QVYjWB2MlkRvaFQsG9hzCobxaRAWx7NQh+FYnJ87k3xyO7n4vg= Received: from PAXPR04MB9445.eurprd04.prod.outlook.com (2603:10a6:102:2b4::15) by PAXPR04MB8608.eurprd04.prod.outlook.com (2603:10a6:102:21b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Mon, 8 Nov 2021 19:13:20 +0000 Received: from PAXPR04MB9445.eurprd04.prod.outlook.com ([fe80::5814:adcb:2173:921]) by PAXPR04MB9445.eurprd04.prod.outlook.com ([fe80::5814:adcb:2173:921%5]) with mapi id 15.20.4669.016; Mon, 8 Nov 2021 19:13:20 +0000 From: Apeksha Gupta To: Ferruh Yigit , "david.marchand@redhat.com" , "andrew.rybchenko@oktetlabs.ru" CC: "dev@dpdk.org" , Sachin Saxena , Hemant Agrawal Thread-Topic: [EXT] Re: [PATCH v7 1/5] net/enetfec: introduce NXP ENETFEC driver Thread-Index: AQHX0OfwQ0DRAp3+FEOWI5v25CFYUavzsJSAgAZMqpA= Date: Mon, 8 Nov 2021 19:13:20 +0000 Message-ID: References: <20211021044700.12370-2-apeksha.gupta@nxp.com> <20211103192045.22240-1-apeksha.gupta@nxp.com> <20211103192045.22240-2-apeksha.gupta@nxp.com> <0d4a783d-3776-1a4f-ff63-e9ad6fa08bdd@intel.com> In-Reply-To: <0d4a783d-3776-1a4f-ff63-e9ad6fa08bdd@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 640af772-2f3a-401a-eb6f-08d9a2ebd3c8 x-ms-traffictypediagnostic: PAXPR04MB8608: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LSX0msgCcXkFVdEVSKmjCqSOJD/nPEd5a7tfFSQXG/BzqdboPWZUVC9Fp+RT7L/upa0+9ZxO1U6z4vMsJjVUtbcBZzfGhdpaVLNXrXIDGqwR3MzdgVO522OiPgUr2E1v/4hQR71Kg7wLZ62t6x8TlnTwtXqBuVR0hJRqnY+szkPDTlO8CPDXHF3NRAW5mTaa52uEUc7o59g75gItDJxrso0eWw2EIULIGqhty9f6daq4hgOVFWH9LykQ97WnT0sgiuvkW9wIyYfRC6lWNtG4jhobZZ4Cx6sSYo7Bh0PzRavUlsc7cx0JtVZqZx9KeMT8O/OUSg9S521Hih093yf2ESRIFZPpnbtloGZhNC1beFFBMF6FlwxhoY2i40e6I5JioIGUTBbNy0SN4NXYJsE4xpypx+RcOnoZT3IOitnP/eGJZ/qOQUpkKCVlVhRawf4dwVillVqU4vPFiV2SC5oxUnUeNXfN3gV+cJUwXON6+FKzlrMUuTQ7e7VR2fJH6UihDh1us+ld61gcPCUreWN5RCG0CfZaxrptE7/jU/z1IKwHGGJx5Ez1VPNt8tEtxorboPWD599tCINIb1ZoY297KcrRJE0HeVDEv9z66DY+FksggpVLJdr2KgowT1CU/jz96eHZRmyZAxPKEkHrrbkuEwtQPrJ2XPKjW2dHNd+WQJeq4q+rqGI48L2k/e0QpEbVtBo84bhI1QBXchXHI3L/v/2ZPs5+gt+Bh7zn3l1n3v69xeWNvx8hW9MAwLcvi3m3qWWNPJUlppa4YuN4XPAPAHIxu+9T5k4/nxSx9+vzBU3+B1vHH2ckSKN30Kv32mTH5lh/ZBzXAzzaDMxfOoF5LA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9445.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(33656002)(186003)(508600001)(8936002)(38100700002)(8676002)(6506007)(44832011)(110136005)(54906003)(2906002)(26005)(316002)(55016002)(71200400001)(66946007)(83380400001)(76116006)(30864003)(66446008)(5660300002)(66476007)(66556008)(38070700005)(53546011)(64756008)(86362001)(7696005)(122000001)(52536014)(4326008)(9686003)(579004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hcp4dSoPA7oMimEPBbUcPwNjbjWyAbtoFiIL9loGFBJRKyXXVOL+2R7RaB6w?= =?us-ascii?Q?GBNsht5oSGPzgO9HQi3bb8JR0IQ4jUTDOhv+DJzmAhaP3dlWqybfKeR/3/hc?= =?us-ascii?Q?mwDewDAmtJZPcN5L7Fsakv+N2QoEHgGA8MJPnuFecQJlrnq7qFzRynEQHXOG?= =?us-ascii?Q?3ai1bYvu+3BFiiOeFcSYUxQsAULhX5i265DIQcBP/WNRuaFErJNVdot6hAXW?= =?us-ascii?Q?bjykMjqruJjSyerfI3RZtrhNHP0dMYBlzFp08vclozFGLXXFsc9dV3VBorHO?= =?us-ascii?Q?HqQhcItW1123C1BnA6Li3eb55ckQ43pate0YZYWHZPfp7ciFLiCIVYYZX/ro?= =?us-ascii?Q?b1ybRGhH89msUPiiZvy3pMGM1+DM9Ph12e9xFhKX/7NX/z4iin2x9QTyX+RJ?= =?us-ascii?Q?d7u6jeAeQIKC3Dh0sDjXFbuQMantYdpoP3G2+YTBDTJY9Cw0Y3mJkLAYZcuL?= =?us-ascii?Q?sIpBxh2VYMTUJZxVB45J1+RCZLTtnaX8fvgHwPVfrV6CCvzwds4zmhc/8TB6?= =?us-ascii?Q?9Viktfuce8j7wSQUGXZJP6zFmksmFBD9Ck4xjiC+rAGV19Ua7BdZTu7dSYJb?= =?us-ascii?Q?LZXWupnQ3Mop3DPtz59fsV8E6IbKVCcGpJfErAkPuzNfsk5UJGquYvKxZcSE?= =?us-ascii?Q?bj9J++oxqfhQ7xGNm/GPl3QZvJrBpUori8VCScxkyX8qGWA9NhbssT7TcxWm?= =?us-ascii?Q?xSYDGrHxDhIrFvj7wYX+tbOeqc8Z1Wwg3vf920ZY87YkaaWhsj4mUwG9/LIE?= =?us-ascii?Q?DyYDdTerDcOWS0zCBa9HIocKJmv6GChIZaGUTIziya1u45G02fseUo5CxacD?= =?us-ascii?Q?MYIUXsqAUTEAFlytpgbHfiCmthuVdjK3Ae0wKQM2OwMx4tjfiHiTiHNtlIku?= =?us-ascii?Q?bWQ+fK7/6na1mVpkG3JA/J0xBA8/5u2F6sySSNDJy7EcHS0gAf75eDcazbnJ?= =?us-ascii?Q?vR7CGI95vDmiIov0o83nVEijRfiGrYE0ljxFgXHk7kL4pEQF6pJQGCYiV5iS?= =?us-ascii?Q?RE2cXXKdEP9glp2KncpqMbB9JVTTF3lq+fwb6h/Iz2qep22VRc6JZJPXsH4T?= =?us-ascii?Q?+AhI6CF2WS0clVnjgEoNt7hoHlHr7Xrw/YDUgsh3hNJtnX7HuYN92flkhQwU?= =?us-ascii?Q?IxEtAsxpr7CifxAjTkWcyIPXkePQUWEP6LHBx8X0OJnXm12DM9KTrfsO4aYZ?= =?us-ascii?Q?O272viVJ+VdX0ubd/zhkt+82LhP1Ri8DjTNefcmy8hAQCvhTcsen5TUEcWhm?= =?us-ascii?Q?Yqb+TOx/OKp9cVHUrgEIuFpZ8PNNI/0d1VrHKM07VVv5ReUUMssUUvtSUP+0?= =?us-ascii?Q?H2WRn+vPLkyb8S72IE39XPCnZKeEOB9oDDAGFoJlKUcdNLBAw+l/EzhMW08i?= =?us-ascii?Q?DdurXd/8z1vDVMCEJELRr1rt6QHTXbjp8Xp6TyPwWQET4rpyUwg/lbeDCBMH?= =?us-ascii?Q?/4jCAZuDM12ITVozxCJR+u3Ifcrkn2M7My3TfG/yyw5H9maDMK4dnAKA5DeO?= =?us-ascii?Q?vivCEW5OtPY+zH0Cr6mrUtwYaL4QUIUhPbwW6wtxar27HmsouSHPmzb4AZ0h?= =?us-ascii?Q?ymuwdcK1RvOqzR/PVDqvuOdbtll/Dn1TVDEnEM9reWlx77KQdXntCVQjrHYd?= =?us-ascii?Q?PrJ57uFhqHg/XnZaZaGlW6Q=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9445.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 640af772-2f3a-401a-eb6f-08d9a2ebd3c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2021 19:13:20.2953 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4yol0pNBIeZOpUthFJLPckh2KnsPUWAujBS2+tQ4WS0dj28qHWMjNbt8m2qIX3CIZfw4l5nKwYZ7EB3HX0vGgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8608 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v7 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" > -----Original Message----- > From: Ferruh Yigit > Sent: Thursday, November 4, 2021 11:54 PM > To: Apeksha Gupta ; david.marchand@redhat.com; > andrew.rybchenko@oktetlabs.ru > Cc: dev@dpdk.org; Sachin Saxena ; Hemant Agrawal > > Subject: [EXT] Re: [PATCH v7 1/5] net/enetfec: introduce NXP ENETFEC driv= er >=20 > Caution: EXT Email >=20 > On 11/3/2021 7:20 PM, Apeksha Gupta wrote: > > ENETFEC (Fast Ethernet Controller) is a network poll mode driver > > for NXP SoC i.MX 8M Mini. > > > > This patch adds skeleton for enetfec driver with probe function. > > > > Signed-off-by: Sachin Saxena > > Signed-off-by: Apeksha Gupta > > --- > > v7: > > - Fix compilation > > - code cleanup > > > > v6: > > - Fix document build errors > > --- > > MAINTAINERS | 7 ++ > > doc/guides/nics/enetfec.rst | 131 ++++++++++++++++++++++++= + > > doc/guides/nics/features/enetfec.ini | 9 ++ > > doc/guides/nics/index.rst | 1 + > > doc/guides/rel_notes/release_21_11.rst | 6 +- > > drivers/net/enetfec/enet_ethdev.c | 85 ++++++++++++++++ > > drivers/net/enetfec/enet_ethdev.h | 58 +++++++++++ > > drivers/net/enetfec/enet_pmd_logs.h | 31 ++++++ > > drivers/net/enetfec/meson.build | 9 ++ > > drivers/net/enetfec/version.map | 3 + > > drivers/net/meson.build | 2 +- > > 11 files changed, 340 insertions(+), 2 deletions(-) > > create mode 100644 doc/guides/nics/enetfec.rst > > create mode 100644 doc/guides/nics/features/enetfec.ini > > create mode 100644 drivers/net/enetfec/enet_ethdev.c > > create mode 100644 drivers/net/enetfec/enet_ethdev.h > > create mode 100644 drivers/net/enetfec/enet_pmd_logs.h > > create mode 100644 drivers/net/enetfec/meson.build > > create mode 100644 drivers/net/enetfec/version.map > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 0e5951f8f1..d000eb81af 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -882,6 +882,13 @@ F: drivers/net/enetc/ > > F: doc/guides/nics/enetc.rst > > F: doc/guides/nics/features/enetc.ini > > > > +NXP enetfec > > +M: Apeksha Gupta > > +M: Sachin Saxena > > +F: drivers/net/enetfec/ > > +F: doc/guides/nics/enetfec.rst > > +F: doc/guides/nics/features/enetfec.ini > > + > > NXP pfe > > M: Gagandeep Singh > > F: doc/guides/nics/pfe.rst > > diff --git a/doc/guides/nics/enetfec.rst b/doc/guides/nics/enetfec.rst > > new file mode 100644 > > index 0000000000..dfcd032098 > > --- /dev/null > > +++ b/doc/guides/nics/enetfec.rst > > @@ -0,0 +1,131 @@ > > +.. SPDX-License-Identifier: BSD-3-Clause > > + Copyright 2021 NXP > > + > > +ENETFEC Poll Mode Driver > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > > + > > +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 > > > + nxp.com%2Fproducts%2Fprocessors-and-microcontrollers%2Farm- > processors%2Fi-mx-applications-processors%2Fi-mx-8-processors%2Fi-mx-8m- > mini-arm-cortex-a53-cortex-m4-audio-voice- > video%3Ai.MX8MMINI&data=3D04%7C01%7Capeksha.gupta%40nxp.com%7 > Ce70ec7cb0fb04034c1ca08d99fc05bde%7C686ea1d3bc2b4c6fa92cd99c5c3016 > 35%7C0%7C1%7C637716470792212600%7CUnknown%7CTWFpbGZsb3d8eyJWI > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300 > 0&sdata=3DL%2BY2mjo9ynd%2FtNz3TkjQWokl4Am%2BQL21A0Z09n2HQEs% > 3D&reserved=3D0> > > + > > +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 PMD is a hardware > > +programmable packet forwarding engine to provide high performance > > +Ethernet interface. It has only 1 GB Ethernet interface with RJ45 > > +connector. > > + > > +The diagram below shows a system level overview of ENETFEC: > > + > > + .. code-block:: console > > + > > + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + Userspace > > + +-----------------------------------------+ > > + | ENETFEC Driver | > > + | +-------------------------+ | > > + | | virtual ethernet device | | > > + +-----------------------------------------+ > > + ^ | > > + | | > > + | | > > + RXQ | | TXQ > > + | | > > + | v > > + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + Kernel Space > > + +---------+ > > + | fec-uio | > > + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D= =3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > + Hardware > > + +-----------------------------------------+ > > + | i.MX 8M MINI EVK | > > + | +-----+ | > > + | | MAC | | > > + +---------------+-----+-------------------+ > > + | PHY | > > + +-----+ > > + > > +ENETFEC Ethernet driver is traditional DPDK PMD driver running in the > > +userspace.'fec-uio' is the kernel driver. The MAC and PHY are the hard= ware > > +blocks. ENETFEC PMD uses standard UIO interface to access kernel for P= HY > > +initialisation and for mapping the allocated memory of register & buff= er > > +descriptor with DPDK which gives access to non-cacheable memory for bu= ffer > > +descriptor. net_enetfec is logical Ethernet interface, created by ENET= FEC > > +driver. > > + > > +- ENETFEC driver registers the device in virtual device driver. > > +- RTE framework scans and will invoke the probe function of ENETFEC dr= iver. > > +- The probe function will set the basic device registers and also setu= ps 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.M= X > 8M Mini > > +compatible board: > > + > > +1. **ARM 64 Tool Chain** > > + > > + For example, the `*aarch64* Linaro Toolchain > .linaro.org%2Fcomponents%2Ftoolchain%2Fbinaries%2F7.4- > 2019.02%2Faarch64-linux-gnu%2Fgcc-linaro-7.4.1-2019.02-x86_64_aarch64- > linux- > gnu.tar.xz&data=3D04%7C01%7Capeksha.gupta%40nxp.com%7Ce70ec7cb0f > b04034c1ca08d99fc05bde%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1 > %7C637716470792212600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw > MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata > =3Ds9WLK%2Bm%2Fvq9o4a9vBg%2FMApcO2xu0GVFN9qLXeLPkXYU%3D&res > erved=3D0>`_. > > + > > +2. **Linux Kernel** > > + > > + It can be obtained from `NXP's Github hosting > codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq- > components%2Flinux&data=3D04%7C01%7Capeksha.gupta%40nxp.com%7Ce > 70ec7cb0fb04034c1ca08d99fc05bde%7C686ea1d3bc2b4c6fa92cd99c5c301635 > %7C0%7C1%7C637716470792212600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi > MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000 > &sdata=3Dr0j8ETMAGJlBSFaxF6iBdUFW4%2BOnOZHGG2CN0rpApqw%3D&am > p;reserved=3D0>`_. > > + > > + .. note:: > > + > > + Branch is 'lf-5.10.y' > > + > > +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 > ubuntu.com%2Fubuntu-base%2Freleases%2F18.04%2Frelease%2Fubuntu-base- > 18.04.1-base- > arm64.tar.gz&data=3D04%7C01%7Capeksha.gupta%40nxp.com%7Ce70ec7cb > 0fb04034c1ca08d99fc05bde%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7 > C1%7C637716470792212600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sd > ata=3DjfVUxHzFLG6hYcmf76wNX2NqZui49LvGZEyF9Vh7jOc%3D&reserved=3D0> > `_. > > + > > +4. The Ethernet device will be registered as virtual device, so ENETFE= C has > dependency on > > + **rte_bus_vdev** library and it is mandatory to use `--vdev` with v= alue > `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. >=20 > The question on the above limitation is went unanswered in previous versi= on, > instead of not replying and sending a new version, it would be better if = you > can answer the questions to have some common understanding. >=20 > Back to the question, >=20 > in 'enetfec_eth_info()', 'max_rx_queues'/'max_tx_queues' set to > 'ENETFEC_MAX_Q' > and > #define ENETFEC_MAX_Q 3 >=20 > Also file comment says: > * ENETFEC with AVB IP can support maximum 3 rx and tx queues. >=20 > The device reports and documents 3 queues are supported, but there is a > limitation documented saying multi queue is not supported, which one is > correct? [Apeksha] I apologize. In v7 series, we have fixed the compilation issues = and some code cleanup. Multi-queue is not supported, will update related code change in next versi= on. =20 >=20 > > diff --git a/doc/guides/nics/features/enetfec.ini > b/doc/guides/nics/features/enetfec.ini > > new file mode 100644 > > index 0000000000..bdfbdbd9d4 > > --- /dev/null > > +++ b/doc/guides/nics/features/enetfec.ini > > @@ -0,0 +1,9 @@ > > +; > > +; Supported features of the 'enetfec' network poll mode driver. > > +; > > +; Refer to default.ini for the full list of available PMD features. > > +; > > +[Features] > > +Linux =3D Y > > +ARMv8 =3D Y > > +Usage doc =3D Y > > diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst > > index 784d5d39f6..777fdab4a0 100644 > > --- a/doc/guides/nics/index.rst > > +++ b/doc/guides/nics/index.rst > > @@ -26,6 +26,7 @@ Network Interface Controller Drivers > > e1000em > > ena > > enetc > > + enetfec > > enic > > fm10k > > hinic > > diff --git a/doc/guides/rel_notes/release_21_11.rst > b/doc/guides/rel_notes/release_21_11.rst > > index 502cc5ceb2..aed380c21f 100644 > > --- a/doc/guides/rel_notes/release_21_11.rst > > +++ b/doc/guides/rel_notes/release_21_11.rst > > @@ -20,7 +20,6 @@ DPDK Release 21.11 > > ninja -C build doc > > xdg-open build/doc/guides/html/rel_notes/release_21_11.html > > > > - >=20 > unrelated change. >=20 > > New Features > > ------------ > > > > @@ -135,6 +134,11 @@ New Features > > > > Added an ethdev API which can help users get device configuration. > > > > +* **Added NXP ENETFEC PMD.** > > + > > + Added the new ENETFEC driver for the NXP IMX8MMEVK platform. See the > > + :doc:`../nics/enetfec` NIC driver guide for more details on this new= driver. > > + >=20 > PMDs are ordered by vendor name, can you pleae move this block below > 'Mellanox' PMD update. [Apeksha] okay, we will update in next version. >=20 > > * **Updated AF_XDP PMD.** > > > > * Disabled secondary process support. > > diff --git a/drivers/net/enetfec/enet_ethdev.c > b/drivers/net/enetfec/enet_ethdev.c > > new file mode 100644 > > index 0000000000..a6c4bcbf2e > > --- /dev/null > > +++ b/drivers/net/enetfec/enet_ethdev.c > > @@ -0,0 +1,85 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright 2020-2021 NXP > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include "enet_pmd_logs.h" > > +#include "enet_ethdev.h" > > + > > +#define ENETFEC_NAME_PMD net_enetfec > > +#define ENETFEC_CDEV_INVALID_FD -1 >=20 > Is this macro used at all? [Apeksha] No, we will remove it. >=20 > > + > > +static int > > +enetfec_eth_init(struct rte_eth_dev *dev) > > +{ > > + rte_eth_dev_probing_finish(dev); > > + return 0; > > +} > > + > > +static int > > +pmd_enetfec_probe(struct rte_vdev_device *vdev) > > +{ > > + struct rte_eth_dev *dev =3D NULL; > > + struct enetfec_private *fep; > > + const char *name; > > + int rc; > > + > > + name =3D rte_vdev_device_name(vdev); > > + if (name =3D=3D NULL) > > + return -EINVAL; >=20 > At this function 'name' shouldn't be null, I think you can drop > the check. > But can you pleae double check to be sure? [Apeksha] It is required. API may return the NULL. >=20 > > + ENETFEC_PMD_LOG(INFO, "Initializing pmd_fec for %s", name); > > + > > + dev =3D rte_eth_vdev_allocate(vdev, sizeof(*fep)); > > + if (dev =3D=3D NULL) > > + return -ENOMEM; > > + > > + /* setup board info structure */ > > + fep =3D dev->data->dev_private; > > + fep->dev =3D dev; > > + rc =3D enetfec_eth_init(dev); > > + if (rc) > > + goto failed_init; > > + > > + return 0; > > + > > +failed_init: > > + ENETFEC_PMD_ERR("Failed to init"); > > + return rc; > > +} > > + > > +static int > > +pmd_enetfec_remove(struct rte_vdev_device *vdev) > > +{ > > + struct rte_eth_dev *eth_dev =3D NULL; > > + int ret; > > + > > + /* find the ethdev entry */ > > + eth_dev =3D rte_eth_dev_allocated(rte_vdev_device_name(vdev)); > > + if (eth_dev =3D=3D NULL) > > + return -ENODEV; > > + > > + ret =3D rte_eth_dev_release_port(eth_dev); > > + if (ret !=3D 0) > > + return -EINVAL; > > + > > + ENETFEC_PMD_INFO("Release enetfec sw device"); > > + return 0; > > +} > > + > > +static struct rte_vdev_driver pmd_enetfec_drv =3D { > > + .probe =3D pmd_enetfec_probe, > > + .remove =3D pmd_enetfec_remove, > > +}; > > + > > +RTE_PMD_REGISTER_VDEV(ENETFEC_NAME_PMD, pmd_enetfec_drv); > > +RTE_LOG_REGISTER_DEFAULT(enetfec_logtype_pmd, NOTICE); > > diff --git a/drivers/net/enetfec/enet_ethdev.h > b/drivers/net/enetfec/enet_ethdev.h > > new file mode 100644 > > index 0000000000..0e4558dd86 > > --- /dev/null > > +++ b/drivers/net/enetfec/enet_ethdev.h > > @@ -0,0 +1,58 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright 2020-2021 NXP > > + */ > > + > > +#ifndef __ENETFEC_ETHDEV_H__ > > +#define __ENETFEC_ETHDEV_H__ > > + > > +/* > > + * ENETFEC with AVB IP can support maximum 3 rx and tx queues. > > + */ > > + > > +#define ENETFEC_MAX_Q 3 > > + > > +/* Buffer descriptors of FEC are used to track the ring buffers. Buffe= r > > + * descriptor base is x_bd_base. Currently available buffer are x_cur > > + * and x_cur. where x is rx or tx. Current buffer is tracked by dirty_= tx > > + * that is sent by the controller. > > + * The tx_cur and dirty_tx are same in completely full and empty > > + * conditions. Actual condition is determined by empty & ready bits. >=20 > is above comment correct? >=20 > Where are mentioned 'x_bd_base', 'rx_cur', 'tx_cur', 'dirty_tx', etc... >=20 > > + */ > > +struct enetfec_private { > > + struct rte_eth_dev *dev; > > + struct rte_eth_stats stats; > > + struct rte_mempool *pool; > > + uint16_t max_rx_queues; > > + uint16_t max_tx_queues; > > + unsigned int total_tx_ring_size; > > + unsigned int total_rx_ring_size; > > + bool bufdesc_ex; > > + unsigned int tx_align; > > + unsigned int rx_align; > > + int full_duplex; > > + unsigned int phy_speed; > > + uint32_t quirks; > > + int flag_csum; > > + int flag_pause; > > + int flag_wol; > > + bool rgmii_txc_delay; > > + bool rgmii_rxc_delay; > > + int link; > > + void *hw_baseaddr_v; > > + uint64_t hw_baseaddr_p; > > + void *bd_addr_v; > > + uint64_t bd_addr_p; > > + uint64_t bd_addr_p_r[ENETFEC_MAX_Q]; > > + uint64_t bd_addr_p_t[ENETFEC_MAX_Q]; > > + void *dma_baseaddr_r[ENETFEC_MAX_Q]; > > + void *dma_baseaddr_t[ENETFEC_MAX_Q]; > > + uint64_t cbus_size; > > + unsigned int reg_size; > > + unsigned int bd_size; > > + int hw_ts_rx_en; > > + int hw_ts_tx_en; > > + struct enetfec_priv_rx_q *rx_queues[ENETFEC_MAX_Q]; > > + struct enetfec_priv_tx_q *tx_queues[ENETFEC_MAX_Q]; >=20 > most of these fields are not used at all, why not construct the struct > by adding the fields as you use them? This prevent clutter to remain, > like 'flag_wol' above, does it used at all in the driver? [Apeksha] I do agree, We will update in next version. >=20 > > +}; > > + > > +#endif /*__ENETFEC_ETHDEV_H__*/ > > diff --git a/drivers/net/enetfec/enet_pmd_logs.h > b/drivers/net/enetfec/enet_pmd_logs.h > > new file mode 100644 > > index 0000000000..e7b3964a0e > > --- /dev/null > > +++ b/drivers/net/enetfec/enet_pmd_logs.h > > @@ -0,0 +1,31 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright 2020-2021 NXP > > + */ > > + > > +#ifndef _ENETFEC_LOGS_H_ > > +#define _ENETFEC_LOGS_H_ > > + > > +extern int enetfec_logtype_pmd; > > + > > +/* PMD related logs */ > > +#define ENETFEC_PMD_LOG(level, fmt, args...) \ > > + rte_log(RTE_LOG_ ## level, enetfec_logtype_pmd, "\nfec_net: %s()"= \ > > + fmt "\n", __func__, ##args) > > + > > +#define PMD_INIT_FUNC_TRACE() ENET_PMD_LOG(DEBUG, " >>") > > + > > +#define ENETFEC_PMD_DEBUG(fmt, args...) \ > > + ENETFEC_PMD_LOG(DEBUG, fmt, ## args) > > +#define ENETFEC_PMD_ERR(fmt, args...) \ > > + ENETFEC_PMD_LOG(ERR, fmt, ## args) > > +#define ENETFEC_PMD_INFO(fmt, args...) \ > > + ENETFEC_PMD_LOG(INFO, fmt, ## args) > > + > > +#define ENETFEC_PMD_WARN(fmt, args...) \ > > + ENETFEC_PMD_LOG(WARNING, fmt, ## args) > > + > > +/* DP Logs, toggled out at compile time if level lower than current le= vel */ > > +#define ENETFEC_DP_LOG(level, fmt, args...) \ > > + RTE_LOG_DP(level, PMD, fmt, ## args) > > + > > +#endif /* _ENETFEC_LOGS_H_ */ > > diff --git a/drivers/net/enetfec/meson.build > b/drivers/net/enetfec/meson.build > > new file mode 100644 > > index 0000000000..6d6c64c94b > > --- /dev/null > > +++ b/drivers/net/enetfec/meson.build > > @@ -0,0 +1,9 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright 2021 NXP > > + > > +if not is_linux > > + build =3D false > > + reason =3D 'only supported on linux' > > +endif > > + > > +sources =3D files('enet_ethdev.c') > > diff --git a/drivers/net/enetfec/version.map > b/drivers/net/enetfec/version.map > > new file mode 100644 > > index 0000000000..b66517b171 > > --- /dev/null > > +++ b/drivers/net/enetfec/version.map > > @@ -0,0 +1,3 @@ > > +DPDK_22 { > > + local: *; > > +}; > > diff --git a/drivers/net/meson.build b/drivers/net/meson.build > > index bcf488f203..ac294d8507 100644 > > --- a/drivers/net/meson.build > > +++ b/drivers/net/meson.build > > @@ -12,13 +12,13 @@ drivers =3D [ > > 'bnx2x', > > 'bnxt', > > 'bonding', > > - 'cnxk', >=20 > Better to not remove competitor drivers ;) [Apeksha] I apologize. By mistake removed. >=20 > > 'cxgbe', > > 'dpaa', > > 'dpaa2', > > 'e1000', > > 'ena', > > 'enetc', > > + 'enetfec', > > 'enic', > > 'failsafe', > > 'fm10k', > >