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 5DF4DA00C3; Tue, 14 Dec 2021 06:52:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF28D406A2; Tue, 14 Dec 2021 06:52:42 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 18C1C40688 for ; Tue, 14 Dec 2021 06:52:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639461160; x=1670997160; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7Gq75CLkobdPX36X2Z2Ya2beiKEx7e4Px6GW0FZN4+Q=; b=hHKrd4KUkqjqFSOi7mrqUdmdD3C1o3ekQ0/paoDh2kTHhP9lMlG/KtLn S8BSkdfQGOAIXw3y+XvXP7ihAl8xe7Z0zIJ5HWiRSNmgG5Pr+oX3OIX0i 6L9Jd54JmuFVFXZFIH6O+c/5NLzzGH0RCrMkDpIN6ULpGVOufSXvRnzxX 2ifK1WFI6EXF4cRq0T5VAvd8IYU2V1la5dOA3k/W9i+aIEFIHqUaZlzIs WrxUbqwIJ6KxkDaHiogcOu2CVODIIx5u6pFwe452EOm/NLubuJaeu5nfJ lkCCc0mdHt641l89MdzsswwW6RlO3/BypalPdH8UdrSZrbMc0ro8SX6bO Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="239127931" X-IronPort-AV: E=Sophos;i="5.88,204,1635231600"; d="scan'208";a="239127931" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2021 21:52:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,204,1635231600"; d="scan'208";a="464939514" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 13 Dec 2021 21:52:38 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 21:52:35 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 21:52:35 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 13 Dec 2021 21:52:35 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 13 Dec 2021 21:52:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsoWiNCnNQ5ajPQnMNwSBF3/1R5kQxi9lU4w1wsBjVnfcamvmQrX4T3zbe+8UiXFlvrxtZ382WRmp4EZPfF591Wdb/TTJlH8zav1iEeIdI4UdKmwAOmPwqFwScYAr+QyS+SrusyIHLFHCpLdqCWNvYwFLqrsonD3PSu8hCmNUcN+URRZib5NNrdrmFDxL8QCF9HKY6oz13HG250La0Sb0waJwWHrHbjaKKJfQb7GwWusux1rpP3GVqj/bbf3kmdRe7Sp1Zr/FT+7LtFExoW139YyN6c4fy+T84SBL5JnXdR42o+Zm/0hSwDA91rWJE7LlroT4V5Nkt67e4BY+EfX+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=Py+/M0bLwm7KuqQRP8V8PGVD6SMEFFW1xEs2Qnpp+2Y=; b=kZNFUOoDkFxAua18JoFf9rGrwfjqTqpiFCYp0NVrXn0S66nXZn4uKPfIBDUkr4hfqYE3Q/cXF6EtRV3kUZQ3I7fNxFxiYgkeIGpsT1fjYYZgJ0zz/JlaEQB7b5a6C3e1XvgnLQ2zADor7G3+uhWfXa3QepyJ9SRAisPB67MLi4S6MRYWz9Fip9UoUciPx0tM3xIClP6N35ZgT7uH2uLNOw0FOG5TRORIuLb5ttImOXe6Z4+N4fag/x8j/SMzJ7M1i/cW819Oz+0GU1zPji40oDloQPDNfUNgcfLqyF4Qg60lnk4Il61bnQGZxv6MFWXqedQpRF/K4fHUDYstzZDDYQ== 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=Py+/M0bLwm7KuqQRP8V8PGVD6SMEFFW1xEs2Qnpp+2Y=; b=wr6viy2NWuekrNd6Q+Oweu0l08EAtVo+XAUT9ORG7LFbdmky/54T0wobrepvxX6W6O/mDpyVdnY9uAmfFDzBMG2xKq6bF6vakhheHjfukdZQfk/eywb19U62wVGtmDTLRaCiX7TVitEKDy/jboT2iypBPTkHd9EcOrmWq5d30bM= Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by DM5PR11MB0042.namprd11.prod.outlook.com (2603:10b6:4:6b::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.13; Tue, 14 Dec 2021 05:52:34 +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 05:52:33 +0000 From: "Jayatheerthan, Jay" 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 Thread-Topic: [PATCH] eventdev: fix missing internal port checks Thread-Index: AQHX7/vozLlRxT0fuk2Byttry327HqwxfVvw Date: Tue, 14 Dec 2021 05:52:33 +0000 Message-ID: References: <20211213083143.4233-1-pbhagavatula@marvell.com> In-Reply-To: <20211213083143.4233-1-pbhagavatula@marvell.com> 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: e5236a1b-8c6e-4cc6-bf41-08d9bec5ecc1 x-ms-traffictypediagnostic: DM5PR11MB0042:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: peL5EtNeGItD4pziRoEnde3tVZDrOdyuayXj94antGmrJ8wa1GyeRETPkyJha1v2cVBkgZoP+gOvexg9jjrEuEFiCRAwrinjOpthZMwshlgLNIKKoB5z15b8BRbu3sRH3vXOF4sRk7zXk0jtuRuRknuEBWZRo0UEKnFa3f6HDDlv2mpCxWCaNaN5Oa0j2NQXg14MflV2/Cnt7vyydBIhpqN2iVcwVrA/CUCYhzWj85TCUEDkmzp3je1bEBA4axFGzLWos9IEaozdTDaUvbmex5j6/CIOXi8CYHRW6/dxq8QSfz4OD4Z+53e2kGWZ3EQrYX0RzSxhh7jrIM1ri2eERu5MG14owHyD+kosKyNhhmYFvo+pTcFtK0T275IdHrOZp9klSMdXfuJhIR8fjLThD2LKYYd1B8QBXAn+AC0EhMQy0rm3HAChy20WaUuMwYstCnjo0mIcXOK6i9gMtzxC7LlkPGNkpEqIDdZI7wNoa+0LCPXjwRVWzjn5WqnqnYeB0PGisUsJwdgQEMb8lYAz3wDzsR3/yNNueELcxuaUbhsUMbzHz7cSx1zdSSbAwCZ2+vBoggq2vxLjlAEz9j5C3qiguBe6DCPK9KMwpeOF5qnOYEmAcIeKAfqYwI32aIEgvkCVaxDVCOQLz+XRFlyDtV4O5puZxcEPu5IKH+kzllfiVrUUu/7HGRDaYkzSxSC+SxgMkLsiRmogyQrDquizOQ== 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)(86362001)(83380400001)(8936002)(110136005)(508600001)(9686003)(26005)(5660300002)(38100700002)(52536014)(7696005)(122000001)(6506007)(64756008)(66946007)(316002)(186003)(71200400001)(66556008)(82960400001)(8676002)(55016003)(66446008)(38070700005)(2906002)(4326008)(76116006)(66476007)(33656002)(53546011)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Q4WGwtMoXugnYotxgiKEZ6A+v3YwzmWQ+w9EAyTD4eh6OYaahMR7UFqh1Y/j?= =?us-ascii?Q?hknReqpnp3TEVXLB7egeMB6RxWPpE+qAy1PYxk0oybaleKKScGJtPz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66ckx4xub17VfAgufuN6VfqwlIBBA/Ky78?= =?us-ascii?Q?r9XSOTB0FXMcqQESMkVdlZEkfdO6mYpMddYZ3cErV6XQ34U2jw6V9HHK8taU?= =?us-ascii?Q?cmX3iIWw/HJb+QvkDzTn03/O+YoIhqNek8tHzvCpdF9ZZlF/DJX+ILAjZEjo?= =?us-ascii?Q?aZs7YQkIiUBMVR+nZsK7jtHgAYQnUHmg+LrGemqE746r4D2pPnl6YoUnpINh?= =?us-ascii?Q?7urF4K5SmZJGlUkbxf4iFq097d6IjMU9ji0/xvRjpO2uONH7WK6IfhmgV2kJ?= =?us-ascii?Q?5kTheh3+j9ZTSCZSqAmT9iQVq+pXeCyPYWiSxgCAZXnh5somIPJZeLTKAtR9?= =?us-ascii?Q?eEGHLBhOgXPu9Ac4zcsqL6gn6OsWcrM+rt+qDxlA+4xyFs45AaJdp4l6MkaC?= =?us-ascii?Q?BoaxRvRUm6CSDvlGPZd4BfcE0tFHTcBGB7ya3kSx1YKgLEIJ/JuPOloW5Ogc?= =?us-ascii?Q?tTEHnZLcb4NA8rpA5HtFdO0GyFEwW1WnNH84ov7OAPbBiNncEaLmbvz3CyL/?= =?us-ascii?Q?CHM8bT5QLK2XdD1zygP6WGLdH6g4luKA/Uvd50+RMPo9o32fZzkO5drrtQ1C?= =?us-ascii?Q?CIt/+hWQqUDF4eFQRBY/+qkKUNYag6ytrJBWwDKqK3jA4FJcREPHxlnAVM3N?= =?us-ascii?Q?rp++gKaLsKCQwC4IqK39lF423/6NWD0WtM17rvZ4bCIeHMU0CGVohEBwnKB5?= =?us-ascii?Q?YAi5bg=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: e5236a1b-8c6e-4cc6-bf41-08d9bec5ecc1 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2021 05:52:33.8491 (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: /dWT7kkBLqacAagOjVoARjbjovdEP7Z6Hkqmm2OWx0aw7ClvMdHwaEQ2878xSxlVXEpDYRybtEgfYuwyVuw4jGXSIjEtn77nzI7KEfBMnd8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0042 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 @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 >=20 > From: Pavan Nikhilesh >=20 > 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. >=20 > Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API") >=20 > Signed-off-by: Pavan Nikhilesh > --- > lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_e= vent_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; > } >=20 > - 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; >=20 > - 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; > + } >=20 > 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; > } >=20 > - 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); > + } >=20 > dev =3D &rte_eventdevs[rx_adapter->eventdev_id]; > if (dev->dev_ops->eth_rx_adapter_queue_stats_reset !=3D NULL) { > -- > 2.34.0