From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0084.outbound.protection.outlook.com [104.47.2.84]) by dpdk.org (Postfix) with ESMTP id 4BE5B1B4DE; Wed, 4 Jul 2018 11:45:30 +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:X-MS-Exchange-SenderADCheck; bh=OjpTc0BROQCFJMfxEwnbV2jbMVbND/Vo1cuH8J7ZE90=; b=VhX8dJVcbaAWmDlRFmRzQK8NLV+Kz6OQS+cbFyxX8+nth3h66BsNK//ce+7fTLOI/h50SU9/uWGLLGnFEwKrV0gjJvD+MfXRHZWyiUn335T6NGE1giwPqZF9uO6T+hajXa0gcFw8MepLESfz40pHf+O9oaTrmUWXUGzldz2wj7k= 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 DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Wed, 4 Jul 2018 09:45:28 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: stable@dpdk.org Date: Wed, 4 Jul 2018 15:13:39 +0530 Message-Id: <1530697431-1244-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> References: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> <1530697431-1244-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: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb636076-55e2-4c9f-a075-08d5e192e07d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:l834s8V0XFmc2grSIRZMkr955ZqFi7X6jtwj7A5Q0reqFZlzXCZx9TMgOnebOBtrQYvoEmsquM+YEYCOqJXtjLOPaL4hHFfmlVyJjjEmsUGnNDQT2rFk8eR/FXlXsPlVZyb7RwcUnFxZibuHqTqKve6RRZt6UZ42nct3M7l1Y9XWya9C0QlfUB3phelNmWg8QetYJWyBKZ3t44EylWnJOyii+RfCMfwFhDJsjZskF5oTlwy9gscYlQNxVVU9r2lD; 25:UDspwetOluqkZnfrZn6O6iLo5f/1ncTgctrAyjdufHBmVSyd+HTD65ijP2fbptPgZZhLnpB8KyJH2HIptkqfZoX0ywLfYV8hVueW6LMxddEMst/0Bu9zi0k7Q2Uiq4GRGfDSQ4N+xHjo05KT3wJm2OrBzczdy9q11ZrP1RkLRYYBQ3d/hZnTp7Bmi6NDFsycFQGO/XYdzfG5eU6ySSMDqxpfYyuB3lYmmjN2vw2A8tAANEorAQBEXa14PNSLdVyT3b0fbYFUYRqiTCwe4HD2nK1DzwkL6WRuEQyw4RAv9RlvIZKWayQhpWX3cvD3tFGBPQ+OuwmuS72/EEG0TE8ORg==; 31:sSihc+bKmShrrMnvfbuu5NBmnHqF8b+Wy5qV8oFh0u/qytbiO9PXqYV8P5f2f3Gb33ZWu4PlRXVBZNq4PsUCYbzEiY7FwED4jUZAKvfVef1RHkKX2icIu9UUs6/AEz2HhClaCUOoL7Y6TD7DySKyqZRXX5rx57ZSoQKCQOAvgsjWKXYwkPYwM3o+ec1EKPRPb6Abp41lj9opeq8qqYIwfHzjW0Ewuwf975/YiVDgXrs= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:8qm+84TQOOCednnbWG5Hvy/hg53DxusEwF72knzPWEK7RrH4wyLyEAn308NVZr9daMgWZJ9ZvHvjbecyCAianO6Ym4bQrZZhqjkPcS4vzZaqzuVp3E0aaJHKLXEZFq0tEgTGo2300eXRRm/2fd842VzpefUfjkJopQcTPEJcHQ0T8FsUM6Lf0QuKlJmMwOxkgqA0T6L+J6AyiiCmsKBS/1V1/oso6x/zHI5gc1K9p+ST7kTuljEmaynJa/aCVZnrKuz3aOsQzVb9noR0kOF4LkFbA2Omj7TKe7iHYGD3gBYwcm4vnj2QfmXeuSF/nWwY6tZyeIgEhgGGu9mrLhHUTijLJKGtN/A+LJHK/dzw6hjBG+sRVj4aAH4JGWvlVc4XxxYF6ilE5+Vs0PocZBl29cCwqB+f2boFxgy7ZbZ+dfb7xHKf5ctjC0tEct6ibR6QBEcPJhwOiwsr+fFXR1wzLmYHfgOGDv9k6OYJ2xFfPaup5b87WomLC2ZhqItj61gZ; 4:iCw3aIm9/JIUtvmUDE+tSY/R2sCah1txMNL+5xFgFgzOQoW+CYe4DZL9a3x4N1o/KWQB4JM+CstqJAwMEstvBovb6tlF2omy7a+ZTlKlXDxGoIcnR7U7cgEXp9zXoFRtrshIUxwnUwCdsXrQQnUBUZCJeu5O7obmL2a4QpRItUISENZOWuR1aIGZ5UK6O1Fffi9uD6YwnPlU/axTrS36YnbQb0qUFLZz8phmM/K3pPXezg0m85AwyhxzdQgeXkELQjo0sW7O4nmmL5c2R1vRPer21mlMfb0qzfH8GkL4t+j16lh2RVTCgy/ZBEXPZpl+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(366004)(199004)(189003)(6512007)(11346002)(476003)(386003)(6506007)(4326008)(55236004)(956004)(2616005)(5660300001)(44832011)(105586002)(68736007)(16526019)(53936002)(446003)(50226002)(316002)(6666003)(5009440100003)(36756003)(16586007)(2351001)(6916009)(106356001)(186003)(86362001)(450100002)(26005)(6486002)(97736004)(305945005)(81166006)(7736002)(8936002)(66066001)(5024004)(8676002)(478600001)(25786009)(51416003)(486006)(76176011)(3846002)(6116002)(81156014)(48376002)(50466002)(52116002)(2906002)(47776003)(2361001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; 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; DB4PR04MB0765; 23:GivHEGBuphZc9CMWPYJ7F8oCXtaAECecKym04xOS0?= =?us-ascii?Q?58fMGKHIBQwMhAES18Zlms1uf5eIazROQV4VAKqZwi0nK4CBP1KDif4PUQ2p?= =?us-ascii?Q?lCUI0AetTo/EMyaqqznBrP7t6469pSf1djDxB5BQQCFbaLGauxM2uDVsiQJp?= =?us-ascii?Q?ylojO1g1JHAGJnmqc14K6ORtKPgjpoPZ+pzgkof80yyAw3SeGpm+apNwmgNc?= =?us-ascii?Q?R6Dh1AuQgAiy0RcLWWfrVfhhJt3G5UQSF7uVslQGz5rMXiMRmNerLmskiGQa?= =?us-ascii?Q?togTRAyvzsTEaSqe5fZfLgpsBr36vv977MFXJg919XbU6YFzij/sD/MA4Icx?= =?us-ascii?Q?QI34Jn+MhNniSQcx869HPbhQnpFmDE+jnRSC67GqaxjvU5PrVkrwlWR8m28T?= =?us-ascii?Q?aBKrsxWENw0PcMRHRkbNo3okr7A7oA3Y0KJzmSQtU3gUbifYkX/tQ0WbCujQ?= =?us-ascii?Q?/27BbbdwZgu65Rbr+u5v/C6KFiR1/GOcWuMYDEWVQ44P7jOzesHcJrwKzKlI?= =?us-ascii?Q?uGOwOW6nLHjfPqhWQgs0g4sCrvETTxlCh6jjlhlOizOgx9yI0057L1+U7eEt?= =?us-ascii?Q?hOPhrHM4f2X3RdBW9hDk9Kwi5devLCv/7yfkVIhLJbzhMs7Bhg7a8Zyhj/IZ?= =?us-ascii?Q?d5qNyt32XIs1gHuAyNPeFXoX7dAMWM0TDt38x0g8gr2oimmIFibhGU2w9l3/?= =?us-ascii?Q?W94eXNNBxqMJuuwq+2LQLSGQ+gywLTdMQ0JVdBo8vLwvTNMJmI/VQyl92hZo?= =?us-ascii?Q?T4oZ3JZesUp6ss5VftzAbsw7MoWpPDJOa+8Tao4JToIVHCCNPjm0DG3jHUJ/?= =?us-ascii?Q?R1CQ2L/jrV60jAn75xXSulrEUTNXu5c7z4w1BIWhN6n4Om2sp3FwruezEI4+?= =?us-ascii?Q?pu3lR8yq3trotN1Z3cCBlgZFAz528bbnoI6fK60diAyiqQQgXVkaJDWvtSpT?= =?us-ascii?Q?s40DFPc3wEtxuHdARWxkHFb//4dGP9D7pEtX5wtV022AXIBpy21xkWf/PLyV?= =?us-ascii?Q?XIFubNRMo0hSAexRupYsG50xVe1PICIkOO/2bdBfEJokYTKtfNlAjTges5aL?= =?us-ascii?Q?c8M4FHRuPSE/HIO74qtMefiRb0TS08/top2Gtf2f2Ci0C4bbI4npdim3sGzb?= =?us-ascii?Q?8J19OQd0dENLHi3NI/czgkukh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xqQXNvo01KJSz7V6CcpzlKWk5aFZcCbzt9cG4cdw41FnYDpy8u/LlXaBfKa0XmjdKjO7odxxDvSbmv7jS8mm2Sfgg8UeL+A==; 5:0hfBARUK0JCZ5s6rRdXfjKZwn9igMFNAZVlkWUsMnG3F+VlMxnJS1UkP9trqnJJQZw/yT1iftp0vvBVg3hFSkx+gF3xASnNWXLoSsPPo/Cn8l/b8iVVyJud3oxm2ZVbDDiCnetaDcNBfWTQunaB5s+NY+CNeUk+2hzsFpZcG2RY=; 24:HMSiYQaiBwx2ZkL+ySaLSeldK+zgxuQPQY3OiYj0CNJfEcBCfd4mpCyrICiQ0bZH4xgcXID8kEGG9HUp0bPy2W9nDlqkollW0n2gWRMk7+8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:WdhoeQUfedunqkPjk/DNE1gg5fb02kUaumxAK2TBX7gGcUlRdbo9AGrRB1gtMh/K65++fRAEv/nYWiPREBamtx+EwrugiYrbQm0qf1PUjkygDzAD344akmyyPIpsUUzr0nYjMX37+rjqEmMIaMn6BSTgZ+s2s63oKDJL4XSvW141IThA7CHLJ3yQ3UZYmlg9NnQWxOHeBfae0DLfXgD30UmAFkimeyTR6ZsfTmIKVFCXZDuP+6zcfe690j1ywdob X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 09:45:28.4572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb636076-55e2-4c9f-a075-08d5e192e07d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH v2 04/16] net/dpaa: fix the queue err handling and logs 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, 04 Jul 2018 09:45:30 -0000 Fixes: 5e7455931442 ("net/dpaa: support Rx queue configurations with eventdev") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index d014a11..79ba6bd 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -516,7 +516,15 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, PMD_INIT_FUNC_TRACE(); - DPAA_PMD_INFO("Rx queue setup for queue index: %d", queue_idx); + if (queue_idx >= dev->data->nb_rx_queues) { + rte_errno = EOVERFLOW; + DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)", + (void *)dev, queue_idx, dev->data->nb_rx_queues); + return -rte_errno; + } + + DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)", + queue_idx, rxq->fqid); if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) { struct fman_if_ic_params icp; @@ -580,9 +588,11 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, opts.fqd.fq_ctrl |= QM_FQCTRL_CGE; } ret = qman_init_fq(rxq, flags, &opts); - if (ret) - DPAA_PMD_ERR("Channel/Queue association failed. fqid %d" - " ret: %d", rxq->fqid, ret); + if (ret) { + DPAA_PMD_ERR("Channel/Q association failed. fqid 0x%x " + "ret:%d(%s)", rxq->fqid, ret, strerror(ret)); + return ret; + } rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb; rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare; rxq->is_static = true; @@ -657,8 +667,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev, ret = qman_init_fq(rxq, flags, &opts); if (ret) { - DPAA_PMD_ERR("Channel/Queue association failed. fqid %d ret:%d", - rxq->fqid, ret); + DPAA_PMD_ERR("Ev-Channel/Q association failed. fqid 0x%x " + "ret:%d(%s)", rxq->fqid, ret, strerror(ret)); return ret; } @@ -715,7 +725,15 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, PMD_INIT_FUNC_TRACE(); - DPAA_PMD_INFO("Tx queue setup for queue index: %d", queue_idx); + if (queue_idx >= dev->data->nb_tx_queues) { + rte_errno = EOVERFLOW; + DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)", + (void *)dev, queue_idx, dev->data->nb_tx_queues); + return -rte_errno; + } + + DPAA_PMD_INFO("Tx queue setup for queue index: %d fq_id (0x%x)", + queue_idx, dpaa_intf->tx_queues[queue_idx].fqid); dev->data->tx_queues[queue_idx] = &dpaa_intf->tx_queues[queue_idx]; return 0; } @@ -1016,7 +1034,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, DPAA_PMD_DEBUG("creating rx fq %p, fqid %d", fq, fqid); ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq); if (ret) { - DPAA_PMD_ERR("create rx fqid %d failed with ret: %d", + DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d", fqid, ret); return ret; } -- 2.7.4