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 E321AA00C5; Mon, 19 Dec 2022 18:18:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EF8B40A7A; Mon, 19 Dec 2022 18:18:36 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2783540685 for ; Mon, 19 Dec 2022 18:18:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671470315; x=1703006315; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=xzQIe5y7G3GPdg1HqOukHenEqy0AZQB8g88L3o+kcAQ=; b=AZS/VA+FqHH7Pfgq+mSaH7PlP0ErZE9T9A8HEQykNq4oNEXlhzlUd+WD 2EeVvVS6xmgpXk2NdR+Hat1am/+zVSrUKuoF+2cy46YjNZi6QfJ0psuzF cRyThHwIjLnYX7HDl/7pDjZD64yV4pDSJ25Ws0jpoMo7oL5aK0tTtrhSz IyY0R1c+NtS3ya+06BNvKwZfss1OAzr1hCGLJQA/dIPKyeVcPtvRTxdHf 89aKnxd6Cfx7XLxO+1mQyeEKKk4bJO6kcA9bUoV0R0JsV5aW4JV2Fbtqv koTCB4/SqS77KUkGEkDTCaQfWY18rMX6cuPkkvOSHK+KevUW9UVokljZ/ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="320571622" X-IronPort-AV: E=Sophos;i="5.96,257,1665471600"; d="scan'208";a="320571622" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2022 09:18:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="896099686" X-IronPort-AV: E=Sophos;i="5.96,257,1665471600"; d="scan'208";a="896099686" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga006.fm.intel.com with ESMTP; 19 Dec 2022 09:18:32 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 19 Dec 2022 09:18:31 -0800 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.2507.16; Mon, 19 Dec 2022 09:18:31 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.2507.16 via Frontend Transport; Mon, 19 Dec 2022 09:18:31 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 19 Dec 2022 09:18:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XdsKq8DhMNBoUab5IiVgfgxqIF7h6quKC0vaJ01KRwRsQ3f5Mkqn7NOkb8BzFN0F7myyYdIPuKHkrmbvkQ5Q4DcMBDbV5VsPlY+lqkaDBy+UAfX37joYkVDej8+l80MfNx3ihN3gGDthKD67x+xITJb7XMt1jxYju+3uGhDc/AB6RjLX58xzwm5XfpYiKxCcW0BL7c2y7Oqe8JVBIDiA5h1y7LkNfyPZhlFQV74DlkE8n6flujYIs08ZciKE2amOlojX99IAi9a7WZalU0hCvBEaIoYuy9Gycou1LbReqPWpzaIshmgrVEHjgiutiWQSIYHRa/nBQrck85Jd2mJSlg== 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=hVXdcw3Eh12I8XXeZMw1Nnf5N/9KnEG0eA3zh1Y1ISs=; b=ce7T5wI4xqQA3gT0o29d+P9DgUZq0iCPYBQrQTNvnX56y3yAmj3FYMITI88b3xS67Btt1+DoHvCLmz1VSKxJPPSH7lJqWlNwV4vgzVTsIfEOyOj4sRwuo/Nhn+m/N8CM2ayhFOhb1F9zx48qNRNPi6gQfbfgnRSbNopMOkj3UrH54ITzPoe0LLYE3S3PRmBYHNgJsNj1Q1TX92PbrYR7UfMcNa46ufA5lLbEYSRbK5v0YmwSDvvH80Z9unP2lBLiMUUy+mzlSjO1BsftgV7e0wl+IlbaKmSsp1B3apyFcrUHLbq7NDbjS5Vc9/t+0hR0R6ta9jUUKO9ylcYEJgxwFA== 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 Received: from IA1PR11MB6418.namprd11.prod.outlook.com (2603:10b6:208:3aa::18) by SA2PR11MB5147.namprd11.prod.outlook.com (2603:10b6:806:118::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Mon, 19 Dec 2022 17:18:28 +0000 Received: from IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::e4f7:a82d:dd09:a55d]) by IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::e4f7:a82d:dd09:a55d%4]) with mapi id 15.20.5924.016; Mon, 19 Dec 2022 17:18:28 +0000 From: "Carrillo, Erik G" To: "Naga Harish K, S V" , "jerinj@marvell.com" , "Gujjar, Abhinandan S" CC: "dev@dpdk.org" , "Jayatheerthan, Jay" Subject: RE: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic Thread-Topic: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic Thread-Index: AQHZE3Mz2Yqpw/2Oo0yxHjm8FGwl3651chiA Date: Mon, 19 Dec 2022 17:18:28 +0000 Message-ID: References: <20221219053315.2538180-1-s.v.naga.harish.k@intel.com> <20221219062852.2557488-1-s.v.naga.harish.k@intel.com> <20221219062852.2557488-4-s.v.naga.harish.k@intel.com> In-Reply-To: <20221219062852.2557488-4-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR11MB6418:EE_|SA2PR11MB5147:EE_ x-ms-office365-filtering-correlation-id: 4f19abf9-15d9-46f5-564d-08dae1e50bc6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: t+VmbRgseeiJdZo9c6XHy2zPljeVrrgIFDzea3z01kbTGavlnrfc9EX7hUoEIngJYyhF7uMX2WjygSNHQkQ2uwNqmqzN/LrtItnUM/kx2+ojp7O1tLU9Wh8JXzuemnudEW+sbUvXkb265w12FKPudEet75m46CsdX8SLQktR8BMIDw5mfJgMrQeRyCKxKujIERStdrDi7ziH2WfvOkwqKe6kATTNAkz4g0XTdCo1ctrSQLg3o0lV9M7NIzGSDeT9f+DoMh/5/w+nUqNXtfuqqf9tZL4p3IeIrJdKbJQdwyqrN14BgMpsqq9f+CC42PrCwguEYpMwtiSjOJsJIedXRel8+35QZ3oICXmmeLuCn3n119V00EYsswu5h5m60EAg6w8U6F31wqTiGjDFl0xoVKhrb7eh8ACwdLziMmHUhR9bzoOR5g4r0iFbaQ04FsFmn/zt+tMNNM/lsXKb3kNDpwrM2iPI67dJIuDBPGwngBWiFIoxHEn8EqHePrVQWDi/2rpWHaydqP6IZiXV3Nj99AYoiZJQXeWiQHZMMS+hR4rBppDrTJF74zVetVZs21GwaFGmQqh8BtVQzBAULjQfE9LIkA0FuLxAhrkukiTEFvIk2IiT4jqamFFp6enm9K6yM0kmvwLluo3zBgL7P+2aePw3vRB71LbUpneIVtYUVed1Nj0XWanENVME8bjxG/wXPnKpxlePrJw6LZUPD1MpLg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR11MB6418.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(376002)(346002)(366004)(136003)(39860400002)(451199015)(66476007)(66946007)(76116006)(66556008)(86362001)(4326008)(64756008)(8676002)(316002)(52536014)(66446008)(5660300002)(8936002)(41300700001)(186003)(107886003)(7696005)(33656002)(6506007)(9686003)(26005)(83380400001)(53546011)(71200400001)(38070700005)(82960400001)(6636002)(38100700002)(54906003)(55016003)(122000001)(110136005)(478600001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5O41J5PRP0CpbAWDt9kLDqUa+j6hXLeBA2sqcXAIUR/jGHVQCqmkwXY4akXA?= =?us-ascii?Q?pHQF5Ht+dX6Bs/cGadqTp/cKjXi5ARCavVMU9dNEUpGpSqUZO52cEWdX+QsH?= =?us-ascii?Q?6HySFQZIc/oFmVy9c1iJxVEfirGlUx0T3WFQIdZ5wTeGFlqdBAqD8WAwAnSk?= =?us-ascii?Q?Jd1EYqBWqOPCYtYwMvBAk1XaiN0UEPE1npsdLm93hOMS78rGLfN+dbrJUw5v?= =?us-ascii?Q?BPmII3r9Ks2rSQp961cQRGwBH1Ld9guhp5XL3yUlk9u+KSNpACjPYUPP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kI+0SKXSq0E6wh8XwgCUeCKUsu0jPQqfS?= =?us-ascii?Q?14m9jOxsj9BGYeLx7WANfX1NgDu9eHuBDC7/xoaGA5uDSetTj5c/eddgE6s7?= =?us-ascii?Q?HH9665BS6vHKwna7YxhZfJ2d3T2hfGYJMdLI4rv9TSre89XtCyCPKEUMSK2U?= =?us-ascii?Q?tpFsnYOpxb/ppeEAWF66BHGmqvjvs2WS80b9FGAYo7W03xh/DhcfhNB4u3SA?= =?us-ascii?Q?rH6O0JIcO4z7IUFhKNKJmy9bJGymOd1cKMkZV+pnUe9hmDb+MMALLns0nyBZ?= =?us-ascii?Q?yyiPlu4WQcuBlTOJorpR5pzf4PzBpl5PkWwvZEHDbggWMNToW//vcVEF2mGH?= =?us-ascii?Q?mgVjPJJr3mQzY6egnzWYbihrcQwoeRZ/uRotSwOwRlWuJdl9mbCH3Ieezy6T?= =?us-ascii?Q?sfWEDQZNsWVWPdxu5PgxtRzM4/OO5Yy/BdB3F6Kap3/0IVHDHjGT9qBdTBeh?= =?us-ascii?Q?uA=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: IA1PR11MB6418.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f19abf9-15d9-46f5-564d-08dae1e50bc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2022 17:18:28.7498 (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: iUfMAwCqqaGUQVKeZnPyV/SsnsNcs9dZ+VdjMqRyjHFimNNUDFhB3yFa9Z3jHLL8Scth2LU61wJ0NVQ4fLHrWIfRUWLBCKquz3ATYH55a3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5147 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 Hi Harish, Adding a couple of comments inline: > -----Original Message----- > From: Naga Harish K, S V > Sent: Monday, December 19, 2022 12:29 AM > To: jerinj@marvell.com; Carrillo, Erik G ; Guj= jar, > Abhinandan S > Cc: dev@dpdk.org; Jayatheerthan, Jay > Subject: [PATCH v4 4/4] eventdev/timer: change eventdev reconfig logic >=20 > When rte_event_timer_adapter_create() is used for creating adapter > instance, eventdev is reconfigured with additional > ``rte_event_dev_config::nb_event_ports`` parameter. >=20 > This eventdev reconfig logic is enhanced to increment the > ``rte_event_dev_config::nb_single_link_event_port_queues`` > parameter if the adapter event port config is of type > ``RTE_EVENT_PORT_CFG_SINGLE_LINK``. >=20 > With this change the application is no longer need to configure the event= dev > with ``rte_event_dev_config::nb_single_link_event_port_queues`` > parameter required for timer adapter when the adapter is created using > above mentioned api. >=20 > Signed-off-by: Naga Harish K S V > Acked-by: Abhinandan Gujjar > --- > v2: > * fix build error in documentation > v3: > * update doxygen > v4: > * fix programmer guide > --- > --- > doc/guides/prog_guide/event_timer_adapter.rst | 17 ++++++++++++++ > lib/eventdev/rte_event_timer_adapter.c | 23 +++++++++++-------- > lib/eventdev/rte_event_timer_adapter.h | 13 +++++++++++ > 3 files changed, 43 insertions(+), 10 deletions(-) >=20 > diff --git a/doc/guides/prog_guide/event_timer_adapter.rst > b/doc/guides/prog_guide/event_timer_adapter.rst > index d7307a29bb..b457c879b0 100644 > --- a/doc/guides/prog_guide/event_timer_adapter.rst > +++ b/doc/guides/prog_guide/event_timer_adapter.rst > @@ -139,6 +139,23 @@ This function is passed a callback function that wil= l be > invoked if the adapter needs to create an event port, giving the applica= tion > the opportunity to control how it is done. >=20 > +Event device configuration for service based adapter > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can use '^' instead of '~' here to make it a subsection. > + > +When rte_event_timer_adapter_create() is used for creating adapter > +instance, eventdev is reconfigured with additional > +``rte_event_dev_config::nb_event_ports`` parameter. How about something along the lines of: "When rte_event_timer_adapter_create() is used to create an adapter instanc= e, ``rte_event_dev_config::nb_event_ports`` is automatically incremented, a= nd the eventdev is reconfigured with the additional port." > +This eventdev reconfig logic also increment the "increments" > +``rte_event_dev_config::nb_single_link_event_port_queues`` > +parameter if the adapter event port config is of type > +``RTE_EVENT_PORT_CFG_SINGLE_LINK``. > + > +So the application is no longer need to configure the event device with "application no longer needs" > +``rte_event_dev_config::nb_event_ports`` and > +``rte_event_dev_config::nb_single_link_event_port_queues`` > +parameters required for timer adapter when the adapter is created using > +above mentioned api. > + > Adapter modes > ^^^^^^^^^^^^^ > An event timer adapter can be configured in either periodic or non-perio= dic > mode diff --git a/lib/eventdev/rte_event_timer_adapter.c > b/lib/eventdev/rte_event_timer_adapter.c > index a0f14bf861..5ed233db00 100644 > --- a/lib/eventdev/rte_event_timer_adapter.c > +++ b/lib/eventdev/rte_event_timer_adapter.c > @@ -88,7 +88,20 @@ default_port_conf_cb(uint16_t id, uint8_t > event_dev_id, uint8_t *event_port_id, > rte_event_dev_stop(dev_id); >=20 > port_id =3D dev_conf.nb_event_ports; > + if (conf_arg !=3D NULL) > + port_conf =3D conf_arg; > + else { > + port_conf =3D &def_port_conf; > + ret =3D rte_event_port_default_conf_get(dev_id, port_id, > + port_conf); > + if (ret < 0) > + return ret; > + } > + > dev_conf.nb_event_ports +=3D 1; > + if (port_conf->event_port_cfg & > RTE_EVENT_PORT_CFG_SINGLE_LINK) > + dev_conf.nb_single_link_event_port_queues +=3D 1; > + > ret =3D rte_event_dev_configure(dev_id, &dev_conf); > if (ret < 0) { > EVTIM_LOG_ERR("failed to configure event dev %u\n", > dev_id); @@ -99,16 +112,6 @@ default_port_conf_cb(uint16_t id, uint8_t > event_dev_id, uint8_t *event_port_id, > return ret; > } >=20 > - if (conf_arg !=3D NULL) > - port_conf =3D conf_arg; > - else { > - port_conf =3D &def_port_conf; > - ret =3D rte_event_port_default_conf_get(dev_id, port_id, > - port_conf); > - if (ret < 0) > - return ret; > - } > - > ret =3D rte_event_port_setup(dev_id, port_id, port_conf); > if (ret < 0) { > EVTIM_LOG_ERR("failed to setup event port %u on event > dev %u\n", diff --git a/lib/eventdev/rte_event_timer_adapter.h > b/lib/eventdev/rte_event_timer_adapter.h > index cd10db19e4..4b757773db 100644 > --- a/lib/eventdev/rte_event_timer_adapter.h > +++ b/lib/eventdev/rte_event_timer_adapter.h > @@ -212,6 +212,19 @@ typedef int > (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id, > * > * This function must be invoked first before any other function in the = API. > * > + * When this API is used for creating adapter instance, eventdev is > + * reconfigured with additional > + ``rte_event_dev_config::nb_event_ports`` > + * parameter during service initialization. This eventdev reconfig > + logic also > + * increment the > + ``rte_event_dev_config::nb_single_link_event_port_queues`` > + * parameter if the adapter event port config is of type > + * ``RTE_EVENT_PORT_CFG_SINGLE_LINK``. We can update the comment here in the same way that the .rst files above ge= t updated. Thanks, Gabriel > + * > + * So the application is no longer need to account for > + * ``rte_event_dev_config::nb_event_ports`` and > + * ``rte_event_dev_config::nb_single_link_event_port_queues`` > + * parameters required for Timer adapter in eventdev configure when > + * the adapter is created with this api. > + * > * @param conf > * The event timer adapter configuration structure. > * > -- > 2.25.1