From patchwork Thu Aug 22 14:09:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Davies X-Patchwork-Id: 1975567 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006 header.b=wkE9z7Dj; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=selector1 header.b=UwIpDSnd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WqQ7k6Llgz1yXY for ; Fri, 23 Aug 2024 00:09:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 444D1409FE; Thu, 22 Aug 2024 14:09:51 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id c41kyayqqA9a; Thu, 22 Aug 2024 14:09:50 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E5FAC40393 Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006 header.b=wkE9z7Dj; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=selector1 header.b=UwIpDSnd Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id E5FAC40393; Thu, 22 Aug 2024 14:09:49 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C5428C07E7; Thu, 22 Aug 2024 14:09:49 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 65CE5C07E6 for ; Thu, 22 Aug 2024 14:09:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4796E60B59 for ; Thu, 22 Aug 2024 14:09:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id vIEE0NMkTaS7 for ; Thu, 22 Aug 2024 14:09:47 +0000 (UTC) Received-SPF: Permerror (mailfrom) identity=mailfrom; client-ip=148.163.155.12; helo=mx0b-002c1b01.pphosted.com; envelope-from=jond@nutanix.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 7278460B53 Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=nutanix.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7278460B53 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006 header.b=wkE9z7Dj; dkim=pass (2048-bit key, unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=selector1 header.b=UwIpDSnd Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by smtp3.osuosl.org (Postfix) with ESMTPS id 7278460B53 for ; Thu, 22 Aug 2024 14:09:47 +0000 (UTC) Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47MApRh2030996; Thu, 22 Aug 2024 07:09:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= proofpoint20171006; bh=SvyrnHOhMmfNQc0NMrFvTsx1Yd4rEsso/wA+fzX0z Cs=; b=wkE9z7Dj4D+Z6bQIC5F2YDLVxs+NuS+v62jx9uAmPOxnZ46RCmc7ThbMi 4dvYPSTrrQyMUDAeX0xbRmGcjKtG3+caf7vOpv4/3okFm9CeK6TVSV4GdeyLfCDW tc4PND1ZAGecMyaf0uGUoQzwqoQRCxY+hWqgvr3ggv9sdh8RbvwG4Mz0UMQ2e6GC zhBOE4UQSDeu0qki6zvrG0p17X4mVCFsVjB2R4Ro1B7yOye3FwiYswAZVn+8GU/8 tVx53o4oHAldkLa5JMa9tS5v8KnmDIK7gEspxaRkkw5ygStZoAGWaAWfORrIWX5J lS58HnO1m54zFHpjTEC2pXnX2dH5w== Received: from bn1pr04cu002.outbound.protection.outlook.com (mail-eastus2azlp17010007.outbound.protection.outlook.com [40.93.12.7]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 414g9cehh6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Aug 2024 07:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xzrGBTIJv/5/d2kwbdQeBCaLT0iY3Ra/4TQtrX7Tuu8bqGUK5p2nh1p6AeDupnHKdU2dDM+6MRG92th+EBTHvQx1MTlS7CKTJzG2qJDIDdOr4zFUk2yECiizppz3EF+CRwjNWkNusT9SSi2XsZ0/PNKJaQJUHHfR7orYw27cbtVX6bG0eH1lWnaaJz9p33VXf8jsGWvrTbLun2fQqNW6r4iDlS7BlDM3smoxE7bXKWbmWoz+qdnY0AQkk3jh9y4aValMOSKy5/s0d6rmxkvAD0/XT4zh/sVyS4rBddXOG8XgQlOesKwzV1Oc9rZ7dCcd1lOG0pAQGcVS2qOCHW78oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=SvyrnHOhMmfNQc0NMrFvTsx1Yd4rEsso/wA+fzX0zCs=; b=Pw/w1AXwSQyewJ+RlwwLJFdinuKXQUu/w9kcjgReCGZqOCKSpcKHHaTeJy6w5nnHYajfpA8nbRYVY0qDiKPdFB4AvsNMmHPwPoFpOq9nOyp6lBhSo5+GUoAJw7HnVUiObve4/7WAJWX3KnIzhZEwx3C8sL40ZOLcgy6sYwEsRNwP7MZzaHPk0+MS7V52bYemQA4LQ8tjjzNbFivlA6l/3mCrcMsHUOL91OONQt5bzQ8t/5p41QF3rJuCJr/7B+rY1uwqRk/XS2js3OomK1/C3ACXv9WYKz00CpTreSqfagG1WJxvuF1nEJYR3D5z/hG6BRhwVOcg+JSIsq7yd/x5zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SvyrnHOhMmfNQc0NMrFvTsx1Yd4rEsso/wA+fzX0zCs=; b=UwIpDSndC5/fqEAl3AfyJgATrvIgRPTWuKVrRlgqqTzraBnTdN8xVGte6/gZBCPtNJDnJl97glHIwiaXmvnQOiCtMamEpoyQ738F7MB4PyrlXF8tnwPEJMVxv3XqQ2wf0LQXNXR1Q8Ahw/96neB448jDChHyYxVbmh66jl2wnQhohD/73Nj7FbJVBLT0VdyxE3MmKIfl4lM+rBOffdQ9A8chLIzm2Ips72b/IgStaKS1g+X3LF0/MtkuFyFcapsTG/xsP36cp3QGYMSR5H3PMezQitN76vwc2fgP28BSkWwtF5OZ4w+ToGv0sH/gY1kxaECxsh/2ATFoQaQgJZbC+A== Received: from CH0PR02MB7964.namprd02.prod.outlook.com (2603:10b6:610:105::16) by IA0PR02MB9531.namprd02.prod.outlook.com (2603:10b6:208:40d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Thu, 22 Aug 2024 14:09:43 +0000 Received: from CH0PR02MB7964.namprd02.prod.outlook.com ([fe80::dfe7:62b1:b932:fcdf]) by CH0PR02MB7964.namprd02.prod.outlook.com ([fe80::dfe7:62b1:b932:fcdf%5]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 14:09:43 +0000 From: Jonathan Davies To: ovs-dev@openvswitch.org Date: Thu, 22 Aug 2024 14:09:38 +0000 Message-ID: <20240822140938.241689-1-jonathan.davies@nutanix.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240822112013.893012-1-robot@bytheb.org> References: <20240822112013.893012-1-robot@bytheb.org> X-ClientProxiedBy: SJ0PR05CA0065.namprd05.prod.outlook.com (2603:10b6:a03:332::10) To CH0PR02MB7964.namprd02.prod.outlook.com (2603:10b6:610:105::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR02MB7964:EE_|IA0PR02MB9531:EE_ X-MS-Office365-Filtering-Correlation-Id: 760e6d18-3474-4efe-4bd0-08dcc2b4123b x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: n0uRbosOlIXClnaJhoCpZmK/SeE4PkVpMntEnrEx9u7IyEyYj4EBoJNs8k7nYkc0hwo2uschWJlJerr5XzT0/0c1jnPIDLjXM3oNfv9q1DO0ef2AzWjPs4kyBcjLnvSu3V9GpaT07A1SEwl7qBeoIyi2gkgzVcoL5AUT1TeOSj6iT4nnJR/ufSp8iyTsooMLKRjtSQpskT0sf/l8RIFxq7yqldqqZVHH/TICgxh/1BT3K/oGLaoJZ8RqvAYZTC0076z0d4KYvFSSUY8zXUSHSX2ubTVF80p9v9kFTGJGLm6mXUMhrjhJlfLsefPRD5xEZsINNjFUn2ws2WpP1GvlCxgmEKbuOWPlEunUHcfyQnq0f+uQQF/H/QwIROxRsToMG90lOuzkyjGUUims+9O1n35ABx/s1cJe/obZjZhFW0kCumMTSoET5jOcfb7NY0wSxtTsfkRwP4SxZF6iuTHVgTp0eYW5/UVUQ760tZt2E/YADe7rj7SFfhsiu5WYlbkjhYHdvy4A3o36zn94cseijHL4R7vgx2WM2ajcvSazWml8w70BBnkFrT7NN3+OS/iP0C2zeuNQB31HOLarkNd3T+0owr/hQOAixWf0yWevbEPIiCnH7aq8hrgmGpbQMFlRPn+iCPWoGw+EM/mIt650y2awqG83D2kzL/B4utCDwnvmlsWFnkicSOEXDGfkoW2tKhfsfo2cPtTb7zvMPwVts8/+jhNWvAIYC5oMf5+4Za2k44lCIdX926/1uwa0X2qTXV7nD9K5iKYpHnUevqTtI26J88GlZKgS7a+G9bISaH9ju39IC5A7FOQuaC34PER+uirQXIUZH/g8wz3eYafoocG7pkFIpGBiOkpFxMJLRG/dotmctlHRqdJ0CDDffcf4Ncdur8qRNLyvCV3DqYASLeknHiUHHacM+jnBgiWSwiRGIyzBoh3H95EOoICLVe8WoEocm3lhXrjoY4ZFFc/rmUHNNJIMjwI8XaXBlfvAvAtJB9DlMwdhkCTOrymaKaNoGAOtKAswQytWWHVZ/8N9aqrFpQN+y+Htsyy4WIn9f/rafqt+m7mRu/xzdBbeYmeJXCpDBJUlwwv0FOVecH9dh2XeDiyWkTyfqflLXIirCp0yzFf5eT215XpjSABsxQPg1rMwQ/Es37Xw1AXhIgYVKDWRheWpBdY2TnfYIpBHhYNV5XEnbkL7J1n5L+KG7+lDkJ3gsm9CDoGG06J0FCFpKKNZ283yT8IN9557ljh/lHPjRENU2x150lK8oHaD4nw99Hb5RjaIUIUNbIphAJdihOdiuhEQJGN4wfHL7DedPcS8p88dypoUvh+DATLRfIyLQ4rVHlHFVID0RnAiueu2FSzgrPtbvd9mkyFf8mwgY3z48kXbQbTYnmmB9rTjJcKlOpRXa0ULQFF1HytAVCK+Hg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR02MB7964.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dcFCMmYtdKQI7uVqMwfNd5+/Ggva0gRyRvPguOiCV1g+p1skhcjz8UnnRJdYI7EH2YSuohEtcpCUk9BdirHcpj0UsY0LMfpY0RRrz5gXOiMZJ2XYvKIFNR4VuhAZth27AvlaLtcFOXyrLdn8BGygncjaHa6XzgqYje7uue9o34ntZDSOrPNYdWLrXEOJ0SXY0J5UVKbfdIOei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a+pe/54fe5rbTaAMyEmol8FnPGkTCSxN/KWqwmC+HgOa+iZzk0SPvYSxX4zorpJCiafUlMXs5y41GENV3yS6gDrlxqSFkcF6ez8HFBvP1bF+4p+H38Qzhb3stgCVfAY+ExU3aJAWqJib4/yNfZLDmeNVSMjeLTazfLIeBCJ/5dpFeWyZNXL2mHIAhlTrqF+lGs9hk/De9OQKf1JK+ZIyLs3mkoC4KMwbelSg1Frpi9wU7YFuQiWrVvTjypyt250ca+0lIqgrpihMPBmgTjevnCC9iGavksfyjts1Hv8suGfUb+RucuhmMwF9EZjc4A6dbxaX23WsWqZDhQ== X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 760e6d18-3474-4efe-4bd0-08dcc2b4123b X-MS-Exchange-CrossTenant-AuthSource: CH0PR02MB7964.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 14:09:43.8397 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8rmjr/FhTXZu1/oNRUPjsreQfRAhTKKAo18gmdc31kBbPzUbDzrXL+DutJjLkKZ27wtEAMrJo5+7RTB/AqmFTRgf7n4SMuE3/HChrGq99Gg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR02MB9531 X-Proofpoint-ORIG-GUID: VHhMXCSV8XTKqfrL84YLh5h3Ii9ysfPp X-Authority-Analysis: v=2.4 cv=Fellx4+6 c=1 sm=1 tr=0 ts=66c746a9 cx=c_pps a=EaDl3aPh6j9cByxWTcQcVQ==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=yoJbH4e0A30A:10 a=0034W8JfsZAA:10 a=64Cc0HZtAAAA:8 a=sN_ealGnVAfDdPpptgIA:9 a=14NRyaPF5x3gF6G45PvQ:22 X-Proofpoint-GUID: VHhMXCSV8XTKqfrL84YLh5h3Ii9ysfPp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-22_07,2024-08-22_01,2024-05-17_01 X-Proofpoint-Spam-Reason: safe Subject: [ovs-dev] [PATCH v4] ofproto/bond: Preserve active bond member over restarts. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: i.maximets@ovn.org Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The OVS DB has a bond_active_slave field. This gets read by port_configure_bond() into struct bond_settings' active_member_mac field. See commit 3e5aeeb5 ("bridge: Keep bond active slave selection across OVS restart") for the original rationale for preserving the active bond member. But since commit 30353934 ("ofproto/bond: Validate active-slave mac.") the bond_settings' active_member_mac field is ignored by bond_create(), which set bond->active_member_mac to eth_addr_zero. Instead, set it to the value of the bond_settings' active_member_mac so that the selection is preserved across OVS restarts. Fixes: 303539348848 ("ofproto/bond: Validate active-slave mac.") Signed-off-by: Jonathan Davies --- ofproto/bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index c31869a4c..0858de374 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -246,7 +246,7 @@ bond_create(const struct bond_settings *s, struct ofproto_dpif *ofproto) ovs_refcount_init(&bond->ref_cnt); hmap_init(&bond->pr_rule_ops); - bond->active_member_mac = eth_addr_zero; + bond->active_member_mac = s->active_member_mac; bond->active_member_changed = false; bond->primary = NULL;