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 B39D3A0A0B; Mon, 1 Feb 2021 14:23:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 372A7160651; Mon, 1 Feb 2021 14:23:38 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 5608A40693 for ; Mon, 1 Feb 2021 14:23:36 +0100 (CET) IronPort-SDR: 0ThrTcnw5B7WRIflSs4ym8YE1mwBexWjdGRpzpPqjwRlnOO3pXU7ko81/dXan7RKksx0iZiSsS rWFktUSdHa7g== X-IronPort-AV: E=McAfee;i="6000,8403,9881"; a="180757333" X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="180757333" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 05:23:32 -0800 IronPort-SDR: yS24VszpM+3YWAO9Z7ZJX1ncuDTYvtS5AUfxxJE+rTheCmNdNO1Ehaf5eI80bg6yWe/eOi2adZ UvQWL111XwXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,392,1602572400"; d="scan'208";a="479005929" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga001.fm.intel.com with ESMTP; 01 Feb 2021 05:23:31 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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.2106.2; Mon, 1 Feb 2021 05:23:31 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.2106.2 via Frontend Transport; Mon, 1 Feb 2021 05:23:31 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.52) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 1 Feb 2021 05:23:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYSSlxqTNriS0jaHnZXCegp0+T4KVRrRjTV2iOpikW2Z0IxWiFDXojAVw8BwsrTOhsiRvVa6F0ytN7a2Ovrq00JnrYRWzhWySSMmnOxlGnhfGxNanxiCeN7kKQof38zFuSD9506kBeviK+28Tnntn6XKzGcye+8nfM6pZ4EYWeSlRvsNyKL88RQN18gOP4h7L+a8yFVkjrnYrHvW9nH4vTCaRM7z82m4ldEZGwXXUCOR8m4U5aOOG+wS71dTuYf3iIaMPkhF3n5tX97C5p+5iZbdt2x1CaQg6unDqvJYZHfLSTJ/EUyDxGoCAo2AdsJb2DjMzAKGMpbyyXZiovDxIA== 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-SenderADCheck; bh=FDCOxTIn9wWn7ZRG7hR5ZVf71NG4KtVMeDEPU6w/VqE=; b=V5RVHB590VCtRkusO+DzDQ1EliA6VgDP7Re5WftiieasGDKJT189+/nhfgD3i9ABPxHtwZU24hJRJ+LD+5fX3suiX2iTPukXL9mTezqCDrLQHgtHVhKdFXp+4j1wDH2RmBAek9wJJ1J/6kHkPNi0yhx2jldSHNIlgeqowZMIjNw+/7fT7zTdu/3vEfWjUzd1PM2s+5rU69VRCJ+W1U1VofIxzHdVZXAgJNfxHJsPrpOmoMSSnLIPoYYFGkQENf03uEG6y/frLJNlsS4eo8eHOB5QLrtNJOYMwUiu8qlk8EmlHY1zKxSMTMy9Ywg37k6LZ+5nrZwD/aXqefWp2eivxA== 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=FDCOxTIn9wWn7ZRG7hR5ZVf71NG4KtVMeDEPU6w/VqE=; b=jLa2bZ2bSDas+ERHUXi2pO6j2K5Zd/nm2lBIVWMgDLRPL2nFhCliRORuFH8D0235BMYj2VylJ2N64Lyew6cow8M8Tqdajkh1cO0aV81U9dBy6X5RbDkc1PuZOPHhJgmu5hrOitQ+bHypC6Vt4Y80LeweHHm5xovwuqrNdwYyZ6w= Received: from BYAPR11MB3143.namprd11.prod.outlook.com (2603:10b6:a03:92::32) by BY5PR11MB3942.namprd11.prod.outlook.com (2603:10b6:a03:188::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Mon, 1 Feb 2021 13:23:27 +0000 Received: from BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::e1c7:915f:8714:9ce0]) by BYAPR11MB3143.namprd11.prod.outlook.com ([fe80::e1c7:915f:8714:9ce0%7]) with mapi id 15.20.3805.027; Mon, 1 Feb 2021 13:23:27 +0000 From: "Van Haaren, Harry" To: Fredrik A Lindgren , "dev@dpdk.org" Thread-Topic: Question: typedef of eventdev_info_get_t bug? Thread-Index: Adb4en0LIeGDpUGTRpesaiMx8+RA6gAA5+4QAACUs+AAARiigAAEs6+AAAFYNxA= Date: Mon, 1 Feb 2021 13:23:27 +0000 Message-ID: References: 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.5.1.3 authentication-results: tietoevry.com; dkim=none (message not signed) header.d=none;tietoevry.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [86.40.59.136] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fdf7c908-1cc3-4700-ef4f-08d8c6b48f6f x-ms-traffictypediagnostic: BY5PR11MB3942: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Sfd1oQQtdqzp+6z6WvmcXyFqDICXjCxLc1tiZn3zDtc0B1abnvsXSJjtTHFi8dwz2sFPhXWHGo/bXmvwFhdSBuStLzktlu0DLcfBfFtb3c5JZfCg2gpkz/Dddywd50TNFJK6jPYirrLeVUpMVSdn9pOsBJXpCS2NyHR6AofmgXmO2S2f/pn1iKQRsXhdKiYwuU0nr+4dD9by0p2gh6X1teRclhzSeZtQbc9dp/NICOLjbdUyQyqw9yJhErSemgsGoXCBbptr5uXWNEvnUbaC6FQwljxY/DUPhL6ND1IIIgxCsBcMronKhZphB9aOwyOiTdQ1a4RT/3rwvCaYb9Bw0VVC5O7ARxuFD2X8qoi7XcAn0NZ0mrAVvXbGpsDrkJv4tl+ySQMqsbVBaKVZ5Zg0XhoTYybp/LQXCUsfPdxA5k3Py0BJ6EnwRRtWJ8E9UGFJgX8Kv6bASKwGa54yuju26SkDIW+QkI2rWGRd8C8BcQlg20WmhLxuurgDPgG6SoljLdQzYMrBJE+/Tsj6FWMnAZaQrNfvaMl6pgeGPkKYk8VLrDPzrR4W+SAGzfSK3MNSlJRsOtk9jV6LzeQRA6G901Wm3l5YG1MniMu+fozwuKo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3143.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(366004)(64756008)(9686003)(66556008)(66446008)(26005)(186003)(52536014)(66476007)(83380400001)(7696005)(53546011)(5660300002)(6506007)(2906002)(478600001)(33656002)(8676002)(8936002)(316002)(966005)(86362001)(71200400001)(66946007)(55016002)(76116006)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?qPl6ye6YmYySYQxvM60vDo1FFaISsrNoxNojm6dE2rtXXQjW9I3DYFyGW9Iv?= =?us-ascii?Q?IMtppw7roeOM5HjjJKfEnyNYdWAA1T0OGPiq8D3MFPSbKe9aFVWPlOQMBpxy?= =?us-ascii?Q?drckAb1M4zdJaGDjVjx8QUPejPchAM4+FL6M5vafuB1tPNyfMNP+xicEKqz0?= =?us-ascii?Q?akUropgUVz5nxh8XKu5kF7TTAulvpXI9p8syyYLOLcFSKdAE4D+8imQLts2c?= =?us-ascii?Q?a7tzmHvUApUKPptt4LQhi3h2PHvSOnvFm3LS0fWB3moqzRL4VzjXraB5bYCD?= =?us-ascii?Q?V0Tm40DAIkB2W9dw8QDCXpantj1vBy7WtGZ8hPaAF845mnT/SKlufJQQs68a?= =?us-ascii?Q?ua62kzIdaJzh8yxjsfGHF7TLqKolBKX2hcxY/FZdGOYgdQozZ75n7KnCAgDH?= =?us-ascii?Q?7rxnTZm8/DeTkiUWejM44AqpQPQN5MhpYPNUVgx6Dcbp+ELvylBXAMu3QLRd?= =?us-ascii?Q?i7F2IyO877flb3tEJYEEFb5ptyG9pLZ0uwB5CvVt+mJ/pXsgfRnV/yuGBdvO?= =?us-ascii?Q?PvSiwtONJoUwcEAhADgGSkroXPjk1i/2DlQ8/PL1L3zKKs24mR633U8/4y3k?= =?us-ascii?Q?5Ws2FLztDYdwpHhL1MmfK5pbpBmYTw0NfuI7ZPnbmMtZJ48yn29ZfNYZ9DEp?= =?us-ascii?Q?KVVw9RiO94CB2qQNCyC7oJyVzBl/juAOyXxFcjaF3c9GPoxIJZU3RMdEVfon?= =?us-ascii?Q?zAxyfABIDcurnW9NDl3Sx52Bu8RU0sarkah/CmLR3H4Ll2g1Yfox31+1BQwQ?= =?us-ascii?Q?Q21XlF6cTWqW5L/MWzdVB9yLbpMcE74lt/SJ+fhPAmnICX5nu2rLlHAXzzNV?= =?us-ascii?Q?YbFSvWZXCrMiEUNyHJbeW7RtxmJFACrDz09viAHS2HBP+Dq5CbAY6g3yb1KY?= =?us-ascii?Q?b3WBzr3RfQEZ8hSf8a6bL21uXjMVnze1D1ICHCYy8zD2K1SUBs9aqVnv981u?= =?us-ascii?Q?gsXdpTt8QpT1JSK/92R8IgMVXIDtJaaxptoZazgSD0aCoj/6reic7HSTuDXc?= =?us-ascii?Q?TjGmHcCNm828g/FDQSrUBXaegpOvC4g3xb9D/rjBgrs4d1bgq24gXQvx5fXv?= =?us-ascii?Q?Kydi3uAC?= x-ms-exchange-transport-forked: True 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: BYAPR11MB3143.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdf7c908-1cc3-4700-ef4f-08d8c6b48f6f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2021 13:23:27.4536 (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: /qia0b273yGs4ze9JGs0lSD3BIp3NWtVBboO59vTZ81Pu718oAnROJ7O1/G5Z0tEMqLA2G3IuenvO//oKI8AE8C1kATKT36Qaay8nGStNhE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3942 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] Question: typedef of eventdev_info_get_t bug? 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: Fredrik A Lindgren > Sent: Monday, February 1, 2021 12:50 PM > To: Van Haaren, Harry ; dev@dpdk.org > Subject: RE: Question: typedef of eventdev_info_get_t bug? >=20 > I'm not 100% familiar with contribution guidelines of DPDK community and = since I'm > doing this on work hours Corporate praxis is to get legal approval to pro= vide > contributions to opensource > So if you have the time and already are familiar with contributing to DPD= K feel free > to submit such patch Sure, patch sent: http://patches.dpdk.org/patch/87588/ I've noted you repor= ted this using the Reported-by: tag, as per how DPDK project tracks contributions, thanks! (https://doc.dpdk.org/guides/contributing/patches.html#tested-acked-and-rev= iewed-by) > Yes gotten around at least that issue, have other suspect behaviors when = trying to > use it though. > But those are most likely related to driver and as such probably for a di= scussion > outside this mailing list with Xilinx >=20 > Br, > Fredrik Side note: on mailing lists (like this one) it is best to avoid "top postin= g", as it makes discussions difficult to follow. Adding replies "inline" like this comment = is best practice. Regards, -Harry > -----Original Message----- > From: Van Haaren, Harry > Sent: den 1 februari 2021 11:31 > To: Fredrik A Lindgren ; dev@dpdk.org > Subject: RE: Question: typedef of eventdev_info_get_t bug? >=20 > > -----Original Message----- > > From: Fredrik A Lindgren > > Sent: Monday, February 1, 2021 10:02 AM > > To: Van Haaren, Harry ; dev@dpdk.org > > Subject: RE: Question: typedef of eventdev_info_get_t bug? > > > > Hi Harry, > > > > You are correct, multiple structs with dev_infos_get defined in them > > caused me to jump to wrong implementation. >=20 > No problem. >=20 > > Still a bit "wrong" that comment for eventdev_info_get_t for event > > setup states returns 0 on success. >=20 > Agreed, a patch would be welcome to remove the "@return" bit of the docs. > I can send it if you say you're not planning to, its a small/easy patch. >=20 > > Using older version of > > https://github.com/Xilinx/dma_ip_drivers/tree/master/QDMA/DPDK > > targeting dpdk- > > 19.11 for a corporate internal project as such can't give much details. > > That version had a issue with no return statements in the infos_get > > function which was causing me issues. >=20 > Sounds like you've root-caused and know of a solution. >=20 > > Br, > > Fredrik >=20 > Regards, -Harry >=20 > > -----Original Message----- > > From: Van Haaren, Harry > > Sent: den 1 februari 2021 10:44 > > To: Fredrik A Lindgren ; dev@dpdk.org > > Subject: RE: Question: typedef of eventdev_info_get_t bug? > > > > > -----Original Message----- > > > From: dev On Behalf Of Fredrik A Lindgren > > > Sent: Monday, February 1, 2021 9:22 AM > > > To: dev@dpdk.org > > > Subject: [dpdk-dev] Question: typedef of eventdev_info_get_t bug? > > > > > > While debugging a driver I was looking at the code and realized that > > > eventdev_info_get_t typedef is defined with void return value but > > > documentation for it says it should return 0 > > > > Hi Fredrik, > > > > Be aware that your snippets of code below is mixing Event-dev and Eth-d= ev. > > This is likely the cause of confusion. > > > > > > > lib/librte_eventdev/eventdev_pmd.h: > > > > > > ... > > > * @return > > > * Returns 0 on success > > > */ > > > typedef void (*eventdev_info_get_t)(struct rte_eventdev *dev, > > > struct > > > rte_event_dev_info *dev_info); ... > > > struct rte_eventdev_ops { > > > eventdev_info_get_t dev_infos_get; = /**< Get device info. > > */ > > > ... > > > > > > While return value from it is used in lib/librte_ethdev/rte_ethdev.c: > > > > > > int > > > rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info > > > *dev_info) ... > > > diag =3D (*dev->dev_ops->dev_infos_get)(dev, dev_info); > > > if (diag !=3D 0) { > > > ... > > > > At the Eventdev layer, info_get() can return int (particularly 0 on > > success, or -ERROR values). > > At the Eventdev PMD layer, info_get() has a return void (the PMD > > cannot indicate failure on providing its info) > > > > Hence, the info_get() typedef (for the PMD) is void, but the Eventdev > > layer itself checks some dev_id values etc, and can return -EINVAL or > > -ENOTSUP in case the PMD doesn't support info_get(). > > > > > > > Driver I'm debugging doesn't have any return statement in it's > > > dev_infos_get function which seems to cause it to have "result" of > > > last operation done in that function as return value. > > > Though this behavior may be compiler specific but it should probably > > > be clarified and updated (change prototype of stop using return > > > value) to avoid > > issue with it. > > > > Perhaps provide some more detail on Eventdev/Ethdev that you're > > debugging a driver on, provide some links to specific parts of the > > code? It seems like (from Eventdev anyway) its meant to work this way. > > > > > Br, > > > Fredrik > > > > Regards, -Harry