From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0063.outbound.protection.outlook.com [104.47.38.63]) by dpdk.org (Postfix) with ESMTP id 4CD02376C for ; Wed, 6 Sep 2017 16:57:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7v7/jRWlKaycV2OY0LsQcpv5lmnJf8H8lvBvVHdqq28=; b=b3Itnd/GJYoHdHp7QiY8KCqkpHR9udzrSjNmhMUQNDqK5CkO/wFMimUJNP906Xhmqho7i4JtT65AbROwGV8aEL9r6jHYYER26CxVR6OoHfRNOzR/O3r8qIPSiY/LpoJFa9Xhl09i7SZ4mbDPLZckSZE2mj8bxG3BZnZXMgnF4SI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BN3PR07MB2516.namprd07.prod.outlook.com (10.167.4.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Wed, 6 Sep 2017 14:57:51 +0000 Date: Wed, 6 Sep 2017 20:27:06 +0530 From: Jerin Jacob To: "Van Haaren, Harry" Cc: "dev@dpdk.org" Message-ID: <20170906145705.GA30064@jerin> References: <1500900500-144237-1-git-send-email-harry.van.haaren@intel.com> <20170904052038.GA11420@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.0 (2017-09-02) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0015.INDPRD01.PROD.OUTLOOK.COM (10.174.214.153) To BN3PR07MB2516.namprd07.prod.outlook.com (10.167.4.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d16bc891-4b2c-435c-13d4-08d4f537a632 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR07MB2516; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 3:5HWngBlvWKVC13n+0HYMxQy0VdoZMAIDhfO4EDm/aCntkRIWKJWgPqNSfR2LXnIJgep6ApUV5B7h076DiNCd4g363jfWtLauh3TXs5hLQBW4EPxCZY895O7Z8Wieq4SOzX/OsgRWl+NLfM/necNX2lwEVMQ+1eHdnVOj1wKo9VkX3Wp89g7SfO7J+mvztbtorR6aDxAR92U9Iszrmysq/KDu9zI/J3gjyeoKGtaMkWkkxU7/pNuP+RUvmrttw6lW; 25:TtErw04Uj71lVPvcqUXUQ4w20MM3eoYqbNWx2VWjP9NBUiO3eZOesmAGhVenz3aziO3yePEKAtUc+GmnpJkBvapUEEPXbwJ+IXBkXb625AS9dwdFZtsZeuc6M86owqRh70Ka8HfHdRDDGjRtXyrX2TvvM2ixha+CKjAHXAx25a8hsTN+VurV78qHtvg3CxT4G4KDPsmFNRad/wXhEaKnIiQgxAbKHe4aOrlLreDDUBQZmKiK1MOdJN1oTMTPhEXD6NVo3cnVrAPFIIuCHI+ddis6FHgAv/QNam+OYzqRzQbtPD45OgxpdjfxLDbFGGlBctTaqJ8TnkBvV5sehfclGg==; 31:BGGZTzN2vyc74II+jhE5zVeFIUFI75sFU4CjWLAcdsZoOe6qtxWtNyZbK7SkXStwucYxRVwrJhOKvx1f68sjs+9Wxv+afPBvPCPMJ0iWHZ6VqaTL3/rOST9WUHTUA0g2OBmuClZld3H6/dW6TPHmqPDxN546dZ/UIUgY8cFGW/qTjA/mXHMW7RZB0l/2PUuGOW0wliir8fIZeN1eu6+pAWAyZUzYGFJI4vEax2/aD+k= X-MS-TrafficTypeDiagnostic: BN3PR07MB2516: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 20:vMDpbWk9C6EfJ7rE33LYL52lOIfMFhkTDEU6GKf0HQk1mOmnCyT3q/Mj4rKaXwHK26P0vh7I87EQr2fXEciXfs3ngovJ1+Bsgf6JnW3qY1sXA62GGdD3zpFlZMMGs+Uzak7rWw5h//RCVl3AMIybrrOpAOxGYC3laZbwNzszvBsxsWNHZgPmRrgLQ3HIO7KRyYSPhtTUoA0mvGZ+/RBlE20hG8J+7KvJ2H/r15F3wQHP8ZoTfH1Pl1XH9nrXiztO+XAz7rracElUos4MwkuO0P0vOgJZSe3W23tIgSJPbJ+U2t/tcXd1VamQ2oqsKYPxh57B848T02HWKu9ainIcFpX4OFKvIHWbHcRY3XcbEJK7bX5wAOwPnGF9/9/j/FKn0Eg7X8UanNUDhP51p7Ju5scz8uFx31O85sx7y4AUAP39aX5KgNAVoI2LhYaYD9yQLUtrFJLOaRaeK6Ylqg4R6cG+ucsIbKHHSm2q+T0uGedIB+Q2HbnBxalsHmML2hJePwk9omymf6QiaNW2g3T/OCcmZ6NROaLIajpq3nobID/Eo+zFqhdceBmF2EUnfOfkPDLcEJAqTVsIG+SH1hqw9/GdrsnSCTHv/qrjmeeDhSg=; 4:y5EoQH1B6GdGUZAYZkyifm5/oHSCVXqx+Hnt1DvQkBKSsOTPOT9g5hzHH7vMKZS7n0qoZanO08jxDDa9WH62/ro+yPEzFoOfXbRKOIiw2blFCiMZD42oVwd+wZUqpu0p/0QLFnFVo3WdpzumPz4IRLNCi+9F0N9QyV+7TzCO31DKI9tA3CNHWt1BlCVSb93WEg5aPm42rmGTF4QZ5YgJ1MVO4rsW9avP5myjz57/CjXGkCUDQYSwFXs+5LCl4llqqIZLjRrUrVYPKbwwmqZYnslfEAWIHGxPuHNMDaloKbs= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(10201501046)(3002001)(6041248)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR07MB2516; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR07MB2516; X-Forefront-PRVS: 0422860ED4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(189002)(199003)(377454003)(6916009)(478600001)(42882006)(1076002)(6246003)(68736007)(4001350100001)(6496005)(53936002)(23726003)(5660300001)(7736002)(5009440100003)(4326008)(50466002)(97736004)(9686003)(47776003)(110136004)(33656002)(55016002)(6116002)(189998001)(3846002)(2906002)(25786009)(106356001)(66066001)(81166006)(8936002)(8676002)(42186005)(83506001)(2950100002)(105586002)(33716001)(50986999)(72206003)(101416001)(53546010)(6666003)(229853002)(76176999)(81156014)(305945005)(54356999)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2516; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2516; 23:clLHDMPcah32WzyUdoBBTYnU5g6+MMOgA7v6RX1oK?= =?us-ascii?Q?liCHA8NDofOm6bkuVxBTwbeFBkxYJlkyceBh+1Nrhlf/Nde4HVMG5giVkkyo?= =?us-ascii?Q?355+Nf2oSmteK5njPzrvCEItnv+edRiGmPYSkEwi6dBHCzJaBDBhzF0VLrAO?= =?us-ascii?Q?DAXokNdDc4aUCQqA+zsKZf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me3LlD9v+nJvomzDklxYE/8kD6XNy5ASir49YpQbWfGZYFYjjEsdkpVNeEBOl4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2017 14:57:51.7326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2516 Subject: Re: [dpdk-dev] [PATCH] eventdev: add dev id checks to config functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 14:57:55 -0000 -----Original Message----- > Date: Wed, 6 Sep 2017 14:45:29 +0000 > From: "Van Haaren, Harry" > To: Jerin Jacob > CC: "dev@dpdk.org" > Subject: RE: [PATCH] eventdev: add dev id checks to config functions > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Monday, September 4, 2017 6:21 AM > > To: Van Haaren, Harry > > Cc: dev@dpdk.org > > Subject: Re: [PATCH] eventdev: add dev id checks to config functions > > > > -----Original Message----- > > > Date: Mon, 24 Jul 2017 13:48:20 +0100 > > > From: Harry van Haaren > > > To: dev@dpdk.org > > > CC: jerin.jacob@caviumnetworks.com, Harry van Haaren > > > > > > Subject: [PATCH] eventdev: add dev id checks to config functions > > > X-Mailer: git-send-email 2.7.4 > > > > > > This commit adds checks to verify the device ID is valid > > > to the following functions. Given that they are non-datapath, > > > these checks are always performed. > > > > Makes sense. > > Great - lets discuss implementation ;) > > > > > This commit also updates the event/octeontx test-cases to > > > have the correct signed-ness, as the API has changes this > > > change is required in order to compile. > > > > > > Suggested-by: Jesse Bruni > > > Signed-off-by: Harry van Haaren > > > > > > --- > > > @@ -1288,9 +1293,10 @@ worker_ordered_flow_producer(void *arg) > > > static inline int > > > test_producer_consumer_ingress_order_test(int (*fn)(void *)) > > > { > > > - uint8_t nr_ports; > > > + int16_t nr_ports; > > > > > > - nr_ports = RTE_MIN(rte_event_port_count(evdev), rte_lcore_count() - 1); > > > + nr_ports = RTE_MIN(rte_event_port_count(evdev), > > > + (int)rte_lcore_count() - 1); > > > > While I agree on the problem statement, I am trying to see > > 1/ an API symmetrical to ethdev APIs. Similar problem solved in a differently in > > ethdev. see rte_eth_dev_adjust_nb_rx_tx_desc(). > > Just want to make sure, all the APIs across ethdev, eventdev looks same > > > > 2/ How to get rid of above typecasting > > > > Considering above two points and following the > > rte_eth_dev_adjust_nb_rx_tx_desc() pattern. How about, > > > > Removing, > > rte_event_port_dequeue_depth() > > rte_event_port_enqueue_depth() > > rte_event_port_count() > > > > rte_event_queue_count() > > rte_event_queue_priority() > > > > and change to, > > > > int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, > > uint8_t *enqueue_depth /*out */, uint8_t *dequeue_depth /* out*/, uin8_t *count /*out*/); > > > > int rte_event_queue_attr_get(uint8_t dev_id, uint8_t port_id, > > uin8_t *prio /* out */, uint8_t *count /*out */); > > > > or something similar. > > Hmm, I don't like that we'd have to break ABI every time we want to add an item to attr_get().. so adding a parameter "attr_id" would allow adding events in future. This solution feels a bit like a re-implementation of the xstats API.. > > Thoughts? -H > > > enum { > PORT_COUNT, > PORT_DEQUEUE_DEPTH, > PORT_ENQUEUE_DEPTH, > } > > /* retrieve value of port > int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value /* out */); Looks good to me. > >