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 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 --- 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) -- 2.25.1