From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0067.outbound.protection.outlook.com [104.47.42.67]) by dpdk.org (Postfix) with ESMTP id 10C4337B0 for ; Mon, 4 Sep 2017 07:21:03 +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=1lHypCcKQU63IWsx44QPRETsmvUNL5SuJB7G7qPZ9oY=; b=e3y+Qq83Z7H+k6XGtt8dpO7nX9KJkgu5XWJPzpmDc2X8prcv1jYjCiuYeFe3pDBYPDPZIPUrZF4NqdPlfoXF1Jn56LY4INO+BAjWbssiLGWDldaN+9GLfaVI4jTiKMXn1OM5o1IXaH6BtFjwwJIJP2p1GSJbdoqem38cHPgM4Qs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Mon, 4 Sep 2017 05:20:58 +0000 Date: Mon, 4 Sep 2017 10:50:40 +0530 From: Jerin Jacob To: Harry van Haaren Cc: dev@dpdk.org Message-ID: <20170904052038.GA11420@jerin> References: <1500900500-144237-1-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500900500-144237-1-git-send-email-harry.van.haaren@intel.com> User-Agent: Mutt/1.9.0 (2017-09-02) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (10.174.56.29) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71c9cc83-abb5-40a9-c340-08d4f354ba91 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:04HpH4fcjO+QnIjCrx51OaNDW7y5DiRyAEVakcELNgrm+5+50tH3RuVoOvodr86K2EGXDutlZk41YXjWE5VZSa+AqWS8g2+LDEeJXds/UUIfg2S39egZSE0zdyBbP5C80R4phQXzFJdbQ6fW4CDTrk3cto7ldO57AB/F5yvprYdwvBHiEXzUcXYr7B7vBzsBg8xEEZR+BMDPEeS7LcwU0R+pMWhdIcof9c4thXmzPQ+hmHTYWwsnBRFah64gGfgq; 25:0VbqDqCNrt/Nn36M5FJ+I2ZfUHrmU/54s7vJcuKoEWKhUm5JtwdHNLQlx7zY0cX4rCqeRDaiuIyZ60TpShBR28x5zwXdIbfBDlGXe6XlfKbSP1gXEMMXBW+7GQfWYgh0mg5EMzWDKEc6PvXTohZnQu1n2vFPwnSj19DRgTA+O+yZ/bp1aUmbYCRIbTdyFAHOKhDiyFSvBhRDYwBPt5Y06F2/3SEwHrfptPKjD9mMhD3KgTXZjaE+UKjc7dSrGXi904o8YIJVapalKK+nXbYYzB1QTA0TOeDmGnhPC0ts6+Hi8tLiuAbeqaBazKniTveNbCwfvc/AKPAb41jmsKgKxw==; 31:RsiH8KV/OYoSnueVxP2t65ZwZb0Xa5C/EzC+ca3T5hFgxk1uYNwNXGUBELKwBqt8j1AUL0B5JRaNOY/FUtqvd01Ayd0LJN3wYAb8jE0vtYZVnCP6RGlt55173QzrdmI96O2vwpHjfVU2P1Gr6AevrljBrBIB2KLe+2eNeIGWnAJQgE2TetatzhE83SUZELW9wlIqNGnS7WzO+WrL/hrt34C61mubgR4WF5Guf6qK010= X-MS-TrafficTypeDiagnostic: CO2PR07MB2520: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 20:vie3Jl8LkmhGTkc0CDKUEeyGWdCwviW7MH+TboosMD1xEJibNAneyWoed4etgr79theVE1m2EQ+meamtTWHXjgHGgjQLG4UVCh9sl6S1rQq4gmC4zwmbuow4zi0zKXd63nTIZJEKlKezaPxnrgtYOZbLprSBSi4zScECsacc0zp1dXX0zI64ms9m1Zf+2ymiYuJcCAQI0kX98m2UoYmnKbcC5ygbRegDpDsZCXQz0SyjtUK+p75mFD42R3gxsTwOMTtirjXMepl/lyg7B88Sq7mOiSDe6acrjeMbyIRfJgoGs4IP6jkjPWxxuN8TYps5my1+DRrOTU94dImoOOrJNqJJGCLvt2B719TC1Q++nHELJSaaDuHX1Zb7yTt7Sm6+gXpt/to9R3/u3P+1gEKYuD8gqlwIAl/cJaANlEHwpNYSIV1GQcTwGaauJhDYMD9XLHYYVySUTbgO+FiLzEjzLRjv1FkcBDMfthWOJIKNvGAnJWLP22CtaXrwp8v2lYi4y4Lxmur0sTz4k0Bvh3ZU/FAtkZebWKSp5dsuTINN5EEKAgshQEkyIqmkW8eZwUvtwbZiTshHQ4PQ8qwZGX80kvTD78/MyyYec51T/51070o=; 4:z4D8uwxYqRbMKeMaqMyfJaBNGXXEKrv1t/CtXFcfMtFxcZWt2KtpmdI/kVYkMaK8SW2d0Xzn56MDWSAGXIW4frcPRszV1BrbvqQIxRPzvW+8lAr6Wy9PF8FLmRSTmLa5t9LGTboremLKbLdJPpeo0jm4FX1Yn/oqdRdHTmHqWiWtjO0LA+346wTG1/qTjLXhGdQL14c67v33mB0hI24tuplrv2UmVFZcz5xOvGcyOxUpoJYtrQsoC+AeHohwR0QUvVSeHtURXvhSyul1jd6JurwJyGWpCrnyJxrCvO6z7IU= 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)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR07MB2520; X-Forefront-PRVS: 0420213CCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(199003)(189002)(6916009)(42882006)(2950100002)(6666003)(9686003)(42186005)(305945005)(101416001)(189998001)(50466002)(229853002)(7736002)(54356999)(76176999)(50986999)(6116002)(72206003)(55016002)(2906002)(1076002)(8676002)(3846002)(81156014)(23726003)(81166006)(8936002)(106356001)(105586002)(5660300001)(33656002)(33716001)(110136004)(478600001)(4326008)(83506001)(68736007)(53936002)(5009440100003)(6496005)(4001350100001)(66066001)(47776003)(97736004)(6246003)(25786009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; CO2PR07MB2520; 23:z5yldwzj1zKK2E/vJ4pNa6qT3yVypPsH04rRdMual?= =?us-ascii?Q?OMej0cE4pgCvEW0qV1h22eU2GbrtD8o4WSesLdxFg/mKS+7tJRLjZsd3hHvq?= =?us-ascii?Q?Vb8Vtz+/Yul8gK5i5Xpnvc64MWFN8KzOK+8lXb2yji04NaYnE23Se+BJkF9q?= =?us-ascii?Q?7aTr0xDoUwn7C9KayAI5EXixn5qdklATUus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pamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2017 05:20:58.9468 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 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: Mon, 04 Sep 2017 05:21:05 -0000 -----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. > > 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.