From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0076.outbound.protection.outlook.com [104.47.42.76]) by dpdk.org (Postfix) with ESMTP id 482C21B31B for ; Tue, 10 Oct 2017 16:56:42 +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=ZuITPaTry7nFIobnJETJvoDVR5/V8iR5UO0NwuwcKkQ=; b=l03BNeI0HTb5kW1Bpnp16XCvZK+OBqwG90qztl6qL1Jn1TcZosGYej4vnlbmxKkku8Z4ZYXd8X83xZMSO/+JGKiEc/2eAIMQQraKulRqkCO4pG78dEkYvJVNdtP1PH2M69/UXudXlBZs0eagX0aJ7gkEQX/hWIgbGrf7HDqehoY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 10 Oct 2017 14:56:38 +0000 From: Pavan Nikhilesh To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 10 Oct 2017 20:26:15 +0530 Message-Id: <1507647375-12820-1-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0027.INDPRD01.PROD.OUTLOOK.COM (10.174.214.13) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f8bd8bc-c3be-46d4-51ae-08d50fef1d23 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:jrtekuFwnr9zy/2Ny3oIoY1VQx+U97qW542F+9e3/WrdLJYWdL3r9H4Cysg+D0QuDw9JyOrDQ/JEdiPVqZKMpVogUbfuSPrV9mTTQoj3IP2EnF6kreIEY2026ezAa/m/HTJEHx9s6em/gHMfdYkjQ6qAImfRGJWKUoQD9wQzRzfmt6dmmo5Ok/gFcVBdxtg2RS70hvL3zX6G3r7veBI29JG/1zcJeEzS7hxFhh3FVkjBC9WErOrRyFctzdjbarM4; 25:BAxrwwLYkVmFjvUNjj3K3cjvmMXbz3Kp8wPp1eq0BweoOMS+x2TV7xd9IkeOWgOeu9yx0c96Q1QWWXD/jq0QbVXNLkfvneBO/7E/n1UP/MPaRW0REjv7ISdibZq3T1e8r1mvWKSwgtJRS0aQy2uHrk1Xb5VxGuycQiNv7lpoP14yLN9nTk++IBODE6vaBcn0V8F5ogWiiu8LuS5N/Dsbr0425REW/5e0FQQwEnH99hPUageY8F1v7c5VOU0maAazUGbHrefdyPXXK+xO4gRipWIYIXeigVVhlMLLs2INYMJu++hk2FajCTCdUz1a6pvjXin9pMImDzEZ/wXJ44d2wA==; 31:kJy5xyMn87ywCrZZ70bEQe4VdpjMqugmBffbu/Y7VKJDSNLNpIHwEw6v2xYFJuVSwV69HUWfDJAnCTgdUkA2bR+/4k0UVgVgmqXwshgFEgnhNi7KEu7xmoEOMc2tN4wEDBVm/JSqC+YgrHP0I1J3vy+d+OEogx1ikhcYu6rZxpwozl7qT73v2uqvbSs/sIDujfVIbmcswoSOmRYDoM17C9fuvahjWf6ZQzXu4dDcnKI= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:JXQRHXvLqpCWQjTBg/J+ut8hPF5FosISlP8rEZH/vhhf67/1Ik4W8udoDCC/9C+DXtfusUiX7q96KM3ZXg+mi6OGVv4zqADNuZTq7ZI0iYITKjYy6oCQvebfwRxQRDf2x6keqU/sUqivwA3cpLLDi8cgEGJmC0dINiPFMmQcdgjfwf/McJe7uUsmG9vS//b2UDqVnNudnwUX3JuZUVc1XsmB1l81C7y71OdK/v/as7i2/8pLd7GSS00V65nmxZGHkvwKfu7OAku2FXKSkV2iEnqwKaQDGA60/h9Am1+3x4uxU/LhWVLb1N7QENFwR+MbMqs77lHkL3ON0HVOFNCEaNEBuI513P2tuM9hsailNsxJclfAO4xiQ7XF+1g2ZmCYsyUm/U2aY9iolkXHHYFIlpbD8KCqDd4q/1/UOnkQff94lTcHhXTTFf7LZhuGLZq7motxX6Joj35zwfyjLOxa/FHtfNMO4nzBEBSkm0I6saFZBjTJJ3EjNSWbkTHRwX7OtOkNd1bBLLQejDxgWVpBP4yFuc2QgIWg75Lt5agKvsrYe7/E3GQjf5dOCmKNR+m1oGpK22lvhTb630m3Xp3xkX57TyIW2uXXGZCn7aYZowU=; 4:ds8mQ77xEuI+ZKMnZ95W9MrBZADomMZzSZOEtDTlOCMqS90N2Vz70Yg2dnw7nuw/ub6tglgs7N1WxEo8YfIRk0FBlUlXaKxN9I0NFr2ZL7+IUHdbATINrj2klDAgrPqjhCd2qrpb2qHmhabszFBZ8p8v2gl7pP9+KZqBdHtCW2Q2vgPinc6eAeQLh3eIGetPUE+GSNfpFoHk6AqE8fz1wX7iywiUoyfP0LR68tkbQVwHrwYiX2di1wWHFv39nJOI X-Exchange-Antispam-Report-Test: UriScan:; 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)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 04569283F9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(72206003)(6916009)(6666003)(16526018)(3846002)(36756003)(6116002)(7736002)(478600001)(6512007)(5003940100001)(25786009)(305945005)(5009440100003)(5660300001)(53416004)(107886003)(6486002)(6506006)(2351001)(33646002)(2361001)(4326008)(106356001)(42882006)(48376002)(2906002)(105586002)(53936002)(50226002)(50466002)(8676002)(81166006)(8936002)(81156014)(47776003)(66066001)(68736007)(189998001)(16586007)(97736004)(101416001)(69596002)(50986999)(316002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-LT.caveonetworks.com; 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; CY4PR07MB3464; 23:R6k5oMOHE/2xvm0wkqzbdNOPmSUt0zy9Y3kRHMcRn?= =?us-ascii?Q?Sxr22XlIZl68N1C9StQNHQGe7KnkQxNk8rK3wp4P73XQiXs7Kaas01RB5+ZT?= =?us-ascii?Q?9FtrNZPE3BDePwtKwNcsGgLln93SXit+WyOIPjlPlEEi2uNRkKvuGF4V88dD?= =?us-ascii?Q?JX5a6dYLp1r2lyV60tHukYyGKiTiZBsKyPLjbBtKXQ/Y2oawkJf1cLw2o3dF?= =?us-ascii?Q?PqBP5rGFSulnFTkz239TQRZuUIulA1N2oU4lns7XKNsI3X2cdXeP9hc09qHJ?= =?us-ascii?Q?BhnewVjjBMnueZcF2EW5KLt0R4Qib/l3zKNWS/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KolkU=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 6:5aEy2enK8ph0ZuqI9db+lZKXHTgk0Km+IX/46eVc5J4/ei92EXttu47hRA0LNrvIr+glQpIouHlPxaU4rgxNGk57Ury3KgU4KTVr/aR3/QnGpGsE05aYyvBz2fa7CFXcv3D2n3+8jy7wsjT/Gv2HwSzLI9+kZ7w6upveQCy9j7p6BY0c2M4PJRBlgSJxMNEFfYd/thipyzoj3qqAI3qBE8/MCy0SAenyiKPxK8K810x4T2+8oxCnofixogZLj/HTxAcCEZi54YRnfRiEf6L40eNu6ULd5eV2dFGyRmF3IzacRltlSGjtB3M5cq5o7E+xIwtkj2SczDTbiDXyZ991mg==; 5:V82jQx5rlOAo2hvhzIyMCJjC3aCb4n7/mlkLNuPgpd01FaQIXTqQ16e6cVCUfM6he4hVWV7KCRUVowfOfbgeHdLvmE0BqEM8BdqDrJpBRTkYjHLuOpWh2Mj3qJ8+Ug9tR83M5uzy8KvAzmjEUFLpnA==; 24:tPv392H7u+4Ky2RcyYlCwe7jhhrvuUsRKZq7kcrgTAUomcdTrs+Ij0U/IUx9Wkg3Kxc7HHUgUG0QCWTPd09EPrER/kju2snLTp5h/sC8xtg=; 7:PBSNKsAwpFcJBXdE4OUrZmHTU3FHQtLlSbhLxoGDZJmZ22H0KI88IaMGyw7D/dfwidevEiuIlvtNUm+ndsVWcz+RtG49UeYmyxl2vPeZYF53InHo0gcR2LqlHwN+uZHH/SkC/ydhTVc69BClfP83pmkvRlAHMbNcizqBtECsjh1zjahON2pkmBA/JjFHlHYUk7yr4LqiloMD+m1Hh70/Re2le1SugTE9lWgwKr551t8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2017 14:56:38.8559 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH] net/octeontx: use eventdev attributes to get count 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: Tue, 10 Oct 2017 14:56:42 -0000 Use the event device get attribute function to fetch the event port and queue count Signed-off-by: Pavan Nikhilesh --- drivers/net/octeontx/octeontx_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index d41904f..1e72d65 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -1242,8 +1242,10 @@ octeontx_probe(struct rte_vdev_device *dev) if (res < 0) goto parse_error; - qnum = rte_event_queue_count(evdev); - pnum = rte_event_port_count(evdev); + rte_event_dev_attr_get(evdev, RTE_EVENT_DEV_ATTR_PORT_COUNT, + (uint32_t *)&pnum); + rte_event_dev_attr_get(evdev, RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + (uint32_t *)&qnum); if (pnum < qnum) { octeontx_log_err("too few event ports (%d) for event_q(%d)", pnum, qnum); -- 2.7.4