From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0057.outbound.protection.outlook.com [104.47.1.57]) by dpdk.org (Postfix) with ESMTP id 836631B41F for ; Tue, 30 Jan 2018 15:14:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=W6ZuK912AUfH3CwkQbJrL9E+a9V8zDGt26ccjFNNWzo=; b=XE4tdP5ryO2v4kc3CZ8KqakQHs411fZcqatKG4FAII0tp6fnDP0Z0MC2VowsN6L0ipoGMaFcg1AlSMpXDVPTetofLDkLY4C0d9K0M6o/ZwK/gdj6sZg9lupY78mwHVTbas+7gims5PKG189XRIoQBcggxonb/aF5kKCgM+U0Xw4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0501MB2666.eurprd05.prod.outlook.com (2603:10a6:3:cb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 14:14:13 +0000 From: Matan Azrad To: Wenzhuo Lu Cc: dev@dpdk.org Date: Tue, 30 Jan 2018 14:13:40 +0000 Message-Id: <1517321620-14198-2-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1517321620-14198-1-git-send-email-matan@mellanox.com> References: <1517321620-14198-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: AM6PR0402CA0022.eurprd04.prod.outlook.com (2603:10a6:209::35) To HE1PR0501MB2666.eurprd05.prod.outlook.com (2603:10a6:3:cb::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: aad8a5d1-f146-4c1a-1d8a-08d567ebbde1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR0501MB2666; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2666; 3:kcVKYptBrdu8zrGL0tjjtbq/58KbrfTaoefRRMpXptRcMF2OBs50GqqctnNzoU7DgzGQzEXFLIc8bySrI/83s1fJfhC97SmnIlPf0tYlGpDXCsVyJDa+QvBlcttkdxOrmM8aP/4HVj20wMd2MjuCH7lRGBfUo7GllYDkbx2PftNFdrrakqnhRI5XeEokpJfP+IUVagLdoSyUdeTPwCEYpOr9nEqGA+SI3LF8W+mCVpSypq3t7iYbbyozwK09mPIY; 25:jtlFOhO5T/0opXvXR7cVeVfvlNqLK3VCe+Az4XDZuz6daSyhpMtWmNvGNMm7rlI2lVQKERKTAsFoVrak8SBT83QYFUMXDoNk5TAaectQpjzuLAU8BIv4oVsAuP4vm6X9NYJGKu3b2ARQ35hUWsGojp/8N/vnKCumP7BIElywuwnI9aWHneBg4o+FTxGJMKz4DLovXaLctcvPYKgEM5jKKxkaeP83MGDk8I9XYanaxKBpuGu7CYr0GrxlBNTj7qtP4RF9gHiFyJ9pwKMTlfynz6m92KlBXKts+XtACnzZEP4Q0vjp3GrU0ewkKK0XSEwGoN5xaMVmH9TuS5z4kPRX0w==; 31:ivThB67ifCx4Ri2j0TCKzQLUkkAJfHKlWlLOOkoBALhuH+5BS8QUD0avH405dWpHFE8KzrVLU9jK57wQpOESErZoBfIaEDwjHPjSBPCLsrx45c8NgdWwuAvHDCpbn0OSvzJcA81fgFDzSrWWWXmtpTgbwKfq2lE4KpUB3Vf/AUsngI8JFHUh1E4FZGzc9/nZtvITRtc2qt17ABPKvHH8Dy/oCT4AnpUkI8wa5H7rv98= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2666: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2666; 20:H3J7k98kzbFK2QnV10DC3DxGQoP0aUBExmaBIL6ik9rp/uF0EzTC97vGhRrO8L2NQ8yUxKGisfXxjdaLSR8jmb9S7qsACl78NoGsJ85PCvzG62jJ4LVP53lC47R+vcgGDgREzZUkL3jvLEi6fBVX/Uimu5vJvSM+INopFJxBAqgwojlVVAp/apvcd4BOsEWvoVZZyea8qTcdLtO4LFGboxbMZoVtoTIRnOCtPcP0+hgx7fgiVj2soYXjddDP0IA8rScdtg07S3AtbwAHFGFQyUWqisQzpROqMdPeGy+GiTkULl5cF6vW2oxOK1fzmAqETuA0IK4ZwVbaijXAvMg/gwXASIi01/w6oAQSL15DmjgE/K+NRPzb2aZ15BPNpcTFPZpBo4DJsdJ7xEx6bLYLk4FrL/0gaJ+bqcVPH8DI+oUJanEl+HYo9m7qo9eXTUFKU7Z5fEb6WNezQVDhTjyPQbatlGEBl4+6sxlbh4Lq8erzthhqBuqSA8PWjxHKV13b; 4:PBW6hU063JuPp0pNP3EDVBkkJy2eym+XPA4FJimeBoItWxZxnIKgcMAO8KNh9QSgHmnPyul1T2yoZsRDIWI43CpY81kFIC0wO1yHUpXKUacYFfbQLvyDYp0xrAXCNYPrdRTpgFPE9Qc09MZM9pCTp+qm/HaaaBoCISoBs54F0Y5bR2fP2H/rPqmrk32nWIyiZdEU4bU41vy002aZrKE3gdteDOp9bhiOBtjCkm9CM38PirfhA3aciU10E8MFWWguKvS1nCvqkPq0ksOtPEhjQg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231101)(944501161)(10201501046)(3002001)(6055026)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0501MB2666; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2666; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(376002)(39380400002)(396003)(189003)(199004)(6666003)(16526019)(106356001)(186003)(25786009)(4326008)(316002)(81156014)(47776003)(16586007)(97736004)(8936002)(26005)(50226002)(68736007)(86362001)(21086003)(478600001)(105586002)(81166006)(386003)(51416003)(53936002)(305945005)(7736002)(6916009)(4720700003)(66066001)(59450400001)(5660300001)(52116002)(7696005)(36756003)(2950100002)(76176011)(8676002)(6116002)(33026002)(3846002)(55016002)(48376002)(69596002)(2906002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2666; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2666; 23:uq0w5fYppnbtYEMnL9o7HxU8/T9gAbxajFJQgXY?= =?us-ascii?Q?7NLnywZif4MD0FAQBrXckl5Fu5jSfhAu5MKPaWSfGvuMTtx7ZAlyKEHm4M70?= =?us-ascii?Q?mys2t0EzKu1oFBbSe5pZXFWHzvc3WD9MGzLh3xIiLK660xxfQOFDC5eFIoMt?= =?us-ascii?Q?66Wi6wYrWodw/JkCgy62Qor3eLAHoKu1CBaNfYjsR4smB0AG7nGyty1A8Nan?= =?us-ascii?Q?7EJMcnmlq0gyi0iIicA1RwOjX1OEUKlo6QvPzfJ5yZ7skHkNHWwHORaWU8m9?= =?us-ascii?Q?jhG639vG/Z7w+BKYdbGDjPna6SGObXoRQip4FMdPc0ImAYDPtpp7T18gWW2+?= =?us-ascii?Q?OfWLTkPsJdQJUzjJ0fWso6CTrzDADTC/AlRGUzwRzYHecQzEije7sDM1ASK9?= =?us-ascii?Q?3SPIHJ4oBWXnZ6y88r4T3bfyrl8SUSvPJgvbp6kbLahR+58iUnfY9RcQWo01?= =?us-ascii?Q?t+l0caQfq9xvO+3Tn0dvMTZkfUjeY/yEZNB9slfEnfyABs689y821DA766Y1?= =?us-ascii?Q?Pz6qwNfCFGyCj0RIvv86URuai4Qi943PosQHStC4JLF8u6peG9YCHVrbS3oc?= =?us-ascii?Q?rQVdgdPl7U/gZ5Jh3FK0NLn7JEuPyBzUWLQUW7Ci77bWx05Ztfzt5risjL26?= =?us-ascii?Q?zsKw9FIw0s6JmySghk6D3Lxfv/5UieHtgYcV01PrIUXUB/3nYfgW+cBXFL7/?= =?us-ascii?Q?npSwveRt7wyNn3ye3qWZHhALAc7BoUVAGvDdoCTRe7t3weuSW2ylgRwebFof?= =?us-ascii?Q?lm5G6sBxwfnFqhY+/J+H8xH98P2d3Z8Eo0vbGeweSmwH2awqPkJ97GC4Dxut?= =?us-ascii?Q?c5JwqspR/HTWLp6apFzzLwjoXi/STUX2j+lfFmRmYRckzijzO88BgD2YOdx4?= =?us-ascii?Q?M70dPcV9WEpG8wzzRcdgOCJyE8pPMjeefPDkc9VXZ3cffAoNSfwOM8hzvXhy?= =?us-ascii?Q?/fjGdawx8EpoGCBMTQhiPf9kByKIgJhsXZBZFz0z3yMOh+ImuS81HwnDuuOO?= =?us-ascii?Q?TR7wZznFt6DDnK9mahozezw3AaXrSa0hs1NsxUxj2LSElqG3v48VKUdUF56M?= =?us-ascii?Q?wX8/ExRbsSy7hCUYMCNlK5kEjLVkdS7/Ai/FUWqLw0ulGD/Wzl8Hk/NioTkr?= =?us-ascii?Q?hShyVlfVNospyPfRVHLR5w+Gq5a5iT2mEN6NDP5xu8FaPOtcKswxi7sCRNz1?= =?us-ascii?Q?LByW0M5FpJoNZFe8hPI2AgCSX5yvuL1Molqsw?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2666; 6:vv9qgBs0BUbvFeW2jpdvLD8EnyEuZV/GF7ZwxVFK4DieELw0i1305Res9OtNrppi6uIh3kDJnQiBs2bioLHjU0pOPh/40xMIFK+9ab+zpOXgbmk77ifOtzxeOnyvJzelB0QF7yyxjs2ArRJV6Q1eMh7h26XlApVe8QLL+fO2cM76p50oSKFB2InmlFKWgHlsuYq+KER5AQziJjUrLqU72bpfs3rpxBwFxWUJ4Fa5sc+5U1zjR0YQf62a8i5+1t0AYyv3I3R1nCgcO4uTrg3dJmDooScuNVMYu7CswpPcH2To8z8bpJJUN+x+4erc5EwELj/Ubu1qiVodgzmuXjYjoJJ5Lup9XufxZMuPfzUvoU8=; 5:C7Cc3/fyd2mGL1Tup9qq+m7HW0IAXBxS4fUatiZCQtO5uTcmVPKbqPnAOCMpUPzGwtaN3+1axAWIp5hGeSvCN5qTahu4uPO3f/zop9GPKIg4WK3/p2R1+DeKkRRS2/9OLp5Ha7/F2ZXzna9XVKvSFdvlEpi9x5zP7EQU9Pqz728=; 24:L+vNjOQQEKkgdX4X1WB13MkvEqPlHtmNOveHMKXO0H4uhmXmnNiHx8do2g64wwSszdqw4f8orWSOxZUp7uLf3PH2/ktgwSRlPXf4DmuNiAY=; 7:6XKXyps1jH6De4R7lgRsGY/RLKXVsUH/h0um5ollFcejQF+3y6z5+rrlMMvPm/EYTTk5M+jn1oDRotNHFZy/ys88DRT9JEayVbolJePVB+DNzlPhDdaYDDivTeTURduKB/AZ2TRl4BwRYIPf14na26nPZ+B2Xo+0vHzHhNnhcTBuNn9hdpM697+Cq0FqBnCyCYQzJY/uDCsWEeAw/pIb5SdhCn1VV4wm6Zx8qRJoeXRPFKkcM107lL2ZaezkvrfI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 14:14:13.7634 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aad8a5d1-f146-4c1a-1d8a-08d567ebbde1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2666 Subject: [dpdk-dev] [PATCH 2/2] app/testpmd: fix invalid port detach 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, 30 Jan 2018 14:14:15 -0000 Using registration to all ports includes also the ports which should not be used by the application. It is nice to print each port event by testpmd but in case of RMV event, testpmd tries to detach the port and this case is problematic when the port should not be used by the application. Check the port validation before detach API calling. Fixes: 4fb82244b394 ("app/testpmd: extend event printing") Signed-off-by: Matan Azrad --- app/test-pmd/testpmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 5dc8cca..71b03d5 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2026,6 +2026,9 @@ struct pmd_test_command { fflush(stdout); } + if (port_id_is_invalid(port_id, DISABLED_WARN)) + return 0; + switch (type) { case RTE_ETH_EVENT_INTR_RMV: if (rte_eal_alarm_set(100000, -- 1.8.3.1