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 32014A0C60; Thu, 4 Nov 2021 19:28:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 195C542771; Thu, 4 Nov 2021 19:28:31 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 2A57142768 for ; Thu, 4 Nov 2021 19:28:28 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10158"; a="292603264" X-IronPort-AV: E=Sophos;i="5.87,209,1631602800"; d="scan'208";a="292603264" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 11:28:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,209,1631602800"; d="scan'208";a="729371040" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga006.fm.intel.com with ESMTP; 04 Nov 2021 11:28:26 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 4 Nov 2021 11:28:26 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 4 Nov 2021 11:28:26 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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 via Frontend Transport; Thu, 4 Nov 2021 11:28:26 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 4 Nov 2021 11:28:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Of5DcL/BTRiB0Yt4ZLLpBXPwVS8WM3di3MuF5rEraGJfPT2NwaeP8423K0D0Oc1JQc/s9Cd4gIH4PMm+i3Pc3ZxwHgyzVh4bllsT0RFJjJ39iHlvn3qSWgwuVYCZU0YcaG8b4EgqP5JCsMIsgQRD8NCW59zEsyi+2iVtnS8YCOfGJ2QOn5pbMbIW5/EsF98PC3/4+h3n9TSJwSZTPLCxI6OLG0WGxUvlMNVnIbVepgNfkHSZppOv8WZFG4pyKwdq6zfpNCYWElB4BvXnqcrILVYoBNhB0mKdZL+5BF0Gnjq+bXZ4EzuLh5HsNoDHpHoPH5qxyfLvv9zVgqgfVfdy8Q== 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=vmdBeasVm4wGuU++9571q91vKv4qzkmWO/yuBYAi6wM=; b=Vbp6xZeF6wMF8OZmabNH1tXGbBvSqM/83GYmH8TcwESllEmwjfojZbyZ2B6QcouOaq3tN/g84AYXWH1MTXuRZdu3qltCv1IwcvsYrir9o7K4pXo/Tvkne/ZYcXxVmTGOdLfIFykdaOl7QI6WF1GFdUc3AbgVBdfjNKAY+icyeasS5upTuwlGD2UJXQ+qSe6URZOPt2+nFOMVurCfA711oKX+zSMpicuXiGCpHahUzkBDNO5pyEqkr/QoDK/v/mQX3Hr51sV6QYNBstvxPQX6Rf88JO/sdxcyDJU82jw57OQ5OrPZgFBCGY91Fc0a0mSBEfJHjjh30QeSj/Xpsv659w== 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=vmdBeasVm4wGuU++9571q91vKv4qzkmWO/yuBYAi6wM=; b=DNlEwaXljAzQ9vT2KCGc2hvgDnzswsNcQMGP1EScT1OoFQUPKb38IokVFmEAGbnY3AtlD81AzOeelISQnQxpQBRTEXSq/vcvZT7VJ6/MFfuUg0wY4VD+HfEz0LRfMzUWzFH5ndLKJ3N+Ifp04AHXqySkcKJOT5Qt6d1ulwQxse0= 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 PH0PR11MB5142.namprd11.prod.outlook.com (2603:10b6:510:39::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Thu, 4 Nov 2021 18:28:25 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%7]) with mapi id 15.20.4669.011; Thu, 4 Nov 2021 18:28:25 +0000 Message-ID: <319deb68-dd42-d7fc-d398-d8e1b4904cf6@intel.com> Date: Thu, 4 Nov 2021 18:28:18 +0000 Content-Language: en-US To: Apeksha Gupta , , CC: , , References: <20211021044700.12370-2-apeksha.gupta@nxp.com> <20211103192045.22240-1-apeksha.gupta@nxp.com> <20211103192045.22240-5-apeksha.gupta@nxp.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211103192045.22240-5-apeksha.gupta@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0101.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:139::16) 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 LO2P123CA0101.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:139::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Thu, 4 Nov 2021 18:28:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 21cfb154-5903-45ca-366d-08d99fc0e3a0 X-MS-TrafficTypeDiagnostic: PH0PR11MB5142: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PdjshAKV6aPLx2IViQl4A2Ua0zrmGGogs39uYyhgauh6E+40Tby1EtnzhvAU9Yu/u1kKoDbvh4LDjYCKReMdw+sifHF9fZEcxu8/Layn/Qm74a6PiZBkqag6eKJxuDGSypnmhqEV3G7bMuBBheiDBpDoOzlgYXA1bE77mQABN+hEbmyCC7iEWxzMF7vXX5G/Xyq40F7ASqtcil/9B8rlky3dGrATNW9THHjMTxOOCwLg4CFstnN4A0LlP96vWsZSrD09H+SmOp4pNbSsXdMxoSY3l8T414htH3RjHNHFGDD56DYxvyXhXjjn7g7ADPmGfAXXeua3d1ZnijxF2eIIX12j4SZbAOnWDS3bvU0Oan62YFwRpuTxe2iE6C1DDLPhVvbObjXXJo/Tn0UghdSkm246OtKwGCDD4vc9vow/qJEjTQmk0+6R2CfVWsvOQtlMkDRJj+NSy3QSsBA4Tj/Lg7cGTkBSxyILgjrvP67w4UKhvyDHxkJRoTnBdXT912VOxlO3Ko2ZcaM+LK+CI2OIRVS+pZBs8lePr/rOrYAqKtryZ+Yivy/3fsYnUkekWVtWcySSJ7U2aXt0w7P36RNDn48NcyNit3PNQvKWzQan2owv2WwRlsqmCI/W877nimPYbTOVxAIsmxHoCYgIjrUxuRuDKdFOpDdKSbe+QBG4GU6ifGfqfzpeII0GnhA+l62gPnxeU34M0WOcZnYcl2QmNg== 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:(366004)(8676002)(86362001)(26005)(186003)(956004)(8936002)(2616005)(38100700002)(82960400001)(44832011)(16576012)(6486002)(316002)(5660300002)(36756003)(53546011)(508600001)(66946007)(31686004)(83380400001)(6666004)(66556008)(66476007)(31696002)(2906002)(4326008)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dEJkRExuMEJLNktwdnVCR294SkJnV2N3QW5PVlRQVFdQdW4xdTVQRnIwUFhE?= =?utf-8?B?TVBNSUJQanlGWVo5MlBDWWp2Nzc4aXB4VHowbklaMzdyMjd1Sk12QVZpTnht?= =?utf-8?B?bENXaTNPOHU0ejVkaUFxUmkxVEQzYTdGVXpsU2hlVEVvaWptWlFhWUpmNGVI?= =?utf-8?B?Nkh0Mk9FamtaaTlsd2htU1I3bTBiMkZWOEJHeXZxeU9uc05mS1Brd1ZQdEtv?= =?utf-8?B?SEoyak80Q1RyeUgvWGdsWlFsaTBYOS9xYjlHcjdFYTBpcUkxeDNaME8yeXNq?= =?utf-8?B?MTNVeXN4SGJCb0RpSVU5WTNZdHloUmFUdXFVbXdSSnNjU2FBT00xNnZtb1FP?= =?utf-8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WNkZvZ2Jtc2hLeFd4N29Ga2VCcllMOWUvNmMrY1h4?= =?utf-8?Q?8M4oxGYLwzM7LgFDOHa8MFM=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 21cfb154-5903-45ca-366d-08d99fc0e3a0 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2021 18:28:25.3380 (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: roVp/5gvChctV+AGk19jzk+skKjN2iRJBkr+VW2/6pnEabG0WoqXyI7fw8n5FNBCpaYnQvS41NnH705QZlf7tA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5142 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v7 4/5] net/enetfec: add Rx/Tx support 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 11/3/2021 7:20 PM, Apeksha Gupta wrote: > This patch adds burst enqueue and dequeue operations to the enetfec > PMD. Loopback mode is also added, compile time flag 'ENETFEC_LOOPBACK' is > used to enable this feature. By default loopback mode is disabled. > Basic features added like promiscuous enable, basic stats. > > Signed-off-by: Sachin Saxena > Signed-off-by: Apeksha Gupta <...> > +static int > +enetfec_eth_link_update(struct rte_eth_dev *dev, > + int wait_to_complete __rte_unused) > +{ > + struct rte_eth_link link; > + unsigned int lstatus = 1; > + > + if (dev == NULL) { 'dev' can't be null for a dev_ops, unless it is called internally in PMD which seems not the case here. > + ENETFEC_PMD_ERR("Invalid device in link_update."); > + return 0; > + } > + > + memset(&link, 0, sizeof(struct rte_eth_link)); > + > + link.link_status = lstatus; > + link.link_speed = ETH_SPEED_NUM_1G; Isn't there an actual way to get real link status from device? > + > + ENETFEC_PMD_INFO("Port (%d) link is %s\n", dev->data->port_id, > + "Up"); > + > + return rte_eth_linkstatus_set(dev, &link); > +} > + <...> > @@ -501,6 +658,21 @@ pmd_enetfec_probe(struct rte_vdev_device *vdev) > fep->bd_addr_p = fep->bd_addr_p + bdsize; > } > > + /* Copy the station address into the dev structure, */ > + dev->data->mac_addrs = rte_zmalloc("mac_addr", ETHER_ADDR_LEN, 0); > + if (dev->data->mac_addrs == NULL) { > + ENETFEC_PMD_ERR("Failed to allocate mem %d to store MAC addresses", > + ETHER_ADDR_LEN); > + rc = -ENOMEM; > + goto err; > + } > + > + /* > + * Set default mac address > + */ > + enetfec_set_mac_address(dev, &macaddr); In each device start, a different MAC address is set by 'enetfec_restart()', I also put some comment there, but there seems two different MAC address set in two different parts of the driver. > + > + fep->bufdesc_ex = ENETFEC_EXTENDED_BD; > rc = enetfec_eth_init(dev); > if (rc) > goto failed_init; > @@ -509,6 +681,8 @@ pmd_enetfec_probe(struct rte_vdev_device *vdev) > > failed_init: > ENETFEC_PMD_ERR("Failed to init"); > +err: > + rte_eth_dev_release_port(dev); > return rc; > } > > @@ -516,6 +690,8 @@ static int > pmd_enetfec_remove(struct rte_vdev_device *vdev) > { > struct rte_eth_dev *eth_dev = NULL; > + struct enetfec_private *fep; > + struct enetfec_priv_rx_q *rxq; > int ret; > > /* find the ethdev entry */ > @@ -523,11 +699,22 @@ pmd_enetfec_remove(struct rte_vdev_device *vdev) > if (eth_dev == NULL) > return -ENODEV; > > + fep = eth_dev->data->dev_private; > + /* Free descriptor base of first RX queue as it was configured > + * first in enetfec_eth_init(). > + */ > + rxq = fep->rx_queues[0]; > + rte_free(rxq->bd.base); > + enet_free_queue(eth_dev); > + enetfec_eth_stop(eth_dev); > + > ret = rte_eth_dev_release_port(eth_dev); > if (ret != 0) > return -EINVAL; > > ENETFEC_PMD_INFO("Release enetfec sw device"); > + munmap(fep->hw_baseaddr_v, fep->cbus_size); instead of unmap directly here, what about having a function in 'enet_uio.c', and call that cleanup function from here? > + > return 0; > } > > diff --git a/drivers/net/enetfec/enet_ethdev.h b/drivers/net/enetfec/enet_ethdev.h > index 36202ba6c7..e48f958ad9 100644 > --- a/drivers/net/enetfec/enet_ethdev.h > +++ b/drivers/net/enetfec/enet_ethdev.h > @@ -7,6 +7,11 @@ > > #include > > +#define ETHER_ADDR_LEN 6 Below defines 'ETH_ALEN', seems for same reason. And in DPDK we already have 'RTE_ETHER_ADDR_LEN'. Tor prevent all these redundancy, why not drop 'ETH_ALEN' & 'ETHER_ADDR_LEN', and just use 'RTE_ETHER_ADDR_LEN'. > +#define BD_LEN 49152 > +#define ENETFEC_TX_FR_SIZE 2048 > +#define ETH_HLEN RTE_ETHER_HDR_LEN > + > /* full duplex or half duplex */ > #define HALF_DUPLEX 0x00 > #define FULL_DUPLEX 0x01 > @@ -19,6 +24,20 @@ > #define ETH_ALEN RTE_ETHER_ADDR_LEN > > #define __iomem > +#if defined(RTE_ARCH_ARM) > +#if defined(RTE_ARCH_64) > +#define dcbf(p) { asm volatile("dc cvac, %0" : : "r"(p) : "memory"); } > +#define dcbf_64(p) dcbf(p) > + > +#else /* RTE_ARCH_32 */ > +#define dcbf(p) RTE_SET_USED(p) > +#define dcbf_64(p) dcbf(p) > +#endif > + > +#else > +#define dcbf(p) RTE_SET_USED(p) > +#define dcbf_64(p) dcbf(p) > +#endif > > /* > * ENETFEC with AVB IP can support maximum 3 rx and tx queues. > @@ -142,4 +161,9 @@ enet_get_bd_index(struct bufdesc *bdp, struct bufdesc_prop *bd) > return ((const char *)bdp - (const char *)bd->base) >> bd->d_size_log2; > } > > +uint16_t enetfec_recv_pkts(void *rxq1, __rte_unused struct rte_mbuf **rx_pkts, > + uint16_t nb_pkts); > +uint16_t enetfec_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > + uint16_t nb_pkts); > + > #endif /*__ENETFEC_ETHDEV_H__*/ > diff --git a/drivers/net/enetfec/enet_rxtx.c b/drivers/net/enetfec/enet_rxtx.c > new file mode 100644 > index 0000000000..6ac4624553 > --- /dev/null > +++ b/drivers/net/enetfec/enet_rxtx.c > @@ -0,0 +1,445 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright 2021 NXP > + */ > + > +#include > +#include > +#include > +#include "enet_regs.h" > +#include "enet_ethdev.h" > +#include "enet_pmd_logs.h" > + > +#define ENETFEC_LOOPBACK 0 > +#define ENETFEC_DUMP 0 There was a request to convert them into devargs, again seems silently ignored, copy/paste from previous version: Instead of compile time flags, why not convert them to devargs so they can be updated without recompile? This also make sure all code is enabled and prevent possible dead code by time. > + > +#if ENETFEC_DUMP > +static void > +enet_dump(struct enetfec_priv_tx_q *txq) > +{ > + struct bufdesc *bdp; > + int index = 0; > + > + ENETFEC_PMD_DEBUG("TX ring dump\n"); > + ENETFEC_PMD_DEBUG("Nr SC addr len MBUF\n"); > + > + bdp = txq->bd.base; > + do { > + ENETFEC_PMD_DEBUG("%3u %c%c 0x%04x 0x%08x %4u %p\n", > + index, > + bdp == txq->bd.cur ? 'S' : ' ', > + bdp == txq->dirty_tx ? 'H' : ' ', > + rte_read16(rte_le_to_cpu_16(&bdp->bd_sc)), > + rte_read32(rte_le_to_cpu_32(&bdp->bd_bufaddr)), > + rte_read16(rte_le_to_cpu_16(&bdp->bd_datlen)), > + txq->tx_mbuf[index]); > + bdp = enet_get_nextdesc(bdp, &txq->bd); > + index++; > + } while (bdp != txq->bd.base); > +} > + > +static void > +enet_dump_rx(struct enetfec_priv_rx_q *rxq) > +{ > + struct bufdesc *bdp; > + int index = 0; > + > + ENETFEC_PMD_DEBUG("RX ring dump\n"); > + ENETFEC_PMD_DEBUG("Nr SC addr len MBUF\n"); > + > + bdp = rxq->bd.base; > + do { > + ENETFEC_PMD_DEBUG("%3u %c 0x%04x 0x%08x %4u %p\n", > + index, > + bdp == rxq->bd.cur ? 'S' : ' ', > + rte_read16(rte_le_to_cpu_16(&bdp->bd_sc)), > + rte_read32(rte_le_to_cpu_32(&bdp->bd_bufaddr)), > + rte_read16(rte_le_to_cpu_16(&bdp->bd_datlen)), > + rxq->rx_mbuf[index]); > + rte_pktmbuf_dump(stdout, rxq->rx_mbuf[index], > + rxq->rx_mbuf[index]->pkt_len); > + bdp = enet_get_nextdesc(bdp, &rxq->bd); > + index++; > + } while (bdp != rxq->bd.base); > +} > +#endif > + > +#if ENETFEC_LOOPBACK > +static volatile bool lb_quit; > + > +static void fec_signal_handler(int signum) > +{ > + if (signum == SIGINT || signum == SIGTSTP || signum == SIGTERM) { > + ENETFEC_PMD_INFO("\n\n %s: Signal %d received, preparing to exit...\n", > + __func__, signum); > + lb_quit = true; > + } > +} > + Again another comment ignored from previos version, we shouldn't have signals handled by driver, that is application task. I am stopping reviewing here, there are too many things from previous version just ignored, can you please check/answer comments on the previous version of the set?