From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A044A054F; Mon, 15 Mar 2021 16:53:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AC432426B9; Mon, 15 Mar 2021 16:53:54 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2061.outbound.protection.outlook.com [40.107.92.61]) by mails.dpdk.org (Postfix) with ESMTP id A2BB42426B3 for ; Mon, 15 Mar 2021 16:53:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m9im5A4eKO3FrODjYyo/dymoBtx9K4CEpuM4dIHiIg+ncWyLddsx8QrUaKDaIOMxwHzorqsDM9casWddeMNr6zertkcMAjqHENtyGeDs3+hzfd1fXotB0mn0O75zCJmed63pIm35Z6YAc1mc0Ra1dt4jF2cYCqFQe0MJHyqoq2WgEzoY1FT+6CetTtMHfbpzmManqGYtN7cKFhP6CW71FOY3sWTye23BQF6jvoEiQvbPvR7lgTMIPDqK2ivfvpTelz6HqqEAt+PdckH9bkOop6Cqxt7R/GzGaVAPV+w4LwGT543FOsWtoNv+lTQcFhJK6iJwZaNfMjcuEI7X2wtrqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n2J3NqN5aRUEdCmVurTImT+iXbwgGV2RMlyrCc04S/4=; b=XEtTrQuMuS28nyqCtZLY4uHJ6sEOw5gWsZgRN6iJV6sL1kKmwI37bCTO0dLE8UjCwgUBUcEYmqr5g490G7T1Pw9O8pqo3GrDHv3aKefC5G7wqp8mUdLU7FPEacdG1nq6Q965/YPm/isF8xVNqdbgdN/wfP8DdPGmI3UIhBB/Q5lDeuVXSb4ttq+0mkqKFR+vbel3lhPi+BJlNGJIQrpofyPw/6EVFrjwO0WbGGBSYk2Z3mqx8PuO42/MrZ5vLd5z79n4jY7G0QS5+cm/DYRwPceXVyDr/mSaXISjbAkOAEaRPifI7FBoBjXN5GqlssJWafeAfgBS2qIG+SZXxQdi3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n2J3NqN5aRUEdCmVurTImT+iXbwgGV2RMlyrCc04S/4=; b=m6KPMbc0nHPYFcdqnTPntrh0MUYcAf8J2oi/P35E4AffZbLOQB2r9ABlsN2yK9sZ3vPpIs8p9pXZKv1Kzfebd5BAdwi0PgXALSDazZu5SvEbYKOzPGlsECqPZmRRZRl4aoRTIWEFtiHNWKwnwBOK7ZVoUvSWIH445X1iwO4OK+w/r+c7haERHikz2ysobhKvvgYlghgcweuYXWaPN+d0yuez1S/ZaMNiJ4l0FxgLR6ihYe/GguCwJMlNDDFVmDtDKyYTsFnNVkF6NsOuGJZEpJ2J1uqvwG7Qkm94JXBVBPRmXMBXqMgC79mRFw/8JL8W4NPRkzKp8otkPA6X8UTz4A== Received: from DM6PR12MB3753.namprd12.prod.outlook.com (2603:10b6:5:1c7::18) by DM6PR12MB4121.namprd12.prod.outlook.com (2603:10b6:5:220::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.31; Mon, 15 Mar 2021 15:53:51 +0000 Received: from DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258]) by DM6PR12MB3753.namprd12.prod.outlook.com ([fe80::20f7:11fc:9d46:9258%6]) with mapi id 15.20.3933.032; Mon, 15 Mar 2021 15:53:51 +0000 From: Slava Ovsiienko To: Jan Viktorin , "dev@dpdk.org" CC: Jan Viktorin , Asaf Penso , Shahaf Shuler , Matan Azrad Thread-Topic: [PATCH 2/2] net/mlx5: avoid unbind step to enable switchdev mode Thread-Index: AQHXGbCpbh43bNULVUOsJef9QEMNqKqFMkHg Date: Mon, 15 Mar 2021 15:53:51 +0000 Message-ID: References: <1615822438-10082-1-git-send-email-iviktorin@fit.vutbr.cz> <1615822438-10082-2-git-send-email-iviktorin@fit.vutbr.cz> In-Reply-To: <1615822438-10082-2-git-send-email-iviktorin@fit.vutbr.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: fit.vutbr.cz; dkim=none (message not signed) header.d=none;fit.vutbr.cz; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c72d194e-071a-4120-2cc8-08d8e7ca8774 x-ms-traffictypediagnostic: DM6PR12MB4121: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j7sM+EuYL/+721kU/gnzmECVwc1TpmEu6bDANV0MP9oCkSCoJ7HHJMIfaF0lVCojd7TuvvUjRAMN91hIcEmIe4CgOxfGymlM+rRBpOIZjFVOxf/QblaW35+jW/0nDSEduV0Mx7WjhIsQb2k2/EuKKTeYo73AQ2K+nODg5TOs38TZtVZPGUAzQmq2r6osvR0cdkU8f9kk+EVw3Aez0vjdCYLza5MHuZlHlUKl+H7MKRiOSm4OKPuatReA7XELVUgRTa7nHVZ87Pk0iVhZT8KHRa00d5CO59rBbXlYK+i8UQH7Pw/CVg1Ko5b7oZdkvPDYdWKeBgQy/7dFcvnAkxmY8QWoh5LrjMGPE49QWN3VkZ/FX6i6ml4zZ4khyr1W3CXZ4yn5wqI8feMomoaS8Vevu6KB213VIybTZXIJbPyXAF4YleN3JaOuiVLrBNSWus0G1lNCTCPi76GIxUh+M3QfXGb2tQpe7QluoDk15RUsJxD/iDiv1CF4PQ6IoDa6jPpr+Bck/spl/oCxyMhv412W2NTI7TmP5fWT/skridfvMFMAFMJCAQADpv5wFbbY4tDn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3753.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(376002)(136003)(39860400002)(346002)(316002)(83380400001)(71200400001)(4326008)(478600001)(2906002)(53546011)(54906003)(110136005)(33656002)(8676002)(52536014)(55016002)(8936002)(26005)(9686003)(6506007)(7696005)(5660300002)(66476007)(66556008)(66946007)(86362001)(64756008)(66446008)(186003)(107886003)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?PTsHTb/4Xw9+DgWn5SC+u8PIHQmElO9ULmBHO7LcMCTfJuVl9DFxuMpAdhs/?= =?us-ascii?Q?aZeHT/uJ4Z/SkANV7sxGho9dNJDE0/F+KmUxr8DY17uAg9qZ1JZJpSqmpjcx?= =?us-ascii?Q?ln17jxjVl0mMnY07DPQWVFIOeOQIvwGRaJELPgpzDyKUBwRjO9tMEzpm44Jh?= =?us-ascii?Q?A5NNU10Vf6Dv6FbrKtbNCB1816OIq881ONrNxUtP0hl9ipysql7nDsIh2YMR?= =?us-ascii?Q?E2Mll1dDYemBL+9dWcHbfwe0ErgK/0j97TiwWip+OZkWWYM0IxVabiJic0UY?= =?us-ascii?Q?JpkbRwGyi0yYWGHLKQU9V6oWWrVrBV3SVqM8Wf0sse6pJkk7hD8kjval4g2w?= =?us-ascii?Q?138cQBNlPYbrNgxqlPQ2/LzTZiGpKeF/n3WhVIcCq/N+HxcCUC3uftCayjoe?= =?us-ascii?Q?OKm/0kirXtc0u7egMMIg2vFOqYnCk+1blsqxiaEjrhGNKOMm4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text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3753.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c72d194e-071a-4120-2cc8-08d8e7ca8774 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2021 15:53:51.3293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0o0c1M+wQsPwHKCBMao/T7rWEy/QRdsRelBPxNvWUKXrNyH22CHl2jz3k8aMnSOW7qpyHjrncHdKJtj3s2J8nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4121 Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: avoid unbind step to enable switchdev mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Jan Yes, bullet [4] explicitly requires to unbind VFs, and detach the netdevs f= rom the mlx5_core driver. Otherwise, kernel driver refuses to be configured with switchdev mode in [5= ]. So, [4] can't be skipped. After setting swithdev mode, VFs can be bound back (if it is needed, and th= ese ones are not mapped to VMs): echo -n "" > > /sys/bus/pci/drivers/mlx5_core/bind With best regards, Slava > -----Original Message----- > From: Jan Viktorin > Sent: Monday, March 15, 2021 17:34 > To: dev@dpdk.org > Cc: Jan Viktorin ; Asaf Penso ; > Shahaf Shuler ; Slava Ovsiienko > ; Matan Azrad > Subject: [PATCH 2/2] net/mlx5: avoid unbind step to enable switchdev mode >=20 > From: Jan Viktorin >=20 > The step 4 is a contradiction. It advices to unbind the device from the > mlx5_core which removes the associated system network interface (e.g. > eth0). In the step 5, the same system network interface (e.g. eth0) is > required to exist. >=20 > Signed-off-by: Jan Viktorin > --- > doc/guides/nics/mlx5.rst | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index > 0a2dc3dee..122d8e0fc 100644 > --- a/doc/guides/nics/mlx5.rst > +++ b/doc/guides/nics/mlx5.rst > @@ -1370,11 +1370,7 @@ the DPDK application. >=20 > echo /sys/class/net//device/sriov_numv= fs >=20 > -4. Unbind the device (can be rebind after the switchdev mode):: > - > - echo -n "" > > /sys/bus/pci/drivers/mlx5_core/unbind > - > -5. Enable switchdev mode:: > +4. Enable switchdev mode:: >=20 > echo switchdev > /sys/class/net//compat/devlink/mode >=20 > -- > 2.30.1