From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0064.outbound.protection.outlook.com [104.47.41.64]) by dpdk.org (Postfix) with ESMTP id BF80D1B3D7; Tue, 7 Nov 2017 09:35:48 +0100 (CET) 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=p5ZCi+pviNUGI8RLIS9L6AxxZwmTCh1fwKR3vFvUOrA=; b=giH1aKW1TRgSNBEIphQQlNvKpFMmcolMnhvtsG4StikoP8FGKcp+TBYHPPatswvTD0cHIfVq4HUsnsIte8Aye2bpuyVB/WtiP3WN2qo+wplgSSrvhvWs89q5muTrfovvu0l9wWc5OivpleDDAyRxpsSxi9zyUxfOgBAjiGPmhUQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; Received: from cavium.com (198.186.0.2) by CY4PR0701MB3827.namprd07.prod.outlook.com (2603:10b6:910:94::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 7 Nov 2017 08:35:46 +0000 From: Rasesh Mody To: dev@dpdk.org Cc: Rasesh Mody , ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com, stable@dpdk.org Date: Tue, 7 Nov 2017 00:34:24 -0800 Message-Id: <1510043665-8160-8-git-send-email-rasesh.mody@cavium.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com> References: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [198.186.0.2] X-ClientProxiedBy: YQXPR0101CA0004.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:15::17) To CY4PR0701MB3827.namprd07.prod.outlook.com (2603:10b6:910:94::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f60ee730-99e7-473b-02f3-08d525ba8b7e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:CY4PR0701MB3827; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 3:UuTlESZzmUGlGBe4U+M9W150YI73HqtK0Gq0jL+7cgEVJB/w5PZN/3qLue5yXDlLyjouzWWWQdAzRn6I1CkiUXSHU62pG49ZRRGQ8pwK2m+6AkuOr7xYvL92Tjtlyw4XtcGARBkmxR5PuHAL13h48QnxdgPVLHhRulKvRDCiqUuDwwCSmrLJGsAwGscIxB05JRNFALBlcjiGERr5D+zjs0pBGS3O1HuJbIJE7p7dXo4YVaAM6V5JXMzJtBrTFf0T; 25:VWU0ldncHMuQ4PTTd/IcHNzdE9R+DqCzxyqV+5IEWMsTjIOzUjnfcmcEgsEeHDQMhBD2PDbHVSo/3GYNG6tmy8iq++w5wYEBaE1KBh7g9q/OJ0qCZWZm5pzqFfkhFxJvEhfrCr+AArc3nTXTzA7tOXmdOkvAOLmoxCCrznn+x2D3uLECZBnf1BVnYz2QBGDIsUOEHeHqNx4QuGvzfm7HP0IeR/e4j57R2rf6EQK+HHN/aig5Cv1agozefLxhDReYwtO1OlCALeDaBAmcF+9iqyVKBBl3+01Ro6e+uelI9T9EaYDNWF2hoPE43Xur1DV/12Spvl+MYYcKchTYIn6V3g==; 31:3gtWjtM3h2Ug2oL6I6cYXNI/gvsjX4ht7N3QMFKTOsfYBSLzFN9K2+Gr9eNC+2hvLb/j9jugtbZTYB5S952gLKxYH8yJDgjxD0ixDUVx1zolKy30vX0uguP5+R2CRs5jCspHARMHzQkmacJQpTlImlhd4C2S1fwlwlwx8qwVugvVPtCKHs1qzP86qSkSwnu6ReXUGDkxuaT3JIDozyH/tYPtREgYv8naVmoJsmqseGU= X-MS-TrafficTypeDiagnostic: CY4PR0701MB3827: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 20:yHTohEIKL5szoLvPURlw779Dlna87RsxUObPasPAazt1g+EyqjLnNlNr0/jzG9B2D6hzgUNe4Qrh4ddtT1nmohkZMUFmIXQuNjAlT5WJrmskWvlZYSlu/R60jM9V/t+fPOxqmBB3igpNndfq8f6I3h9p6DifXYJngNUQ1bAfkwu4z5uwDChP5JNtZazmGf2S1e09Oqch0rVHGg4+Y9mE9SR4k+mL/CA+mkoPSWhofh1wF1gEXrdGvanaJJuhPb88Z0+swZLv9nK+hTdmwjGRPmCKGEXpx+0bTo9B1PVmVRTIKwx52A3oYGW9mwEXdbZrSlYoUuiFmyI2r4p6Wn2XNPZskUssoLm2YxezWq+WAk1OWO+03tHDo7hlUm2ZcIYK4JGbxwCkOQ4YJivD3BF2Mjw9k36U+Fo1bNoB547WKC3Kfazssdu3mT6OeUbgv3xWwrCvcCqH4fAiTxsrmNql9bvUJ1ZhxmMzERESvpmp4bUZRMxTDiGeD2T1BRdvgCMj; 4:ZF7LTLSVKuchtDfnVt3Bu9yo3MqPtvYjqQlGAkgluWssZDuRLLWqew5ixX+sHEQRntinpl2kYmJjW2KcFqVWXr7yzdfh/6Qh6yqRgGV5zdrP5iHIrLvhrAIBB/cMBFyzAZQ6l0CHHyXwHLUbLHrgbKaz6gBOmvijP522sA14F2br5YzueK80e/whN2yuMpmKdqnmrkDm4ix4hCyUm791ZijoLYVAqM4dqUIOTd8WCpFYxez0fVVL170aAjwmYzcndSksfvcIFqqUOxr8+J/BpkfrX6E+GfXFSSET8i5tdfIb4Vo22JXPDUrBzZimsQyo X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); 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)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3231021)(6041248)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR0701MB3827; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR0701MB3827; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(2351001)(47776003)(50226002)(6916009)(36756003)(76176999)(53936002)(8936002)(68736007)(55016002)(2950100002)(4326008)(48376002)(50466002)(50986999)(5003940100001)(66066001)(97736004)(8676002)(86362001)(316002)(16586007)(81156014)(81166006)(2361001)(478600001)(33646002)(72206003)(6666003)(305945005)(21086003)(106356001)(7736002)(69596002)(189998001)(4720700003)(25786009)(2906002)(5660300001)(6116002)(105586002)(16526018)(3846002)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3827; H:cavium.com; 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; CY4PR0701MB3827; 23:yPRM6xdPN03N+sdSGgSnADAWrxJ0exJkJf27RxA?= =?us-ascii?Q?/iLF8EhhFxJOB2TNCSDeOIFlyNdQikgC9QuTAdzjTB571SeQ6RP2DQ9lV1Zm?= =?us-ascii?Q?YbxNZyuPAV/D3NdYaX89/9i90ywoT3fetWeGp8EZlU397sbNhSd2NVBoWxq2?= =?us-ascii?Q?yA+Y0wTpZqmE3kD75/RDDGUZ3MTwZeG5yOHzxh4rskRqoG52OoQ9QiV0Y5bQ?= =?us-ascii?Q?P5Wp/pWrXOcGzfS0vVfcb6dAr9zswQp4r0lQTtsOdTyBUlSn4LvDBI2B4CRX?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TdFVJ0HlNDcz42rzbhxSg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 6:eS6FajQ9Jm2pn6gIxCl91q+KYalrIGuMKXPCy8z56ijLh/YOd8MuAjNuN2yyWa+CY4RGVjE9EkBPXGKGHadOFtetCv1tCj2e6pDoabp9sRTgyC+gto2CVphneOVkS1ue41HtE5tpoG8EXpSVgGk6AFyXMwVq/BUHnnsK+VdLSaRqwJgC5tLDMVh15lpQiWMYHRK8aqektOd2RxfoMddSTHCLPrJkhngVD7zUljPTJpw4WnbzIjJXLfN6nt1QW420Yi3f4X7H5V5m9hiI4+lIgp5J9rSqpHlSi8XXQng39ghoyhXvUuZqR++tpcBgfaUMRZYoX8PPrNUIfZHSLU7/o09peW8ybvQFtrP2Wq8ZhPQ=; 5:2uOSOkgTaSalHR2ZyXxgC6snw6G5h1Nj1yNeaf09Wfybc0VyjzRJ2tqBQialuM7aCUPrn7kaPOp7Ez4XURydlCO5Z3+Flkd1bqaDwUP9JmyKHwEuF4+0ekcplzn2s3wHxhBB9gcvNswM1VyuqDq5iegVsoFmb3NrBDipp1aAYJo=; 24:xyf2ObSqcU9KpCnpA5eV9hXk/aXisY3thEKN43EbNskDhL4WcZMjzIKq2pg5SSeM9KeEA8iLs0nKZ2WuM+UUiEvrSLMU3jU2XqmUemzLFOs=; 7:xCLnwqrWzBJSIuticgo7rlZJ//RH26VisZ7AEHZsL9iSrbFWpNOXFn72yY7m3USRKVxbal+FS1Ka/twCC2vIsECxQiawGB4vgFVLDb1CheXGEhAtXTF58gIvNQaArPmC6sJl8II5CjojEMv815GHun3W0PDTGrMV5yuxenVyahxui6oFXT9imrZxW1wSrduqbUusuAZH4gtbT3odZtPdPeET7zq/6Jll7er0zalWsoEH2rVHdED6XRx/WqFDx9Ok SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 08:35:46.7385 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f60ee730-99e7-473b-02f3-08d525ba8b7e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3827 Subject: [dpdk-dev] [PATCH 7/8] net/qede/base: fix division by zero 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, 07 Nov 2017 08:35:49 -0000 Fix division by zero in calculating the regpair elements per page Remove unused API ecore_cxt_free_proto_ilt() Coverity issue: 1379423, 1379428 Fixes: 22d07d939c3c ("net/qede/base: update") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_cxt.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/net/qede/base/ecore_cxt.c b/drivers/net/qede/base/ecore_cxt.c index b47eac2..50bd66d 100644 --- a/drivers/net/qede/base/ecore_cxt.c +++ b/drivers/net/qede/base/ecore_cxt.c @@ -66,6 +66,7 @@ /* TYPE-1 task context - ROCE */ union type1_task_context { + struct regpair reserved; /* @DPDK */ }; struct src_ent { @@ -2220,34 +2221,3 @@ enum _ecore_status_t return ECORE_SUCCESS; } - -enum _ecore_status_t ecore_cxt_free_proto_ilt(struct ecore_hwfn *p_hwfn, - enum protocol_type proto) -{ - enum _ecore_status_t rc; - u32 cid; - - /* Free Connection CXT */ - rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_CXT, - ecore_cxt_get_proto_cid_start(p_hwfn, - proto), - ecore_cxt_get_proto_cid_count(p_hwfn, - proto, - &cid)); - - if (rc) - return rc; - - /* Free Task CXT */ - rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_TASK, 0, - ecore_cxt_get_proto_tid_count(p_hwfn, - proto)); - if (rc) - return rc; - - /* Free TSDM CXT */ - rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_SRQ, 0, - ecore_cxt_get_srq_count(p_hwfn)); - - return rc; -} -- 1.7.10.3