From patchwork Mon Nov 14 18:19:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariusz Sosnowski X-Patchwork-Id: 119853 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42E8CA0093; Mon, 14 Nov 2022 19:21:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2EB7842D1E; Mon, 14 Nov 2022 19:21:11 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2087.outbound.protection.outlook.com [40.107.94.87]) by mails.dpdk.org (Postfix) with ESMTP id 84B8340150 for ; Mon, 14 Nov 2022 19:21:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kd48K7Sl9Ran7NtllVS4XOIBV9vUf/z2gqhFPMDnA1uEoXSK/p4F6Jjci8rwzWMYAL3EOllVlK9iuDGoK1qjjQmkg3DLsseq0oVUX/FTfjuL384JLopDslGIUCQqEpa6SMy3yBljMFjRIkzvQHkXotcBhuWpZbg0C23C25HJNxcVCQkKSMFL5cTdIPulpSoIdeUqj7E2k6c/GNx/QJnz9lnB8MhiTrLDHDZxIE5Y2RYgAEQzmkTcU5ngbSre/yo79O+fyGhowL953wVlpNALQWY+vSdB15xAE7Ln5PcYF4emDFiDxk0YIf0Vsdc0aKLIE4GOOC4pdWpV1656REl1iw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DjJO49GQyTw+/nPy8HuZqk8gMWitkRfXnHRSiUWeFbA=; b=YWqbOzIwQry5igR3QQUxQdGGz+BHvX6LbltuOUeVMU3tvu7dLXeodcoRAvmt9m3kGX7OdURaT4bGyrGw7ynvgNtK5KFeiguxGKvlOR+pt9k301BgfbdKczxYb4TVfQT5JTNxAx/Cbar4PANXG51Le9lAsvsDAw9Y9jsXwA75JXO5A/KiGhsyqSeJCBYqlV32ZbNxP+zGBnmWhtIXzgYm49ISOsgwM2JOZGXjzzwUxAhBKM2UsvLJMsHkohTMpmunj0a2+Hm9xml9siBns/hLCBEBm6oF2v3VpmFzJRExt5IWcf17a3Tiv8ed2jWYD4TGIpyYQzQu/yYDNaAS+ySsiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=DjJO49GQyTw+/nPy8HuZqk8gMWitkRfXnHRSiUWeFbA=; b=dlKmKC+Ir21I3tOt8Qxt/AxETOet8bQgK6V+Nm5Bo6zRD0OKkUWg9m2H4gT54jyAR16bJGvVgQpw2H8X949mFDUx91KD/NJ94rf4vstdbca+SMYnD4x5BDoHyD9RiXDVrpkuoGeeAyUtC53kZlh8vdL+DneBbiTjc/NOgBPAO72RZdD+iFqTZl3S38Ij2C3c+k6I7QGuaMSCqCvY9Y7DbeDtNQxSazBkNeZHJ5vhQpgWdoFzboUt+mA/TpZPev+Lous83LrTXiH97EgIYto2i+9ZSmvWPbdBzH4CooYz6XSll0YeCkJXEOjURGCJwbDwkUnh8sbeTSewgw0v3BMxew== Received: from BN9PR03CA0468.namprd03.prod.outlook.com (2603:10b6:408:139::23) by MN0PR12MB6032.namprd12.prod.outlook.com (2603:10b6:208:3cc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.14; Mon, 14 Nov 2022 18:21:08 +0000 Received: from BN8NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:408:139:cafe::2e) by BN9PR03CA0468.outlook.office365.com (2603:10b6:408:139::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 18:21:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT038.mail.protection.outlook.com (10.13.176.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Mon, 14 Nov 2022 18:21:07 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:20:51 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:20:50 -0800 From: Dariusz Sosnowski To: Matan Azrad , Viacheslav Ovsiienko CC: Subject: [PATCH v3 1/3] net/mlx5: fix log level on failed transfer proxy stop Date: Mon, 14 Nov 2022 18:19:54 +0000 Message-ID: <20221114181956.1052159-2-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114181956.1052159-1-dsosnowski@nvidia.com> References: <20221114181956.1052159-1-dsosnowski@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT038:EE_|MN0PR12MB6032:EE_ X-MS-Office365-Filtering-Correlation-Id: f4c5c468-f9c4-4149-a388-08dac66cfffd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sZe1vAXiiI556FAEzJhfEkJWq4/dsSHCMyecBcwLZO82UnKtBMmhCDse71YvfLqM94U7JrT2uKF3gO6xM1ogRVbkCFe8wF9JVFO/MgKwkOpxowuW3nDQBX47ae+CY4qD2jUX5nN4jsRtqwsSvMNv9iTXfoVX7Z3IGeH7H7C/Dpde1U9jjSYJidfadoNRnMMLJSiFQ4Sn36HKCHn7QZaoul9jhXGIxXLCZxF5YisMoE6yG+oULPQKjFcDQjjybWT5mBytP6pf5TzedF9wn/jGdgd5VSAfeo+/1T0vtQwpB7ByYtTe6etxgYSdE6QWNe5Ls5Fs8zBL3NhjfYwUB2Wp61aoAkY121cvCx938GDGU0xbC9LNUkGHI1i0d5OjnS1R0Oins5+5GJmQoI0BVftgkGrLixcXltqMxfHNasTMBqpbgRQYb3zXxwnTJtaaiEHgzapjcpkCJpA6xB20gxPh3WH0V0cpMP8MqeMmqw6E1CFi/tvrmUxej3driTDIl4P8N0CbHvEzLkyYBpW6dy8CVZKDsDneOug/IQ+/IR4HEoPd7eKiGb6aPQuW+N8qKKoJI/VPdoZkHLdtIpTBawTv+DOGbvuXUTzQ8sTHrp7KwVGmHksBuIOl5HNxHLXkGsrs0rycPq86bQ8IHbD136zr5+3s/4K/N7fT0q9pkQRW/NuIWu+Lzst8/3DW2lq9NcfFNhMXdjF1PniNcYVuU63KXyPCOS8GcSHg4HlPYmZ0KB+CXdews9j5RIu2sIcLuEQ5xd4PUfyt5CNjSDIcbYzj/A== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(396003)(346002)(376002)(39860400002)(136003)(451199015)(40470700004)(36840700001)(46966006)(1076003)(8676002)(4326008)(70206006)(186003)(336012)(70586007)(110136005)(16526019)(316002)(6636002)(2906002)(82740400003)(6286002)(82310400005)(36756003)(8936002)(40460700003)(5660300002)(41300700001)(478600001)(86362001)(40480700001)(55016003)(2616005)(7696005)(26005)(47076005)(83380400001)(356005)(7636003)(36860700001)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 18:21:07.7739 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4c5c468-f9c4-4149-a388-08dac66cfffd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6032 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 This patches increases log level for error reporting when stopping the transfer proxy port failed. Stopping can fail with EBUSY when related representor ports are still running. Fixes: 483181f7b6dd ("net/mlx5: support device control of representor matching") Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_trigger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 9854df828d..fe6359908a 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1377,9 +1377,9 @@ mlx5_hw_proxy_port_allowed_stop(struct rte_eth_dev *dev) representor_started = true; } if (representor_started) { - DRV_LOG(INFO, "Failed to stop port %u: attached representor ports" - " must be stopped before stopping transfer proxy port", - dev->data->port_id); + DRV_LOG(ERR, "Failed to stop port %u: attached representor ports" + " must be stopped before stopping transfer proxy port", + dev->data->port_id); rte_errno = EBUSY; return -rte_errno; } From patchwork Mon Nov 14 18:19:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariusz Sosnowski X-Patchwork-Id: 119854 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2AE9DA0093; Mon, 14 Nov 2022 19:21:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E22E42D25; Mon, 14 Nov 2022 19:21:18 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2058.outbound.protection.outlook.com [40.107.220.58]) by mails.dpdk.org (Postfix) with ESMTP id 0DA0542D27 for ; Mon, 14 Nov 2022 19:21:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wc0o0FqQ0T18aWOLEuwS5zNf33aaIkrHe6CDYBgSj+Q1ub9IkPjd2RFrTyDw/ce+Mp3u/NULGx2jRPoFNTeosrIdQNY1g1Y70atT0iE9y7bLiYTI+10c8OHnVkJZhhRs5duR2UgpRUwXuKdvcnX75KvEq+euRkKUqas8SufEaMeqYzYsf+ADoLYPrP9h0mlXKVcTlzDR3d1P3sZf5qVuArre18wMiEYmtZe6JYMA0LCoO74q1XeNNNPAk2CxEGoUtYIJtPyFiCGACk5knIvMGU6y3R1NeKlU6ht2PutD7BOh6QpvRxO5KUp3TMO8lcYYD9eXvbs+tAw2VClmRgeUBw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BapuQiQQ8EnCKZno5LoszwICysxeUojiSCUHCrufZac=; b=oSsIAqDhlFJTcNKUdCAW/uY8+e1+njda6HcVewDSJ/zGwZTTzXk/FR9iLG2RWDW/OMYGqV3gBpfGJswesUd9ICCO/zkBem/VZ2BLCJvr+t5TnQCVQXqFn8XIZEl+KfGjrVZRBonxI5P71Lp6kfPwdaVF7PPdDxhLCXNg2GW739SUKSYKISluYkdd6bd71tRBEZq/kxabZuXiROh2Z9tF+iJFHDYNh3rVXcM4AVrwB9WHvi7AUeVonyKvGqEytbrPEA2eWllTn6PAvO9oFdB+c4mU32dbOg/SsRnIP3+xgNKWGucdMIWdoqSkXoXXd3MtGAp+tbNQF2zUq7WpNEZ9iw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=BapuQiQQ8EnCKZno5LoszwICysxeUojiSCUHCrufZac=; b=SQnxwBgkab8RGABO6cuuphz89ZOg7tuQoeuRxZWoqEKlm71IK4ak5Ggs/eqyKQ9HT2D2riU4XCAe9+7Lo8FBUvyy85ChMRqYGbP1RdiLQgfiG9oWFgPSE/+BZWNSxKuIoI4tWqyCeuLWVFpESDH78ls/nAslqPirZXLgIxUVf+qEyB0CfUD0mMz1aqSqF2yEyCk6dQjkhWk3ViU+OS7AHIF87jkdNfBKilBgbofVM40NGrLhoPzfXRhUJ8EDATk6lXAhfrKdMRPFUD+TmfIJ9EzhrRlIITK0IYHyo0dednaGrBkY9QhwHxt5hb5CvZ9WLyReRyIvfW+KhSQZuzLf5A== Received: from BN0PR03CA0033.namprd03.prod.outlook.com (2603:10b6:408:e7::8) by BL1PR12MB5945.namprd12.prod.outlook.com (2603:10b6:208:398::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 18:21:14 +0000 Received: from BN8NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e7:cafe::a8) by BN0PR03CA0033.outlook.office365.com (2603:10b6:408:e7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 18:21:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT019.mail.protection.outlook.com (10.13.176.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Mon, 14 Nov 2022 18:21:13 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:21:00 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:20:59 -0800 From: Dariusz Sosnowski To: Matan Azrad , Viacheslav Ovsiienko CC: Subject: [PATCH v3 2/3] net/mlx5: document E-Switch limitations with HWS in mlx5 PMD Date: Mon, 14 Nov 2022 18:19:55 +0000 Message-ID: <20221114181956.1052159-3-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114181956.1052159-1-dsosnowski@nvidia.com> References: <20221114181956.1052159-1-dsosnowski@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT019:EE_|BL1PR12MB5945:EE_ X-MS-Office365-Filtering-Correlation-Id: b95d61d4-0dcf-491d-1857-08dac66d03b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2RAUt0cMKP8WrJSdSak4Z2r4RrtZExn1sObOI35DvKT/vfmTvvun4UU+RRjpBKd4lMTyDI85H5Fex9eEZSiaY+4ijqIHfYr77/1weyE46DTED6QtK9LIo/iExf6HwH8PMGexalFyUzDhiNLam7b+RErkwML9YDZYOpEu+NVRIMFPmxH7Jj2P6rbkLuzre8biZDdU3dl8Qyn3Dd9cdrB3KpYhwjRtvJ1VBY5wv+CHOs30daNaWdLHj8NAwfHidm3zNu1lB0slnl0z0JR0vsvd1qPOukkYeY9KLz0YasXnpbXqLFc1numG3OFU7lw8/1Ht9JbGJM9jojG1gD5y8jlEuVsur5LNC/QncsLSEPRAJsKDpvtVOSmkaawoambpyznIFAopAqC8SDWskjceTTheqQCC4W56fMdDRAhY1QjwhmJJbNFDhc+pgZSd2ynOAOi1ynjgryql2YsDcLkLJ63imnHNkE3Ee9PJQkfFejZehun5I/ogMgrlUfcPfhaecX3X21BJJRpswIQ9ijS1DvouV13FTLjIxrclYj5zpXZ6xCI7lYSv3b7ZDk4sWB/4LIThN46c2oAQOPlqyaq3iA2iIm8pqJ2t/osZ18KRcm1V4HAzBEUA1VmSdZ8i8Ux05v7/H3kqXn3ual8qtbpJuFlP/Zrf0THhDVKsLk3q/47InY7mJ8ckAOvzdz29egFeTNy/aA861OxM9+F/FcHXadhQavluFMnTaZvKNXRWlddGdnGTa3PHpYmsWzjq6yg1n+ku2waNxXJh6nDUvIE1OhYnAQ== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(346002)(376002)(396003)(136003)(451199015)(36840700001)(46966006)(40470700004)(6286002)(7696005)(2616005)(47076005)(426003)(26005)(16526019)(186003)(82740400003)(1076003)(336012)(83380400001)(36860700001)(40460700003)(5660300002)(2906002)(40480700001)(55016003)(6666004)(82310400005)(478600001)(4326008)(70206006)(8936002)(8676002)(6636002)(316002)(41300700001)(70586007)(110136005)(36756003)(86362001)(7636003)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 18:21:13.9897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b95d61d4-0dcf-491d-1857-08dac66d03b2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5945 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 This patch adds the following limitations to the mlx5 PMD guide: - With HW Steering and E-Switch enabled, transfer proxy port must be started before any port representor. - With HW Steering and E-Switch enabled, all representors must be stopped before transfer proxy port is stopped. Documentation of mlx5 PMD's implementations of rte_eth_dev_start() and rte_eth_dev_stop() is updated accordingly: - rte_eth_dev_start() returns (-EAGAIN) when transfer proxy port cannot be started. - rte_eth_dev_stop() returns (-EBUSY) when port representor cannot be stopped. Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- doc/guides/nics/mlx5.rst | 13 +++++++++++++ drivers/net/mlx5/mlx5_trigger.c | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 4f0db21dde..1df6ca9711 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -161,6 +161,19 @@ Limitations - NIC ConnectX-5 and before are not supported. - Partial match with item template is not supported. - IPv6 5-tuple matching is not supported. + - With E-Switch enabled, ports which share the E-Switch domain + should be started and stopped in a specific order: + + - When starting ports, the transfer proxy port should be started first + and port representors should follow. + - When stopping ports, all of the port representors + should be stopped before stopping the transfer proxy port. + + If ports are started/stopped in an incorrect order, + ``rte_eth_dev_start()``/``rte_eth_dev_stop()`` will return an appropriate error code: + + - ``-EAGAIN`` for ``rte_eth_dev_start()``. + - ``-EBUSY`` for ``rte_eth_dev_stop()``. - When using Verbs flow engine (``dv_flow_en`` = 0), flow pattern without any specific VLAN will match for VLAN packets as well: diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index fe6359908a..f54443ed1a 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1138,6 +1138,10 @@ mlx5_hw_representor_port_allowed_start(struct rte_eth_dev *dev) * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. + * The following error values are defined: + * + * - -EAGAIN: If port representor cannot be started, + * because transfer proxy port is not started. */ int mlx5_dev_start(struct rte_eth_dev *dev) @@ -1394,6 +1398,13 @@ mlx5_hw_proxy_port_allowed_stop(struct rte_eth_dev *dev) * * @param dev * Pointer to Ethernet device structure. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + * The following error values are defined: + * + * - -EBUSY: If transfer proxy port cannot be stopped, + * because other port representors are still running. */ int mlx5_dev_stop(struct rte_eth_dev *dev) From patchwork Mon Nov 14 18:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariusz Sosnowski X-Patchwork-Id: 119855 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E760A0093; Mon, 14 Nov 2022 19:21:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41AF142D2F; Mon, 14 Nov 2022 19:21:28 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by mails.dpdk.org (Postfix) with ESMTP id 0C9A642D24 for ; Mon, 14 Nov 2022 19:21:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQlyagqSbjvkeLnAKRSuaUcBx+g8zyh5c71apVgGZA2FP1DtgTd9lJWq3YWzAsIs8iDIU3bfIu5nJORD20jE9rD6OKgvej+bjvooFYL9ELT640DFrt2wj/B5znh/s8Gvq2MovJi4KWJi0Wc4ikL5Efek7r0Ya0T4QHOaMRHf82EwyKS0Q0RNA/O1NYb6o64YJE3uLL8TbvBmqJDxJx9EQfQciexTrMOvR80IydltsVeOW8c3F7uV9tB+AOapxa0rJR6nw25Qqysna0CLjEAQeZWOKSqRHGnGZWC1/UkyH3t9v4xnc3TtkFeGOxVLGYuk6/7d2e5d5I7GbLSV01wG2A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/7ZlqtQJKEODbPENZe0MdhiRW6isK2SjPKnTnz9s0Vc=; b=ahuXCjUT/ceZCbJiI5DLgR3M0tq4PcSwQOyQob31cJsIA6s9KHSDlO9+FxZdv2RW+CaGXf0NdhlquF6920lXR8UPa16W0hm+c/ffYiuKP8Nnl7FIb7i3GDh9grw9sELIVFLiZS1rRDUb5sVOY8TM506R7TSTFu85TlKF7O54RRWG/+4KsK8u9b+C6EQoqPmzXuk1k88PFd5I5Hypga9E284Tipg3o3ON7BP/A/UTsX2DQUVXYRBPdqtBV+uZOaC/6UTU93rf6zA7rjplJNVzlQM8aoCSIudJCsRjBzvOGs7HnFhdDdTY+te8h6ie4dzSG4+VNlsTksKjRVab5EWtIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=/7ZlqtQJKEODbPENZe0MdhiRW6isK2SjPKnTnz9s0Vc=; b=iiWrke1BVg8RVUSDfxdwIdvNVN15ZgD8KP2yFWmJacdUn5CK14J1er5Pg0ui4qf+10gq9oUyWafnqDD/ganEdFt4D274Gc+RY8ATTq6Unzkkn3q9wBCS5DcWSNUU8j1y/GtSRON3hyzAPBoK8OoR5SvQok9Wn1/e0wgJlG0p7Cd1lZ5lCiGeHqdnM/SPiOFMn+BQEIaj0S1egFM0PRY2o+3j4Ri4Jc3beHoOusiH4GnixxWSJk/r0Y790fDcfJJTV63zQ/QKAhhizmKlFEBP91LlG/OC2mRmTT9zbsQ5dX+jvsf5Z80/b3RqEQ4dYRLTuv5254K/2qEE6kYSaEDc2Q== Received: from BN0PR02CA0046.namprd02.prod.outlook.com (2603:10b6:408:e5::21) by BL1PR12MB5191.namprd12.prod.outlook.com (2603:10b6:208:318::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Mon, 14 Nov 2022 18:21:24 +0000 Received: from BN8NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e5:cafe::60) by BN0PR02CA0046.outlook.office365.com (2603:10b6:408:e5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17 via Frontend Transport; Mon, 14 Nov 2022 18:21:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT017.mail.protection.outlook.com (10.13.177.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.12 via Frontend Transport; Mon, 14 Nov 2022 18:21:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:21:06 -0800 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 14 Nov 2022 10:21:04 -0800 From: Dariusz Sosnowski To: Aman Singh , Yuying Zhang , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko CC: Subject: [PATCH v3 3/3] ethdev: document special cases of port start and stop Date: Mon, 14 Nov 2022 18:19:56 +0000 Message-ID: <20221114181956.1052159-4-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221114181956.1052159-1-dsosnowski@nvidia.com> References: <20221114181956.1052159-1-dsosnowski@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT017:EE_|BL1PR12MB5191:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b725cea-10b0-4949-b988-08dac66d099c X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d6xRU9PxXU5wiJJK8AT3elH6srm787KmhzbAcC+gMtSL/HBONFfAkbjEyC7Kzmgw78RqYD7mQ898MgxyANIHOkC9oX+Yfi8NnqWo46rUt/bM2019X11rZR5eYpnYHTodSKKthGtpNi7AzqP4idcYXrhNjoGW3FeGusA+yG6c7yTEA2seMYiMm9O+RKmTARo/UEqYzHRSERqNXWJOoWGW/kAF80uXLMk6vLFWkC4O8dG7Cqdg/s5MKUa6I1I8alqYcgLdJdTjR0fRv9enRS8lLo/IOGWI2JXCN35ULB1nP7fBZR7Mh0MCrsDKj51bqrUNm5ttzZv8M1IEOmtctL22NDimPkvLVFkPZNglo/yl42N5QET4lS0NuVuQYa3ozhJmCMrNRpQJ8lSCLv87s9WaQA2L+6sgtB19X9hTU+r7Aa34BATM6Lx90oftTI7ULgxdHIpHvPiOSqhbPPpvBo9bF7H4H/bVz89sLyAzb6flqu/RK/6m6XFbkEndqTQCu/Kw3qQtrXlqwyOXuiNYVITNgLy0KSNmKlewGK+kqJBmrLn0bNTgwHnDdA7Eo4UXBo2hfssc7EoTS+ujLe7kvGLp9hsDkGz0d8aoK83p48VYfcG5+HWoqUWtccGvOXx6677n7NAqZFHrl0CEW8Sn07L1vRUDzdyoWNYUGUGjIZStch5Nz0+orRkvJ92L7JPyywZVMaSr3dXFF+6liDYh08Vnvrl2x6+XodRS57qNkMeidqk1UvcjOQ5nh4iMSuqBJ4PEgA4L8bpB1Ao6nPyqWGHytw== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(376002)(136003)(396003)(346002)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(2906002)(8676002)(70586007)(4326008)(8936002)(5660300002)(55016003)(110136005)(478600001)(41300700001)(356005)(7636003)(70206006)(316002)(16526019)(36860700001)(6666004)(82740400003)(336012)(40480700001)(26005)(426003)(40460700003)(6286002)(2616005)(1076003)(86362001)(7696005)(82310400005)(186003)(47076005)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 18:21:23.9160 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b725cea-10b0-4949-b988-08dac66d099c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5191 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 This patch clarifies the handling of following cases in the ethdev API docs: - If rte_eth_dev_start() returns (-EAGAIN) for some port, it cannot be started right now and start operation must be retried. - If rte_eth_dev_stop() returns (-EBUSY) for some port, it cannot be stopped in the current state. When stopping the port in testpmd fails, port's state is switched back to STARTED to allow users to manually retry stopping the port. No additional changes in testpmd are required to handle failures to start the port. If rte_eth_dev_start() fails, port's state is switched to STOPPED and users are allowed to retry the operation. Signed-off-by: Dariusz Sosnowski Acked-by: Ferruh Yigit --- app/test-pmd/testpmd.c | 8 +++++++- lib/ethdev/rte_ethdev.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 4e25f77c6a..a0b4ede48b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3182,6 +3182,7 @@ stop_port(portid_t pid) int need_check_link_status = 0; portid_t peer_pl[RTE_MAX_ETHPORTS]; int peer_pi; + int ret; if (port_id_is_invalid(pid, ENABLED_WARN)) return; @@ -3231,9 +3232,14 @@ stop_port(portid_t pid) if (port->flow_list) port_flow_flush(pi); - if (eth_dev_stop_mp(pi) != 0) + ret = eth_dev_stop_mp(pi); + if (ret != 0) { RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n", pi); + /* Allow to retry stopping the port. */ + port->port_status = RTE_PORT_STARTED; + continue; + } if (port->port_status == RTE_PORT_HANDLING) port->port_status = RTE_PORT_STOPPED; diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index 13fe73d5a3..c129ca1eaf 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -2705,6 +2705,7 @@ int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id); * The port identifier of the Ethernet device. * @return * - 0: Success, Ethernet device started. + * - -EAGAIN: If start operation must be retried. * - <0: Error code of the driver device start function. */ int rte_eth_dev_start(uint16_t port_id); @@ -2717,6 +2718,7 @@ int rte_eth_dev_start(uint16_t port_id); * The port identifier of the Ethernet device. * @return * - 0: Success, Ethernet device stopped. + * - -EBUSY: If stopping the port is not allowed in current state. * - <0: Error code of the driver device stop function. */ int rte_eth_dev_stop(uint16_t port_id);