From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0085.outbound.protection.outlook.com [104.47.0.85]) by dpdk.org (Postfix) with ESMTP id 57B531B37E; Wed, 1 Nov 2017 21:12:52 +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=tp7X5NHJgb5R5+NrxgIAGIRK4F3mFcVhn/Ny4BK8pPY=; b=pKBVvuUIYm90KXiDyyBqz5X//HDyRvzHRl/2vkuEfAhhW4EEfvPkiQnWnnvkgYKvoZ/3RS1avCWflHt2fWpowRGSuvlw0yy0c+e63ODdqWEVwAYt6bq7NDutggq1Ytl8DGy4tjZFlmczMuIhx5oNpf6mDyMuv+OuEF1wV9eRGfo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR05MB1264.eurprd05.prod.outlook.com (2a01:111:e400:5188::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Wed, 1 Nov 2017 20:12:48 +0000 From: Ophir Munk To: Gaetan Rivet Cc: dev@dpdk.org, Thomas Monjalon , Olga Shern , stable@dpdk.org Date: Wed, 1 Nov 2017 20:12:38 +0000 Message-Id: <1509567158-15670-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: AM0PR0402CA0007.eurprd04.prod.outlook.com (2603:10a6:208:15::20) To VI1PR05MB1264.eurprd05.prod.outlook.com (2a01:111:e400:5188::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5b7a565-bbfa-44d9-9cd2-08d52164ecbe X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(48565401081)(2017052603199); SRVR:VI1PR05MB1264; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1264; 3:+mZGEusGStSeTjfn6TtZuJ/NtTCoNDqvPYZGOsluGPItFCULCaq30jOy99JHydyqSkCS3Jj1nAd6eAs7N/FVj4v2zQx7YfCKCkpDcctQSuTrkfbrB9b2XZrMb71ZMVEMAuNJzz/DJsGROeATxhLynkPmGWYe8qP8Pre4DkGQtA/Ue+xIIB6cwvORIuMIevj6dgK4pFhHo2ZQUKivHd0tb0/nnxfCyT6wXUB5SIpNX14rg4wih2qk/9Ugv5pdNZrg; 25:S3nXhJzIYcMoH639CRzz8/9jHqido+oqHsRrAjNJfXkljoqnsB3chOy4I+mh9Nv4P/UCLLTr0+g8qPnchX12nOO6PTR4FIOKHC/l0E+jzR1j0MhEokcCIWVihQ/6FCWp8KmArMDRmXxK2755l8Yi5Onp8yzfptI9Onx3ewJKZiepXrEfo8FUew5lpxFCOFTlI3/1ZEG2gnnl6Lp4mejQRk/fdIkzllVmMHQxGavUgurLe3qNvSqNMSsuoHyad6Gl09Gv4LaJd4n2fr9wBZbRG4b9E/ULK5DVN2Fd4qF0bScwcI6iOyi9/TMfVxleWuZg6msgBIriDk6HWHkxaMXaBw==; 31:z1DzkTB1sLfNvPnyxvQ17XrDz9Uen+AacdOOHyE9U7cxfbFurWvt7ke6u3f6nJ+V3TVugsYEoTvrOV3rP/uS8I0BJvd/qtdvfn9IDqFfimCJrReRn4IlQ3DGt7xt2NVCDa7Jfij/ITcovh2VtbYNRABEyaOzu2yszuPqp9sbHBxwkMNFRd1kwpTZeV6Kvo6s7XrWRVrRDlQjmrKNNF17LzSV0GVp/9BIEtsG64M4DpM= X-MS-TrafficTypeDiagnostic: VI1PR05MB1264: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1264; 20:p9qgGM/o42zRa+5TLSIHhXoHa4k8Q3fNZwpGlogb9AIBf8zXTBhn7L0FGR+Hb6pjQYQaDBzziKGUP3pvMS0hT6BQSOg+Z0UOgosrq2XT+ESl+KjU8C7cdS6y5TiBu5BqfooZ6GA/Xnh4Za8x+/tCvoJgviDghgFrB0gZ2+Xal8jFqjiYkACKPXtuS2Z/U5Rd+Q80fAHoUlDwlExWaF7gjHL0qPc7xD94SvCSr/dBYiT45gg4FDflW3RHOZguuGCmUcmplo03L9w7f4ld2cJZx/X3Oh23PpE1veM2kFd23Ft1jdToj2FfFtTviXt0a+4DmH6fJAY40y72su3g4grsTh3AbZbxEQHBw+Ewr954pD46sFRzMLx+Yc4GnUnlegLoyA99SVDZ2qGNBFo2K10jNE2QZ8QCrxzP/yhDaRwS9iiiCtuKGTqcmTepvyjOwhSagMfL5V31CLUi9iu8gnaVlTCFrWtPUbwbsSTM2YEsW1HyQYRE1PDVNYR6tqlACpBe; 4:zkNPO+3yBn+Q9Lv7mp2v6q8Po8Lhk0HRRKTIYSBnNa6V8cjrBBShWX8bW9IkO6W7bjlJ/2FaNGUGOCo1z0TTJntAx5gDjGyGMGpdUu09bmVnJyDdsRzH659sBqriPxJye9F7JB8KBVJcr0BiwV0kL4iKp7U/RKBUVyjEj9eZ9sBMpc20GuLFwPMIjWLc71+MQWZjeqmU3dLEyP0gar63Ld9rpyeNSbdFFICwvu7l0YrCT9MJvngR8kFJAqEEKt4skDAsHNfNjoftRQl716Bh4A== X-Exchange-Antispam-Report-Test: UriScan:; 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)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(3231020)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123562025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB1264; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB1264; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(199003)(189002)(5660300001)(16526018)(50226002)(33026002)(21086003)(33646002)(6916009)(68736007)(6666003)(4720700003)(50986999)(36756003)(101416001)(50466002)(69596002)(97736004)(305945005)(8676002)(47776003)(105586002)(106356001)(66066001)(8936002)(81166006)(81156014)(53936002)(55016002)(86362001)(189998001)(54906003)(316002)(16586007)(7736002)(5003940100001)(48376002)(6116002)(25786009)(4326008)(3846002)(2906002)(478600001)(168613001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1264; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; VI1PR05MB1264; 23:9EBiN1LszqaeY6vAvO+96DTS1SZE8ujf9pXHHz9l2?= =?us-ascii?Q?WgKwGSL597I5ceIvJOLVW7ypf95djFhzVuYQ1Vfbbhb/Ct4YpyyL130EDfBR?= =?us-ascii?Q?6S6juE7Ta3nFb68eNh7Qu9AnqdxL/Xwyjbp74tzpXwXFWCxCqJ5t3/lL9ViR?= =?us-ascii?Q?nRFSUpcIWesRoIssWfyImlQwifOzS2m52pzUL3EkHk/b+kHvUpbAT5pk+l1d?= =?us-ascii?Q?J/XhjOERLhMNkE34gmJPdfbpFT3BSx6LQfEM31L0NMVT7ht2A2Iy6OQlApF8?= =?us-ascii?Q?mrXoYnI4qFe8NglIMM0bmpbBrB5+cika8U9NgWlMVWZvMNzqEn698HXm6haW?= =?us-ascii?Q?OIBkGcLfpm0V7NIA7Ie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FXBi4t4IV/JQIlplikWtt7iV3m0TWkZDF+dU3plPuNM8BC8ZmI/IVyV6EF+aa5i/kZJX3cndBf3D4joq39vQTxnxQDs9U4STJKGG1XMZpm5wpjkWYzA1aoLCgqlQrFXpASxn/MPN/5y6oSP9PpsD0MBF+W2yWGEmmdF+aPHI2dphlBL9yKIEDwOpNtQiWKUv8Y5ZhaO56JVMS8mh1q67bFHD9bI0hdarVQ6TCwhqmcQuI9w7Ky5rHh/pMFjG5Wj1ZkmWnAbPu3rZhw5eXOVV8t5W6oLy9VLctrkPy0gZg=; 5:51NIgl6NXGkAVA+pQhvqNPxbP10j8juq3W7yCDptvOJG42KmVJrplpJgyvn2ktq6w4osyWy2hgJI7xtis6M3IOV6gD5CiHOLqDm+qjlX+K7Y5PP8MD9wZIFU5pEyXO1LpwoUveSYqiEF46KAw9oGUVd2aK7YaeYG1AvEbRzclfM=; 24:Y0SaTkoBZrNjJF7Z9UPbhoM+sLJwqykqw3KH7X/oqT7eeXo+IWNIxJ80zfFODe6lh7TW44cgQWyU7Fwi6z7od/tKQBFs2I7gDKjP2QPWJL0=; 7:J6hn2biW+ohNkc7JuFHANRYu6bD4Ce5kNkyQd0rIZ+9boaPClH5/epUWo0zRA1DHasU4NdzIHln6MSVg7fohUyb9TN1pSD74Tn2cppM/u+CQcXTwgenE044vRJZeuyGoB1m09BlwO5h+MMjidLDjxGxhB3BonOFWJJbR1iPV3TiGKO86bJzDLMrD+1t18ni48w6ILa/3us6ikGDVZRuzBfveVvKT6LTu+E2F44xX8z2PjdrvB3UvwOzfJpLUTeU8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2017 20:12:48.5935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5b7a565-bbfa-44d9-9cd2-08d52164ecbe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1264 Subject: [dpdk-stable] [PATCH v1] net/failsafe: fix VLAN stripping configuration X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 20:12:52 -0000 failsafe device has vlan stripping configured at startup however once a sub device is found as non-capable of vlan-stripping failsafe updates it configuration and removes vlan stripping from it. This update occurs only once at startup. Following a later plugin attempt and in case of vlan stripping mismatch between failsafe configuration and device capability - failsafe cannot recover and the device remains constantly in plug out state. The sequence of events leading to this situation is described as follows: 1. Start testpmd with failsafe where mlx4 is a sub device (not capable of vlan stripping). Expected printout: PMD: net_failsafe: Disabling VLAN stripping offload 2. Execute: testpmd> port stop all testpmd> port config all max-pkt-len 2048 testpmd> port start all 3. Do a plug out (e.g. disable sriov) 4. Do a plug in (e.g. enable sriov) 5. Expected result: failsafe successfully configures and starts its sub devices Actual result: failsafe is continuously failing with these messages: PMD: net_failsafe: VLAN stripping offload requested but not supported by sub_device 0 PMD: net_failsafe: device already configured, cannot fix live configuration PMD: net_failsafe: Unable to synchronize sub device state Root cause analysis: at startup failsafe removes vlan stripping from its configuration. After executing "port config all max-pkt-len 2048" testpmd marks failsafe in need for configuration update. After executing "port start all" testpmd overrides failsafe configuration with its own configuration which includes vlan stripping During the plugin attempt failsafe refuses to update its configuration by removing vlan stripping since it has already updated its configuration at startup. The fix is to remove the limitation of one time configuration at startup and allow it during plugin attempts. Cc: stable@dpdk.org Fixes: bbc6a53dda44 ("net/failsafe: support Rx offload capabilities") Signed-off-by: Ophir Munk --- The commit message includes bug and fix descriptions --- drivers/net/failsafe/failsafe_ops.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index f460551..953ee65 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -187,16 +187,6 @@ continue; DEBUG("Checking capabilities for sub_device %d", i); while ((capa_flag = fs_port_offload_validate(dev, sdev))) { - /* - * Refuse to change configuration if multiple devices - * are present and we already have configured at least - * some of them. - */ - if (PRIV(dev)->state >= DEV_ACTIVE && - PRIV(dev)->subs_tail > 1) { - ERROR("device already configured, cannot fix live configuration"); - return -1; - } ret = fs_port_disable_offload(&dev->data->dev_conf, capa_flag); if (ret) { -- 1.8.3.1