From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10058.outbound.protection.outlook.com [40.107.1.58]) by dpdk.org (Postfix) with ESMTP id 6B0062B9C; Wed, 28 Mar 2018 13:18:18 +0200 (CEST) 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=MZ0ZTfcMHNpO+KpdrYkkeNw0k+rUSwF8f+GYW70S6lM=; b=G4v4GcyzKsQblegDbBD0Op90+eVFNc7vdQEp5OmP6KRu4wa7hXg9GPvw/IMV17+FwQXYX8PFc/9oUqvt+XlyQ4HP3BZCTo4eT+Z3rre+zFD/9xWkoe+IJc7nRetCHK6TC0e3hKKlSpqTKSoEwsXt00A63eSQjZ03+6u+TSgrZ5s= Received: from mellanox.com (37.142.13.130) by VI1PR0501MB2669.eurprd05.prod.outlook.com (2603:10a6:800:9d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Wed, 28 Mar 2018 11:18:15 +0000 From: Matan Azrad To: Wenzhuo Lu Cc: dev@dpdk.org, stable@dpdk.org Date: Wed, 28 Mar 2018 11:17:53 +0000 Message-Id: <1522235873-22042-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6P193CA0023.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::33) To VI1PR0501MB2669.eurprd05.prod.outlook.com (2603:10a6:800:9d::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3a656991-9745-4b44-5fa8-08d5949d9a75 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2669; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2669; 3:sPDEjUOl/Prz4VirZJ94aUD3vyFmd6UE0zdJ0EFpUR+tOwgWRQ5mXswbmVYTR5Gx1PjViavWxTXHfNDhsbjTKtnBVqUcYX7swKW7unVL+Ij1lrRWuwHwmKto4LY3Pr6TPcE1UlNnIDkzwaqvCdSeVU9W1yTLq63jzR/RaLok/GRrNsgD/xN2CBFU+1hdhA4zzVJ4ZMOuU4RB2iF32ZqGphDJGwzwU3SKk5fGu+pLPs1CjLd7IoJpvHVQC2JAcSPu; 25:xk9nEvQ5HT63BPHpdfdfnhBS+sc1GVA7/JqvueiE4HRkvj+r+mrMLiKPiRDcq9YJ1CgBQcs85ErnIsFFGzuEJQzV8aSaK9NmGMHBtsxiZzlXFYVRuTkW6qk9V7luPyovwmL+Xv0KSAZZC13t52DorSDFxoDm/wuZDHXiJj3jhLqFOYwVzwGs/krlERcIUQSB3fYxblx06py8NCArpK58kGxshhFnSqAOIx3Iydx6rQPyluPZKlWWdzqkTvZgRauQGEvUTPaOXUn7jNRgKD9qQmFGD0PFJaFN6H+1tDXe4z6xFA4wAj6AITaTTupOnVbQqWY33p9Lgf3Pd6zaX6wDbw==; 31:liym3cHo9FcyLWQyNmZaERnWsIKQUF62vRJXeX1m+aswQW9YvLG62h/dGHfsdr4MeRFHB2VRwdg3dbp9Xm0DS/TAAh+p54WLaqmjS96JwEv5eBj6/jsX3AO9K8YPvLseJW4hvUucNHYf0fP29d6urlW8XjZrP90kkBw27VBYIsxy1WVL24Bc0GUdYgh8i6g0X/XrwZQVii1qiSMsqnBlBTYttNPLZg2xQMLgULwLPtE= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2669: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2669; 20:kg4yvQNthyoqKbXVzfDijj5wx54xyaAAU909nLXeRjgT3/ekcrAOI3VBpZ7qYx3NOoz2cTb++aFBuDTojiT2/6FvEnnaJo9NaMggXVGOECSdZ42oV4oeqsq9z3NZmXQntNiK2LC1Ozo8IiKK7NCIayljT4G1BaXjPkcWM+FRp7c58rek3E5qKW4t1BjTlWpdYwtmCJ5vVhwf7YyNyfe0PNya4K8zkNsz0BSuCfW9luvrloGsaRX55WXID+RUz/Sbf5ihbbBYNKVgM6PP+/GSh7kwqgY5M1RUWn0uoVX7IHkD4N5jj9l/ZZ1OJ6k2yo+zU7QqmmFlf0AFQM8sCfMG8TjuzMUs7Hv1BPlVaJfDQrkkpcMo5V63LGaWj0JW3mQZdKDw0TDAp58qw/3dzmdV97vXq6FR7VPMfZKs2P5o7xyYA2StEtwMliIOyKrWHgJvJ8m1ioif1Nbf0GTO3LSdIw76keGq/ZHFGNZq3+s/3OHcPE6QC6zK43O8FPabn8FE; 4:uLME26H8b5+ICovf6ZQwn7Jp9utFBPmtL4KbsoRxzkfQ3nSUqwP1FRx40cfcM2uWHoVBGRSfIxGcl44eqe/PLeVeheiLwjrbrMeruO91nLFgY487T83qNdyj0ew4JnnpbSsb9s+Yq6ZTco+9frKJqmPCHNh2fmnX4iaF/ZkLroa5RPG/OBrvzvA3mxTGIEBLMhlVQ21Ylmo6+20pnS5paLwDpbz4/7S1TvqYcZ8TD42boD/1Wg0BFHj+Bkz+oFU+0bncvxuykm6HZfg0MbhWuA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0501MB2669; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2669; X-Forefront-PRVS: 06259BA5A2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39380400002)(396003)(39860400002)(189003)(199004)(53936002)(48376002)(8936002)(50466002)(476003)(486005)(105586002)(69596002)(50226002)(486005)(55016002)(86362001)(6666003)(33026002)(956004)(2616005)(7696005)(386003)(68736007)(59450400001)(51416003)(52116002)(6916009)(575784001)(16586007)(7736002)(26005)(25786009)(36756003)(305945005)(478600001)(1857600001)(6116002)(5660300001)(21086003)(3846002)(106356001)(66066001)(97736004)(81156014)(81166006)(8676002)(316002)(16526019)(4326008)(47776003)(186003)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2669; 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; VI1PR0501MB2669; 23:IfdsBDcF2INSL+m7/uKLcl9y6lT3fCZ1UUisdQL?= =?us-ascii?Q?eqlUSbFfasKpv8h4mZPpusrTAdWu1z3lYCqCQBjOmmYiPC8GcxJmfqrgs2uc?= =?us-ascii?Q?+1kTG0vwcXpfqEtAu8x3tl/6iGAdmSLntC8OoLlCc6fet+VbBSqp6pBDmVUB?= =?us-ascii?Q?wSa5rz6tcUUYqtfuTyDwJiY4ASb5G4R4oY/AGWxi8OHVwBiI3opsnqqQhvRF?= =?us-ascii?Q?qULlXD9ypo8ESy5gGaaoAcH8aMDG/U9EJZNtqe+Oh5f6ozaNUuNPU+s9VcdT?= =?us-ascii?Q?Fx1pYecUARwl2CycoBoLDMQJdn0sCqSpj6dbdHCEu7R2m3sVbMAYWVxZz2tI?= =?us-ascii?Q?aua/4IaFBNRyonmLGT+LO1fzW1in2j6N1vDy8n8Wp5TDz/Ieawc91DuyYK0a?= =?us-ascii?Q?FkNPJ5Zkol1T0npxeAXLit5BVSK76MhWaztAkzmZX+NL816iTdu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KNUS68Jy4Mm/GV78Z7hMkdvboqpVFGwzFfXlUYJ10Ew/CFlO6JrUsgyNPVMxHbiK5FEMHBuDRcrR8F/J6LKdjON6QoQPuYXpMmX35TQqSC23DAnf8kKDHrtHsHtjxdGvHkhvfYlvWiL0l302WFUs3BbrbwEUiY8fpCJ X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2669; 6:YsbNWfW5sJ84uvu7OdkNXt4jT08zMBZn/k5FDMYLSKZQ51Z4qZXzNUqr23uVShqJ4XcFk4l6z7/00p5ZxB1wyyRsoW8TeTP+YFaSzYlK2BCnBLsVD5VfRAgAOQR38ONsN4D1luRlw+RzRL1DypHcm7oCOgOF7qD6FCe1GVtHFgw+HWI+5+XMaTX3jhaxqCEi4ndTt8VIwDtnhgvj7TMb/j1p4tnlUL5K9+NpjXFo7mjiyGNXHFWm6znzGIoyNcmHBz5Qz7dD/WTmnFMHHvIOsR6oWrYF5mH4d3brvz3OUddnj/7+MTmtBF1x+4NytNXDs7vNcPbkKvstss7GgtH5Pa8TqrR1RDRedxIuNC5gNj8OsKti5H7wkvcpkUPuSntjQH3SK+3QF5vo4hmHOxOKE87XSkRSXFyh5VglAVSrRd2DgFC7aavqw++/tewVN9TmzW92WNJOIisRaaBu6XmHFQ==; 5:0jD43X54hY+zn6Kcux3y2EyFv1zGuHRmnSeePgkgfOBd0sJ7iGnUg8ik3+5M/kq2k/1mYs4LcWOTf2D8lByIv8c239cckYqfwqoSlTM/dew8GIYf8pkzntP0nw095W0aszgIGBYkyEPhjo3jgW46eisdNQQcB3bkpz+KHKL6Uu4=; 24:rLeISzqqwmfx0u03T3ocrVvitpqeadQ9DS01T1BcctlehsMl8unrS9emGer9NeBj+kih8I4OHlvbHPxUsIrDuJmbAn78e0WKW72p58aB+e8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2669; 7:jM/roBaCG0cWk4UMpP1zCUiKH//C+kJPs3Gd9OXNKoq6DXHB51n2a2QHlc/8WTFJ5EZzpNC2uPZBCMrr46HIr0wLc2WUZLBnECw4UWLQ6N4jCvMEwtZNTe2c6J2JnMiwGXa/ZlKwcMGSp7n7hNWCbkR7nClsaVt1XqKM3qq2gHkWbeSV0dY3kzXyPBKhbP1p7V6E07FkdPjI+OOfIcou4sOenjKC98N0mJSAgyBq8poh6w+LF1NdzR6ZJS18CixS X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2018 11:18:15.6827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a656991-9745-4b44-5fa8-08d5949d9a75 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2669 Subject: [dpdk-dev] [PATCH] app/testpmd: fix slave port detection 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, 28 Mar 2018 11:18:18 -0000 Testpmd allows to create and control bonding devices by run time command lines using the bonding PMD API. Some bonding device slaves operations(close, stop, etc) should not be used by the application and must be managed by the bonding PMD. Thus, Testpmd manages slave flags to prevent the special operations calls and when a slave is added to bonding device by a run time command line, the flag is set. There is one more way to define the slaves for a bonding device using EAL command line and Testpmd doesn't set the slave flag in this case what causes to the special operations to be called by Testpmd. Add one more check to detect bonding slave device. Fixes: 41b05095c4d1 ("app/testpmd: fix bonding start") Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding") Cc: stable@dpdk.org Signed-off-by: Matan Azrad --- app/test-pmd/testpmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 4c0e258..73d9481 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2251,7 +2251,10 @@ uint8_t port_is_bonding_slave(portid_t slave_pid) struct rte_port *port; port = &ports[slave_pid]; - return port->slave_flag; + if ((rte_eth_devices[slave_pid].data->dev_flags & + RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1)) + return 1; + return 0; } const uint16_t vlan_tags[] = { -- 1.9.5