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 13DB5A00C3; Tue, 14 Dec 2021 11:53:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85F0640041; Tue, 14 Dec 2021 11:53:14 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 839F14003C for ; Tue, 14 Dec 2021 11:53:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639479192; x=1671015192; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=55XTyGiiuB3sS7QxIQwyru+G1zNgFTtZ6S7DNPE0NUs=; b=Rh94OXEmEuFXvmAaVY3qR9gVfwwQqixxgtBOQLjJ0tsaEPLkN5nesFoM TdtjYKwHZ3aJSkM/Qts6bIzxGxx+g0GI0PLMJGH7/L7LwU8JjFBqYAmnB eYCn5dqo2TF0uiCaHeA62ftlLRavYaNcehne8aVeG2ceR6VHSaHVTQVDY z9/DzB/gkl2UQ5p9pwJSpnvaYU5hhIvRtZlofA/e7fgthgtJKnx2pDj+1 8DaGH9lVZn/0UI4H8Ru6L8o64oKreuPexfow52SwVbJqKIzTxpkLcK9vW dDjfuAS+AHits/EAW5ZoOcN6vUg+5gYLeeXQ2TWD81sivm3gwvG6VIbBj g==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="238764843" X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="238764843" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2021 02:53:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,205,1635231600"; d="scan'208";a="505317533" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga007.jf.intel.com with ESMTP; 14 Dec 2021 02:53:10 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 02:53:10 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 02:53:10 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 02:53:10 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (192.55.55.70) 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 02:53:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J1to1ORZ3hrfZw1tIhV3nHN46mPRV1UMCFRmTtjaDftVD/bCjvSnry2mD50Uk5fp0Mu2ehqbCdN+4X6y8NzdhQ/TLprvyUQN9iiuRFhx3Ml1myqqIT+CBX79Yh+xC80JDseCsaLTHdeNRmBMLMKNFheV9KuwrrOonnowbmNECLi2LSNcCOeUWlL7zRSyGXW7MMfo6/GkTXLF3oz+3uh+l4FzfZJ+7m/6rfNDvgoeUYzsYt1gmagdTF/Tkse5MG6lmY+n1I2+qdg4pIAk4j+lJwrQu0D2f9AoxVtlQpmzILPGCo15eLCKzocUl2Np8Kdhik/BxHmCCUAX6OrKHFLyGw== 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=ZOxbvM6LvKDY0pfN/1VQ2KZbXupUXvX4k+vs3NYzKvU=; b=id1X7xowLrz1ztR4zr7+KFwj5k+OSxdSGlb15PAqafTTd94teHk4I6PtkS7kyiPl0Yw9FXOEPSqAzC7lvM5FEpFsX6d8Mku4YnSZHY7FAE+aUHQv6LZ9okMFkldPf1p/PAdiua9IqNk4A/YPt1mRTQDppHIfp5dztMsXJQ9PPk6WLyVulIMjXys21f+VMvJ3TTz7GkkUPeRb0a9SkmNU2OfaLE5GZSZZKXS/J+FcWxzwf4rrdzgwwlVr5ZEhu+kMcEm5Nvz9IbSGtg4VUtI+ONcnSDpdrS7NOFrVDnj08ykHeWCZQRsxLoYqfz938I1ASMyl6lBw4gMLzdrSitxKKw== 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=ZOxbvM6LvKDY0pfN/1VQ2KZbXupUXvX4k+vs3NYzKvU=; b=e+y1bYVz8Fd8IcXpegYKeiFTBF5s+uaxiVv8tW1tjX9Hxg1AbXjaN8WDMHmumRG8FzIHWCEdHB9MeugoxMzkDxgJ5x0ycquFBtNzGoZ2XLF8V7KhRP2nPmjAXo/v13d5m7KDC1kkLVLqLocDU5SjKVr1o1P0FlFa6TCotyQDOxs= Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by DM4PR11MB5471.namprd11.prod.outlook.com (2603:10b6:5:39d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.15; Tue, 14 Dec 2021 10:53:03 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::8526:d612:d8ef:2f5]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::8526:d612:d8ef:2f5%3]) with mapi id 15.20.4778.018; Tue, 14 Dec 2021 10:53:03 +0000 From: "Naga Harish K, S V" To: "Jayatheerthan, Jay" , "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/vozLlRxT0fuk2Byttry327HqwxfVvwgABUFQA= Date: Tue, 14 Dec 2021 10:53:03 +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: dbbf21bd-f0fb-47cc-3cab-08d9beefe765 x-ms-traffictypediagnostic: DM4PR11MB5471:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eq5rIQpRpb6jiZyqre6lHgINbh1n4nBG4k1NELSA2s5dOhgJ+2vx5/13JiCnXNCLekgF1sQijYxS84r0SmGwF0gx0XvYncEtfGisWzbgG/uCFmaY3L/Hy8m3xWx5p4566//nHZTP+peLjtmh930lAUNMlIKSIkL3rM8UWVRT3ViuLipQn1QUss+wSQGYjTwnQ1pYcf5D9TXCi+SuSanu3dVpBKJcOAu+CrwosQmmSPuTURy5MzNo5ATcdT9blCLfbqeBVkALxaKXoW2pNPCBX78lJVXIVFZz7JPC0ps3sHcN8KHy0o3c3lVp7NP4MAkTo7dD55Cnc4fYsx2RoqBsaGCZHI5CUSHw+lQFQbyOKXV1tdPmzijP6+QNGSF+BljNtELkku4BCG4r6HMoEnOQDqc/zFQUyABpZFAFP1UIAgo+OUJeN/YBEfO+0JUFoRlpoX3sfL5PBi+baEvS2O9oOhKd5ac+ywkFSoq7sr19wkLsT39R2kzXJvwbK7dCXUZ/OV7QUsiTDe1XMvYwImUjr27vTUY983DFKAuXlw6F6XUpharOTwaXkllKlsiS74XiPvzTSoGwZGPhIni/xHDepnTkiURDfKdKD5ODm/SexHXQnF6859tAHZYen5WGlm5cbI8rAYnkMHi5dR/IbsOb8B+33Ix/PthrtZ3sG8DuLXwj8adBTmxmXR55uENOyXkYchG9ir8DYNVRzFpj5Kq/rw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66446008)(110136005)(122000001)(66946007)(71200400001)(55016003)(7696005)(66556008)(64756008)(316002)(83380400001)(8676002)(33656002)(55236004)(26005)(38100700002)(186003)(82960400001)(5660300002)(38070700005)(9686003)(52536014)(2906002)(8936002)(86362001)(76116006)(53546011)(508600001)(6506007)(4326008)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TwDfNWuuSiHCUAjnX0HR9YAutd1QZCfIHCGCkAJwwoLOdxSY7MsnoGh2m8gu?= =?us-ascii?Q?YFURfBeZyfjoPC06LqGJediDg8AdBxM3xV2N7R+gKZhCX3PzzNA2/Csjqnen?= =?us-ascii?Q?CC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Lm8V4C6izYlioIzefZlMOk2zmTkN6A8Oyne?= =?us-ascii?Q?2t72tLKcpBtmNs8cILY3BDihJISKAhhn5gLc/0pBa5HB6ND1kFPD4Pnuv4Ni?= =?us-ascii?Q?1SkV1bV5xb/hti4GwxAkSMUdd0wes49pqYbjlqVK7zCh7YDipCE7me6gHB+0?= =?us-ascii?Q?dSaaheib6bdsAFyuTac9YRJ/ISKBo34hurwlVgJwKzgm1uf41oMcyg0x4Plg?= =?us-ascii?Q?bk7A9fowP94ROBb+z5LFgcs35SaJPXoZM3s/uTXsjWEM+0/KBqnrzepgX5KW?= =?us-ascii?Q?DK9Oa/mhzNDiQ4kLVFzZAVeGtsisvTCBXEfoIZu0AexjS+zN/FVXVZ2OoFV6?= =?us-ascii?Q?KAGZ88T1UxwgZANpDmmbmE0DbZFnyu0oSrZFPIy5x8rSDXEYXm+mtGR4yOjh?= =?us-ascii?Q?zVFo+lYzzjM4ms3Q3tzGp+a4YI5oXLPvP+FjLd9kDKYupWErxRWVCajZM0oi?= =?us-ascii?Q?eabj79c9m94o4yb5MmoefNzAehzzzexY3+IJJNctwVUQm3Q8FZGWjh/q6GzA?= =?us-ascii?Q?CGuTczh4k6BY++vKdimz95TYLWhCanQbJxx2wIK3+KKlHqWcJtGpPm2qUvUq?= =?us-ascii?Q?MS1UflYPhMZADG1Hwg7EquYo43L0uhPmK3v1iRQFhG+Ldt1gYVPBlcWlSlAb?= =?us-ascii?Q?4r8aJzawmV5Y6ThycNsDBRhx+e8TQQP/wZj1mLmIKo1gof0JImEItLfAQ495?= =?us-ascii?Q?LKpIfA=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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbbf21bd-f0fb-47cc-3cab-08d9beefe765 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2021 10:53:03.7259 (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: 2oRHPdjeZeXXXh7Qvge1zO5PG8OwPaAnv+5Cuk8ySlmj8TWuXqE4AylisIt7v5OGVNLyD+uprNMbr4pXm9rNG+T88GjNVvk4iu7eueUPjpE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5471 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 The patch looks good to me. > -----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 >=20 > @Harish, could you take a look at this please ? >=20 > -Jay >=20 >=20 > > -----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 by > > 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