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 3EFF5A00C3; Tue, 14 Dec 2021 12:43:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C64F40041; Tue, 14 Dec 2021 12:43:11 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F14B74003C for ; Tue, 14 Dec 2021 12:43:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639482189; x=1671018189; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bT72MYl+plumzQZdtHOmkVxdBWCNM2Tt91KVdo3OCuY=; b=jlJBa+9QELv+MsC5/aG9WQ4wsFBfG1gXdGf3Uquag8R+Myh+U29IwVOy UsiguJeC57vlq2fYhCkDGmV2usYDbXPh+6xNf99xaaQMsNcH+NLdzPA7r kuG2SaGMn8lEJ7tvxCtuHiq9cp3DG1EYOSw8WdBJGhEI+8nSXyJaZcx2j 9YgxUR6IK8t0vxHF/Vq/x9/I8gbi7oNPE7nek+NfB/5fr0znJCQrEvBsL WAawOLMAlqnww6PlTL6r4CKPASB8RA55DAcKi/AnGmnHK0Fpa1QnVic8B lVvoYkFrLrMvFMQsX1KXklUAgM/r7LSAKRw+GaT9s7qGGe00qKGhgcEde Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="226238745" X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="226238745" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2021 03:43:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="604260295" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 14 Dec 2021 03:43:07 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2308.20; Tue, 14 Dec 2021 03:43:07 -0800 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 14 Dec 2021 03:43:07 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 14 Dec 2021 03:43:06 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) 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.2308.20; Tue, 14 Dec 2021 03:43:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YWlJDHZRgLt19HwjzeOUpBGZ96d3+GrZ1VdJa7G1SUNfuMY01a9Njbz20dwxVb2MvrhFjdp2eEAGMmYJBcVR1FcKrDLAcU2NfGZqupj1U2z7yYrgX5FFNrSbYKeNs1+HKkq8Unj1Q727ojv4pfFQGciXlnlpNyBHJkGKzaOTF7+EhkQNxAIDGAPjDVvoDeAO1PllQsi+q8cqq28VHL/0i3wfAEi5V/nH6yf/sQYkGVJj/5R/jLTlwmrPtSpy8RGXCuYzh9/gnd/Vi21TDSH7LUv97dUCwuKCGJGAFOXR3VIsNiIJidql7sDjgIgsIzqp6lAji+5sTJOHgqU2YlC9WA== 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=pJhGUgDTskrg0FRsL90q+wZuD+3x+nW8gzaqYTA4pBI=; b=JKDNbY8rn5Pu4HrfJV2JOxUc/KbuUvBT1EMGDKVyXYRv/ahvw0AFwFtVlfyuJIJ/dJwhGlEyv4tAvAkacv2xZr3LOG8HadLctiwpWwtUuphFJp2dWeatpRiAZpaqBjlOUcAOQ+NynlVBezs0wLyvX8GFi6BiZKmnKGtmkz/djwon6ENEMRsxjNNl0BkizI3guVMEtGtb+CiCx3Nf8BQU8yU1qHbjp+9rxmOMBC9osBFCilAK9bx1uub1eAiRBZWHy3OU+3XVgAzHRkmMPvc+InlHkCUawteIdaZh/rOb2ZlUVzHcCfri4O/9WmuEHRZMNLZxfaTUEQgkX3s1jPTTnA== 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=pJhGUgDTskrg0FRsL90q+wZuD+3x+nW8gzaqYTA4pBI=; b=AuiPSXrSn+vRw3DT5Ell2IAFfumjUMxwngnF4QglGElS3f88cmVrNd7A/ZeLv9KMDdS9ys39LiN5Vo+wmiWNBgPv8Pe0ZrIIPYHh9kw6N/4qETj2a4NvwofxoP11X3calvDqKToBPwhmBYOgxNnazWrXMxzq7AZ3rC7fB72+J3c= Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by DM6PR11MB4593.namprd11.prod.outlook.com (2603:10b6:5:2a3::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Tue, 14 Dec 2021 11:43:05 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e889:17d9:10d9:ab90]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::e889:17d9:10d9:ab90%4]) with mapi id 15.20.4778.018; Tue, 14 Dec 2021 11:43:05 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "pbhagavatula@marvell.com" , "jerinj@marvell.com" CC: "dev@dpdk.org" Subject: RE: [PATCH] eventdev: fix missing internal port checks Thread-Topic: [PATCH] eventdev: fix missing internal port checks Thread-Index: AQHX7/vozLlRxT0fuk2Byttry327HqwxfVvwgABUFQCAAA18oA== Date: Tue, 14 Dec 2021 11:43:05 +0000 Message-ID: References: <20211213083143.4233-1-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 27f68956-e46e-4316-fc39-08d9bef6e46c x-ms-traffictypediagnostic: DM6PR11MB4593:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:324; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MUIN+xGR49Rd5yzhqaoF+zlQMrGHyUTz8GMmCcyLqYlpnCWpiinI3kHh4MVEt+Eoa2EbY0LwhF+AFNzkoww70JeeoBFc+y3w0wLGfxlfD+owZDVfOa0BVtPJc8pJhcx0sp+yzLAOVRUQA/PIEk5aboJhFcR8rMzVqKzNAYqxxpYiqwoVkZXxmIuBONDgo+yQ5QZr9Kvff/bgQye1dzwCwfgKDrMokvPt3OENozqCTwa57lDLICh1ZOVbmqi6aM4iQ08wu5hYU589MrY8p12UL4PjdGEuYxiyXS/9fjCLlSFCDMx5kggZXCCDjuaDkuTdxB1ab2o4j4TPl7ejOFePXggDQk7S7EfZXiQmrS5SxWrqgyGw4sEhbmHEeQF1N6rF02ABH+NFhq2cv0j2KygDcr6GdkBDxastCax8B4jOxY4QH7j5ecNBvW6S+G7xSIbcRXPU9trr/fKvpm7X3TeiyAYQ0psemZr5yozcDV0URz12DwN3ngiGxzX5zgGsUHC29OeILV5magXp9ZUMChTsNoHxSUEvwjYi6syYQmaspDad6tXwQboKtqk1b8pg+0X9S+KA8cz1EPB1IMyw3SetQNi5k38MQnbnYi1JyK6u1apfSjw7YWZbvjWBmGRfSN4n5/t0xCkRq0LsuMTKZd3uiFfi7LzTGcHX7TW/rxAMHyrPh+xZ2Z+2AFy/y7uMp5L1vzFEsavWwXgQgU7E8R/JpQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(316002)(86362001)(8676002)(38070700005)(186003)(82960400001)(2906002)(71200400001)(8936002)(33656002)(110136005)(55016003)(26005)(7696005)(122000001)(83380400001)(9686003)(4326008)(52536014)(76116006)(64756008)(66476007)(508600001)(66446008)(66946007)(6506007)(66556008)(38100700002)(5660300002)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Rt4VEw9rctZrpsHD7/Ijo+92DOR+84GEAMXi4X7ACUsDCVF9W4EkgAtolw4X?= =?us-ascii?Q?2NgAYW1zWxVe5MUWTvjCCMMWXeJmtdLLX4LRu7EXdB30h/CNjIa1mds9n9AZ?= =?us-ascii?Q?3Ob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z+ThwY+jMvRgRQatU?= =?us-ascii?Q?pdicx0iz9hkreauxRCtz2g6ZeFFMqt6PJe3W/EaJMjcbDTRTQGx8Mi2QCORk?= =?us-ascii?Q?dxjKGCyf2Xbewx5CEFGVDcU/F9JGboeGK7GpCri3nCZcFNlerijqUM3H96mp?= =?us-ascii?Q?/m1umagVfGgsKceb1AY2e0KiGWJcNFC2RylocJ2FTbXJlo4YJvB5oJMvjZVC?= =?us-ascii?Q?yYz8KWWKKs/Nnm74CgKMJ4ANQBOkcU8sCONcyy57SMxpl06iYCYaDdetgJuS?= =?us-ascii?Q?V3MOGrBFYNPM4fMCRNy9QWVOIAojZXnOBtRYHFtyvtslGMV2t+5695+CjNgH?= =?us-ascii?Q?gaGFmmpFJxAl5fJdceBJXEltxzvhpUlQtptq6XlY57FTtRYzx+pLegtBTQSM?= =?us-ascii?Q?vqJgsLP4waGkIDkDPI144JF4CixXIV4hThzncMxMvsdZ3FVUTJzdjpJzRFZH?= =?us-ascii?Q?ZTgC/+reUhsWvpR78+AEz7xrbGxWhffakj5TEWp6PVkx1HHblCBIUTZ9kr+v?= =?us-ascii?Q?2A3sFnxqC5xwxOA7+Cd9PcGVdCrufX5A9hXnym8olVmCxKMhoZJBUF3WgebB?= =?us-ascii?Q?liYfqrwyP1U7K7V3oBbI94fl1AgSZlpcAZEzA8fRP/UZotqbvYK62ub8IKpu?= =?us-ascii?Q?33risaqQ0H6ajflI69hH/VVaCoDBzLiZzMmHuy5mVj4gA4iSglSgAvJshW48?= =?us-ascii?Q?z6s0mQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27f68956-e46e-4316-fc39-08d9bef6e46c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2021 11:43:05.2036 (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: uSx/Xlu6+Z5sZiukZeEsXWvghq/6qwvrheKnJPgoZ0/VCgHFPmAD4WETKSOC2IVAt2ARwUGDJZdHHazh4Sb4EdHw69T0IndCk2jUH4nN+jI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4593 X-OriginatorOrg: intel.com 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 Acked-by: Jay Jayatheerthan > -----Original Message----- > From: Naga Harish K, S V > Sent: Tuesday, December 14, 2021 4:23 PM > To: Jayatheerthan, Jay ; pbhagavatula@marvel= l.com; jerinj@marvell.com > Cc: dev@dpdk.org > Subject: RE: [PATCH] eventdev: fix missing internal port checks >=20 > The patch looks good to me. >=20 > > -----Original Message----- > > From: Jayatheerthan, Jay > > Sent: Tuesday, December 14, 2021 11:23 AM > > To: pbhagavatula@marvell.com; jerinj@marvell.com; Naga Harish K, S V > > > > Cc: dev@dpdk.org > > Subject: RE: [PATCH] eventdev: fix missing internal port checks > > > > @Harish, could you take a look at this please ? > > > > -Jay > > > > > > > -----Original Message----- > > > From: pbhagavatula@marvell.com > > > Sent: Monday, December 13, 2021 2:02 PM > > > To: jerinj@marvell.com; Jayatheerthan, Jay > > > > > > Cc: dev@dpdk.org; Pavan Nikhilesh > > > Subject: [PATCH] eventdev: fix missing internal port checks > > > > > > From: Pavan Nikhilesh > > > > > > When event delivery is through internal port, stats are mainitained b= y > > > HW and we should avoid reading SW data structures for stats. > > > Fix missing internal port checks. > > > > > > Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API") > > > > > > Signed-off-by: Pavan Nikhilesh > > > --- > > > lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++++---------= - > > > 1 file changed, 14 insertions(+), 10 deletions(-) > > > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > > > b/lib/eventdev/rte_event_eth_rx_adapter.c > > > index 809416d9b7..da223aacac 100644 > > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > > @@ -2984,15 +2984,17 @@ > > rte_event_eth_rx_adapter_queue_stats_get(uint8_t id, > > > return -EINVAL; > > > } > > > > > > - queue_info =3D &dev_info->rx_queue[rx_queue_id]; > > > - event_buf =3D queue_info->event_buf; > > > - q_stats =3D queue_info->stats; > > > + if (dev_info->internal_event_port =3D=3D 0) { > > > + queue_info =3D &dev_info->rx_queue[rx_queue_id]; > > > + event_buf =3D queue_info->event_buf; > > > + q_stats =3D queue_info->stats; > > > > > > - stats->rx_event_buf_count =3D event_buf->count; > > > - stats->rx_event_buf_size =3D event_buf->events_size; > > > - stats->rx_packets =3D q_stats->rx_packets; > > > - stats->rx_poll_count =3D q_stats->rx_poll_count; > > > - stats->rx_dropped =3D q_stats->rx_dropped; > > > + stats->rx_event_buf_count =3D event_buf->count; > > > + stats->rx_event_buf_size =3D event_buf->events_size; > > > + stats->rx_packets =3D q_stats->rx_packets; > > > + stats->rx_poll_count =3D q_stats->rx_poll_count; > > > + stats->rx_dropped =3D q_stats->rx_dropped; > > > + } > > > > > > dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > > > if (dev->dev_ops->eth_rx_adapter_queue_stats_get !=3D NULL) { @@ > > > -3086,8 +3088,10 @@ > > rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id, > > > return -EINVAL; > > > } > > > > > > - queue_info =3D &dev_info->rx_queue[rx_queue_id]; > > > - rxa_queue_stats_reset(queue_info); > > > + if (dev_info->internal_event_port =3D=3D 0) { > > > + queue_info =3D &dev_info->rx_queue[rx_queue_id]; > > > + rxa_queue_stats_reset(queue_info); > > > + } > > > > > > dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > > > if (dev->dev_ops->eth_rx_adapter_queue_stats_reset !=3D NULL) { > > > -- > > > 2.34.0