From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0046.outbound.protection.outlook.com [104.47.1.46]) by dpdk.org (Postfix) with ESMTP id 350C31B7BE; Mon, 9 Apr 2018 12:25:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+2GpZnjyhFhh/HMW2P2LtFkC6NGtbpzHRPDq39myl3E=; b=dxrg2M0gCNQW3OBJScuBFITWhfCoIWGaDqv7xlW5a8ls+KXkIJfuf9uf7r334/JD5Mzj8BIrKeRRNGXFbuCKEhEAQaJjb5hu4DplzMtWA9GpDikBUvZdon7GEA8F7PJOOg5dIdS0PAaIHHSwzWZygmFoQXbDA6l1AatbHWtguVk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:51 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:46 +0530 Message-Id: <1523269371-28799-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4fb6d0e7-c85a-43d5-1df3-08d59e044533 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:Py7qT6WhYNqhJjBDQagz+kfPm+5H5wER/p/NbGP7Frb4CU06baxmYOd2yqtPG+FgQhNeWu1Q1+R3/59otAx7/QSVB8VoMDhdFfPMEXeR45wCDdbD6dMvlnmjWoKwxEXvjXjVUuwf33dImrcaSO8xl2ukAXYW6NaEu4kwZSEXFX2wwrzRyLe4m274HmMxxqRXfIu/CfPCNn5uf0WB4N95hzRJhVIZ9x95KTXhg+0k7sSp3PnAjO6Jlxq5bFddnglJ; 25:MHvTiAnVWKdp5XypdfOAXVPgzckdPzSuEudry9zOduPXKdWXZEP2gRKoVLA7nBIAv3bGDqmH5nYBFF/TuvkKytfhqnNPkTUrOBLvgZkxlahMv03puUomkO+RU0b371PO+zVuDFkz7OBKmYmC4thbI96TqLJe0mtqlNB+O5UCi2su/X+0Hg4VgxWrsD6BuxKEGMVt3FCeh47eTVhN5ZXP2a22n91k3AL3JbuQPVdD30WOdF0bTGjbdtVPUmtV3xLPVxqVOalYHTrbJAuH7QKMWm0MetQ06gENqj48aNFxEYoO4ER0pbWdTlKbERS8t2koSwX6F2gX+7/PxdJBNLR0yw==; 31:7p5OyZGkv7GofYTWpjniG1fyGm/K2aaC1hFeO+VFA8SCKFY3V/poNrd1cqf3NsBhLP39Q9UtqucB9lAMr1YRllQcX+rNmZclHt2W+vVfFtWKIvpWeEE8LiO5lsbDRaeFNBL+GZ2I7ClPGp1bnr+6Gvhy0VsnzyFOK90vhq1ks3hyzo8ul67f6SjF9LHYrTXuv/kGkGvmjjup2DDJsE1l9WVYyXN1dis4HQ6L0aid8JE= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:PttygiPdIZ9nN70f6GEC4bY/DUH3z0x+PZYCXW+mCWFYr9tj1j/0sPopHKLqf9aj9y4BkWy+JdnyavS6+VkJPePFmoGYJNiBdWYkdir6TE0RXgKooNRkzkwXIr9OZKZ1EcBANHoeqcBbTSlOF60HHsjfml93ZutUt9LT+D6QlWHD7pXugbkVVyreV9IoBTvHUiTEtgAN2BNWwA7rX9CnGfJkTYIZPBtSr96cnSIiZ5NvTBFb+GQQ0izgfGlRyq63fb1Y2JKJOEtS18qqMExDsWRXu/lk6OuWVNa+gHV4RxvdhuIsqw7XViBpEp1/eiBns8QWvqTjQbH8pLjLjEPzfnx3FYf421sPaeBESUmjCVVH4YntrwIKbYLRF6CBb08os1sspNsxV+Mi9D6cWdFE2sHmjJ1sH+q6xNgI4FHazwWr5wOIBhKfZmDfbuQY8H8wZHqJf7BdSj2qnJ2l1ONgK0Z6pNUV8XAiE+T8ZOPqtjB0NxsaPC3XuHxEYNbp/4js; 4:lsqgealx5mFxTQSfHKQ7Ue9x2kV1FJ2IlxunnOZrK9uYsWZSsZWzS83KaLUaqsAOHe2XO8WXQccOMxy0IK2mx4mD8DJbtd+RlqpLIAEReTPXPKawy+xAtJMLfPoIS6YQoyYBeIFfi7ObNHyqujauwCImnoSaW/NGcHmVg/wAYnqhkiEzBdhxvi0D5W20gFu5H2z/UKs8mabWW4vCsKQIrpqAw06B012APWgBcIZ7g9R7puMQ6Tr5+wG6bjkznalHjRCa/Mi8rgayidxvxUd6p5xt0LZBC+ggRuyZd1dmBPRfWe7GGw9kCnxzP9nQR+Vu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:uVen72s3I7zOIrKA9cvjJ185hp7Vi3gGm621BaZC0?= =?us-ascii?Q?mN5MkgIStawrr1Q8Fqf4IQABfmc3bPCdCwzwGiQYbbd2tS1K5cw4zM3//1yB?= =?us-ascii?Q?2jgLgQyjgFDMUISlXFZzDGA8NExwGx+uH+0W2xjD6y7/g/HCNRtn0uzldekl?= =?us-ascii?Q?5bnhutfyqrT57OOI2PWZ6OY4CFizuxtuZp37TWFLovOnjj4xv/uqByJA8YWp?= =?us-ascii?Q?lq0XcQfbzxvjhLy3pEphBNNHT53fMFmb7EXJxDH+0P3EsLiILvE9NfHg9Xym?= =?us-ascii?Q?qZcQ2tZ3rVV/TQ94Nt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?= =?us-ascii?Q?144t70y9Amis9Z1eLq73ksHi78CFlo5ZAovr4cmbOjzEsbTJLWfXy20kfzfe?= =?us-ascii?Q?fjAgXr1/5mEcM2UR/ciKPwp0ZI9vtUSJw4a5Ej/nT+9aBsalSjaGCW/9SSAB?= =?us-ascii?B?dz09?= X-Microsoft-Antispam-Message-Info: Y4Ssh6WTN4SeMaJCqcUULVj0Whlipe2gqdo0FYAmDJiGT5Q6+z0kKUmvQWG337eHDoLCIEBIzw1NY+kpYEnR5cGM4ED064pqYfmTCrQpN0Lc0+ot8puCY6sIeTHUmHMyL6xETABZ82MpYM1qHez+uWRaDwmGiQDU0PIYGo746qG37auK2tJlMRhKcBTqzOSG X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 6:3Yit/QBv9+rSJcZA7B/kBQor9Xff9iTL9ANbceN0zWabniR5swsrs+WDqdH4k0X1RNunYJYIl3Esc7brugxyZvTd+GGUykNhqAeZevusONj9bbFU5idoHRrKOyJ0GmLYQRq4R6PJ69i4nWCdL9GnNHV0XQPg8HKSvGsBqdbjHMKLdmKHkJlQDttaX3K92tigyZiENV3Ufgq7iFgIO7xYE73Sy1R7xpa+74+Mx5kRFWDns+VGdeb6/uUbEt7DEIjTTF+jricw8gKeQD+JWBm4TUZ/ffBfr944/fKnuADrKOp654DIE5Pa6J9O4/h2arKwTql+dUWG3SrO/wbLD+7JFjMBCfLNjez3jEH7fJNsJ5vGKLgFlJJGNIcrweto+82r5QLGKZqha19XV923fDy5T33r0zTj8TafGp026J3etGMxAhyHMvmHsLojP5RU5zBR4XZtwTwgYCaDjIOyMj0hZw==; 5:pYTmLGu1hmTnk9xzawA/iM6mP9HZplfLiHGI9/XpYDtuKZRw1ThdyW/QJgXONpk3IyiODuD/khveLQBc5AZOh70DxalWT3J5vx/cf322KOIB0Vx9NYdnKUJvEqngQIQMAcVkYC4VFoSCP3RY5L71fBk8qRo+sLjMGhTP5AO4qMQ=; 24:ZkPbMy71M7PJlCPpDVBLEaTzoymrMKQk9EU+4IEVXcr/+Vt7/GSYYgOXNHGRSpQBJBwfcqtpJ2PXlLxelSeLz8jzvGG/fXoHG6mfYqlH/Co= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:eJOBFrRngZph7MhGf9EtNqHjP7zG0UfBs9W47+tKPc+MqAXBQaOm7ApY/kWxOEZM1RQYuXS0+n/kXpZT2W+KnDsPf24JmLj4de9YTkP93sNt7clKyVsx4b4U9Kpar87zx4v6MPV9X9lkcBIctwqMLOc/J7ybL4hBur8B+J5Mupd/Iw48SXnncXX2A8ldjYleBnm28nPygOrpY3w2bviAoHzbV2H8Hxd0Yn0sqegwZ7B+k+7LPvhbLx1Wp8Lxv5hB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:51.3172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fb6d0e7-c85a-43d5-1df3-08d59e044533 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 3/8] net/dpaa: fix the array overrun 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, 09 Apr 2018 10:25:54 -0000 Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR") Coverity issue: 268342 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-By: Shreyansh Jain --- drivers/net/dpaa/dpaa_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index db49364..0aad111 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1105,10 +1105,10 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE; } - /* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX + /* Each device can not have more than DPAA_MAX_NUM_PCD_QUEUES RX * queues. */ - if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_PCD_FQID_MULTIPLIER) { + if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_MAX_NUM_PCD_QUEUES) { DPAA_PMD_ERR("Invalid number of RX queues\n"); return -EINVAL; } -- 2.7.4