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 03EC04240F; Wed, 18 Jan 2023 16:45:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA54C42D79; Wed, 18 Jan 2023 16:45:51 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2061.outbound.protection.outlook.com [40.107.102.61]) by mails.dpdk.org (Postfix) with ESMTP id BA05942D74 for ; Wed, 18 Jan 2023 16:45:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nlXtq4FLOrp3x5Zsi3BLV1JKtlz82NLq35xcDQluPeodpdQoS+QkzXWxAalNVKLMf6jwcuOVtlTh1YQGMv2GNGC3w7eB4jszcZyoWCoq2AfJwtqD2J3+ODxLsRMXSBu3UvP/lpjoq6UVyYm629JhCSZzEZ5xu0ZEMsMeQJKFO4UYQaNuotZb0oxsO1AlikjhnxnQbMmXhfM2DBve7ATe4MjCVAHuxLX3YHLbjkYpzU0Juq1sSaxzJo4LMJeCY5KTL5JRt3MaUD3/L4Shmn1MZmBZu2R+LcMTtcBymuxo1JZVQ5OjVHqTpTloM/kJmmaRIJOoU1wcS32WkpuedcMXlg== 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=Q4vazMYT9+2nhcSc/nm9gXDcZkhr7juOAgNQrRo29KA=; b=GCue3tJPIr5jfxO949ZvwxXhJz9c1eWhR1WxThHs64stWj5126VFQmW+7NAX406mnQTOK4oc+W8bDWplNXLYy3M0dCUEEAucz8ihbdddczS7Ra8qpQnzHQg0zVRuKyG+rFjoER8eRPp3zMh72kNu83EzC9GPX/az4b/GxkZnAjGYOum+ctBV5ghR52NeN1FCUGMzSO7iMQuuZWtPxtkHWKlCPhoi9d1eRytWsBXM8CQlfDwiZ5cCCjwNeHtkOLKQTFOKdQ9hgwqkp+PUJ39gizdb6+p1sYRM1sk80MF1ZPWjHFyRC8hJ6MP1HAzzgXyHOeQ42BrihIQzVZKJ4cqvlw== 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=Q4vazMYT9+2nhcSc/nm9gXDcZkhr7juOAgNQrRo29KA=; b=SPQfuyHablkXwQpbY4ceoSAd7VZ5v99qrZcNXj42V4Ku494WUMyVMadnxkNsdXegM4TPNISIMXtkOer1KpdlJ0gx1nDA64azXVpqr2/tY9blhZ4yo/hqHmF8HcyT98C4CsS0E4ihmbVl51ONYaNq35/tu52FHBUo/wuEMCionHTNDyX/RHzxXlLVHo/wX5yxpSFi7giYUjnZiBUvckqq3P9Jv6FqkZfeQa8oEXl0Zg2xAz6eyqQZaKw3lOVH85QvhMLVD/ODc+AlwgBC99YvAvikuy0+Ouya+Kjos2YHgcuvISl9JGo137DBpy1rbbSoulHOTY+o8kII232h8oP+/A== Received: from DM6PR17CA0030.namprd17.prod.outlook.com (2603:10b6:5:1b3::43) by MN0PR12MB6080.namprd12.prod.outlook.com (2603:10b6:208:3c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Wed, 18 Jan 2023 15:45:48 +0000 Received: from CY4PEPF0000B8ED.namprd05.prod.outlook.com (2603:10b6:5:1b3:cafe::f6) by DM6PR17CA0030.outlook.office365.com (2603:10b6:5:1b3::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 15:45:48 +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 CY4PEPF0000B8ED.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.5 via Frontend Transport; Wed, 18 Jan 2023 15:45:46 +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; Wed, 18 Jan 2023 07:45:11 -0800 Received: from nvidia.com (10.126.231.37) 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; Wed, 18 Jan 2023 07:45:08 -0800 From: Rongwei Liu To: , , , , , , CC: , Ferruh Yigit , "Andrew Rybchenko" Subject: [PATCH v4 3/3] ethdev: add standby flags for live migration Date: Wed, 18 Jan 2023 17:44:46 +0200 Message-ID: <20230118154447.595231-4-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230118154447.595231-1-rongweil@nvidia.com> References: <20221221090017.3715030-2-rongweil@nvidia.com> <20230118154447.595231-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] 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: CY4PEPF0000B8ED:EE_|MN0PR12MB6080:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a018173-cab1-4efb-99c4-08daf96b115a 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: lEy6YbBg8/Xp4pBijiP0NA52xZX31g3hDwD88MRvoU103scxkTqiCFd4PKJcMUNvqSsd46rC/bN5wONpE6MIOTJjCM7e1efgjgalKrr6dgRQ6sv7s72M7OY4r35h+ptMU3zxlbGIurtWqJ/6iKxQcbFr+IfjGIZo2gBb9jQRCFjEnCoxb03plL37S6iz5dKyCIElfXv0cZ+CnmlBSW9GDpNWv+1pVXob+R+ibOSIYNPTiaw/0z9dkDUJOXEzk8qalvkofOIWlwifJ1trNXSLZHWmmm4ZybfDVCEnM7OMar4sB2Dez8rbEYPo4sTXrWFh1F1VgDbRJzrJfhMvKArdVenXBaq8trct372a7nvOmvbKxf3oNogDSJBMWuTnUcr26Dzq2yP9WXdQq9+m1YHIECpk44Tjc7yQnHo1hiWqbBhv6IeLl0P3+u4J+4DmyrnTNpPcUbqiQei+a4OL2Fzb3qLyW1PvbcGPf4VfkoGH6Aapcl9XUlGJSWNm0wdR55tiQrQRrOZIrc87UcyG9eybDvTUOO5C3ugpvkfAmeAQbzYPqAhOaY05qepsioVxVhNNp7T/SZKYrHjlRhNhOrpWzqusdt/4pHSKxFbaNJIYQom5JNt+k7tGt1cQXasIraRMs22kJtVFNnxtBJkwhNWLyq6b4IQKOAHNQuptNfehXyjwU7+J1sAICrYqBZGnTr34oTZWrgS6Pf1m0js77Oc6Sw== 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)(136003)(376002)(39860400002)(346002)(396003)(451199015)(40470700004)(46966006)(36840700001)(16526019)(7636003)(70586007)(36756003)(47076005)(8676002)(41300700001)(426003)(8936002)(26005)(336012)(82740400003)(1076003)(2616005)(83380400001)(36860700001)(186003)(110136005)(54906003)(356005)(55016003)(5660300002)(4326008)(82310400005)(40460700003)(70206006)(86362001)(7696005)(6666004)(40480700001)(478600001)(316002)(6286002)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 15:45:46.4782 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a018173-cab1-4efb-99c4-08daf96b115a 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: CY4PEPF0000B8ED.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6080 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 Some flags are added to the process state API for live migration in order to change the behavior of the flow rules in a standby process. Signed-off-by: Rongwei Liu --- lib/ethdev/rte_ethdev.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index 1505396ced..9ae4f426a7 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -2260,6 +2260,27 @@ int rte_eth_dev_owner_get(const uint16_t port_id, __rte_experimental int rte_eth_process_set_role(bool standby, uint32_t flags); +/**@{@name Process role flags + * used when migrating from an application to another one. + * @see rte_eth_process_set_active + */ +/** + * When set on a standby process, ingress flow rules will be effective + * in active and standby processes, so the ingress traffic may be duplicated. + */ +#define RTE_ETH_PROCESS_FLAG_STANDBY_DUP_FLOW_INGRESS RTE_BIT32(0) +/** + * When set on a standby process, egress flow rules will be effective + * in active and standby processes, so the egress traffic may be duplicated. + */ +#define RTE_ETH_PROCESS_FLAG_STANDBY_DUP_FLOW_EGRESS RTE_BIT32(1) +/** + * When set on a standby process, transfer flow rules will be effective + * in active and standby processes, so the transfer traffic may be duplicated. + */ +#define RTE_ETH_PROCESS_FLAG_STANDBY_DUP_FLOW_TRANSFER RTE_BIT32(2) +/**@}*/ + /** * Get the number of ports which are usable for the application. * -- 2.27.0