From patchwork Tue Nov 26 14:37:45 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015474
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Jx7fCG4b;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Jx7fCG4b;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])
(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 4XyQG345pkz1yQY
for ; Wed, 27 Nov 2024 01:39:55 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 18FD16FA6E;
Tue, 26 Nov 2024 14:39:53 +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 q6TvdN-81Yk2; Tue, 26 Nov 2024 14:39: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 smtp3.osuosl.org F0C2B6FA64
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Jx7fCG4b;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Jx7fCG4b
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp3.osuosl.org (Postfix) with ESMTPS id F0C2B6FA64;
Tue, 26 Nov 2024 14:39:48 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 2E1FFC08BC;
Tue, 26 Nov 2024 14:39:48 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 2F29AC08BD
for ; Tue, 26 Nov 2024 14:39:46 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 7C0C24EC99
for ; Tue, 26 Nov 2024 14:37:57 +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 gJy8IROZ4z8u for ;
Tue, 26 Nov 2024 14:37:56 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:260d::621;
helo=eur03-dba-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org A01CD4EB9E
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A01CD4EB9E
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=Jx7fCG4b;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Jx7fCG4b
Received: from EUR03-DBA-obe.outbound.protection.outlook.com
(mail-dbaeur03on20621.outbound.protection.outlook.com
[IPv6:2a01:111:f403:260d::621])
by smtp4.osuosl.org (Postfix) with ESMTPS id A01CD4EB9E
for ; Tue, 26 Nov 2024 14:37:56 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=xFatoPQPB1veD6Lz7iMSq8P2n/UxqC7Br8YCQbMwIc24iE0AaJWie6f5PiqpGrCBXdZiJ2JIa2jjHTs/7Yr4OpZhfRoGRcw5JD1CAgSt09CjX7zBXHWDW0t720/zKLM68MEPWckN3GnnPTPSRPM/+Q97gh78gQ5rOEiNBmI3AQFsfSqkyDX72rG+XNymcPU/khtlnwUD42LWge+TbWLu8FGMoK5ka9HWRluakgz17WMC7e9D7vsxx0wEYfeJr5b1EtRinBXz7OiVWXhICNgkxsFrq1cOn+D/BX2finy03pEMCBPdvEp6WihrJhejoYRiWdcLB2cbz5hjx0Wo7G7Eng==
ARC-Message-Signature: i=2; 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=PI3+t/Tyc3jh3NunEmw1+2zZ/ZbZf5St4OsBK6i2AWE=;
b=VHL7v3q1KuKX8NSmxCtwNYyS/RC9cnEXpAI5PUS0cELz4Vq4Zuc7kntbPLBiu9Ez3p6YReuMGbzDPc03Bv6XJn8iSvks7ZsbB6xMHGA7eFFbqT+igNotaU4lFvAeE6dAXIQGXl3Rb0Kw/+/AZPOa4IOvHUkDySxNxmnhzW7b3Cab5sHRGkX+G6NNfJssKIAZlKSk8emtiBJuFV9EPwIyBeGKYYw1cJPRs4i9cQy80cCocQzOfBlOpVLx9hgdXqeMCs3PhwxfJ++G6V2ui1felktzb4oLokZHdKsSbTNsrZvnR7JhLnfj7R+Yaq+c4L7vVa5SKrOUfrWq4dcJ5xziaw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=PI3+t/Tyc3jh3NunEmw1+2zZ/ZbZf5St4OsBK6i2AWE=;
b=Jx7fCG4bAJJgAdsm2RjZyo5RYwOMOYt+66GrtrW9hZFlO41e3j0kNg2UkXXtlvZxJNAFwaSWvImmcL7jbqtdDyu1hDv3LYT7KogOo7v9ChTkEf61ljQm50qwch9eiDdHYubYNmslyFJ63n9urj566XhIL4UDrVUk73f92PuZXG/2utaIt2ujxf/SprbKHzFLHLNfWkZSJvRjQYw2dzbK0ktqcRgwbgOb5rqKzfew66qNlD9/dl96hVMINRHXKoD4QMOtEBKsTV01JvOJhyDBFVPfNJlIeVpucXzmZaBdmaQm+hUYmoBorx736GfyMZP8R/fhD22+tU3ruRf1hTjh8Q==
Received: from AS4P191CA0004.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d5::10)
by DB9PR10MB6546.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:3d5::21)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:52 +0000
Received: from AMS1EPF00000041.eurprd04.prod.outlook.com
(2603:10a6:20b:5d5:cafe::87) by AS4P191CA0004.outlook.office365.com
(2603:10a6:20b:5d5::10) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:37:52 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS1EPF00000041.mail.protection.outlook.com (10.167.16.38) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:37:50 +0000
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (104.47.11.239)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:37:50
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8033541
X-ExclaimerImprintLatency: 7101467
X-ExclaimerImprintAction: 3ef038f0166340a0b8119e6dc9051764
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=mvOBr8OoYSTgTaMIjBifSE8VY8xB7rGB14ch3sHfqglTHXJmCW9hN/m1RFBeOoK1l+6sCgXz6z4AHOAAJ6aekUtDlCSOsCTQLReOk4YPjnqX6dJIcBl4mVx0YFwL/U9ylHMVZAO55QhKA1XqZwdqwJR9dg1otxLqRZ/vjYv35VhSyKo1iLODtSBQiosDfYFP2AlfWIJNV96+uPhO+nFq5YGsbfcyAEBOCJ6kcwsGa4GPmfEQ5B2WxxdlVWmFnoLSTHABVfEDF6tR3bxfJzNDSUPploukCDijYZDLJXJL4/er9uCcHlfyTjjLhRtlvHLWvV08yqtdMA7+j4RceFNaxA==
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=PI3+t/Tyc3jh3NunEmw1+2zZ/ZbZf5St4OsBK6i2AWE=;
b=cxeNnWGd6UjGoN7sBWqODcp5CLq7if90A5rpIhmJiZgqEHgFaX364q8MC3/P5pgP3WOeyoW0Lt6nkZAMO1xRTP6PYJMbKvC33hWzNaNurbFGuwnGSo0vSgfpcX9yy4XzW+/rpNwnQ8a2b3dfIdQFcBPVSzIrIrQwd2J1Bv71prxBR1bEzbyHl/xA0wqd2EaxQBOMfFjJDFfG8IbKRnZrGjI8Y1qy76W2SIL+hyHi+kcl1pHdzWTmemJg7+ve13KzgKM91bEHkXFu8GSOtCj5202cz4IkkptnueovcTvCbaNCysbOGnmM/hlG8DuXJA8u5OmlPcoSB0SOIHhQwHfnKQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=PI3+t/Tyc3jh3NunEmw1+2zZ/ZbZf5St4OsBK6i2AWE=;
b=Jx7fCG4bAJJgAdsm2RjZyo5RYwOMOYt+66GrtrW9hZFlO41e3j0kNg2UkXXtlvZxJNAFwaSWvImmcL7jbqtdDyu1hDv3LYT7KogOo7v9ChTkEf61ljQm50qwch9eiDdHYubYNmslyFJ63n9urj566XhIL4UDrVUk73f92PuZXG/2utaIt2ujxf/SprbKHzFLHLNfWkZSJvRjQYw2dzbK0ktqcRgwbgOb5rqKzfew66qNlD9/dl96hVMINRHXKoD4QMOtEBKsTV01JvOJhyDBFVPfNJlIeVpucXzmZaBdmaQm+hUYmoBorx736GfyMZP8R/fhD22+tU3ruRf1hTjh8Q==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by AS1PR10MB5555.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:476::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:47 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:37:47 +0000
Date: Tue, 26 Nov 2024 15:37:45 +0100
To: dev@openvswitch.org
Message-ID:
<2e7c714a8543135ac19fd8a1a2c58bb691e78e0c.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0116.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::20) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|AS1PR10MB5555:EE_|AMS1EPF00000041:EE_|DB9PR10MB6546:EE_
X-MS-Office365-Filtering-Correlation-Id: ec131f13-7257-4bcb-ad52-08dd0e27e7ac
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
ILSfKf/xLTJDt3J08P5AIsQYDewzRvI8B7kLveU/Itqhe12lNn7w9urLQ3qdxp0WJAiaEM2ZNa2DDyTSlVthlIaTvDc6AAtkKq7XJVavEIJPBR6I+y1q5S4PXkVsEXc1kB35wPNIoexdr28kccQIIQTcED2m//zqg2ScregtkSm/hCxJhP8/sDtDWD7tIyosjwrmpoGt6nvKwpqQsPTtW0xm5cCV5A1lCN3ZsVqjzpiclC92/ycsqBniygFjJGO/C4J6N+4wNZp57KuXMt56fdT+K8w1UNax0saaVo23kJgbT8S0IkvofaTPBApN8vL2J32dSTqqsZ8VOsfQXkzqZ5HyEaMP2cAKesrJHVTcio1pyk6KeXKvxeEeJuym2vvTUcLgZe1Bzz02pkQg/0aAaI/V8/I1XUxmBX9fJH7pb1utuU2N0f2TxmNOHIN1aaRNfXbNXk++9IgHDAJtu1nEsN6p+ZtwLwz2LYi3AJf14CfOJgrghYtAxgLG6tcx7reiVkMQey1C2qAl150+0zaDdZLIQcA1yOCUipOLxzh2uEsBPGKfClUfaDVLzrZUchOXF489i6BPbVY5LALB3uuh/caSmZvigchI4rw59gj3rejDm1fbIllYB8kSQdGAxEz9sg94AIzVGy8BBsho4LkV0wJ88iLfjpKMI1O6TSNk2vkQum7F3O1ch1eGPsk4VzCCXHOaMAIbhmycDx+67nB2yhC6cVrBu9jZRGltYuMtgl6yYw+dbRx+Q//IYrPTC8KDcMz4xe97o66M3ch9RPqXnNiUa5hwj3GO1Nt4cMYly1jawfIOH3UjoT/eXOG7vT+OS7CTfuL+ft1a3bUlmyg4AheFqqOnsKIRTjHrYDCpRL8rBSbHlZ2xtPb02ExoFPhfY8rpu48CHyrX0fUl8K91fBRsZo/3TNmat38GeFGk5zMuQCkJOBSn/02TW23UD7SNBgAA+SR7B9V8JrRGYOCYAZdJEi8TF2iVkjX3tMCPtukaQKE7Cn4u7OJapJBaBtqO6seNUSIPSoaOXmLVu/GlidJdxhuVi2XvO8RF/7UfawNP4LISGw1lM12MCwRORsDfUdkrkKT6ZFJHN07jqp4xZ5Y+IcPN8EB8kFpwrI17eaYeQ4D/P0wCyAgh5mWhhsm0uqvsjtYh/EueDif5y08xcIpOrgi5CqESuv3X3HEMJg/yXvL+v7B0T/NyuhrbEaIR0Ns3Q++cJNARbz2Z+1ShISvhrXQjd8HbxUbE551/WKLwDLfxwohMLPyd1kKplr2OAOqsz7tgcQg/RnbJ/FLQ8NKpNC7SV2zLR9PXBDsZUbqi61DtKU5W8kSgPRFqBb8x/gfJNz6ocHh+3S89ETVM6Q==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR10MB5555
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS1EPF00000041.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
8e456e2e-f7c8-49ef-f2b0-08dd0e27e56d
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|35042699022|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
5M+RMiA+bhMAQhv7CXHuCvwwwn2bc7UO9aOvQOb6riY5Tw7wqUiwqjZJf2Ff5PFTuYI4+yEUdXhBVl2TX59dADCWluSi6hr6Zqzu9l7S/IqLXSgFUiFlwoL6JJvmZKKNqmjx6+X+mK/MuP7snPMC/s7sug4ciqPxylBKONN3Fs4eRpiKPdSDEFdv9Ki1ZLwv0+4m5H8VeG4F1OnUhlkGx1MBbRKeBhhKOaapAbryU1OkfeL57E6piYCgnqnVpHkzGaLQMc3viCMUqtVfOi6EE+kODe3QwPWpL5on7BREymiXXck/eVaQKlM8Wr1tiT66+DUCPFGKawObGAOWFnaykG72LgF4dcIljbYrFc9Mvl3Gk55uKvDp2wgAiyUXPRi7F0z7adhjrkxYAYAscs0uqII3gsr7jPG7sZVR7lDUZ6sMJh4haKRsfuWGDba12L+UXSkWWvzreHf5oPcjx2jhCBnSxPVO8W2tPUiy3FVgnXxClkS0UVVU9d3ZwBOUhSYYDGvCyam98ZE5FPCAk+PI6jY+jTMNMECRaaKcRbYOoi6xmDo9XjPV2ec4FeA5t3oTL1Y9yrlFoQ78J69OlnmN3q6+eJ+4NaCbjta92W7j6iqvdUxKof0Kzs2l+RGd6LZvgeicFZyJ+Ot4Qun93W1fgR60stsxtj2b9Bkk+ZWJZXKrD1JryCdxULp9fUs2/Io4C4fWU+96aeNZVqHRXB7D0WvgyJvBWSvyPrH/yYjAeZFtrspJ6Aa7XjDlaP/QuMyK+FKvoeC3FkSboD225kmwpq/4HnScOKO7NHfIomcEAKERYSnVES43QF0tobmqaGgHY9zXPWVNezCY2aBCrYrQtc3JFvW6oO4WK4m2Szy1hSq4qNCunApicFNDgpiopM0cfhDyNiOamvdI5pxuc+Re7Sv6lbqnrYP9HQzziiFDY3PJVx3pphZVVIq6zajmld98Q2lS/fLPYG5Mrh7HIbYRLlXgc9ul96BINxiFMXn7Q8LK0acwCs4Pb1dioL2dYMFrToOTiOik1MUyuA0kcysNtg6NVQ+o5r2zQ2a11XuOSJ1VtYJ2/GT1UUK0SP664mHwUR4yaWD8YtxPe4Nal+DVucxVi1rUVVroZ8IhZBKvERCEIuxvqh8vof9e8lA/J5XRSc99YoKjCzW018vw+a1mrv9SJAhJuT5J6Cfr8cfCvLMjWWx1Yiu69J7X3bAKrC7IFcefvaa7hQR7yDEXwakYflnJGgW7eSyPCRYv1yjhnQUvYgwzcYpgnOLRvNUes/Y7IerbzKnHzVthxgWdByU6RlQacnAHZJD6lM3tedEH6jx9lbabcROU2qmwGha+Sxeec9utFGSrkojte09dw5BJ2tF1kTrHZf6uwtvmt/2cz8MqPaxNr/E+7/VtF08um0wJ6sN0UQQ76DrLv+gFeoSQvCWoqFzh0BTMvMVs/CdBH6LVy2JGy4XolQqWbNFCJl0H
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(35042699022)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:37:50.2657 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
ec131f13-7257-4bcb-ad52-08dd0e27e7ac
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS1EPF00000041.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB6546
Subject: [ovs-dev] [PATCH ovn v3 01/33] northd: Set southbound mac from
lrp_networks.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
We already parse the networks of a port to the ovn_port struct, so there
is no need to reference northbound.
This is a prerequisite for later patches that use derived router ports.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/northd.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index 0fe15ac59..32a7c8509 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -3139,10 +3139,25 @@ ovn_port_update_sbrec(struct ovsdb_idl_txn *ovnsb_txn,
sbrec_port_binding_set_parent_port(op->sb, NULL);
sbrec_port_binding_set_tag(op->sb, NULL, 0);
+ const struct lport_addresses *networks;
+ if (op->primary_port) {
+ networks = &op->primary_port->lrp_networks;
+ } else {
+ networks = &op->lrp_networks;
+ }
struct ds s = DS_EMPTY_INITIALIZER;
- ds_put_cstr(&s, op->nbrp->mac);
- for (int i = 0; i < op->nbrp->n_networks; ++i) {
- ds_put_format(&s, " %s", op->nbrp->networks[i]);
+ ds_put_cstr(&s, networks->ea_s);
+ for (int i = 0; i < networks->n_ipv4_addrs; ++i) {
+ struct ipv4_netaddr addr = networks->ipv4_addrs[i];
+ ds_put_format(&s, " %s/%d", addr.addr_s, addr.plen);
+ }
+ /* We do not need the ipv6 LLA. Since it is last in the list we just
+ * skip it. */
+ if (networks->n_ipv6_addrs > 1) {
+ for (int i = 0; i < networks->n_ipv6_addrs - 1; ++i) {
+ struct ipv6_netaddr addr = networks->ipv6_addrs[i];
+ ds_put_format(&s, " %s/%d", addr.addr_s, addr.plen);
+ }
}
const char *addresses = ds_cstr(&s);
sbrec_port_binding_set_mac(op->sb, &addresses, 1);
From patchwork Tue Nov 26 14:37:47 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015478
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KpBgIDcd;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=KpBgIDcd;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
(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 4XyQGJ3jKlz1yCv
for ; Wed, 27 Nov 2024 01:40:08 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 1C133435AE;
Tue, 26 Nov 2024 14:40:06 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id rdFyZDDqQNpt; Tue, 26 Nov 2024 14:40:01 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EB4034354F
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KpBgIDcd;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=KpBgIDcd
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp2.osuosl.org (Postfix) with ESMTPS id EB4034354F;
Tue, 26 Nov 2024 14:39:59 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 117FFC08BD;
Tue, 26 Nov 2024 14:39:59 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 133F8C08A9
for ; Tue, 26 Nov 2024 14:39:55 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id B8D984ECAA
for ; Tue, 26 Nov 2024 14:38:01 +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 UyOyQhA7G_qy for ;
Tue, 26 Nov 2024 14:37:59 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:c20a::7;
helo=pa4pr04cu001.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 2AFB74D19D
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2AFB74D19D
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=KpBgIDcd;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KpBgIDcd
Received: from PA4PR04CU001.outbound.protection.outlook.com
(mail-francecentralazlp170130007.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c20a::7])
by smtp4.osuosl.org (Postfix) with ESMTPS id 2AFB74D19D
for ; Tue, 26 Nov 2024 14:37:59 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=b2ULgTg7rAxGFTjBdgpAnFQIQa3eZ/2Fi7N+qTUS+crjAThspqSp7PmfPdPajg9umclKPsnQsIBcRyWMl+uI6hpusRXxRSzvukg88xnHbC9yL+to76GsU+3lCadU8lhLifhEIuqe33U1zlB7uYI+AiLIaJI/u1VM71dS9ARtpb4opfdkIGuBe4L2soL+C/Ya0//2F0ozMD9kbBdGtqnuVUdkdGdhhU8FjMBxa7GQTMBcsIwAokdO6Ff1m4Vbu3HQIgbGlJQjxRhbOXH229TruNHOUA6GalZN8o/TiiTu1412I9OtqAjFdEZ3Aifo5Q1+u+gawySJ4sNjn2Jdh3J59A==
ARC-Message-Signature: i=2; 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=u7RXsMdAe2dbXUuYVWJtWwyva/7M0e6cuS9ywmfzes0=;
b=i4qJ+JM04azwTAku7OiEgugrzMat2mSvTNIyDy91yU4K6xhAez2MzOZpGbrjbHenKbr4QMYDYmVAEaHt7D9jvHV5O7i89Z0zt5rQfUnZ0oikqLUJstwSWoToNzj8ItWKo+a6IJ+7n12QLvQH76YugzXzA8uap1gtRgBM26N/jO7/IeSIU85mSpODwPfNFKMAWS+h0Ws7vs9gaz1p70+yzFBo4JL2FJXGT7DpfPkblq7f48CeH3bReP4tw7kBNJAagaQbdxEJEuGxfTLvYLcx5gBMTVnRfOcMFNJ6uP8rz5PKHPAAKKJmG12gLlQ3jv3gqEy3lJSkjKsUHQdnmO0U/A==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=u7RXsMdAe2dbXUuYVWJtWwyva/7M0e6cuS9ywmfzes0=;
b=KpBgIDcdwPzOvn2+TM23puW3oub4kq2arnLZQxz8yZzEnYd9VVedMLUKVzvSiJTHswvIGfqeVkJYjW5zjiSAceEvgovHsXRqBegtgZD22YQ3S+7bJkN4tYHpDkdtpWfOWWLHvijIR/pfQfiIpPySY8YNpaOa05n511oTKq9anP1V0QYy8v1vFQ82mcbUlDY0QKvfCdZfALwAMQnfSAOs5LDKfgg9GDzJ0Ud2q4cubrxZgcEY3+XZ8BRN2BtcoQD4HBUm8Y1G5Sivj9N+0IcdXmdOuyvZiAfbrfbqAHTF1t/eNrrnc+kRhF+zmRJH2871qZP2Ce9Ve4k2ILLGogco2Q==
Received: from AS9PR06CA0069.eurprd06.prod.outlook.com (2603:10a6:20b:464::18)
by DU0PR10MB5432.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:32b::20)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.16; Tue, 26 Nov
2024 14:37:54 +0000
Received: from AMS0EPF0000019F.eurprd05.prod.outlook.com
(2603:10a6:20b:464:cafe::d8) by AS9PR06CA0069.outlook.office365.com
(2603:10a6:20b:464::18) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:37:54 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS0EPF0000019F.mail.protection.outlook.com (10.167.16.251) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:37:52 +0000
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (104.47.11.239)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:37:53
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 7609513
X-ExclaimerImprintLatency: 5441735
X-ExclaimerImprintAction: ac87eed03abb4594957a53dfe51ef2ce
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Pq3DkKvgqgrp6XbaHEo3zw31SZZqbbfwXiOGN8fQDLQlygrq8BsLmkT47Ke4+YQpBvTtzWSopQWRh4FZgtwDWY2S0DPrtnHo/naGXyQsAwelNaQMGDYra/n/88VhQzevHCINXkShpaS3za8u/wUtlSQlt2EO6FxDEaXSA9vPv3AKYTNUhCdSkJdty0XF12wmRZ1TNKQbXYcJ6B8h6f3opzyj3KrpL6yBNMWSkoGCfg0Oce3RT0WVGriUwsguGPIV1cJV0AsZqdTzaCWCkmi5bs6qVJSy+9SZanaXlJWNt2JayOIlBVKprQvV0KIf1gHmaFDhSakEHbencHYXGSbE5w==
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=u7RXsMdAe2dbXUuYVWJtWwyva/7M0e6cuS9ywmfzes0=;
b=TlvcS5uuo9w8gT1DepOXEW1G64gG3sPwmiEacb0zSj1zrWki0HfUSGW3gn4d70/pg1RqLdNvYd/F3H24k5dHUR9l9rdmo5tQg6AxfUus4FZNRIDSrvTJdYA7V58a6+WQBazGAHLgH7IIJBw9tgzaKnN3UZHeCZJbs/sa7hNTspFtM0uTyrNaWFM8UDmShjhcQvSueFtmXaJDGsyeowsBjgHvTsrqX/63G6glkw2SD3kWhah+RRWBLuhB+ifOZVUjC5Il12HvLjC5QUlShxto/QxmgP22sg+vQJsSjvWZBv60p/JWHu/3t7d++siOvlj2m1Z+7SztK++pLWUTzWSs5w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=u7RXsMdAe2dbXUuYVWJtWwyva/7M0e6cuS9ywmfzes0=;
b=KpBgIDcdwPzOvn2+TM23puW3oub4kq2arnLZQxz8yZzEnYd9VVedMLUKVzvSiJTHswvIGfqeVkJYjW5zjiSAceEvgovHsXRqBegtgZD22YQ3S+7bJkN4tYHpDkdtpWfOWWLHvijIR/pfQfiIpPySY8YNpaOa05n511oTKq9anP1V0QYy8v1vFQ82mcbUlDY0QKvfCdZfALwAMQnfSAOs5LDKfgg9GDzJ0Ud2q4cubrxZgcEY3+XZ8BRN2BtcoQD4HBUm8Y1G5Sivj9N+0IcdXmdOuyvZiAfbrfbqAHTF1t/eNrrnc+kRhF+zmRJH2871qZP2Ce9Ve4k2ILLGogco2Q==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by AS1PR10MB5555.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:476::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:49 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:37:49 +0000
Date: Tue, 26 Nov 2024 15:37:47 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0108.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::11) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|AS1PR10MB5555:EE_|AMS0EPF0000019F:EE_|DU0PR10MB5432:EE_
X-MS-Office365-Filtering-Correlation-Id: 90082a3c-07a2-4f62-3789-08dd0e27e90e
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
RgTzEyU5Y3TrR4Fe9XWBiGtSh/F3+KQxyLHRfvBqiQeEvrH0RcQnVaQdZKJ0XnLhATTq5SNjrAXP8GyLCYjLfcE921i6XzO8I8X/BJwtGEp2gddqicOLKJJTGSn7NMC+VN+MmFh3IV/92PrJrNXFFZ/nuUbluln8M5VJHhZGeyGV35g/U/p/xg9rVNG/QtOSmghywiceeXKJFk1X5pSf00d15EFqGDHu/ET3DieqrUvQ/471tkwwDqh5kmMmU4GAqwTyZKX6CdGVqVofRW6+vOwhQiqkR7N2pTaMBYYT5l2W3IVGJku6Wv1m7L3YArMmQAOtqbaqcuN4f1uMiXaE/4nN0ObAA9DE9VouhBxNMMZ4MyqhNKPhK1ESREtzIXIhbrAJMVT4LP+C4XQULuFID3ocqLdoEbZzOJjtk5ffpxth8rwnSSQXwmSuAoQrmQz+6W0NTJoFpcTSVhbzRYAQLG0xVePFJfntF2nIALIh4e2ZihwuZjLTStaR7WA6TxFaV4x3S+jO4JJeh119RwoAj2TQo60BW8iT3RaSOly/jx61DjFprWECWk46hnvqD7z3rulYMgWbhAJCB79bKVir63OlbbmVoXZq8cUDX4PRuV0FUQAgzqQL//KYTQWrHmM7949W+BzKwEyIeJFtxggI99Oqq0YV1DTqZT8BHE0HoGfjzr0JIrxPyvJ/rLHoq7FTrDAU6Hw4Cb57GFLFi70NKGZDQSXor8pX8jOP+34YhtJPc29UUdtmAtLcufTuFYJj48+iw1w9UOydASL2Jq+QXR+lg4OjoFnAAG15BikvMjjvjhPke7QrtpAenTiqJgCfuXmtzkcmG4JfQyze9LQSp/cIKIqc9iSSTcKAJbj48GXuSAQcZ86I66NhOvse3cLla9eE4zw6b8TJqaWcesNaI5hhQNkVkS2xJ6qoq8irxeDS6mBZ34eZlkCcaVS+i9+jWF2kn65wx10J74aJ1xg8zoP4yqHivU/+hNgTd1ZcT9kDKpR26xJvk25qC9tLZWSiWxvxNcGNK9XsU7LgbrhdaAHC8kK9h3sEPHbCiTllHHyEcG7nUE1d+yAnyZ4sMYJZ0PMiSVj6fEyqHc1i2aTHAMk1sXbo2tNlKywkDecTQ9Vmudq0SVUssgFJOUZpzu5Ym6L9fMSWJMc8gz5WPkhn1xXQBJ4M1Y640Wg0jgHNW4ELrQH5wGwJijyC8gNLBzSQKILkkLbnFMLBZEn+8oOyL5wCVuVlRIoMpcu/4yDHpzIq90ib+HTnrOxThHv4ym812kSwBbFIwZiE+F9BJf25jEagSHg9p9VVgbtLnzeTwvune0YrFUeKLIJXoRNB+kMPevzUNA63R54FfxjfD1fqOA==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR10MB5555
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF0000019F.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
1cf6e1ef-f7c9-4559-4b15-08dd0e27e66c
X-Microsoft-Antispam: BCL:0;
ARA:13230040|1800799024|35042699022|82310400026|36860700013|14060799003|376014;
X-Microsoft-Antispam-Message-Info:
XvqmVGSYv0m7J0n7kwnLQkNDn3rvqfExeLqeoVVWPWtm2qzhCqL6XBdsReBo9I9rCyxMh/am73RP/Dr2WR8XCgWiNKcRDzWbi4J2gv1S/DrBGYVcKZXb1QivDwht5yLrT8xFlFR7idykagGlnsf0yNJa/9T+n4WYwYUGPAyuYNrNcxh7u7fjrVfuXexOCtMq9sFP5kJaVT6JFNybdgKvxZBMzPXj3dtnHUOIva8CKGIBefLFz7p/8ml0CYIR2nxGO1AXXVSraEkA4XFHsf7FSoHwnDP2Aluj/vmPci+JtZApoJ4FvbSIYpX7EAzIuRp4Eb/dcLQo3STOG9zwz7LK8on+4ZogQgyuq2nF3bhwy7HqxuVzyWcxAiOMIwxpn1hHH/A5danMYN2PeDX4vwnGXp6y3w+5l9f6ioYdvxAOURkfzI4XUJ7EOO/kWHSoZ7AUADPDaOEI3ndJVr6Iy10XCsiIVP3/H3yoShKPBtCHP8859utYx45/V4+u5RerNowoxep5nghttfJS+qNuZBKdJ2h+jI2uyiMF2A1inQOeixj8n2t/H0PRJmEHR9XW38ra6oxx2ojXawab3DPerLf67fnmdNZR067MvLJ/MLYaTjTt0hdQYv1q2lD4O8bsmPpoxhVurpcvG3/cWnqMYMflgbmPV+XuTNA0FcIOkmUB+gy79BUeEDd7hbhIPaDiVvEM98v5x4XPEUHOjkbPK50rfFOYYHrjXzVMLibGThtewsY+QFvu939ixETBqpqtmxNue1iztorc2qs+K+mhqxP8H87w+3maKufsOuLrW64Jf/n4Bh3Zn/ISbDMXnSp9R52GcuPW3xSH5u5zmQMoDCgu23BPuEVxtb9fVEO9Q8N9gqm33CXHI7hYihy2Qh9opEVIrjlpKZc9wbB1AIBu25MsreddeoH31jCWDTeil6vCDYAf0MehDQ6om/v5LUolz+9qezGtGgLYsDh+0q4DFnOg90wfaVzhVXE/IYuoTc7n+6WZ0kLxXxKWaI7VcZo6RUVLxTknUakcw03SC/S7HT/4l8OuKhea/nBPZa4+WsOAHt4N3cnshtJb1cASZplsH234y1R+zzZniHr7ZSd/qZMfAtSM/PuyJuG3HqcLZ7Hlvc3GuxNxw8ybnf3xahg58u/DgsTaR/lpT1nr3TYW0oOcbBxVEFEdrs3IMnJLkePxnmcsSi4eYu7sOgdkZd0FBqIjLnztKu5dvGN8S1RijqKBvWduNiWQ9CTnwnwu97bsRDFU7bTam5AQASjirZFOFrf504Iv97MX+5+BPPYYj3ReOF42lu725kzf2NmIkEVwDgwHqNNF9nYXjZyjbvlHH5dJqqajndnvOdokmzDKjnr7PbhAl1hITmdh779oAf5HMtZwJIKcoZbW9dU3HpdwUdXHFqi8JCDJ5QCfFkLeeLgB8Alr0s/m2I9yU4qkTPROr8/EexxrXkfCpOXje/VcO7mf
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(1800799024)(35042699022)(82310400026)(36860700013)(14060799003)(376014);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:37:52.7233 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
90082a3c-07a2-4f62-3789-08dd0e27e90e
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF0000019F.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR10MB5432
Subject: [ovs-dev] [PATCH ovn v3 02/33] northd: Fix relying on naming
coincidences.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
We previous relied on the fact the the southbound Port_Binding gets the
same name as the Northbound port. However in all of the cases we use
this we already know the name the southbound port will have. Therefor we
just use this name, instead of getting it from northbound.
This is a prerequisite for later patches that use derived router ports.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/northd.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index 32a7c8509..fa3a8a882 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -3305,11 +3305,18 @@ ovn_port_update_sbrec(struct ovsdb_idl_txn *ovnsb_txn,
if (router_port || chassis || is_cr_port(op)) {
struct smap new;
smap_init(&new);
-
if (is_cr_port(op)) {
smap_add(&new, "distributed-port", op->nbsp->name);
} else if (router_port) {
- smap_add(&new, "peer", router_port);
+ /* op->peer can be null if the peer is disabed. In this
+ * case we fall back to the router_port string which
+ * might be wrong, but since the port does not exist that
+ * does not matter. */
+ if (op->peer) {
+ smap_add(&new, "peer", op->peer->key);
+ } else {
+ smap_add(&new, "peer", router_port);
+ }
}
if (chassis) {
smap_add(&new, "l3gateway-chassis", chassis);
@@ -4025,7 +4032,7 @@ sync_pb_for_lrp(struct ovn_port *op,
lr_stateful_table_find_by_index(lr_stateful_table, op->od->index);
ovs_assert(lr_stateful_rec);
- smap_add(&new, "distributed-port", op->nbrp->name);
+ smap_add(&new, "distributed-port", op->primary_port->key);
bool always_redirect =
!lr_stateful_rec->lrnat_rec->has_distributed_nat &&
@@ -4050,10 +4057,7 @@ sync_pb_for_lrp(struct ovn_port *op,
smap_add(&new, "peer", op->peer->key);
if (op->nbrp->ha_chassis_group ||
op->nbrp->n_gateway_chassis) {
- char *redirect_name =
- ovn_chassis_redirect_name(op->nbrp->name);
- smap_add(&new, "chassis-redirect-port", redirect_name);
- free(redirect_name);
+ smap_add(&new, "chassis-redirect-port", op->cr_port->key);
}
}
if (chassis_name) {
From patchwork Tue Nov 26 14:37:49 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015487
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Co6CQF/O;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Co6CQF/O;
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 4XyQH925f3z1yCv
for ; Wed, 27 Nov 2024 01:40:53 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 9D5794EDC1;
Tue, 26 Nov 2024 14:40: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 sgSEMBR44uhi; Tue, 26 Nov 2024 14:40:47 +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 14F3B4EDAF
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Co6CQF/O;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Co6CQF/O
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp4.osuosl.org (Postfix) with ESMTPS id 14F3B4EDAF;
Tue, 26 Nov 2024 14:40:25 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 9ABC3C08A9;
Tue, 26 Nov 2024 14:40:24 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 22BB0C08BF
for ; Tue, 26 Nov 2024 14:40:08 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 81D274EC70
for ; Tue, 26 Nov 2024 14:38:06 +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 cGTpRv-H5OaW for ;
Tue, 26 Nov 2024 14:38:05 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2608::62c;
helo=eur02-db5-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 79C094EC75
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 79C094EC75
Received: from EUR02-DB5-obe.outbound.protection.outlook.com
(mail-db5eur02on2062c.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2608::62c])
by smtp4.osuosl.org (Postfix) with ESMTPS id 79C094EC75
for ; Tue, 26 Nov 2024 14:38:05 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=wGGyYTH6QbAzpJ/z7q0lbz4A7D/YdqCp4t1doneiet/7v6FS6dYv2hQLdEQPOhOz8aQu+ICnHNL3jg57cNXOEyLMacuK5MC5odj1bMhX2ZyRXajnBQ+H0wMOHlAHpRhmNs+SQ9Fxdwiq6ZBzjxwqNTiiQgyfLKHUEKNllK5LrCqNoLbGpI/FHlUXMC0QorZR5e8qysYDe9qCk9hSc/ehDr/T10dan/acxzd7yl2pMPdHKb5DgqJOdhYcBjVewAD+Sy1aSKMtq043+YMteiWyA20Fq+efu4hZDCjmzz/VNxx6FrDC0r6Nngt4yi4TTpyBU0oITjrj3OEoQI3HbXsoAA==
ARC-Message-Signature: i=2; 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=JyISVOgYiNDLn1SJFmNyXNpVXKhzf6Nfem1iXk48q20=;
b=ceZqCu+piJ6IRAiQ04f0M13VUq5cXviUS284Zv0rCgwxBjRJo/oaD8+HnWo54BY2kEO2RTioWfCJrJCMJF1OyFV7FisfUsh1nOdIDzI3ol0BJn/Z630N5pFQgjwHF50lMNJntzPzt2nJfREP5izHGLhAk+g61Dr6z1aMKs5tmKWvcYEznTa/Db7l89psDZAGxpGrT0zA9X1h4pXChdOJeSfw7+zbDFGXkFHa8RElv8A5fympL1xodV+OXda0tVgTwP8fPEh9w46ASwU4FtDGz676RTlOnQIJcS4TPq5jqziZb529jlvOH3CeaF8n9MkbbJXNvXWpHXfYHvohg4TqkA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JyISVOgYiNDLn1SJFmNyXNpVXKhzf6Nfem1iXk48q20=;
b=Co6CQF/OPPB7Cnka7p2615Sgl6oArp++M4YD6Nw1IX9YO079/Q2ZpMj7ROsGqmq1zww3jkkQgolQplGIxcxUFsIwet1zhcoFI66EynEp19v4kZsD5wItGWJvkMMkUGoWAEv4oBlQxE2vedew/PIZq6OAWBseCdcRJpk5Ak2kkBMlrh2yUrIybAjhhbGoR1kLbYWg8TxNaPK5EiVIYOzX3sEb+8HtE2Cel+vcE7pxM5eijl/7gBjUnKyW4hEi3o/eosSk98LafF+LXWqBhWLiM6qAV9joUlnL9JM/k/FoJ4DYv14jonN+GG2BTj6PdWEmqIgGsFXye1ewfIJg0gm5VA==
Received: from DU7P189CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::26)
by VI1PR10MB3727.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:142::9) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:37:59 +0000
Received: from DB5PEPF00014B94.eurprd02.prod.outlook.com
(2603:10a6:10:552:cafe::37) by DU7P189CA0018.outlook.office365.com
(2603:10a6:10:552::26) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Tue,
26 Nov 2024 14:37:58 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
DB5PEPF00014B94.mail.protection.outlook.com (10.167.8.232) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:37:57 +0000
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (104.47.11.238)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:37:57
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 6733198
X-ExclaimerImprintLatency: 3397803
X-ExclaimerImprintAction: a0aa3f201e7a4634b069d51cd4800961
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=hTDABnbK9vzuUh+CH8uyylqjWLMDe8PHkKbwKwYFNlUN+QdwVe8O1OwK9pLxh56HnLh/8mCT4XStxPNmEzmI78wFAbWXLnZPwgqYnSLgDKGaOsAzgPPVvfROnJaKVZIwnGYBNTD+wIl40YCigsuuBywekoaOMTz+030qI1vEY6TVFtBMrxTL+SfzSiVPUk9u4T1sZcNtRUv6X2B6tcZgNbqBe24GBIzPW3gX5e/Lr5bdMM7rY4/vQlA/fb+8Y798/A3/qcyHzBJ0xa1xw5qJxJEhgZBZzbsXfBjyg/lMcEUE5BA0QxIuk48yZX8WyMYs0H/jdjZ7bvL7SCJgCNmDXQ==
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=JyISVOgYiNDLn1SJFmNyXNpVXKhzf6Nfem1iXk48q20=;
b=b28ZJlPO9Rt7U4fp8d257KTVmCmCk/Duw0DuKL0IgumFk+t9UENa/MeJZISQ+sDYeh/fMkmP7RWt6lyiMgQ5LEmEqHCxR2N8u0NDucDZ0yAtXuKQeKVPPi8avI2tHVpYO/Yqi3gmASNrfdqJ0Lve7NaOKNarQLC+FNOC0Fnwde5fxAuAlj40XYYkdxWvs4Rptg+NfUMRJuHo7wEBA0SYyVoAmOx1LJjwXy8agxjuzaDdlw7pTYmB63oDCOPU/dv8/RF3Iownro5QW7CNrSTrnd/5ND4n987QRm0CWY2O3E5D1cWilkb4ANoEzPHuyDkio2nVrnu/YiRCLUZRFBy7Ng==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JyISVOgYiNDLn1SJFmNyXNpVXKhzf6Nfem1iXk48q20=;
b=Co6CQF/OPPB7Cnka7p2615Sgl6oArp++M4YD6Nw1IX9YO079/Q2ZpMj7ROsGqmq1zww3jkkQgolQplGIxcxUFsIwet1zhcoFI66EynEp19v4kZsD5wItGWJvkMMkUGoWAEv4oBlQxE2vedew/PIZq6OAWBseCdcRJpk5Ak2kkBMlrh2yUrIybAjhhbGoR1kLbYWg8TxNaPK5EiVIYOzX3sEb+8HtE2Cel+vcE7pxM5eijl/7gBjUnKyW4hEi3o/eosSk98LafF+LXWqBhWLiM6qAV9joUlnL9JM/k/FoJ4DYv14jonN+GG2BTj6PdWEmqIgGsFXye1ewfIJg0gm5VA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by AS1PR10MB5555.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:476::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:54 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:37:54 +0000
Date: Tue, 26 Nov 2024 15:37:49 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|AS1PR10MB5555:EE_|DB5PEPF00014B94:EE_|VI1PR10MB3727:EE_
X-MS-Office365-Filtering-Correlation-Id: fc359a24-d05f-4534-c4da-08dd0e27ebb4
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
8A2hYdYYs/0WklFViTnst6FSynB64LmGDWIv3GoyjJa0Fuk4NmFN4+HvUR2ryCGUKqHFqjHmbeRuORdCeR327eZZH71o3H8l7kfytMZeyqkhS5JhG2IASU57PzXmTBi/6sNp2OnfNzivSPZuET04R7v2TNjvaZWsPA+XkPVZUStZZZC6CaOtnk3CZpPDQc3FoAOTB8HSi5cDqAwRRDV908s1gPEjiHY21lOL+o/H5WBZ4M0cImsaItntOY/CdB6a/X7w56uuYULjPfbeKY443ETyTaDsKUG34W6UZ8mnidbpy40tscJnFnUW+QdVZRHY+zIN7ZJxZWqnHJ3g87Jrj9r4hFo86c/ZD+5Vg813adSX+U941ACaCMl/2bJQxdkpwja0x6GclqPILLX31w+CXaAszez/oT0AsMtlrIfGOg49u4KfoDAyBmYIlNuba4qI/7nK6n/4c4cfyw4gKv2Q05SKFL/crJkWhNbXiyMMOWK4qgwcxmB3us0OMjOdkuP0u/mUTtiyMO8n5M+7pGVufPtSqMY4KgDyF1dXSgT1HUQVPc40Ef1PblUI/gZT08DR9kcqEf1b9a0x65j9MknBoCWgvs5kItQRRYKFzCO56kANYNq2kJUNZbXAlHrznxag4Rb+gqomlidKn7SZBt49Rfae97dswVXaAH291ICHk7GlAcc0K4C8Rt1mRXczberz4EHsRVSKKpJOSshDyzeosXOsgeJS5bujBFlZVlVaBi2VR3I2uFvCcOM+6YRKUOyr+GGUjPwCAv7kyd9F4rkd43RjAFyPGYufaTOXk54MyJ7VD9huU3urXdBE7YZw13sNqI+0ZQmbDmChuZ8uBnUf7e10KFFWKQ8TSnnb4bmyipyCkzxUnrtVcaA6ZSXBWJQeOpT238yO5CsEA7qZUNgH4VMFembbkzH9yXFivZ0XsHKpr+1bR0zK4rvjMQfC/jS57nw6jWMJGrJt38I9ERtE/+nHz38kwtvFDhVvLGkwmd2ka7+HVe/Bdg/cmBg0V39XKMcA+9y7BIlnws24XxLq3KGVgU6y34E9z1j/lEV24olFEjbPe0CGXNcKwzhAtp/waeVja9GOL1qzfwFcvkmJsPxh6PvL5l9hZwLLdUJq/dySl5RPNkJhHcAXQIXWP1mA3fvTiP9AKXYObwTxu2c6Xel1jwuUAXJ/eP1HHeiRl7Sca0L35B0s9K/D0RboqnWDCYOylqa4x4HE/iDFbCHTmXktq4eDqVQUbRac542TydnjfYNvpdU/UkuZsMPiO/fnTyL3GAMYJBPkBjCIt9EHU1yDU8Y1/Vrxs3Fu8Eemv5e3I3mcscAn7l7OQr22Pj3AswkzX57zQZOq09AXEa1ILQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR10MB5555
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DB5PEPF00014B94.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
376188f8-232e-424d-17c1-08dd0e27e9e8
X-Microsoft-Antispam: BCL:0;
ARA:13230040|35042699022|376014|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
ykuwfX9EN89cAczSvC0VaTf3H+lHUb5SWscAGsWKwgDNMCjl6MKvKPNakdXplhuousRHSd52KZ5Gb4O3IG1nraDZ6W1gWXHku4jcGe/CzVb8MdzBTqFKOaS2U33j0O36shaXXQhsq8T7LSwj3gbTXx1Qd3fYiniDvX0bttEBUxh10Y3jwOBqj6GRBQrRR4UwTKOHwYRr0si5j4F0QK6gEPo0OMp1qQS6r2pfFr9wAzdykR2qkVrjIoVyZ59Sh2nz8sxvcKlV14vul61p++p2zShIbhY7Az/tY/jAGlh7NySH0DYx+GwUKY3HfKzTK8raooMORj3zovk/h1HJvsSpFbvy8OdsMPdib6nzG2sQnfvc1ce+0hJLxddY5DmD++FGSXbgdEsrzt4ar8yYpbSXAO2OpG7RSprGG8IW1yDGn/K9lixPa0QqkqXWQO/GEmQCBXwvR+uB+ODYlMtzpzL+rKEvrxRWmPZIVUwPMMw7VzsecUMwm6bzmZM8+gFvdaxDb6mqTJdEw5fbWuC233wL2aXLFm8mI6DVDYE1berfAneJCpjJ360WdVkTgydpLb+kDceTPOpd2fUrbwVNqNb9PQ8vomBMlzgnTuZlU3xGQHW5b0y9dz+bIykB2IRfuMPXeAQkgNtqECgTDnLlSfR1qdKChTFpham1o6XSw1R2O9awfKMfmdAGu6drCasPlmtsneWlNv92x8IN3Zwi4xuFp+D6pSYIi4toPmoFbX8j9KFTbVqdc4qVy9RqQRNo4MngKnt57cwaiOYVg/VjhevZ/gB3U8nmHOxEhg3R6dCMSoyokN+4PN8J5Oh2kYNdcXwK8sst/QHLIo2CKiqZSg7/MyDWkdF2nyeHhcLBdmOb6t/Np8k9Hpw6MovAgoMaxjzOF2HMCqhnaC05hUHQ1xP7x2DXTIp46XO1mtfbDdRQvBlMkgh3wsy/aXr6oHKUVMVutMJVGLXvWlpYmIeB9zWcq02eaBJwa2kGupWkqpBVrcislulPllE2Mh2ZMISqjg/DlvRlJiNOhaj5Pe8vkl8l3z458XSfsS0kUpSdMtV/tKPTjr/yvTgbj+6H2Wl+Dju0ejUK26RD8nI2353FGmHRZGhPSGQ9Z0TiacSWnrGetKsvcjIO/wFbSam0UVYwJgZOMxqgpZWeJgSEPsactgfSeMcWhZ4xRhp7WKTKYtMc7O4VBaASqpo4D6j/w271vLXu0l2+UNUZARFv3OVPzcw51upLOvvtje/zy7VoaAQpZo0xN5ZDkz3QsurZdrJTbMesZK/tSC5GXfVU8FFf5ZQM2UMf7mrxA0mtIznnHeF0pkKF4/45dp6Ljw0h0FOcVQvY8EmCfsy6WZx2N7mwLsry7tiJXwHm7Cp59VipHpQB5wsZJO3snYUdWhzkvS69pax/A/kf8xiEco/eF594fgPZw/tplBZPzIADDU6kmFj8oznmaDRrm3lrTbHtC33CRbPS
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(35042699022)(376014)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:37:57.3578 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
fc359a24-d05f-4534-c4da-08dd0e27ebb4
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DB5PEPF00014B94.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3727
Subject: [ovs-dev] [PATCH ovn v3 03/33] northd: Find outports based on
ovn_port.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
Previously we searched for the outport of a route by going through all
LRPs of the LR in the northbound, finding the matching ovn_port and
checking if it matches. However we can also just iterate over all
ovn_port of the LR datapath.
This is simpler and a prerequisite for later patches that use
derived router ports.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/northd.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index fa3a8a882..8ba7b8c33 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -11433,15 +11433,7 @@ find_static_route_outport(struct ovn_datapath *od, const struct hmap *lr_ports,
} else {
/* output_port is not specified, find the
* router port matching the next hop. */
- int i;
- for (i = 0; i < od->nbr->n_ports; i++) {
- struct nbrec_logical_router_port *lrp = od->nbr->ports[i];
- out_port = ovn_port_find(lr_ports, lrp->name);
- if (!out_port) {
- /* This should not happen. */
- continue;
- }
-
+ HMAP_FOR_EACH (out_port, dp_node, &od->ports) {
if (route->nexthop[0]) {
lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
}
From patchwork Tue Nov 26 14:37:54 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015481
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Hs+yynD3;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Hs+yynD3;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQGj2Kvkz1yCv
for ; Wed, 27 Nov 2024 01:40:29 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 569DD6FA10;
Tue, 26 Nov 2024 14:40:27 +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 hUNS8vJir1nj; Tue, 26 Nov 2024 14:40:23 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1936B6FAE2
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Hs+yynD3;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Hs+yynD3
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 1936B6FAE2;
Tue, 26 Nov 2024 14:40:07 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id E0874C08BC;
Tue, 26 Nov 2024 14:40:05 +0000 (UTC)
X-Original-To: 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 11E85C08BD
for ; Tue, 26 Nov 2024 14:39:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 58F8D6F6A7
for ; Tue, 26 Nov 2024 14:38:20 +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 xhUkWtKNLLfD for ;
Tue, 26 Nov 2024 14:38:19 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:c200::4;
helo=duzpr83cu001.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org DFAB76F722
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DFAB76F722
Received: from DUZPR83CU001.outbound.protection.outlook.com
(mail-northeuropeazlp170130004.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c200::4])
by smtp3.osuosl.org (Postfix) with ESMTPS id DFAB76F722
for ; Tue, 26 Nov 2024 14:38:18 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=tdDz1ynGp59o1ZUJa2cEI/ayYKd40TsPZ/RjXGPiaJgEt/FSRSOt69SMAQWdtDyEY6XH/P1ccHkSIDd2H4ff4NEn9guokxTmkRN6ebml/9/XFKsWaG4txZwFFxKZK4NQ01OqEbkyDGXAa3zvP3mMAAvV9fJYiC4D8EDnkrthvdT0GzJYykuN13gu1Udvv7lLQRetDX4K1pT6nfhCTIU7tR89+1EdkOlFBBjbfrH/1UbaAKS5uqryfi7r4tIeOewsw5xmlO8S7VYVH6sA7vO3sUMMvJtVYziO6j2WbQXugxAv2Desru7pGcz3aHcrdlMVl+gT/Uk3Wm2Dkl/5ibVQLQ==
ARC-Message-Signature: i=2; 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=lmuGfMN92wyO+bki2lz+oxe2eEcT89+BqyZo/1bM+Rg=;
b=SNqntW9WlHY2zHdQVi+OrHp+uAwNSCscnCRenKYxzK+2VelYT73nUgBQZPjJROPzRa4ftwElDSNvjmvJFd3fOeskXAnQu+ZBEgVMLz55XXn+IvhoxF+m1f1BvKFWpb2A1MlBfLmPXlNjLlZQ4KA3LoTyXfd4JlS8rUJu+1huWe0G/5I+HH/HKT5J0U4H6Vh9p6GpQRxzwbiZ7pnrnkf2SvhVEHwa4I9BKhUXdQaubYUc+9rJYNtqN77rNXM7eOAbq5+XKola5x+LlpcM1Vo6aP8Q6medL0TLiJIcBHBz8i+SuNfe9Df+VOo31ea2sDKrBsCDzGY7iSQODoTsAO/CYQ==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=lmuGfMN92wyO+bki2lz+oxe2eEcT89+BqyZo/1bM+Rg=;
b=Hs+yynD327vcj/0uQ8cfeRMS5/5qOhnYkpd5jcsb5+7Npyny2sENNK8/4ZH86xMkhwU4aWqwaEC09HGbIv+N4bISqT+xtZ5e5BYF8HAjmNxdpxuTMeQ+FmXweO5/IZFAOrvz+3QWT5E6UOt1P0l3IW0Qkwbyat++VX/P4tRuGXMfGVgK12bTC9CZpUGgGdhcUDb64k+jcfmRrjVi62bBepnksLJ8rhwVTOkDf722OtFjQMdaJbBJrFiLX1y8DhjDr6wufIUEsr+k4IofWmWrt8vOuCgbC/SnV7wl6vJ8Pjoayp3RhS5vXKW3lzMChOiZgQh+8SHNA/bzc9dDWFHYZA==
Received: from AS9PR06CA0095.eurprd06.prod.outlook.com (2603:10a6:20b:465::28)
by VI1PR10MB8109.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:1d7::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:16 +0000
Received: from AM4PEPF00027A69.eurprd04.prod.outlook.com
(2603:10a6:20b:465:cafe::f7) by AS9PR06CA0095.outlook.office365.com
(2603:10a6:20b:465::28) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:16 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AM4PEPF00027A69.mail.protection.outlook.com (10.167.16.87) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:00 +0000
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (104.47.11.238)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:16
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 157574243
X-ExclaimerImprintLatency: 156071805
X-ExclaimerImprintAction: ed91dcc002b14f5a885a259d84c7d909
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=CpGkUujcLyRaSyEzXqO1YZiCaKi+nKe7nvcxp8CyvRFftWEiHeR+JP4iXQNMlrPbpYBk0hWaZ8rtiIGvhuwkpRedSKC5asGDL2foMbwXD5GDx3lE7CEtjXChQIS2cL9eXNQaXOLSLVoKsBrvHLh47c/DYIaENe/TnXuIij5XYQZpY3ks5Ka//1sfkvIUzaoPA3Fo1yK0q9HQrOGWN3ZoKIWejF4YN7YZhf/xOBQAHPx9BCpafAdwhORjQPt9d0YqwL9xWjYM/RKJgstAoCNs/y98MKizbD7uTRIT6Ua47R27UHtR2yj3Y9JAqane7V90KUcx/wydr4J/ADyzcO2ZbQ==
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=lmuGfMN92wyO+bki2lz+oxe2eEcT89+BqyZo/1bM+Rg=;
b=H8QjOthE46vDsGo4RJ/a2IlOAX96E3GhTHaCPhHGQoAO+QoeUrWvG+0Y3GKo5uMq9Tk7U4Llumzs9yBnWHKeNpRjAo3LAMaa/T05JQPYPyIHeZXtqPv6NjT13lWm5sx8wVBqtR8D+IoxNj5KPpYciZCV576stYIeRJp7/FaMvLLYEihjfHsLwltrtcfimJBSfQvCvFiMpWX/bmWA+ebHHQZlsv5j8GHyDcOIkM82HcbmfcNZVjQTiogno77BxtFJGqW3poPqqOcrRhk6eyN0rK4eyKSwnaHFwgPVWM7byEEXky2ipkNGT2hPTgjqPTA+4FoG++M/NuZtxUjIpq3h9w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=lmuGfMN92wyO+bki2lz+oxe2eEcT89+BqyZo/1bM+Rg=;
b=Hs+yynD327vcj/0uQ8cfeRMS5/5qOhnYkpd5jcsb5+7Npyny2sENNK8/4ZH86xMkhwU4aWqwaEC09HGbIv+N4bISqT+xtZ5e5BYF8HAjmNxdpxuTMeQ+FmXweO5/IZFAOrvz+3QWT5E6UOt1P0l3IW0Qkwbyat++VX/P4tRuGXMfGVgK12bTC9CZpUGgGdhcUDb64k+jcfmRrjVi62bBepnksLJ8rhwVTOkDf722OtFjQMdaJbBJrFiLX1y8DhjDr6wufIUEsr+k4IofWmWrt8vOuCgbC/SnV7wl6vJ8Pjoayp3RhS5vXKW3lzMChOiZgQh+8SHNA/bzc9dDWFHYZA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by AS1PR10MB5555.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:476::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:56 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:37:56 +0000
Date: Tue, 26 Nov 2024 15:37:54 +0100
To: dev@openvswitch.org
Message-ID:
<7ca930ff80e1a7be2eb36a84ea0ff9731bc22c92.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0108.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::11) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|AS1PR10MB5555:EE_|AM4PEPF00027A69:EE_|VI1PR10MB8109:EE_
X-MS-Office365-Filtering-Correlation-Id: 5ddc4151-97b4-4b5b-b573-08dd0e27f695
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
bzMfkHfIHjmm15wOS844ftVcPmdU9EfXBiycaqKqyE98co08PQLrdQ53lUoZsx3bU9dwAxo1jYGj5A38oyq0kpWgXcYvlu/NUuwtDqWrLo9oK/wXCQuWUGInuIZa8X/tig0pWHIn3A32U/2aSfeBRuMmksqmbGNECgF28Gzqqk6j0qP/fxUMac7Il1U5C3fK9FSx8eLAYCKCUyw5o0mqnJ4AtAsCnxDvrD4H3dJBInw1YCi1bhoFqR7GzSGYY31R+a2XHm+38qQmwHSKShc5iicK7FVlD7J0YXuPAI33Hj4+8kB3jY4Jy0ewxY9Th1UAwTErDyGVuEcIUVjQ6ABeQTu5uorl7dZiSHgZSFsaM+aeskvgZR9BtHYXdMJNVQkXFK1uRa1ALLo4SMLnrLw4h82+GmJZOt/jEN9IwlYXNWCXSPD3ritYdAYF3Alz27EeymKZYrKqrUcJD6uRe53FIIwTKIoKslBesYTK13sRHGFLE2G9HsP3ZjMKuPGLB1EyOANVSdYTyhH9ZCYnnaKxR0/znoj779adyHUDZXkD+9kUCDm0S0tn5VDXZ66Z0g1MR4Gs67QOBwO1JOsJhlZGh5Gk+WzQl5Q2KZOGqT0TvLKD5cyBq5ZCUh3vnV7wUyMx025ScJ8r86jeAlpKSPrJYx4OjTzjvWMIrfZ5RAaJX3s5Rb7znCfmWBREyY6XV7+p32g2eqY1q3f3eVmLkGwJ30Ka2VqsSrHDbHDkivsu3ATraQJftwlYGoSFauutIUzgNSXepbOmkqzJGoEyB4TMIMyXiu4FCS2rPHJemxy69IIbmOFqjPp5x7hP6Zhskq10qXxROitkm1YWmyhi6bwATV5Rp4oLVvpKPW2D9hfy7HmNkZlNUMwS3zniDuTPnAKQBY7jxV435ibWNVS2w9TqzS20sJhyA3wIfeSRj1vYVSBtWDYWqv/btqCBlSFhvAmg0JCXUagyPG3rRszWD9Z/lu3Vk+4fblsJ6FxdkqEZjtVsn7ml9WNzyYeTxNM4eJ9LkkpwP9cEESle0wq6c/ylasKzvtZJMfqAgAvE7YsM1XVzd1ycSLaieuLYWSnHVI4MM6oBtMSWfVLoA88dY8UJEvibllcVMyDj7d0PsVI1lwQKfPjXRjPJ41EzNA+ZZBegArnSQNUbva4kWhFbUpt0iaDLonvGBJMo9rgCgmF7qs4cuI9lZwLh25322Hld1tqR69cUdS/7bxltw0hIEGcwQGoakJw+fI7FjQfOExUDeIaliC4xvIekWVIR82iukypCAdTJOfMa6Qma9R+LjkLVIUqO1CvaEbP+QEZLulQUhM81A97EpLpTXe36HIEDLDNikXkx9bWshqLG25+ujYHgaw==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR10MB5555
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM4PEPF00027A69.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
33df4a99-f8fa-482f-dbb0-08dd0e27eae2
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|35042699022|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
gFipqG68ouiMeUAPcZ2sfCaGwQ7uJQT7Joo3dZ5lHp/NktEoqPzy5pCZURf7CG1xebJsISHuNXgXyTwsYxRC7m1c3NiD7ASl0gYKEA1B4Vybz/f2wmpdVXA9L35KLYgA8l67QEnPr6AVi9n2VTS+byMaBwi9T6fYMOv4tM7U/sDwl0/EST9ksJwXDo+ug4nsMcA3Hi09B+k685sFMCkKpvIG5GtDGPeSjWrWQTcSQ5a73tOQV74+FoIpDOiybXCouxeb7iNiPPNEbpf9+kQbABZWyE5BjK4O+Bdu3xRV91aD+gloftIu0EWPlwnuTJiP6TnG/OIz9uM7hWTRPwH9FOxN4XCdOobwnK0dWDmi3zA6p0pmr/tzGfcBXhGwoe7zU3L8nmDBeKXAnj7kKNChK34/S1of+3R1FlWcocmvMf7GgGao8GhTJJU1G+QsFCuaejJSS44cO4SIhGjTqtaQ/FlA8cXO3oeO7TYxoaRYvTayo4jW+IZIfeKFHBLly5IdlAhOUPlY6LcVvquDDHdeo6cRMyp+4WemrvtcK5EE9tCOpqdPm3j3tliq7YbSO3hGy0Ygf/nvMA1Hn6aEL4omoxMixAuINtjX0MOXR4JHhWA61/xmoWZ2y7z8wCKSqT9/EzI5CGMoyq0QWuFIke0CLnWpevJXh1sEZimBg6S15CvOXXfdu+EnUHpyYpN5/Rriu6JaArvRSvwbH9z+vx/y6vOnWyxiIMqvMTmWlA977FB01dyKObZy5F6aBEn63urLHmrnxsBcNCGBv7C8/vqfgVjD/JxXu2B4Rm1E6vN26PTPkrNMqaB25E7neJx6Gjlv9wUec11Xf3a3hK8cVSs3kv5+WYuWS1uxgEjtw+EJBVypzaIn0knQMWrDofT7Mcuprp8RFA3/hzj0WJDy5Tk6NlocZ2vqYQwX69LnkVPy5OOvZAJ0+QyeZiJ4ZZYGhiU8a49EDEUT+3BSlrgsV4q+SfSfkbDxJAISdG3D227wCAdaT15I6eOOnOSN0NU6HdbSDtBYQTJ657bL7FXMhawT4F3cov/NiJ84eLHcismsZo/vzDaC7x/a83s4S1/UlhuA/69QGBxLXssNPbgBwrmPTCdxPY8RBj+/LsXEGg9IGZgaqAV1HO/qWrxG0G75kiPcxw/VVh4WikXIP6g0jFWU8X7sFkhP1RtV9CzPze8SFJ4nZ6r/xeQhynN+eSgc4WJImepTIxvb3kBlptEVjIfhwZe03hZ/392JyHyg4l6E1z7udmvb5kf0itm4R4o4+bxEPYcFdukn12N0PP/5FtQKU3czzWFf61rpr6/ZcyukBPq5Xtsv5HvGRd35vbzYzq8VPhJ5cr5SGkJz879LriMheJydYHdRE449/Uvkm95o3XCUzBRpA7ClIOKqrDmgnFM7Pw4qV27pDvnfPyXxoB4sGIUsoIwnX8WL8SlbEmSeiejbBUnXizoIFmj/80r978cU
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(35042699022)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:00.3902 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
5ddc4151-97b4-4b5b-b573-08dd0e27f695
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM4PEPF00027A69.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB8109
Subject: [ovs-dev] [PATCH ovn v3 04/33] northd: Store outport of
parsed_route.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
We already determine the outport of a parsed_route in parsed_routes_add.
However we previously ignored it and recalculated it later on.
Now we just store it for later usage.
Signed-off-by: Felix Huettner
---
v2->v3: updated based on comments
v1->v2:
* fix memory leak
* fix incorrect comparison of struct parsed_route
lib/ovn-util.h | 17 ++++++++++
northd/northd.c | 84 ++++++++++++++++++++++++-------------------------
northd/northd.h | 2 ++
3 files changed, 61 insertions(+), 42 deletions(-)
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index 7b98b9b9a..3f956fb80 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -484,4 +484,21 @@ void ovn_exit_args_finish(struct ovn_exit_args *exit_args);
bool ovn_update_swconn_at(struct rconn *swconn, const char *target,
int probe_interval, const char *where);
+/* Return true if both strings are equal to each other.
+ * In contrast to checking with strcmp NULL and "" also count as equal */
+static inline bool
+streq(const char *s1, const char *s2)
+{
+ bool s1_empty = !s1 || strlen(s1) == 0;
+ bool s2_empty = !s2 || strlen(s2) == 0;
+ if (s1_empty != s2_empty) {
+ return false;
+ }
+ if (s1_empty) {
+ return true;
+ }
+ return !strcmp(s1, s2);
+}
+
+
#endif /* OVN_UTIL_H */
diff --git a/northd/northd.c b/northd/northd.c
index 8ba7b8c33..552e471b5 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -11066,12 +11066,26 @@ parsed_route_lookup(struct hmap *routes, size_t hash,
continue;
}
+ if (pr->out_port != new_pr->out_port) {
+ continue;
+ }
+
+ if (!streq(pr->lrp_addr_s, new_pr->lrp_addr_s)) {
+ continue;
+ }
+
return pr;
}
return NULL;
}
+static void
+parsed_route_free(struct parsed_route *pr) {
+ free(pr->lrp_addr_s);
+ free(pr);
+}
+
static void
parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
const struct nbrec_logical_router_static_route *route,
@@ -11125,10 +11139,12 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
}
/* Verify that ip_prefix and nexthop are on the same network. */
+ const char *lrp_addr_s = NULL;
+ struct ovn_port *out_port = NULL;
if (!is_discard_route &&
!find_static_route_outport(od, lr_ports, route,
IN6_IS_ADDR_V4MAPPED(&prefix),
- NULL, NULL)) {
+ &lrp_addr_s, &out_port)) {
return;
}
@@ -11175,6 +11191,10 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
"ecmp_symmetric_reply",
false);
new_pr->is_discard_route = is_discard_route;
+ if (!is_discard_route) {
+ new_pr->lrp_addr_s = xstrdup(lrp_addr_s);
+ }
+ new_pr->out_port = out_port;
size_t hash = uuid_hash(&od->key);
struct parsed_route *pr = parsed_route_lookup(routes, hash, new_pr);
@@ -11182,7 +11202,7 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
hmap_insert(routes, &new_pr->key_node, hash);
} else {
pr->stale = false;
- free(new_pr);
+ parsed_route_free(new_pr);
}
}
@@ -11211,7 +11231,7 @@ build_parsed_routes(struct ovn_datapath *od, const struct hmap *lr_ports,
}
hmap_remove(routes, &pr->key_node);
- free(pr);
+ parsed_route_free(pr);
}
}
@@ -11463,7 +11483,7 @@ static void
add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
struct ovn_datapath *od,
const char *port_ip,
- struct ovn_port *out_port,
+ const struct ovn_port *out_port,
const struct parsed_route *route,
struct ds *route_match,
struct lflow_ref *lflow_ref)
@@ -11559,8 +11579,7 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
static void
build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
- const struct hmap *lr_ports, struct ecmp_groups_node *eg,
- struct lflow_ref *lflow_ref)
+ struct ecmp_groups_node *eg, struct lflow_ref *lflow_ref)
{
bool is_ipv4 = IN6_IS_ADDR_V4MAPPED(&eg->prefix);
@@ -11608,20 +11627,14 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
LIST_FOR_EACH (er, list_node, &eg->route_list) {
const struct parsed_route *route_ = er->route;
const struct nbrec_logical_router_static_route *route = route_->route;
- /* Find the outgoing port. */
- const char *lrp_addr_s = NULL;
- struct ovn_port *out_port = NULL;
- if (!find_static_route_outport(od, lr_ports, route, is_ipv4,
- &lrp_addr_s, &out_port)) {
- continue;
- }
/* Symmetric ECMP reply is only usable on gateway routers.
* It is NOT usable on distributed routers with a gateway port.
*/
if (smap_get(&od->nbr->options, "chassis") &&
route_->ecmp_symmetric_reply && sset_add(&visited_ports,
- out_port->key)) {
- add_ecmp_symmetric_reply_flows(lflows, od, lrp_addr_s, out_port,
+ route_->out_port->key)) {
+ add_ecmp_symmetric_reply_flows(lflows, od, route_->lrp_addr_s,
+ route_->out_port,
route_, &route_match,
lflow_ref);
}
@@ -11638,9 +11651,9 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
is_ipv4 ? REG_NEXT_HOP_IPV4 : REG_NEXT_HOP_IPV6,
route->nexthop,
is_ipv4 ? REG_SRC_IPV4 : REG_SRC_IPV6,
- lrp_addr_s,
- out_port->lrp_networks.ea_s,
- out_port->json_key);
+ route_->lrp_addr_s,
+ route_->out_port->lrp_networks.ea_s,
+ route_->out_port->json_key);
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_IP_ROUTING_ECMP, 100,
ds_cstr(&match), ds_cstr(&actions),
&route->header_, lflow_ref);
@@ -11720,35 +11733,22 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
static void
build_static_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
- const struct hmap *lr_ports,
const struct parsed_route *route_,
const struct sset *bfd_ports,
struct lflow_ref *lflow_ref)
{
- const char *lrp_addr_s = NULL;
- struct ovn_port *out_port = NULL;
-
const struct nbrec_logical_router_static_route *route = route_->route;
- /* Find the outgoing port. */
- if (!route_->is_discard_route) {
- if (!find_static_route_outport(od, lr_ports, route,
- IN6_IS_ADDR_V4MAPPED(&route_->prefix),
- &lrp_addr_s, &out_port)) {
- return;
- }
- }
-
int ofs = !strcmp(smap_get_def(&route->options, "origin", ""),
ROUTE_ORIGIN_CONNECTED) ? ROUTE_PRIO_OFFSET_CONNECTED
: ROUTE_PRIO_OFFSET_STATIC;
char *prefix_s = build_route_prefix_s(&route_->prefix, route_->plen);
- add_route(lflows, route_->is_discard_route ? od : out_port->od, out_port,
- lrp_addr_s, prefix_s, route_->plen, route->nexthop,
- route_->is_src_route, route_->route_table_id,
- bfd_ports, &route->header_, route_->is_discard_route,
- ofs, lflow_ref);
+ add_route(lflows, route_->is_discard_route ? od : route_->out_port->od,
+ route_->out_port, route_->lrp_addr_s, prefix_s,
+ route_->plen, route->nexthop, route_->is_src_route,
+ route_->route_table_id, bfd_ports, &route->header_,
+ route_->is_discard_route, ofs, lflow_ref);
free(prefix_s);
}
@@ -13523,7 +13523,7 @@ build_ip_routing_flows_for_lrp(struct ovn_port *op,
static void
build_static_route_flows_for_lrouter(
struct ovn_datapath *od, struct lflow_table *lflows,
- const struct hmap *lr_ports, struct hmap *parsed_routes,
+ struct hmap *parsed_routes,
struct simap *route_tables, const struct sset *bfd_ports,
struct lflow_ref *lflow_ref)
{
@@ -13572,11 +13572,11 @@ build_static_route_flows_for_lrouter(
HMAP_FOR_EACH (group, hmap_node, &ecmp_groups) {
/* add a flow in IP_ROUTING, and one flow for each member in
* IP_ROUTING_ECMP. */
- build_ecmp_route_flow(lflows, od, lr_ports, group, lflow_ref);
+ build_ecmp_route_flow(lflows, od, group, lflow_ref);
}
const struct unique_routes_node *ur;
HMAP_FOR_EACH (ur, hmap_node, &unique_routes) {
- build_static_route_flow(lflows, od, lr_ports, ur->route,
+ build_static_route_flow(lflows, od, ur->route,
bfd_ports, lflow_ref);
}
ecmp_groups_destroy(&ecmp_groups);
@@ -17062,7 +17062,7 @@ build_lswitch_and_lrouter_iterate_by_lr(struct ovn_datapath *od,
lsi->meter_groups, NULL);
build_ND_RA_flows_for_lrouter(od, lsi->lflows, NULL);
build_ip_routing_pre_flows_for_lrouter(od, lsi->lflows, NULL);
- build_static_route_flows_for_lrouter(od, lsi->lflows, lsi->lr_ports,
+ build_static_route_flows_for_lrouter(od, lsi->lflows,
lsi->parsed_routes, lsi->route_tables,
lsi->bfd_ports, NULL);
build_mcast_lookup_flows_for_lrouter(od, lsi->lflows, &lsi->match,
@@ -17653,7 +17653,7 @@ void build_lflows(struct ovsdb_idl_txn *ovnsb_txn,
/* Parallel build may result in a suboptimal hash. Resize the
* lflow map to a correct size before doing lookups */
lflow_table_expand(lflows);
-
+
stopwatch_start(LFLOWS_TO_SB_STOPWATCH_NAME, time_msec());
lflow_table_sync_to_sb(lflows, ovnsb_txn, input_data->ls_datapaths,
input_data->lr_datapaths,
@@ -18833,7 +18833,7 @@ static_routes_destroy(struct static_routes_data *data)
{
struct parsed_route *r;
HMAP_FOR_EACH_POP (r, key_node, &data->parsed_routes) {
- free(r);
+ parsed_route_free(r);
}
hmap_destroy(&data->parsed_routes);
diff --git a/northd/northd.h b/northd/northd.h
index 8f76d642d..3e22e4f14 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -707,6 +707,8 @@ struct parsed_route {
bool is_discard_route;
const struct nbrec_logical_router *nbr;
bool stale;
+ char *lrp_addr_s;
+ const struct ovn_port *out_port;
};
void ovnnb_db_run(struct northd_input *input_data,
From patchwork Tue Nov 26 14:37:56 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015482
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Br2ngHyj;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Br2ngHyj;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
(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 4XyQGl4PRyz1yQb
for ; Wed, 27 Nov 2024 01:40:31 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 0551185467;
Tue, 26 Nov 2024 14:40:30 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id Vo0CQ8L6D_G6; Tue, 26 Nov 2024 14:40:24 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 133F5853E6
Authentication-Results: smtp1.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=Br2ngHyj;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Br2ngHyj
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp1.osuosl.org (Postfix) with ESMTPS id 133F5853E6;
Tue, 26 Nov 2024 14:40:11 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id B83CDC08A8;
Tue, 26 Nov 2024 14:40:10 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
by lists.linuxfoundation.org (Postfix) with ESMTP id 17708C08BE
for ; Tue, 26 Nov 2024 14:39:59 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id B7659852DA
for ; Tue, 26 Nov 2024 14:38:23 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id 8NpRrw4Mptkq for ;
Tue, 26 Nov 2024 14:38:22 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2613::60e;
helo=eur05-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 448A385209
Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 448A385209
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur05on2060e.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2613::60e])
by smtp1.osuosl.org (Postfix) with ESMTPS id 448A385209
for ; Tue, 26 Nov 2024 14:38:22 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=pQUg3k9IiaTXa30KlXEDUQRmqbP1qafluIi6hGuBlEZU6RjoBF0MjPqVtkEZ+++QFzQXSDPC+cudaYe8KVPpIAWSwJDkW2ikQj3BazEag/tkLFzidvgkMsJHAjAHciy/8p27wRpnEyLswFtzHXssFdL1oBABGSPJnrulaceBPAQqXdR/68W6rX8PsM2O6asqoaiveUffKdR7vKFVQRTx7wlvKIeMQvDAf9wfTCpHsFC8nswwUXOvE5YjPOMxJ8Hd8CNqfl5fQJnBVS7fCOSr0PmysR2ZJYTPQQHhuFkH8ubnks67oT827x89xj8vS2Myvim9TuBqCMJpT2tdbIHsHA==
ARC-Message-Signature: i=2; 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=HtLhTqzKbbxasc+SXZjWxCV23jp9EEi3KMkjtHdprx0=;
b=fdzbtLTcr4BLI4GQAMYw+84U7Bkxx6s6ayZrf79hkEwGasFvrzxUFHrFeouGQ1tinDiQ015ZygVW9Yx7WA9K5VQBmbD7AwglF8Nstqp/bt5DHnb5BH9gyNo9LvUklJ+WaB41XmVJjRy6RcaLnlThmWSQPWhh36GbCyjHPT6DKLC6RawF0ya69ZrQSgsVA8s1jEp9zwVqPC7FhinMtZHb5xi6VKfxtrAD6+uLc9qtKgMJ/PKVbojP0RHbE6NCaChP6Tn+NpLbt71DpOBoGD2eKey340hM1y2cdbPMf2YGqpHOM4Snylfux//TldnfTY+Dy1lCDuKSV/GYmSvVQeM4tw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=HtLhTqzKbbxasc+SXZjWxCV23jp9EEi3KMkjtHdprx0=;
b=Br2ngHyjPUG3Gxn3MGEgCvbf6vi3TOldqK/c/Pr7u+HJAnM2bJcIDV+fVLNquXPogGK+J/8kkx8xe5XLPSM/SfxyW70klqjkIeKcNbERwzy89oXYnx+U39FqgQPW5Bt7LONYgKhzwM7B1c0BwC/l4KjC+raWX2pWKpRVhZXXdea6oucquY+7AWQsK3fGQAwlXLw84zLls00fo97DZmT+RPS/fkIur6PvaHSAJKRSrsieuOiZZ0jUdBpdyqSVIsDmOeOgJJz+z8lbXPK+AotIR9NTe0jW/Etni4Nxby8W+w07n6RjFmtNRo1edwT1joX4yQi0npbFmbxFYG7AhSusFQ==
Received: from AM7PR04CA0021.eurprd04.prod.outlook.com (2603:10a6:20b:110::31)
by PA2PR10MB8511.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:417::12)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:19 +0000
Received: from AMS0EPF000001B6.eurprd05.prod.outlook.com
(2603:10a6:20b:110:cafe::e5) by AM7PR04CA0021.outlook.office365.com
(2603:10a6:20b:110::31) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:19 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS0EPF000001B6.mail.protection.outlook.com (10.167.16.170) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:18 +0000
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (104.47.11.238)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:19
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8121422
X-ExclaimerImprintLatency: 5894203
X-ExclaimerImprintAction: 259ac780c6de45a0bb06c785d115b09d
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=C7TEsAEfjGy/phX05rmgDcD8Ea3kjWfLTk+tuvxNA3h1DwH6/y5Gm0D+vyyJudUFaSm+lShGkZXtm4/Q591AWyQvOPZ7WkjU34zq+b18c3lJ0hnk+vpPHvZjMm2XG4QanNT9g4e2kevLx/C9Ner1WHw2l3aObyqgamKnZCeI5R5xdJz5+/4DFEkh4H6QiD+ksdRYcIA4w1tOr5UBSBd2PCimZOI9eR2fTLTVU9HKLWJCD7mJzKR9knxt1o49f8rI6lAiD/+QOBdghXHLTjRvfyqKdrc3Wqz3JUkDREkHtvo2mCT/r9rRuTOJHBsFTWYVkq6SmQqPJR9e5U0DtQaMTQ==
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=HtLhTqzKbbxasc+SXZjWxCV23jp9EEi3KMkjtHdprx0=;
b=x1KVLgBh4Jx9LO8emrrjlq59Kivnb/jtWOSFwG2b2RnRxh+fcPDto/BSR+w7YUmkJ2dBhAnS2YBglUgvkF4LlTcuAMdIaC8rAUIQkiVsm0wHhoxJ587mxj/I6k9ZfN9zVw8dRx/hiY/I+V/66Fnpp4GMrO6GZp2ca9Uj+9B0bElNfnjbA3RvqAA3oNNEaaLQfsVNu3dfHY5ntltQ/T6/N4o1y7+6mBkUlpOyxVPtSDGp41XipeWFwxzsi4hsfZrdDNJefA1wKYe/FRPAyJUhpu9rhVLsKhx+Q4Htd6P30rqpGyYGa5kK7nPpo+2rg6hXLr/5LaDaIXOFlNeqkrTOhQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=HtLhTqzKbbxasc+SXZjWxCV23jp9EEi3KMkjtHdprx0=;
b=Br2ngHyjPUG3Gxn3MGEgCvbf6vi3TOldqK/c/Pr7u+HJAnM2bJcIDV+fVLNquXPogGK+J/8kkx8xe5XLPSM/SfxyW70klqjkIeKcNbERwzy89oXYnx+U39FqgQPW5Bt7LONYgKhzwM7B1c0BwC/l4KjC+raWX2pWKpRVhZXXdea6oucquY+7AWQsK3fGQAwlXLw84zLls00fo97DZmT+RPS/fkIur6PvaHSAJKRSrsieuOiZZ0jUdBpdyqSVIsDmOeOgJJz+z8lbXPK+AotIR9NTe0jW/Etni4Nxby8W+w07n6RjFmtNRo1edwT1joX4yQi0npbFmbxFYG7AhSusFQ==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by AS1PR10MB5555.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:476::7)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:37:59 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:37:59 +0000
Date: Tue, 26 Nov 2024 15:37:56 +0100
To: dev@openvswitch.org
Message-ID:
<9421570470b2b09b674b7969765e2242d62c67ee.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|AS1PR10MB5555:EE_|AMS0EPF000001B6:EE_|PA2PR10MB8511:EE_
X-MS-Office365-Filtering-Correlation-Id: 3d59247a-bcb7-4e00-b970-08dd0e27f861
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
EAggeJYmd0L/FMBWfsVJ06sE/7BroLt3DgqoR6xt6Eh3IU5yjfUpdInaCWE/884ytIVS2NWQsFBWgxqZRXDHF4cm7m/o1Bq0Iak7//34olgaLBpPwGP5OYCmC7CUGJvI+Fkhnfhny/rQZlelvrryZwgj9QH8byvNUgYry1nCP712C1ohbw9Uh+r05juLjttl92cpEr9lLM85v465ZfcF+DKmaEGXnwAq7qe6hJNWXJlA22UU+XQF8Qu2qGdGOvZIkIzUqXCwbBDMGB8qMzgxex2iFdHYBn55goYHa+Mk3XaVDo/PayTPtGpwwxzGzFwHLhKaC91CCNZxbrLANUw0zeccX37mdqPbx5+6nvRm/kuceKjkaPZ/TQnGHl64pCcGmcziDs2R39ylJ1/cFVom/bYHoDuBoevepOpXiI7qPZy8n3RvbQctOuErDCOU49xbjZ52pzH5CjUQW/xd+jHzsuj+uQl79jeGWOWmh9P4qU+HDU2X5TaZZyTxGoij9XQK4JIrYjtXUCTYj+mNxAPUbn2VCHynT59JxNBHZbpB+f35pXVJqBuMb8zRNVk1Bztz4lH8GD1JaIwKr08yJnQuFPqIYJ8RyeOaRjNHRiv8jfNeGdGlqE29N6UhOUQBo/mkdx3ZqYUYCNuWfud267jmYuW4+Vu7OZ/azieRRtXfnKtRLuqky9OsZ6jT339j245CjV35GGlaoHICztqQIw88IB9KHHj/3UK2kBvhAWoRbRhtHdYGtCisRKMG6/PKd0BTiLDD0qGzkxfbAjGJV4n5AqB3DBpLxnkwUgFqarJhzoQ1eNQaNZnWugL3GYaTX8dryGRXiVN37ZdzRjayKeIjB9MNi6zHWfzMTvX0WiEmxrBppMLnQHGJjt642r9/yjSWJjJBI3ekZrYmZLvvPw8t3BrimXmF5Zr+zmmgsbvpvzb+p4DjzRecG4sLDWA5q/FRUNWqavPvhZao2OzxyrBpGNYoEeDXFCycgmbGoLF+dODGGjYB07SPDXKk+Bl8rBhKz3YiSSZKXRHZWTao/C/sZsvWpmFU4hs88VefYcbfoYMABN8liHpokbrCvMEvXIv86ZIFDn21XTqKQrglwisRQ4QjcZrh8inEUUVcBzIXa8gdQAePDliPsiVn08Ipbdegj0XJN6iMCPqpqLD9fd0cAy7jO87aZBEitBu2Q4fCp/N4CdymMoC3ZVwaLRGmvvBkE2AIKBTvN3f0zBtgBnudmYSi0uL3W/uUyY0Hcfx1NLEJlB46gQQQK6B5udWGQUJPxeLDugyGpeGNmHdHysNf856cXngBnbBuHAO9NBroTRxXvr30D9lpPbz8WgObV415KH811jGl3G94ymYKNjqYRA==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR10MB5555
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF000001B6.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
7acbde00-58c7-48de-7d6c-08dd0e27ebfd
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|35042699022|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
eXbbE9jD8dcBGGwJEH4q+FsUvsx2oBPIvWIKTQJ4Drb1RZk/mjF78ChkioExNdQSA9sMxiYQ8PrTFLVOrOTJsQM3/wr9XjckKgPoNnf/URODtm8t9wpKJXNUjL1A3w/FJ2yeN5aOCU25+mANAqum9ckHqQzf9gk7zup1hN9S6fIpcNovY2mxpKRzi66tCplPm8Dr7DLZJWa1IqcvxbTsp4J0nJTKDBGuNTQ3bDd5dGdTnSY+q7qzlY51GkGq7aAOebMyh+vqJaQal8z+0bsQWj8DMmhGSP0ka4EaCE8NHJVEjW6S3Zi1+bfjlGg84JeZBQ1XUEcOa0gc5YB4H7AAc2nYUOGWY0yFfyWGL/vcmrSgKNpiGW2Cb5f03bMMZnAHm0Dly4Rh2FUYnyqYoz4BTfDvVs/FGM4mb5HmIo17UaXUa3bQDcWm4WHnJvNaaoSm4PT5sNvtZhNbeAEbUNBE/4NMXpEcOV6nukjmNCcrNj6V5/u8G6ET/4zy+LnTMJ8EHU7Ar0tbpPi3D54vSbbBWxOfz5FFVC3jyI0rU/DkiHGeY3vdfQ/roHuDXTs+kXzYU4VKXtwOu/r9fDRU2cdhJ7I8cPG5GwptX7iiGySYDsi+1IhrNgE59wnWxf+o+4QhjpMj8p1DcuKd6lDL9p+bDiw3cmBkP/3C21noPlSoBRWXs6ReAuzCNka4P4wUvC4Ih2GmxSyXok/Hm9rjCwngsfwmMsIgg/frEW8MWQSqitkcATZsPxr0WR8stCLvZf2XJNzmGyqIWtTfoQTwm6JfNEwW4017x051DsA7EXATz1J6dkZZF9A019yvwbdpgiVhyqPrqxKCkLjrBwmNbsBXh8/pn/MbjqyyIOt+ow4ZiX6nhlKogdkRcwt61NGq/g4TjYApY5Ik82TXtgLRod6V/LTKwLoZ1/FAhKxlKjoWBbQV8aymK8AHv920KDbnf2mZnqUm1R1HfVkIuQmuTBiqV/B7PEeY6VpajEfggafVeOTHtjC7cTz5nPYPeXk+Pd/WRcB6GQPRhS/iRqcJQZY9iiZqtLqsgc2hVgWrgbw1KrNJ4I8LLDDzwmj+83EO2Jx8jX4uQ/wGU6vaJySwZ+WO+Mfp36aYJpayLh6BAkwjHG3tLtBlKZZjRMZN3fyjpuoakuExVkSz0zVycVLZw98x2c6cpxaloOVxkH5XxaDKwFBobLbPBVJ4qqp7IuIRs00jmaoXpShpLmKq2x2Plx4i37ieC98bfD31QPjaoi6XKZgGeZ9ZLg6hLF83KlhbUkmf1TBKUzCnKTabIdVc0xNd1T1yCN51Kx9bipklRHbQn+XXSe3+Uoyya1PIwtzHf87UvrCtuDR8ZZjrZvlKELFRnuAd6N8V3stO7gj1xf8CBQMAduquFl1DjhydSFvg0S7R5Sme3Hx6w4QesstsEoTIckZtxFmP6mi5wfAe+Xu47gvno4PPio+dZWysOjCsk0c3
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(35042699022)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:18.4052 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
3d59247a-bcb7-4e00-b970-08dd0e27f861
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF000001B6.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR10MB8511
Subject: [ovs-dev] [PATCH ovn v3 05/33] northd: Split out join_logical_ports.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
To make the code more readable and make future changes easier we split
the main logic of join_logical_ports to separate functions for LSPs and
LRPs.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/northd.c | 321 ++++++++++++++++++++++++++----------------------
northd/northd.h | 1 +
2 files changed, 176 insertions(+), 146 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index 552e471b5..6bb3cf436 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -2127,6 +2127,175 @@ parse_lsp_addrs(struct ovn_port *op)
op->n_ps_addrs++;
}
}
+static struct ovn_port *
+join_logical_ports_lsp(struct hmap *ports,
+ struct ovs_list *nb_only, struct ovs_list *both,
+ struct ovn_datapath *od,
+ const struct nbrec_logical_switch_port *nbsp,
+ const char *name,
+ unsigned long *queue_id_bitmap,
+ struct hmap *tag_alloc_table)
+{
+ struct ovn_port *op = ovn_port_find_bound(ports, name);
+ if (op && (op->od || op->nbsp || op->nbrp)) {
+ static struct vlog_rate_limit rl
+ = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "duplicate logical port %s", name);
+ return NULL;
+ } else if (op && (!op->sb || op->sb->datapath == od->sb)) {
+ /*
+ * Handle cases where lport type was explicitly changed
+ * in the NBDB, in such cases:
+ * 1. remove the current sbrec of the affected lport from
+ * the port_binding table.
+ *
+ * 2. create a new sbrec with the same logical_port as the
+ * deleted lport and add it to the nb_only list which
+ * will make the northd handle this lport as a new
+ * created one and recompute everything that is needed
+ * for this lport.
+ *
+ * This change will affect container/virtual lport type
+ * changes only for now, this change is needed in
+ * contaier/virtual lport cases to avoid port type
+ * conflicts in the ovn-controller when the user clears
+ * the parent_port field in the container lport or updated
+ * the lport type.
+ *
+ */
+ bool update_sbrec = false;
+ if (op->sb && lsp_is_type_changed(op->sb, nbsp,
+ &update_sbrec)
+ && update_sbrec) {
+ ovs_list_remove(&op->list);
+ sbrec_port_binding_delete(op->sb);
+ ovn_port_destroy(ports, op);
+ op = ovn_port_create(ports, name, nbsp,
+ NULL, NULL);
+ ovs_list_push_back(nb_only, &op->list);
+ } else {
+ ovn_port_set_nb(op, nbsp, NULL);
+ ovs_list_remove(&op->list);
+
+ uint32_t queue_id = smap_get_int(&op->sb->options,
+ "qdisc_queue_id", 0);
+ if (queue_id) {
+ bitmap_set1(queue_id_bitmap, queue_id);
+ }
+
+ ovs_list_push_back(both, &op->list);
+
+ /* This port exists due to a SB binding, but should
+ * not have been initialized fully. */
+ ovs_assert(!op->n_lsp_addrs && !op->n_ps_addrs);
+ }
+ } else {
+ op = ovn_port_create(ports, name, nbsp, NULL, NULL);
+ ovs_list_push_back(nb_only, &op->list);
+ }
+
+ if (lsp_is_localnet(nbsp)) {
+ if (od->n_localnet_ports >= od->n_allocated_localnet_ports) {
+ od->localnet_ports = x2nrealloc(
+ od->localnet_ports, &od->n_allocated_localnet_ports,
+ sizeof *od->localnet_ports);
+ }
+ od->localnet_ports[od->n_localnet_ports++] = op;
+ }
+
+ if (lsp_is_vtep(nbsp)) {
+ od->has_vtep_lports = true;
+ }
+
+ parse_lsp_addrs(op);
+
+ op->od = od;
+ if (op->has_unknown) {
+ od->has_unknown = true;
+ }
+ hmap_insert(&od->ports, &op->dp_node,
+ hmap_node_hash(&op->key_node));
+ tag_alloc_add_existing_tags(tag_alloc_table, nbsp);
+ return op;
+}
+
+static struct ovn_port*
+join_logical_ports_lrp(struct hmap *ports,
+ struct ovs_list *nb_only, struct ovs_list *both,
+ struct hmapx *dgps,
+ struct ovn_datapath *od,
+ const struct nbrec_logical_router_port *nbrp,
+ const char *name, struct lport_addresses *lrp_networks)
+{
+ if (!lrp_networks->n_ipv4_addrs && !lrp_networks->n_ipv6_addrs) {
+ return NULL;
+ }
+
+ struct ovn_port *op = ovn_port_find_bound(ports, name);
+ if (op && (op->od || op->nbsp || op->nbrp)) {
+ static struct vlog_rate_limit rl
+ = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "duplicate logical router port %s",
+ name);
+ destroy_lport_addresses(lrp_networks);
+ return NULL;
+ } else if (op && (!op->sb || op->sb->datapath == od->sb)) {
+ ovn_port_set_nb(op, NULL, nbrp);
+ ovs_list_remove(&op->list);
+ ovs_list_push_back(both, &op->list);
+
+ /* This port exists but should not have been
+ * initialized fully. */
+ ovs_assert(!op->lrp_networks.n_ipv4_addrs
+ && !op->lrp_networks.n_ipv6_addrs);
+ } else {
+ op = ovn_port_create(ports, name, NULL, nbrp, NULL);
+ ovs_list_push_back(nb_only, &op->list);
+ }
+
+ op->lrp_networks = *lrp_networks;
+ op->od = od;
+
+ for (size_t j = 0; j < op->lrp_networks.n_ipv4_addrs; j++) {
+ sset_add(&op->od->router_ips,
+ op->lrp_networks.ipv4_addrs[j].addr_s);
+ }
+ for (size_t j = 0; j < op->lrp_networks.n_ipv6_addrs; j++) {
+ /* Exclude the LLA. */
+ if (!in6_is_lla(&op->lrp_networks.ipv6_addrs[j].addr)) {
+ sset_add(&op->od->router_ips,
+ op->lrp_networks.ipv6_addrs[j].addr_s);
+ }
+ }
+
+ hmap_insert(&od->ports, &op->dp_node,
+ hmap_node_hash(&op->key_node));
+
+ if (!od->redirect_bridged) {
+ const char *redirect_type =
+ smap_get(&nbrp->options, "redirect-type");
+ od->redirect_bridged =
+ redirect_type && !strcasecmp(redirect_type, "bridged");
+ }
+
+ if (op->nbrp->ha_chassis_group || op->nbrp->n_gateway_chassis) {
+ const char *gw_chassis = smap_get(&op->od->nbr->options,
+ "chassis");
+ if (gw_chassis) {
+ static struct vlog_rate_limit rl
+ = VLOG_RATE_LIMIT_INIT(1, 1);
+ VLOG_WARN_RL(&rl, "Bad configuration: distributed "
+ "gateway port configured on port %s "
+ "on L3 gateway router", name);
+ return NULL;
+ } else {
+ hmapx_add(dgps, op);
+ }
+
+ }
+ return op;
+}
+
static struct ovn_port *
create_cr_port(struct ovn_port *op, struct hmap *ports,
@@ -2198,90 +2367,12 @@ join_logical_ports(const struct sbrec_port_binding_table *sbrec_pb_table,
struct ovn_datapath *od;
HMAP_FOR_EACH (od, key_node, ls_datapaths) {
ovs_assert(od->nbs);
- size_t n_allocated_localnet_ports = 0;
for (size_t i = 0; i < od->nbs->n_ports; i++) {
const struct nbrec_logical_switch_port *nbsp
= od->nbs->ports[i];
- struct ovn_port *op = ovn_port_find_bound(ports, nbsp->name);
- if (op && (op->od || op->nbsp || op->nbrp)) {
- static struct vlog_rate_limit rl
- = VLOG_RATE_LIMIT_INIT(5, 1);
- VLOG_WARN_RL(&rl, "duplicate logical port %s", nbsp->name);
- continue;
- } else if (op && (!op->sb || op->sb->datapath == od->sb)) {
- /*
- * Handle cases where lport type was explicitly changed
- * in the NBDB, in such cases:
- * 1. remove the current sbrec of the affected lport from
- * the port_binding table.
- *
- * 2. create a new sbrec with the same logical_port as the
- * deleted lport and add it to the nb_only list which
- * will make the northd handle this lport as a new
- * created one and recompute everything that is needed
- * for this lport.
- *
- * This change will affect container/virtual lport type
- * changes only for now, this change is needed in
- * contaier/virtual lport cases to avoid port type
- * conflicts in the ovn-controller when the user clears
- * the parent_port field in the container lport or updated
- * the lport type.
- *
- */
- bool update_sbrec = false;
- if (op->sb && lsp_is_type_changed(op->sb, nbsp,
- &update_sbrec)
- && update_sbrec) {
- ovs_list_remove(&op->list);
- sbrec_port_binding_delete(op->sb);
- ovn_port_destroy(ports, op);
- op = ovn_port_create(ports, nbsp->name, nbsp,
- NULL, NULL);
- ovs_list_push_back(nb_only, &op->list);
- } else {
- ovn_port_set_nb(op, nbsp, NULL);
- ovs_list_remove(&op->list);
-
- uint32_t queue_id = smap_get_int(&op->sb->options,
- "qdisc_queue_id", 0);
- if (queue_id) {
- bitmap_set1(queue_id_bitmap, queue_id);
- }
-
- ovs_list_push_back(both, &op->list);
-
- /* This port exists due to a SB binding, but should
- * not have been initialized fully. */
- ovs_assert(!op->n_lsp_addrs && !op->n_ps_addrs);
- }
- } else {
- op = ovn_port_create(ports, nbsp->name, nbsp, NULL, NULL);
- ovs_list_push_back(nb_only, &op->list);
- }
-
- if (lsp_is_localnet(nbsp)) {
- if (od->n_localnet_ports >= n_allocated_localnet_ports) {
- od->localnet_ports = x2nrealloc(
- od->localnet_ports, &n_allocated_localnet_ports,
- sizeof *od->localnet_ports);
- }
- od->localnet_ports[od->n_localnet_ports++] = op;
- }
-
- if (lsp_is_vtep(nbsp)) {
- od->has_vtep_lports = true;
- }
-
- parse_lsp_addrs(op);
-
- op->od = od;
- if (op->has_unknown) {
- od->has_unknown = true;
- }
- hmap_insert(&od->ports, &op->dp_node,
- hmap_node_hash(&op->key_node));
- tag_alloc_add_existing_tags(tag_alloc_table, nbsp);
+ join_logical_ports_lsp(ports, nb_only, both, od, nbsp,
+ nbsp->name, queue_id_bitmap,
+ tag_alloc_table);
}
}
@@ -2299,71 +2390,9 @@ join_logical_ports(const struct sbrec_port_binding_table *sbrec_pb_table,
VLOG_WARN_RL(&rl, "bad 'mac' %s", nbrp->mac);
continue;
}
-
- if (!lrp_networks.n_ipv4_addrs && !lrp_networks.n_ipv6_addrs) {
- continue;
- }
-
- struct ovn_port *op = ovn_port_find_bound(ports, nbrp->name);
- if (op && (op->od || op->nbsp || op->nbrp)) {
- static struct vlog_rate_limit rl
- = VLOG_RATE_LIMIT_INIT(5, 1);
- VLOG_WARN_RL(&rl, "duplicate logical router port %s",
- nbrp->name);
- destroy_lport_addresses(&lrp_networks);
- continue;
- } else if (op && (!op->sb || op->sb->datapath == od->sb)) {
- ovn_port_set_nb(op, NULL, nbrp);
- ovs_list_remove(&op->list);
- ovs_list_push_back(both, &op->list);
-
- /* This port exists but should not have been
- * initialized fully. */
- ovs_assert(!op->lrp_networks.n_ipv4_addrs
- && !op->lrp_networks.n_ipv6_addrs);
- } else {
- op = ovn_port_create(ports, nbrp->name, NULL, nbrp, NULL);
- ovs_list_push_back(nb_only, &op->list);
- }
-
- op->lrp_networks = lrp_networks;
- op->od = od;
-
- for (size_t j = 0; j < op->lrp_networks.n_ipv4_addrs; j++) {
- sset_add(&op->od->router_ips,
- op->lrp_networks.ipv4_addrs[j].addr_s);
- }
- for (size_t j = 0; j < op->lrp_networks.n_ipv6_addrs; j++) {
- /* Exclude the LLA. */
- if (!in6_is_lla(&op->lrp_networks.ipv6_addrs[j].addr)) {
- sset_add(&op->od->router_ips,
- op->lrp_networks.ipv6_addrs[j].addr_s);
- }
- }
-
- hmap_insert(&od->ports, &op->dp_node,
- hmap_node_hash(&op->key_node));
-
- if (!od->redirect_bridged) {
- const char *redirect_type =
- smap_get(&nbrp->options, "redirect-type");
- od->redirect_bridged =
- redirect_type && !strcasecmp(redirect_type, "bridged");
- }
-
- if (op->nbrp->ha_chassis_group || op->nbrp->n_gateway_chassis) {
- const char *gw_chassis = smap_get(&op->od->nbr->options,
- "chassis");
- if (gw_chassis) {
- static struct vlog_rate_limit rl
- = VLOG_RATE_LIMIT_INIT(1, 1);
- VLOG_WARN_RL(&rl, "Bad configuration: distributed "
- "gateway port configured on port %s "
- "on L3 gateway router", nbrp->name);
- } else {
- hmapx_add(&dgps, op);
- }
- }
+ join_logical_ports_lrp(ports, nb_only, both, &dgps,
+ od, nbrp,
+ nbrp->name, &lrp_networks);
}
}
diff --git a/northd/northd.h b/northd/northd.h
index 3e22e4f14..25235c78f 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -371,6 +371,7 @@ struct ovn_datapath {
struct ovn_port **localnet_ports;
size_t n_localnet_ports;
+ size_t n_allocated_localnet_ports;
struct ovs_list lr_list; /* In list of logical router datapaths. */
/* The logical router group to which this datapath belongs.
From patchwork Tue Nov 26 14:37:58 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015473
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=AfVDTSAJ;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=AfVDTSAJ;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQG05HkRz1yQY
for ; Wed, 27 Nov 2024 01:39:52 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 026476FA37;
Tue, 26 Nov 2024 14:39:51 +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 V2iGEg2lStya; Tue, 26 Nov 2024 14:39:48 +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 smtp3.osuosl.org 1FEC16FA65
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=AfVDTSAJ;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=AfVDTSAJ
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp3.osuosl.org (Postfix) with ESMTPS id 1FEC16FA65;
Tue, 26 Nov 2024 14:39:47 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id B7351C08B4;
Tue, 26 Nov 2024 14:39:46 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
by lists.linuxfoundation.org (Postfix) with ESMTP id 35AEFC08B4
for ; Tue, 26 Nov 2024 14:39:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 664118523D
for ; Tue, 26 Nov 2024 14:38:07 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id YImOb_PgX37n for ;
Tue, 26 Nov 2024 14:38:06 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2606::617;
helo=eur02-am0-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 5376B85345
Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5376B85345
Authentication-Results: smtp1.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=AfVDTSAJ;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=AfVDTSAJ
Received: from EUR02-AM0-obe.outbound.protection.outlook.com
(mail-am0eur02on20617.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2606::617])
by smtp1.osuosl.org (Postfix) with ESMTPS id 5376B85345
for ; Tue, 26 Nov 2024 14:38:06 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=pClNVbudm801tJ8h2cdnsBw/y2rpvmF/ntBEj0YYYL4H1giMvgPIsnZcMlHB9lL+DhFZYttbpyctfsOWtWdytZaf/WSUs2/NIwy8/2ohwUN+WQO2KmLbTjRSxOfISsjzyb1wcOzSg8FW43OL1qJJ2129k4mpI74b3VE1rB6petGS5704XDD9Kb9iM5V1+TZhXLfwpLkn5v4ZKkdkdqKeFQA4qf6M6IyWQ3QdFh8AS3eAKdL+RuRhrXVBkMqi4eS1x78jv+5QstCqbLa2WsdZ1s0R2G5DBRNHWNM9H8LefTqukFVnX6nDsTBbH3ORZ+MZ7Lk8Pa7l33W74LlszOkIPw==
ARC-Message-Signature: i=2; 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=ewJ6CcN/tHgAXHrBxN2KvgL8rgSM4nE8rAOt2piG/Mw=;
b=DbCwJceANteLCAp7sW3gu86yYOKrCZLITborJyayBJq84hKRm26NtKz/5I1uk4znqdBLEmn1VR25q3yTaK7Tb5e1gUvxqIE0t8O4HACi9qvqnfvpAzPmkMhoCjW5eF8wSTlQrKZdeNvh0Eu06DOmW8/ZV55QvmnkmDjK4BD5gNKyshwMXITvp1+nQIMPrsKLieXeG6qDDko14xhh6Q3Mu5RqAaqC7gCldOfEHIzfrSo+V0exXFieDGg4zRel07IlG6TSxxJ4r1QAt1ICK9r4hde80INdUzXqvkJ/8IAh0xSNuqm1MiNaZL89c1RK/nmvxCJbz4uCQ4IYn+KBW5/0Bg==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=ewJ6CcN/tHgAXHrBxN2KvgL8rgSM4nE8rAOt2piG/Mw=;
b=AfVDTSAJBESilLcYZuuIFwXkjMOhZ3TrTtcY4f+MGtYY2eHYuWbUUKHDIW8y5oY3+PBheDX2IPxOK3ph1hnbC1bRMLBGo4mRJAOGwpgLsiW/ePVSHCoS0NxSGJjK0p4Q2PjtcslcFoOoMFdU6UOFLrEZa9qsEmC4ZyBBg3b8t7KjBpsLg5Ib5NVYV6ybMNGe1Ks348Ud2wlEWtAoysfbg0xxA9g7yS41m+ptH/p1yhCGIuL2eXoUIa7g0qSY2EFiddIYLS/Tvk58YkzZWbHhNGAr1IdYI/CroV9nelDKpW7Cuor018K9YmWhdQ9hnI2qEdRv9NssUksebuTs4n0e4Q==
Received: from AM6PR01CA0043.eurprd01.prod.exchangelabs.com
(2603:10a6:20b:e0::20) by PA1PR10MB9179.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:441::12) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:02 +0000
Received: from AMS0EPF0000019D.eurprd05.prod.outlook.com
(2603:10a6:20b:e0:cafe::ae) by AM6PR01CA0043.outlook.office365.com
(2603:10a6:20b:e0::20) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:02 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS0EPF0000019D.mail.protection.outlook.com (10.167.16.249) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:01 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (104.47.17.108)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:02
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 6504016
X-ExclaimerImprintLatency: 2909540
X-ExclaimerImprintAction: 243e7f90b517496e9afd34f3ec43dc37
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=f+JJ16zF7hix3G6wImkC2Cm8FvoNJ88rNlBLfrXrFvXVhHeX09YcYDR2R1QYzJoqSk3SnpO2h+8zOjlkVjZUM10UmcgXpINGrmeQWKtRAUR8lwiLNjy49Zt3nAHkV8RU+YM59+opjCYFHd31pReyv+90KBEfbNg62HTXujzIzHSEkUTWa15m3j7e5VsUfItPNeOLA3n+JjiNQCWgI3hwRkmHjBntco+DfAmaTsJ35ryX4V/hO+YYgm1Z0SAFvYNCfPp8tNhb3gf1QoidTEDmYbC2KYvITgIsqwdw4zgH3BvTnn4HEm7EUK/qlcpzPn8rRHtz7GIm5PrNlpl3z26Fiw==
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=ewJ6CcN/tHgAXHrBxN2KvgL8rgSM4nE8rAOt2piG/Mw=;
b=H3ci1PuwTfMEabZ6bANBY4X87k6TkDw2TfFFxg4WT9GbJwmAQAGYwlnB1GMGmHxIf2GDp7cthsPqX6s8NGwV5YRKYMJe9ImVUlckJTd/+FgWktwCoYbVbKh8QXOpdAWkbXLRoMIkjTDAcho6o6Tj2eIf/kegEGLJBycwn0Lc18ckWQIP9tfXXm7/A0AAkBL9ZxjG32PpY1cWNYfOFoObuGfZ+uyFPXHS2DwKR6YBhs3YeUGTLWXeiQQpoMdJt/5M2uK2FSfkPaTCozsBAGI78382mW8ezANcvtDAxT2GHOnAtiGRvHzND/8Ytr8Np9vHDvY+nyAWvpDHZu+fNfX7lA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=ewJ6CcN/tHgAXHrBxN2KvgL8rgSM4nE8rAOt2piG/Mw=;
b=AfVDTSAJBESilLcYZuuIFwXkjMOhZ3TrTtcY4f+MGtYY2eHYuWbUUKHDIW8y5oY3+PBheDX2IPxOK3ph1hnbC1bRMLBGo4mRJAOGwpgLsiW/ePVSHCoS0NxSGJjK0p4Q2PjtcslcFoOoMFdU6UOFLrEZa9qsEmC4ZyBBg3b8t7KjBpsLg5Ib5NVYV6ybMNGe1Ks348Ud2wlEWtAoysfbg0xxA9g7yS41m+ptH/p1yhCGIuL2eXoUIa7g0qSY2EFiddIYLS/Tvk58YkzZWbHhNGAr1IdYI/CroV9nelDKpW7Cuor018K9YmWhdQ9hnI2qEdRv9NssUksebuTs4n0e4Q==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:00 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:00 +0000
Date: Tue, 26 Nov 2024 15:37:58 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0117.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::8) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AMS0EPF0000019D:EE_|PA1PR10MB9179:EE_
X-MS-Office365-Filtering-Correlation-Id: b504e980-0491-4c49-e895-08dd0e27ee69
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
6xIzZcpKUJZr13Ms8PFrqr77sPJWJcorYTugeEWMP3/nZelwLStOkpU0MaNOh6Gk/ratSTeT+eLQtFU0nKdWhCudGCwvnR1qFzDcH3H+ZdmoRQr9XjLJEoCgTsmK/ZquW68dObnMk3twoEUHtvSD9jMyNmCisAhX8d0qhVxWbkRSJqn9/CVpm6ngt2r4oPtUVHlpSfSS1RnhhmyEIUxdjHZByiTJYiaRUS63UTHtghoyrV53KmFCkpQSf3+BuhddX7hyUk9ce8cynOqXTDxF1fJ3fSWbxkz9bYyObvPUjyd/E2SIHjNwnKnrP0ErwcaKAMxmUrsIBxE90GnTlz4EQwOepnUeslJsvkwh87SOFIgbkva/1guHDz23RPv9whZfu6rudtCP5Di9cvtuSXeO338O+JOnJuhh25gqPdbXBQSVx/CGDfAbBqAC6EtqpfbBDrrBqsxz0VOTBwTIz5rG9lDd+cTfUpfoX1uxt5WmVVsiDX2FfkAQjIZ0WQKMOGTBft7PAhOLK436w3xCig3rUvuJpBbOUNrcrt8xF0PMAq8zjXKZmogo73B/v9euVU/ovTE7aiX2QCGluR/eLwp3kVYtRIsuA55C08PqAYT6Iudd/dcnbbWNplKajpUk8mA+dPoogOwp2f5DhEQbvADrgxbeLnZXniFml+Ze5ZplHwgg5cTuEXIQU46vDhkr0hHB1Li6ZbvJHBjCLoBFuP2Ms8C6H/PrAhk4NvweKqeHlTy8KspNJfds0XQV0M6La5xZFS+BL6z2A3sk9IghLikQpm21jdpvzG5+F1KuFO+JFUfNcEjR3RuLrgaRYqBmUt0TVPDczu2PFxXCaZAl6nMPNgEhn/tjs7wWJP1s3iZGeBCKhCifjOqn8/LxIUtQInGIvzBwq5XWA2g3KJ1qWU0F0bDHXT5DCrXcV/TC7+xt9fle4XznD+dAouU9JTliTDYwDZDXNmInOphn6isSSYRHL0qAwzH7fTrmRnQiYY4FaYY8JHeec5sLvU4I59PZp1E3ifzwEsS/JmDCmuqUM7eG1x3PACHjsjlS3uVlJx7Kb01hqVzjP/Gt4KQqvnsHPA3IMYBg4sA8igruQSzP1gK3BXDt+/+InBpbyxBPmZI02NrJdTXZruAtdDr77XinobiIrEBCHW5K3B97gQnajuANjL3YvtN2NazfMFV9nUtyUgN3r43pL7oxTZ4hsdqW0jY7INExeoiR6JGm0+EQDsSeB7ufaMQ90kYvAE1GsfBzRKeVJWORfWcCfKrILFM+eVprwpTOUKpmUBHrsxxv2l81CUwXowzemDggA63iSaQWv6Ma5kpMWangXd4FcpAsYq2q7tfaAN5rC++J6NmmcCzlfw==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF0000019D.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
f25e256d-7cf6-4867-68f5-08dd0e27ed18
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
jzo16DIXbsqO8A260NkK4ANTUMdtpl17zPXXR/8BsdBOvqkzrgI7HlhkO1kfgRrwEvHBsqyj2Lcn/qqLdwRnVJWRyl6rTus5cQs0de2Xx8tp3jak2kuofBIDPMIPD17odoYiQWYBlabH2JCtOJ46PLQpoEmUycudh5I3AmW6uTGdzMt93fMlbAfRZbuBuMZWf4wEphtzv55srTQzs8v9wp3PLkYxpfWeb7K8lSSwhPHiZkrAKzbjVs5FBOUuHllk+K+HIy70NRK+38y76Ze1JX7QB5QLdsmi6+chjWrylp8uCmvuPMWVNzhfq4H/HxSd9KgO0i9eb43wNQubNcOh47+ZWgsq/BdIFmYz5IPnBPrKudoUIpTcI37W9uKxXaxLzjd7RiFOpj+9r8bxeXUsTwCmsb4dbLVIpLbwDlb6Sk/a7Yz8NeO3rV4qJAnyQVfP0/WKYv1S/JDIXZfOwT0W/cfqM0MjibxCdFKosPgnxd20ls7ZHrtpn9YvRseAVQBfrPvjQnzun5tcNzsR5jQMI7tiRc4pjrLyattUiQJz4z75nwubTdRMZTFO3Dz0GS9+TeaEqxSxilVJ/M4DKCSmt6PsmcfqR18VxW8wx0icw5F+Thy8nSeZ++YFpos5dW7xNfi0bXcSe6q9AuGTOjLgV5h87uaXWcbTBKczAVOtqs38QNybhNmKlNoBtbd1mv6u/j9ZdeQQIRFIqv/TLaPJSq9z6SLPwxwkPOIud/vnNpRoMtSTtYmQBGfMJdqJtwHsHm1iYuintPYMBvRBiAuf3j7jyOhUnyCFTBBCPNdA5yldMuR0O0pAPflOU2wzyWGUp2+2n3xwMsalEXkgmlxENDNsDXCiRKkpfsf1xyE51AOMayGxtta6IvSz9PTCA64bOY18+DfL0BN4seQTMJN2TM5+BY4tgM/1ICKPGxis7bWPK77bDhZ9v5ewtIKijDc0PW0S55hz2d5CVQgIqLSmXbYe+/lvWV9MKSYHxB3nfP8o+QdmDaRft8jQnvnXuaUjxaKGsDR5NoJPjfdhSW36gPWKPGE0fBB+hS9/cMdMEn7d2V4TFoMwLjtS5hoX5awstzSpB82+IzyD1FAUvT4j4wbFBgZKJk0HnpntDyEK1MPgXDU9CdBva2MHt5R910MfcF404en+B9Jf0JINsxNvZ1xxBvhI+XRCGSyfkmy/ocqbNNyQP0KWN67ger8YBg7X3KvQFxKt4ju0nWK+49z8RkeHzuWwXgKBKmnAGBXJ2s/UhvQnNcxcwKHESDRanlK22KTXGRDDYfm2nxlWlcPjOweDmUmoJOskMNPJY+vJRDe55ndjUXMrH4BUk1fwu1nnVWtLLghQVrgs8a6yI9EhcWxrbbIkkLsHoDYsBFZRcNuG280maVoZIiyymn4nz0GZEHNOVKLh647PIGSwULnu2h3nifvhhz0mZl+RSfSlVD2rkTdUU0wsAJgrRDFWCnaN
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:01.9316 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
b504e980-0491-4c49-e895-08dd0e27ee69
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF0000019D.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR10MB9179
Subject: [ovs-dev] [PATCH ovn v3 06/33] northd: Reorder join_logical_ports.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
this makes the later active_active patches clearer as they need this new
order.
For now this has no real effect as these two parts are completely
independent.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/northd.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index 6bb3cf436..2175afa20 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -2365,17 +2365,6 @@ join_logical_ports(const struct sbrec_port_binding_table *sbrec_pb_table,
}
struct ovn_datapath *od;
- HMAP_FOR_EACH (od, key_node, ls_datapaths) {
- ovs_assert(od->nbs);
- for (size_t i = 0; i < od->nbs->n_ports; i++) {
- const struct nbrec_logical_switch_port *nbsp
- = od->nbs->ports[i];
- join_logical_ports_lsp(ports, nb_only, both, od, nbsp,
- nbsp->name, queue_id_bitmap,
- tag_alloc_table);
- }
- }
-
struct hmapx dgps = HMAPX_INITIALIZER(&dgps);
HMAP_FOR_EACH (od, key_node, lr_datapaths) {
ovs_assert(od->nbr);
@@ -2396,6 +2385,17 @@ join_logical_ports(const struct sbrec_port_binding_table *sbrec_pb_table,
}
}
+ HMAP_FOR_EACH (od, key_node, ls_datapaths) {
+ ovs_assert(od->nbs);
+ for (size_t i = 0; i < od->nbs->n_ports; i++) {
+ const struct nbrec_logical_switch_port *nbsp
+ = od->nbs->ports[i];
+ join_logical_ports_lsp(ports, nb_only, both, od, nbsp,
+ nbsp->name, queue_id_bitmap,
+ tag_alloc_table);
+ }
+ }
+
/* Connect logical router ports, and logical switch ports of type "router",
* to their peers. */
struct ovn_port *op;
From patchwork Tue Nov 26 14:38:00 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015475
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=wWrGHrCf;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=wWrGHrCf;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])
(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 4XyQG669lNz1yQY
for ; Wed, 27 Nov 2024 01:39:58 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 181C36FA8A;
Tue, 26 Nov 2024 14:39:56 +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 cIGMoaSPXAam; Tue, 26 Nov 2024 14:39:52 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7EFFE6FA72
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=wWrGHrCf;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=wWrGHrCf
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 7EFFE6FA72;
Tue, 26 Nov 2024 14:39:50 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 08BCCC08B9;
Tue, 26 Nov 2024 14:39:50 +0000 (UTC)
X-Original-To: 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 30334C08A9
for ; Tue, 26 Nov 2024 14:39:47 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id A99F86FA17
for ; Tue, 26 Nov 2024 14:38:13 +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 lOq3ySiXmMg0 for ;
Tue, 26 Nov 2024 14:38:12 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:c200::4;
helo=duzpr83cu001.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 0A0B36F6A7
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0A0B36F6A7
Received: from DUZPR83CU001.outbound.protection.outlook.com
(mail-northeuropeazlp170130004.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c200::4])
by smtp3.osuosl.org (Postfix) with ESMTPS id 0A0B36F6A7
for ; Tue, 26 Nov 2024 14:38:07 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=SwNyx8+Cxie5iApQE5NZnuIm+axwo7XdqZ5BfXc9INthpLaBdxn+b2ihYV8j66nuG4PGfDF5I8FNrTm5GQF0OSwBtMOSNwgB6a44ZtCJ0r067kIOLZzhJoemt0JFMJW5D4Uy2Fzh7beod8SgJpAVvtSX75CaJniWpCANHobiWeMC/DjekGP6I+71EaCDuw4JFwZ+bZzWdNvja2yN9zKagGBPtOqloOVCFWWX+yJ6Y9BIfVVaNlas6DB2BpvxA2FoYtA98Oh3sHOrCjNt5bwvs1ocCyo9Mz+G8Lu7qTDS6nImZofn/HF1WrsdTQMZOorLKm6rByhpPebnQWwM6A8oLQ==
ARC-Message-Signature: i=2; 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=G4Hx59T2dhVp/qurjg1Uwq9D7b8MdIgrX9vFfLLz5D0=;
b=RmUoRKIB4ZjAwotp+hvJesZyKnir58TBLG2r6vznf2NKiWdu700Ft6eS4aYlm6cVcbrLayaDzGPn0vo6O4ZOZCAGBdicpSY7suMa3GjOWrMkAKVTqZJt7t71qUC77CkenHv3ox7CNJlUaUMHuZlyww9kEcO9zF/d1WPMm40PzgF8ApnqxDNU02tvpeWNmea6N05iUSDZqh+BOYBZHQBltm+Ri28qMyUEqQFttA4ZzqxubcqmHAKQRw3jPy9FGmsF0z8yxC7ET8AxnoUnn9agwIvAD/fmprbWrJzbIfoute8Gb0h3qzk0tIDCsP6uvoWcYwp5ABp9WoYShQT06Cj7Yg==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=G4Hx59T2dhVp/qurjg1Uwq9D7b8MdIgrX9vFfLLz5D0=;
b=wWrGHrCfwUSsA9+ZnoFwWSNM0u5Mneon5l2ewZ637RVyvq8m4rAmVR77nDcM5IL0KLO9nvDv+Ik6dqh/HVeJ91M73JL8U/H8OoFkVwf4FmmbwKgysBOuoEfkSaMeF/NaZrIesivdOrrqbKf+CkdMWsUuRNTBkBcZQYz8OyQS2gBfrQSrxnijOtwfrbX33OCSYxGvjcyBxEwAMk6ZY07y/nBdetuSQv88SKqXp/95CEn5iDRnR4fA9t007CbpKs3UX0GZ++BNPnmZuV5lhBBJ1K+oiu76dqQM8Va5rcjCYcG0lEARtDAyM32Ei+HeYZoA0evWCJxB5EAYrxZeizzSYw==
Received: from AS9PR06CA0091.eurprd06.prod.outlook.com (2603:10a6:20b:465::9)
by DB3PR10MB6811.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:437::5) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:04 +0000
Received: from AM4PEPF00027A69.eurprd04.prod.outlook.com
(2603:10a6:20b:465:cafe::f8) by AS9PR06CA0091.outlook.office365.com
(2603:10a6:20b:465::9) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:04 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AM4PEPF00027A69.mail.protection.outlook.com (10.167.16.87) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:03 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (104.47.17.113)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:04
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 7889177
X-ExclaimerImprintLatency: 5067230
X-ExclaimerImprintAction: 985c7960a4264aa0a431cc2aa4c36ce6
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=qZ/8A6IRSD9BTBSu9MjWXAKJi82enxRyp9H5kxvHMOi7KZ04GoEhtIZYwvjDpvU8fo/yMgR7EYd/odh0+N6dSUGx+4OGcmDOe/HTqR0gkL1lweaNxVgMBi/xlvFKjijksyw6v5+nAbwytr9v2iNihWCI2M4+qAeiiI5IOsooat/Ufif2BdbtEZLeSDvsX27+ED36OxxuTjoKTbfF5Z6+9vzStQlNPJi1ICGh+GaiVlRbCVLQJ3NpYarsF9xZNcm+eHEZuxZBxaprgdcP8KypgBY2wi0dZ6FoNLH5MFljocljfAWhoqQ3pS9qk6i4VfXrr3yW1vzJk77kWzATH79oEg==
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=G4Hx59T2dhVp/qurjg1Uwq9D7b8MdIgrX9vFfLLz5D0=;
b=DSkqkwUWlBuRx9CmTG5qGMj9awieJfRXkjuV+SW97VhmH4ePeyuXqgTMxaDvd4khnV6666ySWAwPwKsqkh+6aSr2n1NE4zOHEstytjuCJRdU1NTsFVbA7yqGW5pizLWE/9jy6W4b/sacwigs0Mct6jiIYbKEykhp7+1qNpJH7JXMG0O5SzgLTcC3km+KSl7X61bTJt5l8kG8dS1R8GgMDCIGkkyn/VJ9w+u+uXbu+gR4/tGzP6205rNbIFqp2G1CIy7fbwyF3DBks5nuGzPRV8kofW5WhDhoz/mS51txVYe6BxMaBDQ6tckMDk+zEYsx7ALfhOTjuhHUGWkPBZxipw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=G4Hx59T2dhVp/qurjg1Uwq9D7b8MdIgrX9vFfLLz5D0=;
b=wWrGHrCfwUSsA9+ZnoFwWSNM0u5Mneon5l2ewZ637RVyvq8m4rAmVR77nDcM5IL0KLO9nvDv+Ik6dqh/HVeJ91M73JL8U/H8OoFkVwf4FmmbwKgysBOuoEfkSaMeF/NaZrIesivdOrrqbKf+CkdMWsUuRNTBkBcZQYz8OyQS2gBfrQSrxnijOtwfrbX33OCSYxGvjcyBxEwAMk6ZY07y/nBdetuSQv88SKqXp/95CEn5iDRnR4fA9t007CbpKs3UX0GZ++BNPnmZuV5lhBBJ1K+oiu76dqQM8Va5rcjCYcG0lEARtDAyM32Ei+HeYZoA0evWCJxB5EAYrxZeizzSYw==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:02 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:02 +0000
Date: Tue, 26 Nov 2024 15:38:00 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AM4PEPF00027A69:EE_|DB3PR10MB6811:EE_
X-MS-Office365-Filtering-Correlation-Id: d37fa1c1-3cef-436f-eeb9-08dd0e27ef9b
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
OlvUH3OY4SvrdzHsCC5RtZb+6g8Est0SR+AmPMBe0a0X/TH9jgrMsvFPGt0jmruFPAX5SUDN3uJ1i1guxI3PDRQSpMfuvLpvfIUAPtW3vf7pHsBemBbaZprQ82CQfcxC2LNGi7a8FoRiS66D/LCq2L/vIrR0MVl3wBe7c3RZwc3qU9J7V+8r+RWp7yTsMQLKzxfZvgYkBIvTmQL19biOS2jpYXh3X3UUT56Gj7eBhG19APjGefPsvdFrdttsuhdx7H+/TLJ/Rr5pE7o7kz7sfH2Mjh0zNhoj7t6ur2+FFbQ4hDVKXN5APN+FZb3O5K3ZZVi+V89r5MsjoAoLq1zpjPZlk1DQNvPmOEVZYpRzysV86aZu0NzqRe19LN6Uks6R8Lqz9s7csET7/2R6SI17iCsqeKR9U1n9yYxezqEo0F5eCotHlLlfTAREiZGh9U2P2QCLrY++VJ14x8j4UkIAsRrRDHb9EZ/hxzBJ3DVgifu6TVjWJslbJZ/Q4i6PDY/cYJPxddF0zwaR9ZkMb2dEntfdCk41+DWn2p/FbuvDMI804rYhjAV5E0PC8yPvsm1K0LTUgoHBk5OdFJB+DyOuMvW4cGeeAyvDF60O79hCwagSb0h6+MT+4mKvn++Sn9EYDvlwhpFqLM7GTcuJDHG+O8xNjbr/2dD31P0lwC3W/dCetH5R8Z958QFUf7BEO1Q1qR79k1L6lnjNRIf8dVwYqhVu97wYbdkYP1EI1uWpSDToSzMkE+x+LWpmKZ6mG5Kr1rsIkoZyCFwCMEDq5/a+sXL/XRslpfWKB7QK4nTeEzPSUeD0Qg6xDD0g2bA5q/h8HkGKGLNUSjD4pMaJuhFtY3Jqdw6NvQ8r0p8ZEBI+7v5zK/UUQ2T5zarhoASPDPqMTcaJ2LE+IifD4Ifi+mvlwziCw6qgAkdi9z6DfvXrr1jkwYpzjPb/iJ7kf53NuueTrrSISjF14yxUMJWWYT86amBzQHELuBg/aspGm7kjXzGZdcI5kLxuzJnaJS0C/UKgUUK5G4b53omeOysNdPVk4l7naRt7Hux1fLu+gYajY0evcr8vkXh4J/wpDl2Ptt1bfLiwTvxZGFf2EIRCpMv1lW3tbJXnyZTz7xF5pRIvDuSWSd8KSMkUIIg05Bs7dsSF3YvZhTqqXdsk5mJ+LfnBs7DeapTo4UH7X0wWYmPB2D+ojHcg2EqkwLC0pCtf9m4b4robW3ovrKlM47Yq/pbporrJQt4F+zbGcfLAGgFjeRV0iAWknz4fwQXm0InNzv6wNFKwGU2TuDOSU9k/Ti6X+vgufN9eHaYVQ30eVXmSbBkQBzY7EN/9GGlnlV3K7dYmPT2lSSc7p5Z1FzhnSmdOeg==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM4PEPF00027A69.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
2f9d0b6f-e1b9-475b-0024-08dd0e27ee2e
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
Xh8pzErUXKPXk/kU02RaHFCu+r136UXCKEti75OacjD59mDJOwGGla4KtngkioMlSKzUREG1mMOiw+pMhmHnZkS1rOh4Xpajh8cWXKiCP78LsXqYN1uQKTABx5Le1+ZIIkmMAHhAnstKUWZhuvkoIisA870k8yZ1YMe7pXRcXzzeODb5r20bzcjvWpkuax0qT1BF65xaP7n6xR4VNoJVKzWO4Rwi0058AAwFICOmxRInqc3ooEsK2cQNzCdan/FM1P2W4VJiN9pXM0nDNQJr9qWIpZlYTANPi6NffPQjT6WHKxZZRCuwN81vCfez0PxzdNYyiz3iDKVrn96t1V0PZFIg5QPSELrh8KBPIEQEQTJPeEoJTwcyPN5KakA5D4hib+ZgqJiiAY7J9crAcHbqnbhp0keK3pPG2NUoOH08TpGDWaGqDj5eO1j3qvPWbW/2guf3EENssrtu/qC0ldqZpTSuYWIxzRWnqKdb8v0U2rYP0kAVf6NW2NtVQfHy824uaUdTocsXWIlyTMizBzCyJsggwU8JaaPKvFElZbayFwdx8BbDglbc7y8WtWjrA4yRjQLtFzvTvGkzERI1cwEOXygItbgWHVszpAAQTqrZxC5eavLJ2EkvJF4RuJxr+TEoiK5G6Hhw+kepgSWKEW1gHOzsaKS9cWkubiUO7/SI/+ecNY25ShsqhaNc5RF6fdV2hHlkWy6gFCAu5NJWzMudgCQNArbvYBp4ffFtMMt7xwo4E0n0TiWL4pj8YXKbsb4b1A+x3DEYznyxxwvcXuvKXy2UXOlz0s4NFdEtQDB4eC6VZKDpuGk7o0IbeLE+znO9ghA08E1w8K51lGIEzCMgx+cfY/xnL4F1GHmIgcXCeUUk7f97F8ncQT4LF219TagoVNvLPhi3o4GZBWOu79OFIxf9SeqsBXNRWAqJg0Mqf5aowMur1uP17HIdcxuJtpWSEbFt2oC12rMkgESslBeaFZpNlop2Y3erT7FE0cXTc4SqhbkKrHoT7F/CqabyUNiHJIwdjGhLizB3AyrlSdhZEPaYkPNHJ4gTk9zOzi9RMer33wusIBksXE6LdsKi5vaZhgvdcOgcnew16nseliGRNyvsG0lcfPxvyg+upOXT1gNiSMw2asvQc42wi9SutZ91v6W1tkMAu2O6v2QbUYI0qXWzji5mbxKABRyC+cZyHEUJtm7ib0893KUyha+5gPQ/AfSlRB50QDK5YfyiLvYPk6vWD06lZc0gvVh4nHyLGotuwKhCx4xbriRPEGuFMyPh8eADqex2AjhrqoHdvN/i0304QNHCol7xzD8IYkOdsDQmVbNSTbJpZvfkwA2vziAMbd7nJminEc8clje6yF+uLIXhayfXiv+db8zMvc52fK06T49/1h/X9gEruFBuOAZiRXCSB8gxKGf1y7Uuaj0yaLtz7EpHXnJfCeLfU2tcuRFDzxckI0wIXvzjVI7EFYAP
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:03.7184 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
d37fa1c1-3cef-436f-eeb9-08dd0e27ef9b
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM4PEPF00027A69.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR10MB6811
Subject: [ovs-dev] [PATCH ovn v3 07/33] northd: Rename en_static_routes to
en_routes.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
this engine node will in the future also handle routes created as part
of the LRP network property. Therefor rename it to make it clear that it
handles all routes.
Acked-by: Lorenzo Bianconi
Signed-off-by: Felix Huettner
---
northd/en-lflow.c | 8 ++++----
northd/en-northd.c | 34 +++++++++++++++++-----------------
northd/en-northd.h | 8 ++++----
northd/inc-proc-northd.c | 12 ++++++------
northd/northd.c | 4 ++--
northd/northd.h | 6 +++---
tests/ovn-northd.at | 6 +++---
7 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/northd/en-lflow.c b/northd/en-lflow.c
index 469d7c6b5..fa1f0236d 100644
--- a/northd/en-lflow.c
+++ b/northd/en-lflow.c
@@ -44,8 +44,8 @@ lflow_get_input_data(struct engine_node *node,
struct northd_data *northd_data = engine_get_input_data("northd", node);
struct bfd_sync_data *bfd_sync_data =
engine_get_input_data("bfd_sync", node);
- struct static_routes_data *static_routes_data =
- engine_get_input_data("static_routes", node);
+ struct routes_data *routes_data =
+ engine_get_input_data("routes", node);
struct route_policies_data *route_policies_data =
engine_get_input_data("route_policies", node);
struct port_group_data *pg_data =
@@ -82,8 +82,8 @@ lflow_get_input_data(struct engine_node *node,
lflow_input->lb_datapaths_map = &northd_data->lb_datapaths_map;
lflow_input->svc_monitor_map = &northd_data->svc_monitor_map;
lflow_input->bfd_ports = &bfd_sync_data->bfd_ports;
- lflow_input->parsed_routes = &static_routes_data->parsed_routes;
- lflow_input->route_tables = &static_routes_data->route_tables;
+ lflow_input->parsed_routes = &routes_data->parsed_routes;
+ lflow_input->route_tables = &routes_data->route_tables;
lflow_input->route_policies = &route_policies_data->route_policies;
struct ed_type_global_config *global_config =
diff --git a/northd/en-northd.c b/northd/en-northd.c
index 24ed31517..6e90336f6 100644
--- a/northd/en-northd.c
+++ b/northd/en-northd.c
@@ -287,7 +287,7 @@ en_route_policies_run(struct engine_node *node, void *data)
}
bool
-static_routes_northd_change_handler(struct engine_node *node,
+routes_northd_change_handler(struct engine_node *node,
void *data OVS_UNUSED)
{
struct northd_data *northd_data = engine_get_input_data("northd", node);
@@ -316,29 +316,29 @@ static_routes_northd_change_handler(struct engine_node *node,
}
void
-en_static_routes_run(struct engine_node *node, void *data)
+en_routes_run(struct engine_node *node, void *data)
{
struct northd_data *northd_data = engine_get_input_data("northd", node);
struct bfd_data *bfd_data = engine_get_input_data("bfd", node);
- struct static_routes_data *static_routes_data = data;
+ struct routes_data *routes_data = data;
- static_routes_destroy(data);
- static_routes_init(data);
+ routes_destroy(data);
+ routes_init(data);
struct ovn_datapath *od;
HMAP_FOR_EACH (od, key_node, &northd_data->lr_datapaths.datapaths) {
for (int i = 0; i < od->nbr->n_ports; i++) {
const char *route_table_name =
smap_get(&od->nbr->ports[i]->options, "route_table");
- get_route_table_id(&static_routes_data->route_tables,
+ get_route_table_id(&routes_data->route_tables,
route_table_name);
}
build_parsed_routes(od, &northd_data->lr_ports,
&bfd_data->bfd_connections,
- &static_routes_data->parsed_routes,
- &static_routes_data->route_tables,
- &static_routes_data->bfd_active_connections);
+ &routes_data->parsed_routes,
+ &routes_data->route_tables,
+ &routes_data->bfd_active_connections);
}
engine_set_node_state(node, EN_UPDATED);
@@ -388,8 +388,8 @@ en_bfd_sync_run(struct engine_node *node, void *data)
struct bfd_data *bfd_data = engine_get_input_data("bfd", node);
struct route_policies_data *route_policies_data
= engine_get_input_data("route_policies", node);
- struct static_routes_data *static_routes_data
- = engine_get_input_data("static_routes", node);
+ struct routes_data *routes_data
+ = engine_get_input_data("routes", node);
const struct nbrec_bfd_table *nbrec_bfd_table =
EN_OVSDB_GET(engine_get_input("NB_bfd", node));
struct bfd_sync_data *bfd_sync_data = data;
@@ -399,7 +399,7 @@ en_bfd_sync_run(struct engine_node *node, void *data)
bfd_table_sync(eng_ctx->ovnsb_idl_txn, nbrec_bfd_table,
&northd_data->lr_ports, &bfd_data->bfd_connections,
&route_policies_data->bfd_active_connections,
- &static_routes_data->bfd_active_connections,
+ &routes_data->bfd_active_connections,
&bfd_sync_data->bfd_ports);
engine_set_node_state(node, EN_UPDATED);
}
@@ -426,12 +426,12 @@ void
}
void
-*en_static_routes_init(struct engine_node *node OVS_UNUSED,
+*en_routes_init(struct engine_node *node OVS_UNUSED,
struct engine_arg *arg OVS_UNUSED)
{
- struct static_routes_data *data = xzalloc(sizeof *data);
+ struct routes_data *data = xzalloc(sizeof *data);
- static_routes_init(data);
+ routes_init(data);
return data;
}
@@ -510,9 +510,9 @@ en_route_policies_cleanup(void *data)
}
void
-en_static_routes_cleanup(void *data)
+en_routes_cleanup(void *data)
{
- static_routes_destroy(data);
+ routes_destroy(data);
}
void
diff --git a/northd/en-northd.h b/northd/en-northd.h
index 631a7c17a..b676a0ad3 100644
--- a/northd/en-northd.h
+++ b/northd/en-northd.h
@@ -20,7 +20,7 @@ bool northd_nb_logical_router_handler(struct engine_node *, void *data);
bool northd_sb_port_binding_handler(struct engine_node *, void *data);
bool northd_lb_data_handler(struct engine_node *, void *data);
bool northd_sb_fdb_change_handler(struct engine_node *node, void *data);
-void *en_static_routes_init(struct engine_node *node OVS_UNUSED,
+void *en_routes_init(struct engine_node *node OVS_UNUSED,
struct engine_arg *arg OVS_UNUSED);
void en_route_policies_cleanup(void *data);
bool route_policies_northd_change_handler(struct engine_node *node,
@@ -28,10 +28,10 @@ bool route_policies_northd_change_handler(struct engine_node *node,
void en_route_policies_run(struct engine_node *node, void *data);
void *en_route_policies_init(struct engine_node *node OVS_UNUSED,
struct engine_arg *arg OVS_UNUSED);
-void en_static_routes_cleanup(void *data);
-bool static_routes_northd_change_handler(struct engine_node *node,
+void en_routes_cleanup(void *data);
+bool routes_northd_change_handler(struct engine_node *node,
void *data OVS_UNUSED);
-void en_static_routes_run(struct engine_node *node, void *data);
+void en_routes_run(struct engine_node *node, void *data);
void *en_bfd_init(struct engine_node *node OVS_UNUSED,
struct engine_arg *arg OVS_UNUSED);
void en_bfd_cleanup(void *data);
diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index 8c834facb..ddc16428a 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -159,7 +159,7 @@ static ENGINE_NODE_WITH_CLEAR_TRACK_DATA(lr_nat, "lr_nat");
static ENGINE_NODE_WITH_CLEAR_TRACK_DATA(lr_stateful, "lr_stateful");
static ENGINE_NODE_WITH_CLEAR_TRACK_DATA(ls_stateful, "ls_stateful");
static ENGINE_NODE(route_policies, "route_policies");
-static ENGINE_NODE(static_routes, "static_routes");
+static ENGINE_NODE(routes, "routes");
static ENGINE_NODE(bfd, "bfd");
static ENGINE_NODE(bfd_sync, "bfd_sync");
@@ -254,13 +254,13 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_route_policies, &en_northd,
route_policies_northd_change_handler);
- engine_add_input(&en_static_routes, &en_bfd, NULL);
- engine_add_input(&en_static_routes, &en_northd,
- static_routes_northd_change_handler);
+ engine_add_input(&en_routes, &en_bfd, NULL);
+ engine_add_input(&en_routes, &en_northd,
+ routes_northd_change_handler);
engine_add_input(&en_bfd_sync, &en_bfd, NULL);
engine_add_input(&en_bfd_sync, &en_nb_bfd, NULL);
- engine_add_input(&en_bfd_sync, &en_static_routes, NULL);
+ engine_add_input(&en_bfd_sync, &en_routes, NULL);
engine_add_input(&en_bfd_sync, &en_route_policies, NULL);
engine_add_input(&en_bfd_sync, &en_northd, bfd_sync_northd_change_handler);
@@ -276,7 +276,7 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_lflow, &en_sb_logical_dp_group, NULL);
engine_add_input(&en_lflow, &en_bfd_sync, NULL);
engine_add_input(&en_lflow, &en_route_policies, NULL);
- engine_add_input(&en_lflow, &en_static_routes, NULL);
+ engine_add_input(&en_lflow, &en_routes, NULL);
engine_add_input(&en_lflow, &en_global_config,
node_global_config_handler);
diff --git a/northd/northd.c b/northd/northd.c
index 2175afa20..d38a1650b 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -18764,7 +18764,7 @@ route_policies_init(struct route_policies_data *data)
}
void
-static_routes_init(struct static_routes_data *data)
+routes_init(struct routes_data *data)
{
hmap_init(&data->parsed_routes);
simap_init(&data->route_tables);
@@ -18858,7 +18858,7 @@ route_policies_destroy(struct route_policies_data *data)
}
void
-static_routes_destroy(struct static_routes_data *data)
+routes_destroy(struct routes_data *data)
{
struct parsed_route *r;
HMAP_FOR_EACH_POP (r, key_node, &data->parsed_routes) {
diff --git a/northd/northd.h b/northd/northd.h
index 25235c78f..6e3f86eb4 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -180,7 +180,7 @@ struct route_policy {
bool stale;
};
-struct static_routes_data {
+struct routes_data {
struct hmap parsed_routes;
struct simap route_tables;
struct hmap bfd_active_connections;
@@ -739,8 +739,8 @@ void build_parsed_routes(struct ovn_datapath *, const struct hmap *,
const struct hmap *, struct hmap *, struct simap *,
struct hmap *);
uint32_t get_route_table_id(struct simap *, const char *);
-void static_routes_init(struct static_routes_data *);
-void static_routes_destroy(struct static_routes_data *);
+void routes_init(struct routes_data *);
+void routes_destroy(struct routes_data *);
void bfd_init(struct bfd_data *);
void bfd_destroy(struct bfd_data *);
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index d6a8c4640..63fcf3f71 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -3904,7 +3904,7 @@ AT_CHECK([ovn-nbctl lr-route-list r0 | grep 192.168.1.2 | grep -q bfd],[0])
check_engine_stats northd recompute nocompute
check_engine_stats bfd recompute nocompute
-check_engine_stats static_routes recompute nocompute
+check_engine_stats routes recompute nocompute
check_engine_stats lflow recompute nocompute
check_engine_stats northd_output norecompute compute
CHECK_NO_CHANGE_AFTER_RECOMPUTE
@@ -3920,7 +3920,7 @@ AT_CHECK([ovn-nbctl lr-route-list r0 | grep 192.168.5.2 | grep -q bfd],[0])
check_engine_stats northd recompute nocompute
check_engine_stats bfd recompute nocompute
-check_engine_stats static_routes recompute nocompute
+check_engine_stats routes recompute nocompute
check_engine_stats lflow recompute nocompute
check_engine_stats northd_output norecompute compute
CHECK_NO_CHANGE_AFTER_RECOMPUTE
@@ -3967,7 +3967,7 @@ AT_CHECK([ovn-nbctl list logical_router_policy | grep -q $bfd_route_policy_uuid]
check_engine_stats northd recompute nocompute
check_engine_stats bfd recompute nocompute
-check_engine_stats static_routes recompute nocompute
+check_engine_stats routes recompute nocompute
check_engine_stats lflow recompute nocompute
check_engine_stats northd_output norecompute compute
CHECK_NO_CHANGE_AFTER_RECOMPUTE
From patchwork Tue Nov 26 14:38:02 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015472
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=ttxsREtZ;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Wr8fJBvi;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
(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 4XyQFw33fWz1yQY
for ; Wed, 27 Nov 2024 01:39:48 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id CD8D080DD1;
Tue, 26 Nov 2024 14:39:46 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id pIxVFzCjWkj0; Tue, 26 Nov 2024 14:39:44 +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 smtp1.osuosl.org ACB7680D9A
Authentication-Results: smtp1.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=ttxsREtZ;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Wr8fJBvi
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp1.osuosl.org (Postfix) with ESMTPS id ACB7680D9A;
Tue, 26 Nov 2024 14:39:44 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 8C8FDC08B4;
Tue, 26 Nov 2024 14:39:44 +0000 (UTC)
X-Original-To: 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 3F619C08AA
for ; Tue, 26 Nov 2024 14:39:43 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 0C43A6FA68
for ; Tue, 26 Nov 2024 14:38:12 +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 IGm95yNdZMrG for ;
Tue, 26 Nov 2024 14:38:10 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2614::617;
helo=eur05-db8-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 301456FA2A
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 301456FA2A
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=ttxsREtZ;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=Wr8fJBvi
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
(mail-db8eur05on20617.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2614::617])
by smtp3.osuosl.org (Postfix) with ESMTPS id 301456FA2A
for ; Tue, 26 Nov 2024 14:38:10 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=fail;
b=zN4u5+/9NIy/V2vSokSwiBXPj20P8C5FD3LNULMrS8+bh1E33iPu4QEzkXjiEXZR4DiS1NURv2dMKo325UK+xG8MmF+3XoBHzfGR6LFVm5q6XleAqHuA6Fri1u7zvlCjvqYTYgapHF1p285Ehbkb9NiUnfEUeMq+8RUMKuw8e0vadXJOux/CNN7Q4EzhE8xw0OYBRokdHWAPsC1nsJpxjfKRN5yOLPYW9h5u2BbhdEpsT8lsEGqikb9ivKOQs6k2RmvtPN0y+jdFRVihPoag1/DcGpGUXenuP37eIGhEiS57vvs5jKpIyZ9dPZc6FzjljQldp0dSMwre2rlwK4npng==
ARC-Message-Signature: i=2; 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=sYgDfs2V2dD1TfY0aAi3lOZ/IxhYe/EvwYehmOm+rxY=;
b=CouFtd3n75RvALLQnmmM2F+oPrjdXSv4ANawc22iOvT2LYqDRtsGdjtV1N0l/wwPLq2vzU62hYkdDq7hoDgcHygJwxObPrwYK+I+Chl9qbPi9uo29ykACgXyg+wwCwmb94RRvC0IlRHj1WlPN5aGXcynm5zjwE/G2q2Uv9uP1TAWYqt/wHCZJNXsVeOcSqX3Ac2/7V6AtoRJHARrGrMwZpcq2yJZ5PCZfYZZKzgLS+8gnq7UiB2MkAEEL1vfSeyg3fDbcP4h8SPVljMF9EO6bEY1GyUNxM0Txzn3pKREaxE68AdwyvPNq1JYDPvkS0x3vkKcGXDAQKyTDwWRK+6DNg==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=fail (p=reject sp=none pct=100) action=oreject
header.from=stackit.cloud; dkim=fail (body hash did not verify)
header.d=stackit.cloud; arc=fail (47)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=sYgDfs2V2dD1TfY0aAi3lOZ/IxhYe/EvwYehmOm+rxY=;
b=ttxsREtZ0SU5vmcHp0fV+ufHGnDzQlJGYB5wm1DODegG3NwYikenx/2YeN6gaNHDjKZ6T1pV3MT7UZf+MEJ6bnTvaHaP7lStJ2kdVdgqhJxupZKUTSDhUxR09o8QVdBLuN0DPTQLjEs8My45KxmFpQHX8iA+MO6mfxxUMO98JCpoG2sWhvgthsaaMrSB0R+BCiNghN27VxbIiJ1At6pjtL6bj6y64thaFnDzyJ2x90Zmf3HmvSsRWc7IknVEXH+E/okQ1iMVbW0jcLHDA3Sg4wz+6i76Rs9vxjQltKhjxdFXyEdGINBN9Zu6PrFXvNfzuYJKwYt11gyaG9HTXnbTDQ==
Received: from AS4PR09CA0010.eurprd09.prod.outlook.com (2603:10a6:20b:5e0::14)
by DU4PR10MB9048.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:560::13)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:07 +0000
Received: from AM2PEPF0001C70F.eurprd05.prod.outlook.com
(2603:10a6:20b:5e0:cafe::fd) by AS4PR09CA0010.outlook.office365.com
(2603:10a6:20b:5e0::14) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:06 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=fail (body hash did not verify)
header.d=stackit.cloud;dmarc=fail action=oreject header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
AM2PEPF0001C70F.mail.protection.outlook.com (10.167.16.203) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:05 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:06
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 12758840
X-ExclaimerImprintLatency: 8314270
X-ExclaimerImprintAction: b6d6ca305d9a4e21bcf4caab3875c498
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=ICM7mdnXp7zWY5bgpAWEKDZIs70aegVa4O8dhbdMzdOGX42ne9NPRgPJ+XLTI1dd2s5hWbr/bq7OnjLms63ViL5AigXPZNfiNelV+WbI6XxGAZCNVXlp0LUK81oXCvgsUKdonDJPT4uCIkBhzh7BpRNiEsfnmW1nggKTlFEaFHCxsk5pWcWbZcCzNrP7D7wlsS1uoHZDoeCa1SDMwt0MHc0yE3RfH+7uUS9Sn3K9MdEpfU5O+VDVCwncK30+M+bJa2H13JHGug+pnBFze+HFWht9B78Mh2LjiObcJVNhQ95BvT70M9Q5TwNtqElU0L8zMsgcCqXr1anTm6I0lYYpCA==
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=TLZW9kj5mB3s2b+0PdD8X/EmUv91gqAQ391DGJ6KFtE=;
b=EWAQktn6xsUgdOr9IGLaEVztotKFp5eBOmAwJuA+gzKdlrS2kM1pkGyhCQmoO4XqZhixKZAYVL8tptnDs3uAV2eLpTwSnz3u7YJA7JtuM8oonfjegErCs6C/n+LBZL2qkxeUOQHpHA3YlzPNdMH/rPHLM2PeDNdb7XY1Afv3LAUWnQroCKuG3REKIzImutAmtC+eC51WoOOL5WFb3IhMpaoGrD4dG/yHOQ6SqJ6CYxmBQ+zUAZnHWguJR5dzw9yAcYllX2AFIzBP2wSblOV1POy+2qJwErFIF9zZDEcaNGeL3+Z/q+zyobUELl6le1CgK//3AI1Kj0KO85GBr00v2w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=TLZW9kj5mB3s2b+0PdD8X/EmUv91gqAQ391DGJ6KFtE=;
b=Wr8fJBvi+aMBIsfBwadRaEWloUdoZLiBQmWgBQpRKJyZVkmypRvRTRYqh99N9zyg56njGeyviFRo0o8iaWzPnRrA2Cfv6drDPNTqvanNOoSleej8VxyxpqPDoxA5SuqoMEwpPFPLaU6v39fHId52usNPN5m3ecLYuR+r0z4sH9z44xBGFl2973l/JHHl2xEmm5E4xGFGquAzhjriPcO+kP2NANIbo7/ZF2x9T5cDuyv9vw8/G6FOBght7zB/LIEQ47UPhRC5TTYJoTtqV42Za9pFWfKGlZh+xFzTYyUWWA/pAVhMHn/Wiw8p0uhbKAqxNsg6jXvPezk7xPsTOf3sBg==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:03 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:03 +0000
Date: Tue, 26 Nov 2024 15:38:02 +0100
To: dev@openvswitch.org
Message-ID:
<161897e2374d1ec0b12b0aab0eee7fdff48d0599.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0107.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::17) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AM2PEPF0001C70F:EE_|DU4PR10MB9048:EE_
X-MS-Office365-Filtering-Correlation-Id: 7f652e0a-ff6a-44e4-4d2e-08dd0e27f11d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original: =?utf-8?q?8SP5hJIkRU0cVqsf6uJLsk?=
=?utf-8?q?dC6gEAQVoa7iL6HOTG42IAS+w5E8WFAbLoP061JNpBjJPaxQs18Gte0u5GADAxu8V?=
=?utf-8?q?Up4Vy9ZJYtQTY4+CJ0xO76KnUV2pPj3cRBvvwuqvx0WqVfnEmrQNPHF3qecFvuwwb?=
=?utf-8?q?IQt4DfrpdKHTmbcJSLQ7xanqS2Ndn2lKzjCQkJG1+o+Ht58cALUPztLwW1pScqN+7?=
=?utf-8?q?TNejSJBPNeCqfnLG6mOWqTe5cJmbtlFf6vyJ4yT9vmDQdwJvOB74kwhtxOEEMz0CR?=
=?utf-8?q?h/fp0AWH+M9ryHZMA1EJy5imXwDTUEtD8FLnb9DKsMQ84aEChgwYa/s57pI2ZWVCK?=
=?utf-8?q?upYq+59wTRxfbmjdM78JAk0b+Tr1bT8/oIy3D4VOVSf0IP5GPEAD6mMYUi3+qX/F6?=
=?utf-8?q?D3/u8UmxD4gAUM8013pWtdXRLYlep2cgi+wFTL391fBhB17zNtulhPeyjIEPnWmBZ?=
=?utf-8?q?j+iioot9APrI0oFdhs1CTo4MVyp4zpYuudGTzxdaqRDFpzhXOilL6dV0Yzx9px+pI?=
=?utf-8?q?ieS4Rs300W4pN8rx7PQ8WZ/dWnT3knFirLSQVuls1lXYYk+8PnAWLfxELEtAFTkAB?=
=?utf-8?q?ebM0cCgY6l+2XZh1I3bMnY6j5KR1+JtatZ2sDiE2OuULFQbe5uvhLoN/E7JrmNEYk?=
=?utf-8?q?H80U6qKBsTi0CrG6Bub0kA+snjed+XbPe2KHEKYqHJ7INrxu6O5cnEtBQhiIRakOp?=
=?utf-8?q?WCG8c3LFEqKjv28h1iqk8SnnAQb18pMcK9dhMWx8hm+DYHJeEbyCuSw3069KfWOcH?=
=?utf-8?q?fU3rMxtwJTzQsPTT4fJEjbSpaQpl/GpVxql11uZZKZRjXH7vPax5wOCr9U0TelmNi?=
=?utf-8?q?UTo2Iq4RCASj72guZ9pKwUlYDvFfhx1TaG+Dv6wFNG2ItX4L+o8MvMCpPm4QZlzhQ?=
=?utf-8?q?BvjKrnwxU5JouTEEcILufKa04rlhM0pVswo9L6Px8r+/MlgOaD2rxf4+4fQcsa/dh?=
=?utf-8?q?0aI20/ihGJu1rZUyAljp2hTRp1jQU4RgHmyZkJBOh+6yiKAAJEl4Wtom+YlsTFB+7?=
=?utf-8?q?abOsJu0MA7t9ReJh3yyo4hGJvYUH4W8m2WV3iG7SEl2ic/kL+njiUb5QFGTtnFCfA?=
=?utf-8?q?lIhswKmKaLsyhJktmePOP7RPbyH96E7e2B45WSVdUZK8H3t5gpYLG1xe64+tgHHT2?=
=?utf-8?q?wGm6V7F8iLL8bRTQPJ3EOe39rWGhzr/Hd31GdojItVfbYy1lmabg56joYWah53w9E?=
=?utf-8?q?MVS6kRaSlP9B7CU3Xx0XuImi7vqOI3PWhnRWagw4xPnKwMUUqqI53q2JuDy52xs2E?=
=?utf-8?q?uYF/2Z9NMH0tjkomkGiupniMhtUXwmh7m3rcljtJiS0w=3D=3D?=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM2PEPF0001C70F.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
2943a385-f1cb-42d6-079f-08dd0e27ef40
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info: =?utf-8?q?8RuSifphqnR/Uy3th57QWOFkB2nRiTx?=
=?utf-8?q?IQ7T6ocTWLiL6tmywl62NZZVm1NTksTFN6qWq5IU7XEm+v3D7SVVYh6r6j8As1YST?=
=?utf-8?q?vXR1YmVn3Za6PgjxAuzADzZ+6a8dDcUNsZJIisSwo0HrxLhGKlak6FhqGHoWdrmts?=
=?utf-8?q?WK26Lf1aWgfv7PUhmwsuB9qF+QP5qrQ5PjRPpuIUdB4oRcZQfA6w2JzEd8nUSV1DM?=
=?utf-8?q?GnYZOFFKdhY5QZmCSZvu75qe8UxAIPWc/Np3yiDzhZnXucgj/zN6Dl1pMjq0B9ICI?=
=?utf-8?q?Vx7mew2wKN99H9Tzq1BZep8G7Dt8/Gd38f3ZZsF8h38YYdWIALrWpaxItZ0i9kOeS?=
=?utf-8?q?pii05z33wJfDvPQS0/IZ2BSub6SbJtNnwkrSUsyKDiFyZJrrETdkgd5HbsJtCqI7i?=
=?utf-8?q?X2H5GeZOFk7a9+vyiHIsV4m5/G/G/5WuFtzxhi6GCfQiXy+5iOXKaCBto/ELprWMG?=
=?utf-8?q?JUrblIWkZaUPzI0mXeTXQRUj9ZGhXAMi5HIxLNxD5gM/K1CrpYq+BT8bg+7spJHRg?=
=?utf-8?q?Lv/+bTYRB42NjVn8hmpr2fTyN5B2ROi3E+PY6y+HJIOflTnf82Hn+inrKERVB7tC1?=
=?utf-8?q?KbthxlZRqat8mJfPAt91p5yGdo9WiayTPvvW2tTxD+5a/35bO8qCUL3ojfVcvAiQF?=
=?utf-8?q?1J/wkUbVkKWtY6Y2PywKbx4SBBhVvidMVsBNQSvlLbvEbVK69/4wZJ08b7gzHKQuk?=
=?utf-8?q?AfD2aOiC4Ao6b62qUvP/gd2/2G3f8gMFJecy3bKwZikRrmZ1BJdmTHXsZPowKxWdT?=
=?utf-8?q?of3cQrjABVVJjrBfDXDfe4hWRIGkFoHrLv3maDB/awqHthGj9IshdNt7dlJAv/Oyr?=
=?utf-8?q?KFDIp5F27xlLPu7GIHsTJQX0yxqmlB8+3bEQRlavNQzMlMe0OgprEeCcS8Ngu3vTx?=
=?utf-8?q?XUDzHhAfRPKi1h/9y/f4/S9gbvhcsmKLi+1vdp7cJspl6NFbLH+IgtG2MBOe/sLK1?=
=?utf-8?q?O7922WOdBG9XerQTUQWtfHwl9xaVkHa1DagB2V3k+R0MhggmOU14a4BBGjkFzEtou?=
=?utf-8?q?+C21/kfcxKDngmQ+SaKvwvU0g4K68bUGBmKcKDvznp9tPAfGcQWjTSVEBpKh3Pyon?=
=?utf-8?q?lsBYU+st1V15Qzb34g4Yt9yWiRU7KGo9ygeeA4RMHpSWBGjY3ak7iz0F6ml8C3bf0?=
=?utf-8?q?u8ee7SZ+59Q1XHCFSW6DJcUEHYvhbX3D8bMSM1XihLDzRlMQQIPMyE7+ZKkkAL1k8?=
=?utf-8?q?HAcnj9vg4g7subbc3GNolX4j5NgRJl0taBC6wydD/f8/7qu43MFp+/+taTR10Befh?=
=?utf-8?q?8KcRfYp41z4rClS1qwG6MiUxDwANI+bw30bx5GxdLKm2Qp40/4CcvfLjFHcPzLQuH?=
=?utf-8?q?qL4ZxKyTPaJAF4h03jSRi5LNufsrYUGCbP3A59SBGBAuUvUFKzt+IDrZcv3Pk9m7I?=
=?utf-8?q?aRCTLk6mDs6?=
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:05.8689 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
7f652e0a-ff6a-44e4-4d2e-08dd0e27f11d
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM2PEPF0001C70F.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR10MB9048
Subject: [ovs-dev] [PATCH ovn v3 08/33] northd: Move connected routes to
route engine.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
previously connected routes (so routes based on the networks of the
LRPs) where handled separately from static routes.
In order to later announce routes from ovn to the fabric we need to have
a central overview over all routes we want to announce. This includes
routes based on Logical_Router_Static_Routes as well as the networks on
Logical_Router_Port.
With this change the "routes" engine node will output a complete list of
all routes in the system. This also serves as a future integration point
to integrate routes learned from outside of OVN.
Signed-off-by: Felix Huettner
---
northd/northd.c | 265 ++++++++++++++++++++++++++++++------------------
northd/northd.h | 9 ++
2 files changed, 173 insertions(+), 101 deletions(-)
diff --git a/northd/northd.c b/northd/northd.c
index d38a1650b..0050919b1 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -11071,6 +11071,19 @@ parsed_route_lookup(struct hmap *routes, size_t hash,
continue;
}
+ if (pr->source != new_pr->source) {
+ continue;
+ }
+
+ /* Check if both parsed_route have nexthop set to NULL or non-NULL. */
+ if (!pr->nexthop != !new_pr->nexthop) {
+ continue;
+ }
+
+ if (pr->nexthop && ipv6_addr_equals(pr->nexthop, new_pr->nexthop)) {
+ continue;
+ }
+
if (memcmp(&pr->prefix, &new_pr->prefix, sizeof(struct in6_addr))) {
continue;
}
@@ -11112,35 +11125,82 @@ parsed_route_lookup(struct hmap *routes, size_t hash,
static void
parsed_route_free(struct parsed_route *pr) {
free(pr->lrp_addr_s);
+ free(pr->nexthop);
free(pr);
}
static void
-parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
+parsed_route_add(const struct ovn_datapath *od,
+ struct in6_addr *nexthop,
+ const struct in6_addr prefix,
+ unsigned int plen,
+ bool is_discard_route,
+ const char *lrp_addr_s,
+ const struct ovn_port *out_port,
+ const struct nbrec_logical_router_static_route *route,
+ uint32_t route_table_id,
+ bool is_src_route,
+ bool ecmp_symmetric_reply,
+ enum route_source source,
+ struct hmap *routes)
+{
+
+ struct parsed_route *new_pr = xzalloc(sizeof *new_pr);
+ new_pr->prefix = prefix;
+ new_pr->plen = plen;
+ new_pr->nexthop = nexthop;
+ new_pr->route_table_id = route_table_id;
+ new_pr->is_src_route = is_src_route;
+ new_pr->hash = route_hash(new_pr);
+ new_pr->nbr = od->nbr;
+ new_pr->ecmp_symmetric_reply = ecmp_symmetric_reply;
+ new_pr->is_discard_route = is_discard_route;
+ if (!is_discard_route) {
+ new_pr->lrp_addr_s = xstrdup(lrp_addr_s);
+ }
+ new_pr->out_port = out_port;
+ new_pr->source = source;
+ new_pr->route = route;
+
+ size_t hash = uuid_hash(&od->key);
+ struct parsed_route *pr = parsed_route_lookup(routes, hash, new_pr);
+ if (!pr) {
+ hmap_insert(routes, &new_pr->key_node, hash);
+ } else {
+ pr->stale = false;
+ parsed_route_free(new_pr);
+ }
+}
+
+static void
+parsed_routes_add_static(struct ovn_datapath *od, const struct hmap *lr_ports,
const struct nbrec_logical_router_static_route *route,
const struct hmap *bfd_connections,
struct hmap *routes, struct simap *route_tables,
struct hmap *bfd_active_connections)
{
/* Verify that the next hop is an IP address with an all-ones mask. */
- struct in6_addr nexthop;
+ struct in6_addr *nexthop = NULL;
unsigned int plen;
bool is_discard_route = !strcmp(route->nexthop, "discard");
bool valid_nexthop = route->nexthop[0] && !is_discard_route;
if (valid_nexthop) {
- if (!ip46_parse_cidr(route->nexthop, &nexthop, &plen)) {
+ nexthop = xmalloc(sizeof(*nexthop));
+ if (!ip46_parse_cidr(route->nexthop, nexthop, &plen)) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "bad 'nexthop' %s in static route "
UUID_FMT, route->nexthop,
UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
return;
}
- if ((IN6_IS_ADDR_V4MAPPED(&nexthop) && plen != 32) ||
- (!IN6_IS_ADDR_V4MAPPED(&nexthop) && plen != 128)) {
+ if ((IN6_IS_ADDR_V4MAPPED(nexthop) && plen != 32) ||
+ (!IN6_IS_ADDR_V4MAPPED(nexthop) && plen != 128)) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "bad next hop mask %s in static route "
UUID_FMT, route->nexthop,
UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
return;
}
}
@@ -11152,17 +11212,19 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
VLOG_WARN_RL(&rl, "bad 'ip_prefix' %s in static route "
UUID_FMT, route->ip_prefix,
UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
return;
}
/* Verify that ip_prefix and nexthop have same address familiy. */
if (valid_nexthop) {
- if (IN6_IS_ADDR_V4MAPPED(&prefix) != IN6_IS_ADDR_V4MAPPED(&nexthop)) {
+ if (IN6_IS_ADDR_V4MAPPED(&prefix) != IN6_IS_ADDR_V4MAPPED(nexthop)) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
VLOG_WARN_RL(&rl, "Address family doesn't match between 'ip_prefix'"
" %s and 'nexthop' %s in static route "UUID_FMT,
route->ip_prefix, route->nexthop,
UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
return;
}
}
@@ -11174,6 +11236,7 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
!find_static_route_outport(od, lr_ports, route,
IN6_IS_ADDR_V4MAPPED(&prefix),
&lrp_addr_s, &out_port)) {
+ free(nexthop);
return;
}
@@ -11183,6 +11246,7 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
nb_bt->logical_port,
nb_bt->dst_ip);
if (!bfd_e) {
+ free(nexthop);
return;
}
@@ -11202,36 +11266,58 @@ parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
if (!strcmp(bfd_sr->status, "down")) {
+ free(nexthop);
return;
}
}
- struct parsed_route *new_pr = xzalloc(sizeof *new_pr);
- new_pr->prefix = prefix;
- new_pr->plen = plen;
- new_pr->route_table_id = get_route_table_id(route_tables,
- route->route_table);
- new_pr->is_src_route = (route->policy &&
- !strcmp(route->policy, "src-ip"));
- new_pr->hash = route_hash(new_pr);
- new_pr->route = route;
- new_pr->nbr = od->nbr;
- new_pr->ecmp_symmetric_reply = smap_get_bool(&route->options,
- "ecmp_symmetric_reply",
- false);
- new_pr->is_discard_route = is_discard_route;
- if (!is_discard_route) {
- new_pr->lrp_addr_s = xstrdup(lrp_addr_s);
- }
- new_pr->out_port = out_port;
+ uint32_t route_table_id = get_route_table_id(route_tables,
+ route->route_table);
+ bool is_src_route = (route->policy && !strcmp(route->policy, "src-ip"));
+ bool ecmp_symmetric_reply = smap_get_bool(&route->options,
+ "ecmp_symmetric_reply",
+ false);
- size_t hash = uuid_hash(&od->key);
- struct parsed_route *pr = parsed_route_lookup(routes, hash, new_pr);
- if (!pr) {
- hmap_insert(routes, &new_pr->key_node, hash);
+ enum route_source source;
+ if (!strcmp(smap_get_def(&route->options, "origin", ""),
+ ROUTE_ORIGIN_CONNECTED)) {
+ source = ROUTE_SOURCE_CONNECTED;
} else {
- pr->stale = false;
- parsed_route_free(new_pr);
+ source = ROUTE_SOURCE_STATIC;
+ }
+
+ parsed_route_add(od, nexthop, prefix, plen, is_discard_route, lrp_addr_s,
+ out_port, route, route_table_id, is_src_route,
+ ecmp_symmetric_reply, source,
+ routes);
+}
+
+static void
+parsed_routes_add_connected(struct ovn_datapath *od, const struct ovn_port *op,
+ struct hmap *routes)
+{
+ for (int i = 0; i < op->lrp_networks.n_ipv4_addrs; i++) {
+ const struct ipv4_netaddr *addr = &op->lrp_networks.ipv4_addrs[i];
+ struct in6_addr prefix;
+ ip46_parse(addr->network_s, &prefix);
+
+ parsed_route_add(od, NULL, prefix, addr->plen,
+ false, addr->addr_s, op,
+ NULL, 0, false,
+ false, ROUTE_SOURCE_CONNECTED,
+ routes);
+ }
+
+ for (int i = 0; i < op->lrp_networks.n_ipv6_addrs; i++) {
+ const struct ipv6_netaddr *addr = &op->lrp_networks.ipv6_addrs[i];
+ struct in6_addr prefix;
+ ip46_parse(addr->network_s, &prefix);
+
+ parsed_route_add(od, NULL, prefix, addr->plen,
+ false, addr->addr_s, op,
+ NULL, 0, false,
+ false, ROUTE_SOURCE_CONNECTED,
+ routes);
}
}
@@ -11249,9 +11335,14 @@ build_parsed_routes(struct ovn_datapath *od, const struct hmap *lr_ports,
}
for (int i = 0; i < od->nbr->n_static_routes; i++) {
- parsed_routes_add(od, lr_ports, od->nbr->static_routes[i],
- bfd_connections, routes, route_tables,
- bfd_active_connections);
+ parsed_routes_add_static(od, lr_ports, od->nbr->static_routes[i],
+ bfd_connections, routes, route_tables,
+ bfd_active_connections);
+ }
+
+ const struct ovn_port *op;
+ HMAP_FOR_EACH (op, dp_node, &od->ports) {
+ parsed_routes_add_connected(od, op, routes);
}
HMAP_FOR_EACH_SAFE (pr, key_node, routes) {
@@ -11276,7 +11367,7 @@ struct ecmp_groups_node {
struct in6_addr prefix;
unsigned int plen;
bool is_src_route;
- const char *origin;
+ enum route_source source;
uint32_t route_table_id;
uint16_t route_count;
struct ovs_list route_list; /* Contains ecmp_route_list_node */
@@ -11315,7 +11406,7 @@ ecmp_groups_add(struct hmap *ecmp_groups,
eg->prefix = route->prefix;
eg->plen = route->plen;
eg->is_src_route = route->is_src_route;
- eg->origin = smap_get_def(&route->route->options, "origin", "");
+ eg->source = route->source;
eg->route_table_id = route->route_table_id;
ovs_list_init(&eg->route_list);
ecmp_groups_add_route(eg, route);
@@ -11379,6 +11470,7 @@ unique_routes_remove(struct hmap *unique_routes,
if (ipv6_addr_equals(&route->prefix, &ur->route->prefix) &&
route->plen == ur->route->plen &&
route->is_src_route == ur->route->is_src_route &&
+ route->source == ur->route->source &&
route->route_table_id == ur->route->route_table_id) {
hmap_remove(unique_routes, &ur->hmap_node);
const struct parsed_route *existed_route = ur->route;
@@ -11606,6 +11698,19 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
ds_destroy(&ecmp_reply);
}
+static int
+route_source_to_offset(enum route_source source)
+{
+ switch (source) {
+ case ROUTE_SOURCE_CONNECTED:
+ return ROUTE_PRIO_OFFSET_CONNECTED;
+ case ROUTE_SOURCE_STATIC:
+ return ROUTE_PRIO_OFFSET_STATIC;
+ default:
+ OVS_NOT_REACHED();
+ }
+}
+
static void
build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
struct ecmp_groups_node *eg, struct lflow_ref *lflow_ref)
@@ -11617,8 +11722,7 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
struct ds route_match = DS_EMPTY_INITIALIZER;
char *prefix_s = build_route_prefix_s(&eg->prefix, eg->plen);
- int ofs = !strcmp(eg->origin, ROUTE_ORIGIN_CONNECTED) ?
- ROUTE_PRIO_OFFSET_CONNECTED: ROUTE_PRIO_OFFSET_STATIC;
+ int ofs = route_source_to_offset(eg->source);
build_route_match(NULL, eg->route_table_id, prefix_s, eg->plen,
eg->is_src_route, is_ipv4, &route_match, &priority, ofs);
free(prefix_s);
@@ -11672,13 +11776,14 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
REG_ECMP_MEMBER_ID" == %"PRIu16,
eg->id, er->id);
ds_clear(&actions);
- ds_put_format(&actions, "%s = %s; "
+ ds_put_format(&actions, "%s = ",
+ is_ipv4 ? REG_NEXT_HOP_IPV4 : REG_NEXT_HOP_IPV6);
+ ipv6_format_mapped(route_->nexthop, &actions);
+ ds_put_format(&actions, "; "
"%s = %s; "
"eth.src = %s; "
"outport = %s; "
"next;",
- is_ipv4 ? REG_NEXT_HOP_IPV4 : REG_NEXT_HOP_IPV6,
- route->nexthop,
is_ipv4 ? REG_SRC_IPV4 : REG_SRC_IPV6,
route_->lrp_addr_s,
route_->out_port->lrp_networks.ea_s,
@@ -11696,17 +11801,19 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
static void
add_route(struct lflow_table *lflows, struct ovn_datapath *od,
const struct ovn_port *op, const char *lrp_addr_s,
- const char *network_s, int plen, const char *gateway,
+ const char *network_s, int plen, const struct in6_addr *gateway,
bool is_src_route, const uint32_t rtb_id,
const struct sset *bfd_ports,
const struct ovsdb_idl_row *stage_hint, bool is_discard_route,
- int ofs, struct lflow_ref *lflow_ref)
+ enum route_source source, struct lflow_ref *lflow_ref)
{
bool is_ipv4 = strchr(network_s, '.') ? true : false;
struct ds match = DS_EMPTY_INITIALIZER;
uint16_t priority;
const struct ovn_port *op_inport = NULL;
+ int ofs = route_source_to_offset(source);
+
/* IPv6 link-local addresses must be scoped to the local router port. */
if (!is_ipv4) {
struct in6_addr network;
@@ -11725,8 +11832,8 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
} else {
ds_put_format(&common_actions, REG_ECMP_GROUP_ID" = 0; %s = ",
is_ipv4 ? REG_NEXT_HOP_IPV4 : REG_NEXT_HOP_IPV6);
- if (gateway && gateway[0]) {
- ds_put_cstr(&common_actions, gateway);
+ if (gateway) {
+ ipv6_format_mapped(gateway, &common_actions);
} else {
ds_put_format(&common_actions, "ip%s.dst", is_ipv4 ? "4" : "6");
}
@@ -11761,23 +11868,20 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
}
static void
-build_static_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
+build_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
const struct parsed_route *route_,
const struct sset *bfd_ports,
struct lflow_ref *lflow_ref)
{
const struct nbrec_logical_router_static_route *route = route_->route;
- int ofs = !strcmp(smap_get_def(&route->options, "origin", ""),
- ROUTE_ORIGIN_CONNECTED) ? ROUTE_PRIO_OFFSET_CONNECTED
- : ROUTE_PRIO_OFFSET_STATIC;
-
char *prefix_s = build_route_prefix_s(&route_->prefix, route_->plen);
add_route(lflows, route_->is_discard_route ? od : route_->out_port->od,
route_->out_port, route_->lrp_addr_s, prefix_s,
- route_->plen, route->nexthop, route_->is_src_route,
- route_->route_table_id, bfd_ports, &route->header_,
- route_->is_discard_route, ofs, lflow_ref);
+ route_->plen, route_->nexthop, route_->is_src_route,
+ route_->route_table_id, bfd_ports,
+ route ? &route->header_ : &route_->out_port->nbrp->header_,
+ route_->is_discard_route, route_->source, lflow_ref);
free(prefix_s);
}
@@ -13506,51 +13610,8 @@ build_ip_routing_pre_flows_for_lrouter(struct ovn_datapath *od,
REG_ROUTE_TABLE_ID" = 0; next;", lflow_ref);
}
-/* Logical router ingress table IP_ROUTING : IP Routing.
- *
- * A packet that arrives at this table is an IP packet that should be
- * routed to the address in 'ip[46].dst'.
- *
- * For regular routes without ECMP, table IP_ROUTING sets outport to the
- * correct output port, eth.src to the output port's MAC address, and
- * REG_NEXT_HOP_IPV4/REG_NEXT_HOP_IPV6 to the next-hop IP address
- * (leaving 'ip[46].dst', the packet’s final destination, unchanged), and
- * advances to the next table.
- *
- * For ECMP routes, i.e. multiple routes with same policy and prefix, table
- * IP_ROUTING remembers ECMP group id and selects a member id, and advances
- * to table IP_ROUTING_ECMP, which sets outport, eth.src and
- * REG_NEXT_HOP_IPV4/REG_NEXT_HOP_IPV6 for the selected ECMP member.
- *
- * This function adds routes for directly connected subnets configured on the
- * LRP 'op'.
- */
static void
-build_ip_routing_flows_for_lrp(struct ovn_port *op,
- const struct sset *bfd_ports,
- struct lflow_table *lflows,
- struct lflow_ref *lflow_ref)
-{
- ovs_assert(op->nbrp);
- for (int i = 0; i < op->lrp_networks.n_ipv4_addrs; i++) {
- add_route(lflows, op->od, op, op->lrp_networks.ipv4_addrs[i].addr_s,
- op->lrp_networks.ipv4_addrs[i].network_s,
- op->lrp_networks.ipv4_addrs[i].plen, NULL, false, 0,
- bfd_ports, &op->nbrp->header_, false,
- ROUTE_PRIO_OFFSET_CONNECTED, lflow_ref);
- }
-
- for (int i = 0; i < op->lrp_networks.n_ipv6_addrs; i++) {
- add_route(lflows, op->od, op, op->lrp_networks.ipv6_addrs[i].addr_s,
- op->lrp_networks.ipv6_addrs[i].network_s,
- op->lrp_networks.ipv6_addrs[i].plen, NULL, false, 0,
- bfd_ports, &op->nbrp->header_, false,
- ROUTE_PRIO_OFFSET_CONNECTED, lflow_ref);
- }
-}
-
-static void
-build_static_route_flows_for_lrouter(
+build_route_flows_for_lrouter(
struct ovn_datapath *od, struct lflow_table *lflows,
struct hmap *parsed_routes,
struct simap *route_tables, const struct sset *bfd_ports,
@@ -13577,6 +13638,10 @@ build_static_route_flows_for_lrouter(
struct parsed_route *route;
HMAP_FOR_EACH_WITH_HASH (route, key_node, uuid_hash(&od->key),
parsed_routes) {
+ if (route->source == ROUTE_SOURCE_CONNECTED) {
+ unique_routes_add(&unique_routes, route);
+ continue;
+ }
group = ecmp_groups_find(&ecmp_groups, route);
if (group) {
ecmp_groups_add_route(group, route);
@@ -13605,7 +13670,7 @@ build_static_route_flows_for_lrouter(
}
const struct unique_routes_node *ur;
HMAP_FOR_EACH (ur, hmap_node, &unique_routes) {
- build_static_route_flow(lflows, od, ur->route,
+ build_route_flow(lflows, od, ur->route,
bfd_ports, lflow_ref);
}
ecmp_groups_destroy(&ecmp_groups);
@@ -16849,7 +16914,7 @@ build_routable_flows_for_router_port(
laddrs->ipv4_addrs[k].network_s,
laddrs->ipv4_addrs[k].plen, NULL, false, 0,
bfd_ports, &router_port->nbrp->header_,
- false, ROUTE_PRIO_OFFSET_CONNECTED,
+ false, ROUTE_SOURCE_CONNECTED,
lrp->stateful_lflow_ref);
}
}
@@ -17091,7 +17156,7 @@ build_lswitch_and_lrouter_iterate_by_lr(struct ovn_datapath *od,
lsi->meter_groups, NULL);
build_ND_RA_flows_for_lrouter(od, lsi->lflows, NULL);
build_ip_routing_pre_flows_for_lrouter(od, lsi->lflows, NULL);
- build_static_route_flows_for_lrouter(od, lsi->lflows,
+ build_route_flows_for_lrouter(od, lsi->lflows,
lsi->parsed_routes, lsi->route_tables,
lsi->bfd_ports, NULL);
build_mcast_lookup_flows_for_lrouter(od, lsi->lflows, &lsi->match,
@@ -17164,8 +17229,6 @@ build_lswitch_and_lrouter_iterate_by_lrp(struct ovn_port *op,
&lsi->actions, op->lflow_ref);
build_neigh_learning_flows_for_lrouter_port(op, lsi->lflows, &lsi->match,
&lsi->actions, op->lflow_ref);
- build_ip_routing_flows_for_lrp(op, lsi->bfd_ports,
- lsi->lflows, op->lflow_ref);
build_ND_RA_flows_for_lrouter_port(op, lsi->lflows, &lsi->match,
&lsi->actions, lsi->meter_groups,
op->lflow_ref);
diff --git a/northd/northd.h b/northd/northd.h
index 6e3f86eb4..eb669f734 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -696,10 +696,18 @@ struct ovn_port {
struct lflow_ref *stateful_lflow_ref;
};
+enum route_source {
+ /* the route is directly connected to the logical router */
+ ROUTE_SOURCE_CONNECTED,
+ /* the route is derived from a northbound static route entry */
+ ROUTE_SOURCE_STATIC,
+};
+
struct parsed_route {
struct hmap_node key_node;
struct in6_addr prefix;
unsigned int plen;
+ struct in6_addr *nexthop; /* NULL for ROUTE_SOURCE_CONNECTED */
bool is_src_route;
uint32_t route_table_id;
uint32_t hash;
@@ -708,6 +716,7 @@ struct parsed_route {
bool is_discard_route;
const struct nbrec_logical_router *nbr;
bool stale;
+ enum route_source source;
char *lrp_addr_s;
const struct ovn_port *out_port;
};
From patchwork Tue Nov 26 14:38:03 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015476
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WSY8f25N;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=WSY8f25N;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
(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 4XyQG82gX7z1yQY
for ; Wed, 27 Nov 2024 01:40:00 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 8017F81163;
Tue, 26 Nov 2024 14:39:58 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id MlwIgN7bOCqI; Tue, 26 Nov 2024 14:39:55 +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 smtp1.osuosl.org B142180FA9
Authentication-Results: smtp1.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WSY8f25N;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=WSY8f25N
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp1.osuosl.org (Postfix) with ESMTPS id B142180FA9;
Tue, 26 Nov 2024 14:39:55 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 7CBCBC08A9;
Tue, 26 Nov 2024 14:39:55 +0000 (UTC)
X-Original-To: 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 09FD2C08A9
for ; Tue, 26 Nov 2024 14:39:54 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 052586F804
for ; Tue, 26 Nov 2024 14:38:16 +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 CVdpxVtpf2Tw for ;
Tue, 26 Nov 2024 14:38:15 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:260e::625;
helo=eur03-am7-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 691776F759
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 691776F759
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=WSY8f25N;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WSY8f25N
Received: from EUR03-AM7-obe.outbound.protection.outlook.com
(mail-am7eur03on20625.outbound.protection.outlook.com
[IPv6:2a01:111:f403:260e::625])
by smtp3.osuosl.org (Postfix) with ESMTPS id 691776F759
for ; Tue, 26 Nov 2024 14:38:14 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=iNEOnBJA4/kC3fOdnY2DIGMdzHDnmR7A0RxXBYiKu0M7GGRyVBGpR/27zjH78dHu9v8FKrOOAfgTzfjt2U5H/t8+Ut060S5h8y0SCql2UFWYtSuS1EGRR2Ua2/DjEa0XKoayNL+dkKIMSoSjdZX3EcQZ0eCWmU3Mo/gluW1ic/5OGWFbiPlCqAvqpJoR4cR9OYFRhcrAlZEwa/R79dwHI9OYqQMWDzqgrjfIhnG1onUzH4POVM7CrujnsQUjAq4FmGUWMtD0FOf2Tk+ZkRYiWbk21o2E/1uk112EaQpcxXSoANWpUoGF8xjs+OQ19vmXACxUpZWPhoTHmsbOkTKE2g==
ARC-Message-Signature: i=2; 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=d93skFJldS+aVw4V0wHfReW5ShYoUknaWVxOoCsrWVU=;
b=LzgCFCxbMR/UTKjGJKqhYjVK6v+zjiXqx63xaQPH44vmalhxZwMphVmzc6/xSDN1FsVqxTgusuLnHnZOVs/8WoL9KMicCt1gsqFY9auKNqb7PKKQZvTO8eoQEzuzvnViD32CgVRIwjOArBn/rXaEu+olVX7WW0fcYBjibOSaJ9E2VY+tzQZCAG8f8Utl3qUFL7ospnd5EFqm6qwdUb4y8+7Iu+natNPj2KULqFWnptRYtcQLsveHZwx39Z40yXT0kz/qbuNXjvbRtitxPTp/Ojd0oSyO5OWAWtjJMFU0m9SvbleCBttIIFgZqEZ2xA2sQ7P5CnstqlNEiC+UUoc7ug==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=d93skFJldS+aVw4V0wHfReW5ShYoUknaWVxOoCsrWVU=;
b=WSY8f25N8YiTFoSf80ZGYO8DZkYVPUc13ExP8wMkIEMsOu+cQBUUQD3x/2dgSNJNHDZrwCUB/n+LBbrTodPUq0bqp2kjULHL3w9Li/Sex6LLXos6geIL/esMPrkNAgL8c+t5lUMOkyY3Y04aClyUZroxTOt6S+z7/1Y+wrQzbNeSLlgXHz5BY6LrIdjbNmVwbfbGEn0hY6d2qtunTEMAVhAJ6NZvuo2TVE50I6tj1ij2a3TYr5PiQU3JPid5+PQp7i+BNKcfK0asSiZV4qQ/TgCVdW1bu3Z69wJtZsNYq1eIYk8sU2p3R7Z6BiE2Kc9sDXFqrHs/rhN/Cw5rkR7r9A==
Received: from DB9PR02CA0017.eurprd02.prod.outlook.com (2603:10a6:10:1d9::22)
by PR3PR10MB3945.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:28::19)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:09 +0000
Received: from DB3PEPF0000885A.eurprd02.prod.outlook.com
(2603:10a6:10:1d9:cafe::6) by DB9PR02CA0017.outlook.office365.com
(2603:10a6:10:1d9::22) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:09 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
DB3PEPF0000885A.mail.protection.outlook.com (10.167.242.5) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:07 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:08
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8821872
X-ExclaimerImprintLatency: 5131955
X-ExclaimerImprintAction: ff70f55079b4453680914bbeac80be0b
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=RoCDnMhGNfdrnBIBR6irBWi9+gi8WzY2CoAUwnCLWSOz/KQWdEaVM1XiCVuYb2NwZyf+gT4xy8nOVrk6Jgk5sE4pFRCGztiNc3cDg1YAOlB1xrwSgeCbzKjBD2UbAHA0FJBYv2+3kj821osFsxoaNzJp1Jpr0MWv9zX2mr8rSYxlaQ5c5w9CsbruiqDR3R4tcH1VsVqO+r171kzxf0k6Kl1roUHEc6Y6OG0T5mnGQWckLrWaEtQHzpYifN4Fg94m9EspuQGEPCem4AQ3IovYiEMhm5/SoGxT1ATY3ECI3DAs7+Kk2cyzKTvKH7CIWEnLRjwVRAxL7/f+TpiG4caxCA==
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=d93skFJldS+aVw4V0wHfReW5ShYoUknaWVxOoCsrWVU=;
b=j8v+sL5i6bl8QCZLpE5XYXNbOBC6xArnRF1p4PLv/GnCVjKTXvIy9IugIMzn30Ori+lFGd2zl+9oixcsANdgY7QXPsfrzi3ULLBlc+IgQv7R/CH5cumyN96LbEBmxDCHg36T+FRrXble1+isyEQzMretXdQz4WsjDp9Nq7mp1nyg8b/ax4pgDWRSIy/9yTIX9n8Mt2Dr6cE63p7h7R9IGZ1piEcr7TJq30UcPTlQ5/0zBmKXf/IJW4TJ+QfZnvhs+7PtDQyLEs6UVTgqE84C7HjiM4Dkl2tmpQfD6ydrI4TwZNMZ+dJXq4fA9Owi11LzS9bfKPi4Q3fcHUC+VHzRVA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=d93skFJldS+aVw4V0wHfReW5ShYoUknaWVxOoCsrWVU=;
b=WSY8f25N8YiTFoSf80ZGYO8DZkYVPUc13ExP8wMkIEMsOu+cQBUUQD3x/2dgSNJNHDZrwCUB/n+LBbrTodPUq0bqp2kjULHL3w9Li/Sex6LLXos6geIL/esMPrkNAgL8c+t5lUMOkyY3Y04aClyUZroxTOt6S+z7/1Y+wrQzbNeSLlgXHz5BY6LrIdjbNmVwbfbGEn0hY6d2qtunTEMAVhAJ6NZvuo2TVE50I6tj1ij2a3TYr5PiQU3JPid5+PQp7i+BNKcfK0asSiZV4qQ/TgCVdW1bu3Z69wJtZsNYq1eIYk8sU2p3R7Z6BiE2Kc9sDXFqrHs/rhN/Cw5rkR7r9A==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:05 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:05 +0000
Date: Tue, 26 Nov 2024 15:38:03 +0100
To: dev@openvswitch.org
Message-ID:
<8ac6eda5ed9ee2cfe5b07baf7a4cc8e856313926.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0115.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::10) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|DB3PEPF0000885A:EE_|PR3PR10MB3945:EE_
X-MS-Office365-Filtering-Correlation-Id: 1f536a31-0eec-4c26-f4db-08dd0e27f1ec
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
kQNtzbf8XEHqWwcsMbXNgH+4/GWOzQlHYyWx9K23SAQaZj1tU9IxBZUaZ+G0YT6nwMM46pAqNDVapVJCxfbkln/AbBW/USr1kjK7098Y/GVn7PrAX0jPTN18aTniWXLGZKbDqNTxRyDn0BNNAUev8dteJQt3NzKJFhqpF1BMOA2/xKIVTX/mjejKWdkd8NvttQktSqXszuhtLr2Zuk9q29ciWuyrEVBTboVLqsWANmxAFE+eM6e2jMeWfHz0Rzevp1GSER/yGDriGwA7WHdYmbGU+5GLE6jFN231wF26zvEfwOEnHynguaNJlbDkaGzPJq5Zye29/VdFs0V88+o4kVbt+THQMxBcBJ263qUooVElT4lOF0gXUk7tMri+rPE6MjMsG7sY/nuEQi9YXPUzR4J5ksdQ6UrpUw1TFw8cR2aM5XM44WD5WueZ6v+6BOzNnhTEFO4awHIRslPL8UaRngILzApLU3O+KZhlntzUBO+F4lsUWzsYdY1WjJc/KqxilJMTgCvO0MrHfNCmh1jicYXAcHfjNPjNd0oAORWS0bu4/+KSnonUJILhxOqtD0yHIPY0AUEiYs6UKriZJKsUNTawkLxFkVlfPmbcDk0cDXumPbv5zz3VIzjrsrCvx1RLnmvAxlo7qzglg2wEZzPcoRNe8KiCXeSBDz+iVjZYKHY4XU+szAv43CZYDFROMjJnMq/qfieEJmdFBSNJJRoC8/bRSviIL9vZAIn+rRUuVdTAQanPR9xOhiZUdyJynWvtIUn/NnuaP3DNUu3F/PDgLqmSITcZiJSogwyDO91wZbTPRucO4gK33hQI39SQH8AbGooNILc76+CfmnF3SowHqDOPf81ExDJqqABxMnS0oXFsB5LVxFIH318db3xZbKhwRMpv2nNZ0hqm01BguiNjKFZQRKTqufCANK1DSHCopT3vCS2EeiGSBlcfJ35utsm5h5igVoedfAcoR5xAo4dyAaP8k070nIqWLg3apobNH3pz8lL/HA37V8P3lE6e2XA931+aZ1pMgdtG67ZtX9QpF+AAM1smAvCwGz1J+JCTr1d1sM6MGKDThKn2RFqSmcJN0O1RVYeD+bifrTFoBSZ7d6TLinwS12Zcy36Ee7f94MaF3fF11AfJQ2V1HE69XPTlLhKjTZSJ9k2+z+g5Cg6CdeHBp+3nChOdwZe+RR0XDmThUgamKw3SqrJEx54uOiAyo5n5h+zD1LhG0xTsv2pjqQ0/9aMeAsFZ5iGPasOBVDETJTU36/EeUpKE7FhN4Q9WX5BgUEUSU8wY2O/0i86O/93XTMXtV6RWN02vtBw5Db5/t2gA14O6gnZ2lZOU5nThwhYWOLWsx54z1jZag817aA==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DB3PEPF0000885A.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
fec39578-5654-4f62-a7fa-08dd0e27f051
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|35042699022|82310400026|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
CnwTpZjJnka//8FfklekiXMnn3S9+yc1z6AMkWsvWawfvZEnF12kJfF5hRPJvBATFwEK1vjgk4+/P6c9N+8cxba8KKfNDZs0BtqSz8A/AvwDeJ9zzT+wc7SOClYfbivtWXDsTjTMNAllDWuvqjvFxHX6pf/lYKsoHTB+HIznWCVeNhFu9TOb2TqN1r44n3Jq6TfjHfVMRB0cqFkLB4XZ8xTnELiYsfzIDMSzrUlBY/WsI8J4VoqYZNDr12uaPMSv5uJgMXKjom1ok6m6VqDiFeK96u/fi94AFsad8MP54SRjF8A4bEohq4Im2npdTGi0icl3DjMOjgdRXXoiAUgXUGv5baIqSvyXG3E+nnbztyC8oQB4dhrTU+P6fbu0p0cvgQEBOBEmw+yx4xMU/uZCx+dyJu+l1AjQXGXgZHbL76jYql8f0gaYR74p4JuOWvUAXgvNDRUIUQZOsHyMLkRAxtwuJs1gIGHmmPfB7A/yQoan9G7r4xh8xhZ01S1CfzfrTQXM+ZEjUQ4Fm6CrAVbfiA+cCcwZ/pDmJDfXXgMZZeCkubafm9zHxgzM48WRderpYMdGBtYjpxRQOpiHALRIafW9HJ1iwbwk5py3pG5fgj4riA+PKl6xz9JLu4JBcSYW5KH4sqzV7SRt0WQ5L4/Osf1DDjqvwstVe4DA4Tc5Cejqs3BzKWRCXgqR4aiUiR0+Mb7L3mKhIyaZUYnzROHP8xWWpTm1yUBx4A6uB4hV5c+p0JyQdDJr2yOf1N6We+3vMMKoSohqT0UzvaVLbGVTM6ICyCC2lUuadwvv3LmH8kkTlg1huBh5dN26F4GzNRlK2ENO7LghRtLCPgXl+ovenWHJUI1eKA8qJFMPOgsm9Q4votVLad0SyYRDC4nTyFG2O2cJm9oXfU93s4zP1x06IcvrIudUTmRZpoRbH7UQXAWT8rLbLhvx/rgfeVjGlrJ6hRf7xz/qrw/rY0A/QiWfwzyDwY4/QVn8hZVfEnanJ8wS1IJGYGRUDWWGfaJ32DjXoF0AryGWdiiHIxGsXUBFYCEhj/UKYFInlfDk8qUNeeHL+ixBSJj5Dz6Y4NaSJ2TJxPhq3EwY5maKNZgfFvlK1ZvVWGhqEao9P5E9k3v1l2C2F3B8eSAxXS3CLaPDIcn9giZBjjhWQkFSon9e2j3hAONrvWHCJmu0zDFbZDpVQKkVhcd7fUSwrPpq1iSRolykXxrarKSCW3QiSAw2h5jmlgniULmVRrDTKzlyAEvpjfNRzs+NqiRPudXnfoT2rJkm70ksr12QglKLNEKAAYPULNp1lX4YPyzZDb143FKY7SgI6P02FN/IVEWpIlGT+fCVsw5TO/lW8iaLbkv36LQaNcP/vXBlezhQojLFr1jd/rrXe/vw+m43ejPTKJUqcwukBy68fv8C9Pi3C/MIYKFn6GxsYx8gqHn+X4cAW2g+xuREhnw16/SBuiLjG6GVWxXs
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(35042699022)(82310400026)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:07.6361 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
1f536a31-0eec-4c26-f4db-08dd0e27f1ec
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DB3PEPF0000885A.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR10MB3945
Subject: [ovs-dev] [PATCH ovn v3 09/33] northd: Autodiscover
centralize_routing.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
There is no need to set this manually. In all cases where a user would
set option:centralize_routing they would not work without this setting.
Therefor we enable it automatically.
Signed-off-by: Felix Huettner
---
NEWS | 2 ++
northd/northd.c | 6 ++----
ovn-nb.xml | 34 --------------------------------
tests/multinode.at | 7 -------
tests/ovn-northd.at | 48 ++-------------------------------------------
5 files changed, 6 insertions(+), 91 deletions(-)
diff --git a/NEWS b/NEWS
index aaa3964a9..6deecf037 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
Post v24.09.0
-------------
+ - The LRP option 'centralize_routing' has been removed. The behavior is now
+ enabled in all cases where it is needed.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/northd/northd.c b/northd/northd.c
index 0050919b1..617ecc8dd 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -2329,7 +2329,6 @@ create_cr_port(struct ovn_port *op, struct hmap *ports,
* Chassis resident port needs to be created if the following
* conditionsd are met:
* - op is a distributed gateway port
- * - op has the option 'centralize_routing' set to true
* - op is the only distributed gateway port attached to its
* router
* - op's peer logical switch has no localnet ports.
@@ -2340,7 +2339,7 @@ peer_needs_cr_port_creation(struct ovn_port *op)
if ((op->nbrp->n_gateway_chassis || op->nbrp->ha_chassis_group)
&& op->od->n_l3dgw_ports == 1 && op->peer && op->peer->nbsp
&& !op->peer->od->n_localnet_ports) {
- return smap_get_bool(&op->nbrp->options, "centralize_routing", false);
+ return true;
}
return false;
@@ -2500,8 +2499,7 @@ join_logical_ports(const struct sbrec_port_binding_table *sbrec_pb_table,
* peer if
* - DGP's router has only one DGP and
* - Its peer is a logical switch port and
- * - It's peer's logical switch has no localnet ports and
- * - option 'centralize_routing' is set to true for the DGP.
+ * - It's peer's logical switch has no localnet ports
*
* This is required to support
* - NAT via geneve (for the overlay provider networks) and
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 2836f58f5..a7d9d4444 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -3628,40 +3628,6 @@ or
option.
-
-
-
- This option is applicable only if the router port is a
- distributed gateway port i.e if the column or
-
- is set.
-
-
-
- If set to true
, routing for the router port's
- networks (set in the column ) is centralized on the gateway chassis
- which claims this distributed gateway port.
-
-
-
- Additionally for this option to take effect, below conditions
- must be met:
-
-
-
- -
- The Logical router has only one distributed gateway port.
-
-
- -
- The router port's peer logical switch has no localnet ports.
-
-
-
-
diff --git a/tests/multinode.at b/tests/multinode.at
index 408e1118d..9e1c6d29a 100644
--- a/tests/multinode.at
+++ b/tests/multinode.at
@@ -1197,13 +1197,6 @@ run_ns_traffic
# Delete the localnet port by changing the type of ln-public to VIF port.
check multinode_nbctl --wait=hv lsp-set-type ln-public ""
-# cr-port should not be created for public-lr0 since the option
-# centralize_routing=true is not yet set for lr0-public.
-m_check_row_count Port_Binding 0 logical_port=cr-public-lr0
-
-# Set the option - centralize_routing now.
-check multinode_nbctl --wait=hv set logical_router_port lr0-public options:centralize_routing=true
-
m_check_row_count Port_Binding 1 logical_port=cr-public-lr0
m_check_column chassisredirect Port_Binding type logical_port=cr-public-lr0
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 63fcf3f71..4588a65c6 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -13675,52 +13675,8 @@ check_flows_no_cr_port_for_public_lr0
# Remove the localnet port from public logical switch.
check ovn-nbctl --wait=sb lsp-set-type ln-public ""
-# Check that the lflows are as expected and there is no cr port
-# created for "public-lr0" when public has no localnet port
-# since public doesn't have the option "overlay_provider_network=true"
-# set.
-check_row_count Port_Binding 0 logical_port=cr-public-lr0
-
-ovn-sbctl dump-flows lr0 > lr0flows
-ovn-sbctl dump-flows public > publicflows
-
-AT_CHECK([grep -e "172.168.0.110" -e "172.168.0.120" -e "10.0.0.3" -e "20.0.0.3" -e "30:54:00:00:00:03" -e "sw0-port1" lr0flows | ovn_strip_lflows], [0], [dnl
- table=??(lr_in_admission ), priority=50 , match=(eth.dst == 30:54:00:00:00:03 && inport == "lr0-public" && is_chassis_resident("sw0-port1")), action=(xreg0[[0..47]] = 00:00:00:00:ff:02; next;)
- table=??(lr_in_arp_resolve ), priority=100 , match=(outport == "lr0-public" && reg0 == 172.168.0.110), action=(eth.dst = 30:54:00:00:00:03; next;)
- table=??(lr_in_arp_resolve ), priority=100 , match=(outport == "lr0-public" && reg0 == 172.168.0.120), action=(eth.dst = 00:00:00:00:ff:02; next;)
- table=??(lr_in_arp_resolve ), priority=150 , match=(inport == "lr0-public" && outport == "lr0-public" && ip4.dst == 172.168.0.110), action=(drop;)
- table=??(lr_in_arp_resolve ), priority=150 , match=(inport == "lr0-public" && outport == "lr0-public" && ip4.dst == 172.168.0.120), action=(drop;)
- table=??(lr_in_dnat ), priority=100 , match=(ip && ip4.dst == 172.168.0.110 && inport == "lr0-public"), action=(ct_dnat(10.0.0.3);)
- table=??(lr_in_dnat ), priority=100 , match=(ip && ip4.dst == 172.168.0.120 && inport == "lr0-public" && is_chassis_resident("cr-lr0-public")), action=(ct_dnat(20.0.0.3);)
- table=??(lr_in_gw_redirect ), priority=100 , match=(ip4.src == 10.0.0.3 && outport == "lr0-public" && is_chassis_resident("sw0-port1")), action=(eth.src = 30:54:00:00:00:03; reg1 = 172.168.0.110; next;)
- table=??(lr_in_ip_input ), priority=90 , match=(arp.op == 1 && arp.tpa == 172.168.0.110), action=(eth.dst = eth.src; eth.src = xreg0[[0..47]]; arp.op = 2; /* ARP reply */ arp.tha = arp.sha; arp.sha = xreg0[[0..47]]; arp.tpa <-> arp.spa; outport = inport; flags.loopback = 1; output;)
- table=??(lr_in_ip_input ), priority=90 , match=(arp.op == 1 && arp.tpa == 172.168.0.120), action=(eth.dst = eth.src; eth.src = xreg0[[0..47]]; arp.op = 2; /* ARP reply */ arp.tha = arp.sha; arp.sha = xreg0[[0..47]]; arp.tpa <-> arp.spa; outport = inport; flags.loopback = 1; output;)
- table=??(lr_in_ip_input ), priority=91 , match=(inport == "lr0-public" && arp.op == 1 && arp.tpa == 172.168.0.110), action=(drop;)
- table=??(lr_in_ip_input ), priority=91 , match=(inport == "lr0-public" && arp.op == 1 && arp.tpa == 172.168.0.120), action=(drop;)
- table=??(lr_in_ip_input ), priority=92 , match=(inport == "lr0-public" && arp.op == 1 && arp.tpa == 172.168.0.110 && is_chassis_resident("sw0-port1")), action=(eth.dst = eth.src; eth.src = 30:54:00:00:00:03; arp.op = 2; /* ARP reply */ arp.tha = arp.sha; arp.sha = 30:54:00:00:00:03; arp.tpa <-> arp.spa; outport = inport; flags.loopback = 1; output;)
- table=??(lr_in_ip_input ), priority=92 , match=(inport == "lr0-public" && arp.op == 1 && arp.tpa == 172.168.0.120 && is_chassis_resident("cr-lr0-public")), action=(eth.dst = eth.src; eth.src = xreg0[[0..47]]; arp.op = 2; /* ARP reply */ arp.tha = arp.sha; arp.sha = xreg0[[0..47]]; arp.tpa <-> arp.spa; outport = inport; flags.loopback = 1; output;)
- table=??(lr_in_unsnat ), priority=100 , match=(ip && ip4.dst == 172.168.0.110 && inport == "lr0-public"), action=(ct_snat;)
- table=??(lr_in_unsnat ), priority=100 , match=(ip && ip4.dst == 172.168.0.120 && inport == "lr0-public" && is_chassis_resident("cr-lr0-public")), action=(ct_snat;)
- table=??(lr_out_egr_loop ), priority=100 , match=(ip4.dst == 172.168.0.110 && outport == "lr0-public" && is_chassis_resident("sw0-port1")), action=(clone { ct_clear; inport = outport; outport = ""; eth.dst <-> eth.src; flags = 0; flags.loopback = 1; reg0 = 0; reg1 = 0; reg2 = 0; reg3 = 0; reg4 = 0; reg5 = 0; reg6 = 0; reg7 = 0; reg8 = 0; reg9 = 0; reg9[[0]] = 1; next(pipeline=ingress, table=??); };)
- table=??(lr_out_egr_loop ), priority=100 , match=(ip4.dst == 172.168.0.120 && outport == "lr0-public" && is_chassis_resident("cr-lr0-public")), action=(clone { ct_clear; inport = outport; outport = ""; eth.dst <-> eth.src; flags = 0; flags.loopback = 1; reg0 = 0; reg1 = 0; reg2 = 0; reg3 = 0; reg4 = 0; reg5 = 0; reg6 = 0; reg7 = 0; reg8 = 0; reg9 = 0; reg9[[0]] = 1; next(pipeline=ingress, table=??); };)
- table=??(lr_out_snat ), priority=161 , match=(ip && ip4.src == 10.0.0.3 && outport == "lr0-public" && is_chassis_resident("sw0-port1") && (!ct.trk || !ct.rpl)), action=(eth.src = 30:54:00:00:00:03; ct_snat(172.168.0.110);)
- table=??(lr_out_snat ), priority=161 , match=(ip && ip4.src == 20.0.0.3 && outport == "lr0-public" && is_chassis_resident("cr-lr0-public") && (!ct.trk || !ct.rpl)), action=(ct_snat(172.168.0.120);)
- table=??(lr_out_undnat ), priority=100 , match=(ip && ip4.src == 10.0.0.3 && outport == "lr0-public"), action=(eth.src = 30:54:00:00:00:03; ct_dnat;)
- table=??(lr_out_undnat ), priority=100 , match=(ip && ip4.src == 20.0.0.3 && outport == "lr0-public" && is_chassis_resident("cr-lr0-public")), action=(ct_dnat;)
-])
-
-AT_CHECK([grep -e "172.168.0.110" -e "172.168.0.120" -e "10.0.0.3" -e "20.0.0.3" -e "30:54:00:00:00:03" -e "sw0-port1" publicflows | ovn_strip_lflows], [0], [dnl
- table=??(ls_in_l2_lkup ), priority=50 , match=(eth.dst == 30:54:00:00:00:03 && is_chassis_resident("sw0-port1")), action=(outport = "public-lr0"; output;)
- table=??(ls_in_l2_lkup ), priority=75 , match=(eth.src == {00:00:00:00:ff:02, 30:54:00:00:00:03} && (arp.op == 1 || rarp.op == 3 || nd_ns)), action=(outport = "_MC_flood_l2"; output;)
- table=??(ls_in_l2_lkup ), priority=80 , match=(flags[[1]] == 0 && arp.op == 1 && arp.tpa == 172.168.0.110), action=(clone {outport = "public-lr0"; output; }; outport = "_MC_flood_l2"; output;)
- table=??(ls_in_l2_lkup ), priority=80 , match=(flags[[1]] == 0 && arp.op == 1 && arp.tpa == 172.168.0.120), action=(clone {outport = "public-lr0"; output; }; outport = "_MC_flood_l2"; output;)
-])
-
-
-# Set the option "centralize_routing=true" for lr0-public.
-check ovn-nbctl --wait=sb set logical_router_port lr0-public options:centralize_routing=true
-
-# Check that the lflows are as expected and there is cr port created for public-lr0.
+# we know we still need the cr port so we check that the lflows are as
+# expected and there is cr port created for public-lr0.
check_flows_cr_port_for_public_lr0
# Set the type of ln-public back to localnet
From patchwork Tue Nov 26 14:38:05 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015479
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=krtIC0Hm;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=krtIC0Hm;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQGS45Kkz1yCv
for ; Wed, 27 Nov 2024 01:40:16 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id BE07B6FB1D;
Tue, 26 Nov 2024 14:40:14 +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 2mVsSzdoJ2uV; Tue, 26 Nov 2024 14:40:11 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3AE596FA20
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=krtIC0Hm;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=krtIC0Hm
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 3AE596FA20;
Tue, 26 Nov 2024 14:40:02 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 881DDC08AA;
Tue, 26 Nov 2024 14:40:01 +0000 (UTC)
X-Original-To: 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 12D5EC08A8
for ; Tue, 26 Nov 2024 14:39:55 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id C576D6F759
for ; Tue, 26 Nov 2024 14:38:16 +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 M3JKsJk37KPa for ;
Tue, 26 Nov 2024 14:38:15 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2608::611;
helo=eur02-db5-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 6EB8F6F6A7
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6EB8F6F6A7
Received: from EUR02-DB5-obe.outbound.protection.outlook.com
(mail-db5eur02on20611.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2608::611])
by smtp3.osuosl.org (Postfix) with ESMTPS id 6EB8F6F6A7
for ; Tue, 26 Nov 2024 14:38:15 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=DLA+Hxu14Ra1gljhP7BxG5C0bJeBrV1uMvPRM5iAIIqIWMrTDpdyb+843mIZmGMMqKKUj3NS+w/1XQFUbK+AMfwKwvGTu+3yGH0bl7w/ZF8KnlQmv6XFPssZfh8G4wvZka/8Ywfp8/SLpgD5VSZZ90EfJc8sm/GXC2DRN9fW5PtCOj1GA84+IrNDSz55AdNF9Gx87709KkrLqVvy4j8tCzpATkgaZb1fRmhix7Yhx3R1NBfbuN7ygGSU2UG0Bnz/IjijK+/uWr+y/QtU8XQu8p1qvtdxd8+s7hhHyREc9aLhB+SaGU2EpRoFBZT8jPDKMpJ3Q8v/24VCRFH4RPWR0A==
ARC-Message-Signature: i=2; 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=w2Y7kC/aql34MtmSWDScbjKn8hOOC1w45ONnjt9Uf4Y=;
b=GRfILCVf5HopVI7kqZJe1P/KERNVHwcq1lDr1uFUk1OKEB7t/8u2elz3LdOkSaoFYCkVc/guARj/DJcPEdfrLNg7cl/4YybHiV+IY0NXlDa2RunIPrgjMLqSG8yeAkjjK2KT/STgIwDWMFch0JCZetNslLkCAhJjA2mlv0IAeOAbEUlXs/ZmNV+TSxB4JpDDdZ+pwpijAjH5xLqVMJ9hPEB2YY8BeIj5hbEg/2/BuDxPjHv7rlUFLwTQBnGI86ts3Qyhf1LeSXrgTHyt+aka+lkAnbr4pAXf2YkH9Z8rSbAxkZxxq6QhZQ3pf6o6EjKb5qxZRr1GVQ6uugeylNdzrw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=w2Y7kC/aql34MtmSWDScbjKn8hOOC1w45ONnjt9Uf4Y=;
b=krtIC0HmhBlBdGfa5MoiOE0io1xWNYcdq6r4dXq9+MHg9Z22wn2r8K5MjwY4AzzacroUX4K9qbGbzMT3nPDtV8vS0yHa+7q9hjamymsiUHUB2q/qHUdTE8GtryPgubfy1LGy+j7JD4YIrbUaAKEv/fgRSpZpjKx9p0ZWoMXE72mBhkBQOCmqRvxEBqpN6wQjaz3NJGLkt5kkEoo8p0khP7pT65M5L15469DvkCckaETaUXotXijpXHGxejOgYY+RicckL2FgJgbnZmVRMftXZ+duTIqwSrWozGFQeQqhIvDLGlIUYoS2yWhP8kB9x2CquoN6HX677JxmdxmEY7N0hw==
Received: from DU2PR04CA0183.eurprd04.prod.outlook.com (2603:10a6:10:28d::8)
by VI1PR10MB3359.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:130::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:10 +0000
Received: from DU2PEPF0001E9C0.eurprd03.prod.outlook.com
(2603:10a6:10:28d:cafe::ab) by DU2PR04CA0183.outlook.office365.com
(2603:10a6:10:28d::8) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:10 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
DU2PEPF0001E9C0.mail.protection.outlook.com (10.167.8.69) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:09 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:10
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 6910723
X-ExclaimerImprintLatency: 3921482
X-ExclaimerImprintAction: a7bc2b70903447a3ae9a7763fea35d80
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=eWv91RNehJ5Z0S2AtLYJXJwQnnY8jCoZHkrhqruIR/oiUETmWP72mAYpoWSEDEtzdcX+wtcOAk029Hcv2WqH3cqDzEP1Oe3J1yXGLLU4FPf9oJRDmHoIqAQGDm4bQ8CGQqX1I0jWZk5fd76zhNXZUoOTjOXkW8I40ccKTtZhPMJ9eMmBNNwTBEwrJJK53AQbuZj1+KAhq7486P8yQSx18ZSz2NRX6O1ku7HIugGEncouXTxXDk26HSryqholp2uArkaP5U46CkkNMR3YAoYdLQp3e6bcmK0dX8UpZkxS9dScqGYKQRqQazHtd0vPGJdfzFrmjr9cJyRc2zWtV7mszw==
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=w2Y7kC/aql34MtmSWDScbjKn8hOOC1w45ONnjt9Uf4Y=;
b=S0FTCDyo+FrDXrnl6YnlRxMQp+G3+wd1h9HugqJ7Mko5nYsgWb9K9tRkTjHlnahGgVR/yyTE4188gMOL8+flv7U3C++3FwgEqiUEheHju0MJ6BGQPPOfAtYMnUCkOq/2VBS/1LiZBC7vHtDi90foJBy4/FNoPcBOJC38Psb4lp5v5CBj/hWRnz8G4pRazlKDCXrfvqcJzE3gvqfh4C2i4J5KEvH8I7tpBmtbhFS7La5WeNXI0o9nlxffXgWcAVAh88b0Rv0/vmIXV404gfdnzgbG0I0B1g1+F0gNCHmM1M7RMzkAEGTCmXpAlIsyuMT5R23IWOEV2yLA/ayFNtIpUg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=w2Y7kC/aql34MtmSWDScbjKn8hOOC1w45ONnjt9Uf4Y=;
b=krtIC0HmhBlBdGfa5MoiOE0io1xWNYcdq6r4dXq9+MHg9Z22wn2r8K5MjwY4AzzacroUX4K9qbGbzMT3nPDtV8vS0yHa+7q9hjamymsiUHUB2q/qHUdTE8GtryPgubfy1LGy+j7JD4YIrbUaAKEv/fgRSpZpjKx9p0ZWoMXE72mBhkBQOCmqRvxEBqpN6wQjaz3NJGLkt5kkEoo8p0khP7pT65M5L15469DvkCckaETaUXotXijpXHGxejOgYY+RicckL2FgJgbnZmVRMftXZ+duTIqwSrWozGFQeQqhIvDLGlIUYoS2yWhP8kB9x2CquoN6HX677JxmdxmEY7N0hw==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:07 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:07 +0000
Date: Tue, 26 Nov 2024 15:38:05 +0100
To: dev@openvswitch.org
Message-ID:
<5176df3a6c7fb09c5cfcc538d0d4b64459c3ba61.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0109.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::9) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|DU2PEPF0001E9C0:EE_|VI1PR10MB3359:EE_
X-MS-Office365-Filtering-Correlation-Id: 3f2a9ff4-1ee1-470c-3164-08dd0e27f318
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
W+W5Ea98M0erTf4U3OobqDo7DiWbhPs7VupGdXnwa8D0w/41foRQE5YZYeSRM77UHdArUbmRS9OGHs57E88R1gew0ubN/bfTP6nU5aNMTyKj7kH9R/RbRg2UFiEQNKFHy2aa2faqmQJ399fIRKmzhWJBFkNfchsQ0zY5lfjHg5y3QRY5g1cFL1SKDVilW1vVRYI7ZhJdPL4py3DJnRY3kE51sMfm2cGEf0tawTL/xE1j5RR8i+q2VHomW2QVE/r4UVQ+eam3WhYuc03INCydchzH4DcZGjDI/83C/JZVCzB8C2k4tUhRFWWaQDXsUzArDRjV72E7YvnbNZERvEJQ1RgCHeBGX++1C6GbuWiu6BlxnUs2TGCZO2lK9VsQ6sUbOaM+s5HboAhLf7WFCENlWFVZfV0Q1Msqo+KAizey+e2HYvI1m1e9Qd89UGzd9cJRTaCxJ4BqiwLaoBCdcFsGUyEWIHd6K+AMjUs6YRemTIZ5LQ5/9l3/GEvlWps9gNfUlsFrxatLRJL+BS4yEBQSKrnshmOPALcqPbTVM6me28wzB0LhslPGN/Un995ypGE9KgGxOzFqNcaFkOK16MrlLpP6NmRu4CHpmIfGElOdBYBB2BII+cXZkuWoDWqorn4i+o8icQcLjUZcGSKbw3rbHN9IvQ5FH+Zacq8MG4bbFMWpcX1mQX8Prfn44sYBTbfH/TL9FSvP6LQ1gZBYt9oDG/0w2QExERULcvf/Bb/BhStDjj+3leHzObKMe9w60L5WK/0c/mG/PUPCk8rVcMHbJEiwT6cNApLQ/2s4VQvBApm29Bh6y+Nho5NYxa0ScSOgMLF5UQWGKRH+ez7iAhmPuxU8kt4/57WUs8z39S6C4vdIINxRwmocJOtNcHg1viKZqIdLZ6v37t1K1zGdrSWnBytGXi8yMfI31ThczLL3gSRdERmUHqtYBjzdSICwbceQG9xQKbRv44ZDV5piUYoydIMpbP/0I5R8MxWrwN588yZGsyF1TAghsh81bg+WgWcQfZlLOmIZwzFmZN3VwajxgUqUnJKx8hVbWFxGCTqAmwOT/RRu6i8wtpufhYxpCpWZJdqKJXic9J06Qyy6d6X8kpOKcVUA+CV8Ee4Yn3fZ4nl5q2g5aSPoboKlwu1kDTHHkLhLfQ8D+h22N1gV21YOrBHZ4q9FJESHUKS0TWBlgh4gELs7UeJs24hobh8Ie0jvrojEDXYGzpGPEz8KvToDIRLbjY7iAiHoznr8O+T7kjAFDb7PZwBVZ45i3ZaXEz8idOhrfhxNHRpPkD2nAbi66Hlgk1VmWhAKCy3hH+SOMzlozyZYpMgAqazYSD/t3rgdW9mMRMkEqEUvC3+yhTmziA==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU2PEPF0001E9C0.eurprd03.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
cb333080-18e3-4016-2091-08dd0e27f170
X-Microsoft-Antispam: BCL:0;
ARA:13230040|14060799003|1800799024|36860700013|376014|35042699022|82310400026;
X-Microsoft-Antispam-Message-Info:
zOEdqQKNMkdHBNFBYxPZ7ZojSlx6tNHaIxfit87G56zKi4nic7aSQtWzBJw+1ucrjbwK4taEBohuUefTNGkfVZCoO0+gB3NKz3fJ4S4VAOU6vWUV3Lyeapq3M1fJk0p7zS6i9A/pGw0231UvQEZU8k6JSgUMve01a5dKmhwftEW0P/xN9pMrGoEOrUnG7prVuumBPEZURSgP96YEM9hebS40h6GgMAUKRfYBnZOMhP4gaL++D/zRh6G/XnUNhCOJB3IYtiuVxpxiulp2JwLb//GWE2t0JPmHCiCtbnidjc2Z0X7ZkXfbBwkS9tX/fGXOy54Wf/Bd0QjbekNHm1fHu/LwuP0+jYthCWMv3cjIciGwCFlhWzIg0r7ZTtZLFlqU6cRjxGz2pVr8ajzruXtgL2DPdboROvXLRNzGZdHJ+m09WKaYiWumeiLI7m9Z6zgF+6ilzcOEmpqFzkpXQNdGcztHk/XEomgNe0Cptog3AyG7WRB4I9m4XbJO/ZyXFWdfEBi4DjkbpCvjHKsmimgH/74hm4cif3XorTwrsujSQeC3XCqzFiVpV3XqDjpnLguTTnQpFLhsYnZpgAoIFc6nvNOUJPfR3G5KA6W9dzG/Ypac97xcaYO0gvzq+BPmbXyTHxNvGWjaSWnQRz7sAhjwZHYQhSRzDAjhi+aGea/J9fR6NIaUBOp91OJMyhBzUH/z99eCkdWz/Qy8eNjy9CcP4gYijz3Po/1saLiJD8ltSJwHLMZ8o/F43gh04/k64gqcXtREoU6fZsqa3btd5h6ymNc6utJuUzBWrJvL8IzbCZKEoGTPJgXDNJfRKHqASXz2l3ogBGh7E1up2szsXs0f65NA4Q0LNZMtIGIE2hUSE8C84+MG9dhcLQ6r2NfN7PUs7zJg8ukLpg70qlh+XW/nW38DaeHyjhJ9UNrEvbifb5Ll3ToKXSz6HX0piS9x5bcD9EJiN1MEqqCL5k8Yvx1oacn+RLNhtMDjrgbegL3OW2tsDm3rzHxV3elp95xugv99Wtjk/EwyyqCl9uzccgqtOewE5SAdbC22iVQw/9fi6ei9cG765dJStQ66S66+KTeNRIEci2bj9/56joI+j/WHUGT1qs9pnt72R30kmqmAGkHt+Ksk2X3L/L85EidDCUJEO8TU2f7z4bm7/zNUZQaddhg+N+R1JQ3flYNsx2f/5Ym6okX85dKc7vksR2dB2bw1EF1mJFnybNkJZOMQc6YXXkvtIGikPyyzBKwa9jVYA8eAqj1+oklNBQmuVhB7hqpXyGr1nddZd8hn8tB3rPsc7Pa5gwmw9GORw8nQsEK6wINUMr+PlYQ0UwhdLXo6C36Enb5y7XaPHphdmf7C6yNTznYzwx9Bp0Px+Whu1j+oiDuaN0UntrGovgcTP7RYPIjvXk8HnBgXYPFjc7VjY3zLyhkI2cthyVQEbUXIY7m6nUEqhcW4AzNtzV2iqMJsiDJQ
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(14060799003)(1800799024)(36860700013)(376014)(35042699022)(82310400026);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:09.7065 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
3f2a9ff4-1ee1-470c-3164-08dd0e27f318
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF0001E9C0.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3359
Subject: [ovs-dev] [PATCH ovn v3 10/33] northd: Routing-protocol-redirect on
crps.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
previously we prevented using the routing-protocol-redirect option on
chassis-redirect ports. However the option works fine there, therefor we
remove the limitation.
Signed-off-by: Felix Huettner
---
NEWS | 2 +
northd/northd.c | 8 ---
tests/system-ovn.at | 152 +++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 153 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
index 6deecf037..27eb1e27b 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ Post v24.09.0
-------------
- The LRP option 'centralize_routing' has been removed. The behavior is now
enabled in all cases where it is needed.
+ - The experimental logical router port options "routing-protocol-redirect"
+ and "routing-protocols" are now also useable on distributed gateway ports.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/northd/northd.c b/northd/northd.c
index 617ecc8dd..0fb571f54 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -14189,14 +14189,6 @@ build_lrouter_routing_protocol_redirect(
return;
}
- if (op->cr_port) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
- VLOG_WARN_RL(&rl, "Option 'routing-protocol-redirect' is not "
- "supported on Distributed Gateway Port '%s'",
- op->key);
- return;
- }
-
/* Ensure that LSP, to which the routing protocol traffic is redirected,
* exists. */
struct ovn_port *lsp_in_peer = ovn_port_find(ls_ports,
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 6dfc3055a..d12e9111f 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -13782,7 +13782,7 @@ AT_CLEANUP
])
OVN_FOR_EACH_NORTHD([
-AT_SETUP([Routing protocol redirect])
+AT_SETUP([Routing protocol redirect - l3 gateway])
AT_SKIP_IF([test $HAVE_NC = no])
ovn_start
@@ -13930,6 +13930,156 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
AT_CLEANUP
])
+OVN_FOR_EACH_NORTHD([
+AT_SETUP([Routing protocol redirect - DGP])
+AT_SKIP_IF([test $HAVE_NC = no])
+
+ovn_start
+OVS_TRAFFIC_VSWITCHD_START()
+
+ADD_BR([br-int])
+ADD_BR([br-ext])
+
+check ovs-ofctl add-flow br-ext action=normal
+# Set external-ids in br-int needed for ovn-controller
+check ovs-vsctl \
+ -- set Open_vSwitch . external-ids:system-id=hv1 \
+ -- set Open_vSwitch . external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \
+ -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \
+ -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \
+ -- set bridge br-int fail-mode=secure other-config:disable-in-band=true
+
+# Start ovn-controller
+start_daemon ovn-controller
+
+check ovn-nbctl lr-add R1
+
+check ovn-nbctl ls-add public
+check ovn-nbctl ls-add bar
+
+check ovn-nbctl lrp-add R1 rp-public 00:00:02:01:02:03 172.16.1.1/24
+check ovn-nbctl lrp-add R1 rp-bar 00:00:ff:00:00:01 192.168.10.1/24
+
+check ovn-nbctl lsp-add public public-rp -- set Logical_Switch_Port public-rp \
+ type=router options:router-port=rp-public \
+ -- lsp-set-addresses public-rp router
+
+check ovn-nbctl lsp-add bar bar-rp -- set Logical_Switch_Port bar-rp \
+ type=router options:router-port=rp-bar \
+ -- lsp-set-addresses bar-rp router
+
+check ovn-nbctl lsp-add public bgp-daemon \
+ -- lsp-set-addresses bgp-daemon unknown
+
+check ovn-nbctl lrp-set-gateway-chassis rp-public hv1
+
+# Setup container "bar1" representing host on an internal network
+ADD_NAMESPACES(bar1)
+ADD_VETH(bar1, bar1, br-int, "192.168.10.2/24", "00:00:ff:ff:ff:01", \
+ "192.168.10.1")
+check ovn-nbctl lsp-add bar bar1 \
+ -- lsp-set-addresses bar1 "00:00:ff:ff:ff:01 192.168.10.2"
+
+# Setup SNAT for the internal host
+check ovn-nbctl lr-nat-add R1 snat 172.16.1.1 192.168.10.2
+
+# Configure external connectivity
+check ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=phynet:br-ext
+check ovn-nbctl lsp-add public public1 \
+ -- lsp-set-addresses public1 unknown \
+ -- lsp-set-type public1 localnet \
+ -- lsp-set-options public1 network_name=phynet
+
+check ovn-nbctl --wait=hv sync
+
+# Set option that redirects BGP and BFD traffic to a LSP "bgp-daemon"
+check ovn-nbctl --wait=sb set logical_router_port rp-public options:routing-protocol-redirect=bgp-daemon
+check ovn-nbctl --wait=sb set logical_router_port rp-public options:routing-protocols=BGP,BFD
+
+# Create "bgp-daemon" interface in a namespace with IP and MAC matching LRP "rp-public"
+ADD_NAMESPACES(bgp-daemon)
+ADD_VETH(bgp-daemon, bgp-daemon, br-int, "172.16.1.1/24", "00:00:02:01:02:03")
+
+ADD_NAMESPACES(ext-foo)
+ADD_VETH(ext-foo, ext-foo, br-ext, "172.16.1.100/24", "00:10:10:01:02:13", \
+ "172.16.1.1")
+
+# Flip the interface down/up to get proper IPv6 LLA
+NS_EXEC([bgp-daemon], [ip link set down bgp-daemon])
+NS_EXEC([bgp-daemon], [ip link set up bgp-daemon])
+NS_EXEC([ext-foo], [ip link set down ext-foo])
+NS_EXEC([ext-foo], [ip link set up ext-foo])
+
+# Wait until IPv6 LLA loses the "tentative" flag otherwise it can't be bound to.
+OVS_WAIT_UNTIL([NS_EXEC([bgp-daemon], [ip a show dev bgp-daemon | grep "fe80::" | grep -v tentative])])
+OVS_WAIT_UNTIL([NS_EXEC([ext-foo], [ip a show dev ext-foo | grep "fe80::" | grep -v tentative])])
+
+# Verify that BGP control plane traffic is delivered to the "bgp-daemon"
+# interface on both IPv4 and IPv6 LLA addresses
+NETNS_DAEMONIZE([bgp-daemon], [nc -l -k 172.16.1.1 179], [bgp_v4.pid])
+NS_CHECK_EXEC([ext-foo], [echo "BGP IPv4 server traffic" | nc --send-only 172.16.1.1 179])
+
+NETNS_DAEMONIZE([bgp-daemon], [nc -l -6 -k fe80::200:2ff:fe01:203%bgp-daemon 179], [bgp_v6.pid])
+NS_CHECK_EXEC([ext-foo], [echo "BGP IPv6 server traffic" | nc --send-only -6 fe80::200:2ff:fe01:203%ext-foo 179])
+
+# Perform same set of checks as above for BFD daemon.
+# We need to manually check that the message arrived on the receiving end as Ncat will
+# produce false positive results over UDP due to lack of ICMP port unreachable messages
+# from LRP's IP.
+NETNS_DAEMONIZE([bgp-daemon], [nc -l -u 172.16.1.1 3784 > bgp-daemon_bfd_v4.out], [bfd_v4.pid])
+NS_CHECK_EXEC([ext-foo], [echo "from ext-foo: BFD IPv4 server traffic" | nc -u 172.16.1.1 3784])
+AT_CHECK([cat bgp-daemon_bfd_v4.out], [0], [dnl
+from ext-foo: BFD IPv4 server traffic
+])
+
+NETNS_DAEMONIZE([bgp-daemon], [nc -l -6 -u fe80::200:2ff:fe01:203%bgp-daemon 3784 > bgp-daemon_bfd_v6.out], [bfd_v6.pid])
+NS_CHECK_EXEC([ext-foo], [echo "from ext-foo: BFD IPv6 server traffic" | nc -u -6 fe80::200:2ff:fe01:203%ext-foo 3784])
+AT_CHECK([cat bgp-daemon_bfd_v6.out], [0], [dnl
+from ext-foo: BFD IPv6 server traffic
+])
+
+# Verify connection in other direction. i.e when BGP daemon running on "bgp-daemon" port
+# makes a client connection to its peer
+NETNS_DAEMONIZE([ext-foo], [nc -l -k 172.16.1.100 179], [reply_bgp_v4.pid])
+NS_CHECK_EXEC([bgp-daemon], [echo "BGP IPv4 client traffic" | nc --send-only 172.16.1.100 179])
+
+NETNS_DAEMONIZE([ext-foo], [nc -l -6 -k fe80::210:10ff:fe01:213%ext-foo 179], [reply_bgp_v6.pid])
+NS_CHECK_EXEC([bgp-daemon], [echo "BGP IPv6 client traffic" | nc --send-only -6 fe80::210:10ff:fe01:213%bgp-daemon 179])
+
+# Perform same checks in other direction for BFD daemon
+NETNS_DAEMONIZE([ext-foo], [nc -l -u 172.16.1.100 3784 > ext-foo_bfd_v4.out], [reply_bfd_v4.pid])
+NS_CHECK_EXEC([bgp-daemon], [echo "from bgp-daemon: BFD IPv4 client traffic" | nc -u 172.16.1.100 3784])
+AT_CHECK([cat ext-foo_bfd_v4.out], [0], [dnl
+from bgp-daemon: BFD IPv4 client traffic
+])
+
+NETNS_DAEMONIZE([ext-foo], [nc -l -6 -u fe80::210:10ff:fe01:213%ext-foo 3784 > ext-foo_bfd_v6.out], [reply_bfd_v6.pid])
+NS_CHECK_EXEC([bgp-daemon], [echo "from bgp-daemon: BFD IPv6 client traffic" | nc -u -6 fe80::210:10ff:fe01:213%bgp-daemon 3784])
+AT_CHECK([cat ext-foo_bfd_v6.out], [0], [dnl
+from bgp-daemon: BFD IPv6 client traffic
+])
+
+# Verify that hosts on the internal network can reach external networks
+NETNS_DAEMONIZE([ext-foo], [nc -l -k 172.16.1.100 2222], [nc_external.pid])
+NS_CHECK_EXEC([bar1], [echo "TCP test" | nc -w 1 --send-only 172.16.1.100 2222])
+
+OVS_APP_EXIT_AND_WAIT([ovn-controller])
+
+as ovn-sb
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+
+as ovn-nb
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+
+as northd
+OVS_APP_EXIT_AND_WAIT([ovn-northd])
+
+as
+OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
+/.*terminating with signal 15.*/d"])
+AT_CLEANUP
+])
+
OVN_FOR_EACH_NORTHD([
AT_SETUP([NXT_CT_FLUSH_ZONE count])
ovn_start --use-tcp-to-sb
From patchwork Tue Nov 26 14:38:07 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015483
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=lDxE1tAH;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=lDxE1tAH;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQGl4JjPz1yCv
for ; Wed, 27 Nov 2024 01:40:31 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 988736FB7D;
Tue, 26 Nov 2024 14:40:28 +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 blDf4BLMJ963; Tue, 26 Nov 2024 14:40:21 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4B1606FAD6
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=lDxE1tAH;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=lDxE1tAH
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 4B1606FAD6;
Tue, 26 Nov 2024 14:40:05 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 4A6D2C08A8;
Tue, 26 Nov 2024 14:40:04 +0000 (UTC)
X-Original-To: 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 13F4DC08B4
for ; Tue, 26 Nov 2024 14:39:56 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 0909A6FA1E
for ; Tue, 26 Nov 2024 14:38:20 +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 gUNOH320pW8U for ;
Tue, 26 Nov 2024 14:38:18 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2606::629;
helo=eur02-am0-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org E4A4F6F6A7
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E4A4F6F6A7
Received: from EUR02-AM0-obe.outbound.protection.outlook.com
(mail-am0eur02on20629.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2606::629])
by smtp3.osuosl.org (Postfix) with ESMTPS id E4A4F6F6A7
for ; Tue, 26 Nov 2024 14:38:17 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=r3LZ7MMx+fph1/twRasYWRUgDBqpEsWLbFJvdi+qeRK2YprzUyxmEO8N3zVxXrGCjwVLOMOrpvEUJGnrzhSyEfJiLKtUkkkjvpI8sOnCE4GV3+F3eU3RAdNire5N2ziiY8IAdXjxuMwlK4COLwinFpz2na6WUHiaxsVi4frPlODV5ACWgJ1NpmoMJ+sRXuDd4Lcdol3qgLWBIc7+s2ZUzVVoh4+CvFZ4XsqRaw1DrerD4v5I0uWwkGht6jE2xvaW73+18eYaAN00gYDecelvCXt7E7+bUoVDOJVh762ZjxSgoYNR8p2msnVn0Hl83zwnCVmkpsuWeIFGLC7ROZx6YQ==
ARC-Message-Signature: i=2; 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=F5knXtXfN8cuqEt9oVOrhvLeGFaqzCB80WxIqFwR7m8=;
b=PxqsF/7W6id7gmv4f2NPjwlIN5BywLIHY52LMdjOCg6WO3uIvWFkJ5Iu6Ifi1Qv6mkjssCYRFgFQelyCs0I3dn6HJJ2AlIam98vzqWrVEeVi6RBuXppN8SUL0GTRJZfqKvafPtCxYSPBjYdcH+/Fg2p7h+gh+xlOy9SReYtYgUPZcy1FYhss9Qj40Ip7IqIHQ96AWkDU80wmk9Bb4ziZI6g51qyHWLXDhRK9eN+sSgTv3pivwf4uONqMAkkhmud8vZj+aphcwVp/riHGzg+tekddAIiO99rIBJb7kXFhERiyLTA2gp/mxPhERMa9QopZIY2FYWmzDuYem4R70ArhjA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=F5knXtXfN8cuqEt9oVOrhvLeGFaqzCB80WxIqFwR7m8=;
b=lDxE1tAHFG26FtxuUawver0ODv2U6hy6JITr8hqIs81YpC3F+IgyuvCMmD7OQQLxjM3TwANIRmtzm3SQ/+pYYWi80EvLLYDzvZ2ShI1IMoTn3BGMCvOclbhEVgN39CpkcFwRkaEure16AlWaFsGFHfO6zRxZ+W9t2S4bGyq7KvRqBaZFAeS/tqZuGkFjrO4w/6byvb8Ud1bezpqvA21md/EiVyrwcehNnVcLdo8ePZws6hbYzPrKbC/LxZ4Era9ots/6+Fu92g2o3Z1GU6iu2DZL4lZYdUHNC7GIPlWL4WDjyeNGUk5m26iKWa8IqxFHh11EWLLBMVmSe6XJedumWg==
Received: from DUZPR01CA0007.eurprd01.prod.exchangelabs.com
(2603:10a6:10:3c3::11) by DB8PR10MB3290.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:10:11f::17) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:12 +0000
Received: from DB1PEPF000509F7.eurprd02.prod.outlook.com
(2603:10a6:10:3c3:cafe::94) by DUZPR01CA0007.outlook.office365.com
(2603:10a6:10:3c3::11) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:12 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
DB1PEPF000509F7.mail.protection.outlook.com (10.167.242.153) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:11 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:12
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 10460299
X-ExclaimerImprintLatency: 5499843
X-ExclaimerImprintAction: 30c69f7060e64aa1bc0e45782346e9dc
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=FMrC6rp5zlIjeqVmFslDzWXNxVr0NIUQlYYus/yeeM1pS9nhaZ/K59UEDFUO1Lo44+XXrS9+Lw30O8DSKkLlfQ6DoimZbv8AeY7vMMZsdnnSmuat+gGRgV0G3NoB7fn3cLx23Nq8mHxTDfRTHCLT+J4tBLrUz7JXjTV/yxDr6M2ROviLXJXmmHXszCrWIuZVeBDWutO2brETu80QuFD1hmnsEPRaWDjaw+q2S7nAI/ocMmqECYEJXj+yNx/5MeaE+1kCKkkZV9xit/Ry98DJ7eMjuqZ8l8Qs3jHhyIGDetIeuH8cY2EpYKZtCBwCqfa/MmZTDvtd4vRYtQvty12UOg==
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=F5knXtXfN8cuqEt9oVOrhvLeGFaqzCB80WxIqFwR7m8=;
b=rLAiKM2BN9hRkQtakVy5Mv5Au3lUVxmTdEyKQ3Lpf86jBxCBw6Axiuv4FxaXoq/VKIxMewoD9Eyjc59Gd3QPkmGu8mYiP6MFh6IZyLRzfMvMnbCXi6aGOO6PSsDaWSsGq68/8SY9grBQ1/lzaZrnkHNThH/+B9fj0bidDfVA09qHRjtB7/+flUl+JykuDwcofNbl+7GUk6k4KDDKUYJ9b91tYz539dgfkw9S+2nCj0l5BDCcV3gik+m5zxsd5qfgv4qcIPA35T1b3FVQNw6xg9wH72ADM4xg69w+kkV4HHronXTFSY1Rz7mkRIeNHT6KXJZgox388mmzy8bklOJUag==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=F5knXtXfN8cuqEt9oVOrhvLeGFaqzCB80WxIqFwR7m8=;
b=lDxE1tAHFG26FtxuUawver0ODv2U6hy6JITr8hqIs81YpC3F+IgyuvCMmD7OQQLxjM3TwANIRmtzm3SQ/+pYYWi80EvLLYDzvZ2ShI1IMoTn3BGMCvOclbhEVgN39CpkcFwRkaEure16AlWaFsGFHfO6zRxZ+W9t2S4bGyq7KvRqBaZFAeS/tqZuGkFjrO4w/6byvb8Ud1bezpqvA21md/EiVyrwcehNnVcLdo8ePZws6hbYzPrKbC/LxZ4Era9ots/6+Fu92g2o3Z1GU6iu2DZL4lZYdUHNC7GIPlWL4WDjyeNGUk5m26iKWa8IqxFHh11EWLLBMVmSe6XJedumWg==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:09 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:09 +0000
Date: Tue, 26 Nov 2024 15:38:07 +0100
To: dev@openvswitch.org
Message-ID:
<9a309c925f668489c8f452b1fe0f11d87bdb3844.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0106.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::16) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|DB1PEPF000509F7:EE_|DB8PR10MB3290:EE_
X-MS-Office365-Filtering-Correlation-Id: 3921acb3-11de-410f-9624-08dd0e27f458
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
JpBUCVUt3hJco9bmvUQO2C76DiAm1JL8zGVf5SZvJ7GdTR3XE//PhFJ2IUWYFnozz4ppTmw3hk8B7dLpvMKjdDcnzh1N8AijENGM4sYx3nmahnaE2dTzJjJmuCtZPIc3BXioUKpq91aVD4LhjEKCX9twY934zp21mpEuECK59YCUVpOO/uAznWbjA4HyQoZFKGaZ6UaN2g9znS5dZn9L/9IdTAKUtN9jUiF6n9EXRO08oWFruVru46Qq4RMgZeA27M0jhrwRJetMGaPHKwcSEJYtilLQyltuvtvSlxRNKmWs7GMPuI/P/50/oaroPc968GyGFWKgZSwNggc+NiRJL2s29Iix4ysUV0ScpdIqG/KcXzfaTVB/vfqfsoUZuDi6Wjs5cfx36tISTr3nxcaBXQ6IfSEigtkCBoEyiO0Rv1ru0d5EKfSuoDDSD5S4ph27ZJWxoOuWTCuiDmApzFEVZm1EZ9aOksK2NhYdMuuAPpXYPPWHpsX/6U9c3K/kLt3lV1WGrTuQm8eQ3le2/Z/0A11ND/f8WRR8FH1+sYkZfZ+BX6cv7A7lukQvnO1dAQ82q//vsw1NCYJq0htLWEH2XDMzLysgbZ236cUYPydyqWAjDMJ/Hci11ZCFb3D4ob1w83AyRcELCoe8mJMMP2UPOGf3eMU2UR6GWV5f/l42XwBa3ZyO9XmbdquWXWKwuZUQIuGfAV+Y73TAVhwLRWK4K4dtoDBQvmMec9Z7P4Abi4Xq921YYnGpAyuKpRUpCf676r1m7Ombl/NU4f5boGQPdXtFJrnr5NU3idscy4wqpd53oDNtGrmJb5U1VaKYqvBmgUn9Sikx+jQpMpk/jey51NC9OzaWQAvYL3yhNnFELtACa42BQeVVJxVdKaU2XLW/LZWwPrpZp2TKbiBacIZO2WoPoIo6Wr48PCEB/ScMtUmqF0vWEfbRROR8PkYF+OIwrgRpC4eeoRQJczAVBn50glp+TbnKfi58xNWmHIgQHCeacI7N1tVrCg6y7pdZ+XsJm9OkdsVhL3zUOoDUyF+c77FaDHCieo0v/X9e3IKymNw87XcpGsUBi9IPVOnfBMaCi/fcA6EwMDH/P0sVVuKUlCpGW8ve5V4eevLgQD/N0oE6msdxVuHbahzrkJtHDx3kOM+18vqtcW06twSGfQWdwGjjSA9MY5xvjgiiFd52Pu9pXLkLz2kECZCvWpGXHWtd5PS7DIJhAYp12FjUl6cIkXYeABrblJH8wKWU96DA/tbbhRwDHIReWpdG1QIlA6nPXjjqh8IsbUIZkNDlCtHh1up7UH3SOuHTX7jRzaSwBlKwOZcIwcxoxjYFyN+14xPV9r5oIYwFo4/XY+CO9QfNh3jKlnpFptZPXme7nHWC5lk=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DB1PEPF000509F7.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
23035912-eea6-4e61-6ea4-08dd0e27f28f
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
wHkTKU+T9DghfQsADuBgWBiFI7Cna7+SwBegQYfYYmQJgrWdBrIfHSozbKF3rHTQEBu01g/hsQbw8lDgUVTYdhryIBxcKnxa74FlFtzO7sB0rraES5jsOT8fNebAPVQ55TLpS9VSF6s+ZYrvbwmiiyymEnMSL7oAero4laFV6bJ/somGzxXXNQcP1sYuplkNelL53e5ZoDSPk67+clkss+if4dQ26cWiUfYAjKkmz0ePfGziiErXf4rQuYyfq4veQEYP0aZhK0onKHzbNKV12OnOtuLg/7/khbaKKytp/hN1RjYHneS6ZZf3p3eQKEPS4X0BUBwQ6XwJO5VIczX9USkaEhOxeVu/y0R0QIDFTZLlsxVwWutgazday9lIo3v6eR5JihJCLX0l/2pbQbO1RMNOc0ReRhTvxtX4gGcf1Y0cF4SfEqYcNsQi9O2sK7IlW3Ucjxx2Pco9K1VNtEEF89yz98CoRynI42UWr+sofcefn5DoJfgdOxVDdf3O438xpyvHeygfPzSO7oHUqenOawry80hkcVj7u9pfRyeKVARsQpqQGEMrfZ0qTDENlJ9i5lY2EXxyNvfwPB7BEeDtTIzmVQ4HYqwq2Qpiq2lxKJQyQTU9AfmdxwJ7DuUWOD/g+kzkdSlgZ6/quPOMM2UjhGjAy9c7CsoBDtn3nSt2c70+/jkA+MFhNXhEmjU6WEQiVx39Xa/qZ884R9uJI9lXFBMzAyPGyt+q6X7+uVVuQ1zzch9AODXzmn/yPEnm99iA96ZaVePWAE/vRfzLSWDe8ABjmaBiDZvrdKZJvQhLCoRy+YK5l2HHfsFpPOF/tGE2wLjzXHVunPeAP27if8itehOewHo5rFH72PaxaRo0ItFLi6l3mV6ieEDdxD7vGMHKrjsGv0gW7TkjLDciAygnDoXw43D6yNe1H+50fzXzYYMHr0U5mXxn5iNjI5OTYLgzWhS8on46U/wtR20NqHuamoC7w99v0IN1saQylXxfF0X3ibZdJLNoypuzKesbJ69TsLv1EjPf9NyWAz7sAd23MraDBd8/tiWGviJA6B9nKpR/6DN4aR4yQKxW2ZbQw1WKE+QAuPxrJxLo/aA/pV4tw4yqn2e4YRoixqa7q/15bUW1nMHfzsDi5qi0EeKh5dClTmxcWJL2sB9KxuHSGhjgwGKqqLf8epOKuD6Pr2jKGciawDkel6nNX7VZsm+gMHmJSzXGq5N1cUdR1MF1AkqqQ2d9rJxsQ46CWZDQ3TktxSCWH9vT6dqoybOQR4Z3I9WxfqhmiSjowzlkmRisDo7sxpQTwHji6DkB4HHhjG+juKh3lmFI1gRPhWaeD+SrN3fx8bTzV3XIGowgPRHlIVs6TnWPL4llySAQjaGwaJVUn08MMAeAnznJlGz7NxjjvqRGon5iOib3AiTkDK6tnRViYW3pxUN6bLC6xTmyjvi7snPwOQ8mVm5vwwsaAx6sMjfF
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:11.6344 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
3921acb3-11de-410f-9624-08dd0e27f458
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DB1PEPF000509F7.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3290
Subject: [ovs-dev] [PATCH ovn v3 11/33] northd: Add route table to
southbound and sync.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
in order to exchange routes between OVN and the network fabric we
introduce a new southbound table. This is used by northd to write in the
routes which should be announced from a given Logical Router.
ovn-controller will later use this table to share these routes to the
outside.
Additionally this table will be used as a way for ovn-controller to
share learned routes back to northd.
Users must explicitly opt-in to advertise the routes using this table.
Signed-off-by: Felix Huettner
---
NEWS | 3 +
ic/ovn-ic.c | 21 -----
lib/ovn-util.c | 22 +++++
lib/ovn-util.h | 1 +
lib/stopwatch-names.h | 1 +
northd/automake.mk | 2 +
northd/en-routes-sync.c | 196 +++++++++++++++++++++++++++++++++++++++
northd/en-routes-sync.h | 28 ++++++
northd/inc-proc-northd.c | 9 +-
northd/northd.c | 24 +++--
northd/northd.h | 4 +-
ovn-nb.xml | 13 +++
ovn-sb.ovsschema | 17 +++-
ovn-sb.xml | 50 ++++++++++
tests/ovn-northd.at | 53 +++++++++++
15 files changed, 408 insertions(+), 36 deletions(-)
create mode 100644 northd/en-routes-sync.c
create mode 100644 northd/en-routes-sync.h
diff --git a/NEWS b/NEWS
index 27eb1e27b..5e266fed8 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ Post v24.09.0
enabled in all cases where it is needed.
- The experimental logical router port options "routing-protocol-redirect"
and "routing-protocols" are now also useable on distributed gateway ports.
+ - Add the option "dynamic-routing" to Logical Routers. If set to true all
+ static and connected routes attached to the router are shared to the
+ southbound "Route" table for sharing outside of OVN.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
index 54dd73f18..6c4d26ebb 100644
--- a/ic/ovn-ic.c
+++ b/ic/ovn-ic.c
@@ -1007,27 +1007,6 @@ get_nexthop_from_lport_addresses(bool is_v4,
return true;
}
-static bool
-prefix_is_link_local(struct in6_addr *prefix, unsigned int plen)
-{
- if (IN6_IS_ADDR_V4MAPPED(prefix)) {
- /* Link local range is "169.254.0.0/16". */
- if (plen < 16) {
- return false;
- }
- ovs_be32 lla;
- inet_pton(AF_INET, "169.254.0.0", &lla);
- return ((in6_addr_get_mapped_ipv4(prefix) & htonl(0xffff0000)) == lla);
- }
-
- /* ipv6, link local range is "fe80::/10". */
- if (plen < 10) {
- return false;
- }
- return (((prefix->s6_addr[0] & 0xff) == 0xfe) &&
- ((prefix->s6_addr[1] & 0xc0) == 0x80));
-}
-
static bool
prefix_is_deny_listed(const struct smap *nb_options,
struct in6_addr *prefix,
diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index 1ad347419..55a081ab1 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -1331,3 +1331,25 @@ ovn_update_swconn_at(struct rconn *swconn, const char *target,
return notify;
}
+
+bool
+prefix_is_link_local(const struct in6_addr *prefix, unsigned int plen)
+{
+ if (IN6_IS_ADDR_V4MAPPED(prefix)) {
+ /* Link local range is "169.254.0.0/16". */
+ if (plen < 16) {
+ return false;
+ }
+ ovs_be32 lla;
+ inet_pton(AF_INET, "169.254.0.0", &lla);
+ return ((in6_addr_get_mapped_ipv4(prefix) & htonl(0xffff0000)) == lla);
+ }
+
+ /* ipv6, link local range is "fe80::/10". */
+ if (plen < 10) {
+ return false;
+ }
+ return (((prefix->s6_addr[0] & 0xff) == 0xfe) &&
+ ((prefix->s6_addr[1] & 0xc0) == 0x80));
+}
+
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index 3f956fb80..a4dd5b311 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -500,5 +500,6 @@ streq(const char *s1, const char *s2)
return !strcmp(s1, s2);
}
+bool prefix_is_link_local(const struct in6_addr *prefix, unsigned int plen);
#endif /* OVN_UTIL_H */
diff --git a/lib/stopwatch-names.h b/lib/stopwatch-names.h
index 660c653fb..87e5bff85 100644
--- a/lib/stopwatch-names.h
+++ b/lib/stopwatch-names.h
@@ -34,5 +34,6 @@
#define LR_NAT_RUN_STOPWATCH_NAME "lr_nat_run"
#define LR_STATEFUL_RUN_STOPWATCH_NAME "lr_stateful"
#define LS_STATEFUL_RUN_STOPWATCH_NAME "ls_stateful"
+#define ROUTES_SYNC_RUN_STOPWATCH_NAME "routes_sync"
#endif
diff --git a/northd/automake.mk b/northd/automake.mk
index 6566ad299..775422d43 100644
--- a/northd/automake.mk
+++ b/northd/automake.mk
@@ -34,6 +34,8 @@ northd_ovn_northd_SOURCES = \
northd/en-ls-stateful.h \
northd/en-sampling-app.c \
northd/en-sampling-app.h \
+ northd/en-routes-sync.c \
+ northd/en-routes-sync.h \
northd/inc-proc-northd.c \
northd/inc-proc-northd.h \
northd/ipam.c \
diff --git a/northd/en-routes-sync.c b/northd/en-routes-sync.c
new file mode 100644
index 000000000..bb61e0d51
--- /dev/null
+++ b/northd/en-routes-sync.c
@@ -0,0 +1,196 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include "openvswitch/vlog.h"
+#include "stopwatch.h"
+#include "northd.h"
+
+#include "en-routes-sync.h"
+#include "lib/stopwatch-names.h"
+#include "openvswitch/hmap.h"
+#include "ovn-util.h"
+
+VLOG_DEFINE_THIS_MODULE(en_routes_sync);
+
+static void
+routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
+ const struct sbrec_route_table *sbrec_route_table,
+ const struct hmap *parsed_routes);
+
+void
+*en_routes_sync_init(struct engine_node *node OVS_UNUSED,
+ struct engine_arg *arg OVS_UNUSED)
+{
+ return NULL;
+}
+
+void
+en_routes_sync_cleanup(void *data_ OVS_UNUSED)
+{
+}
+
+void
+en_routes_sync_run(struct engine_node *node, void *data_ OVS_UNUSED)
+{
+ struct routes_data *routes_data
+ = engine_get_input_data("routes", node);
+ const struct engine_context *eng_ctx = engine_get_context();
+ const struct sbrec_route_table *sbrec_route_table =
+ EN_OVSDB_GET(engine_get_input("SB_route", node));
+
+ stopwatch_start(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
+
+ routes_table_sync(eng_ctx->ovnsb_idl_txn, sbrec_route_table,
+ &routes_data->parsed_routes);
+
+ stopwatch_stop(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
+ engine_set_node_state(node, EN_UPDATED);
+}
+
+struct route_entry {
+ struct hmap_node hmap_node;
+
+ const struct sbrec_route *sb_route;
+ const struct sbrec_datapath_binding *sb_db;
+
+ char *logical_port;
+ char *ip_prefix;
+ char *type;
+ bool stale;
+};
+
+static struct route_entry *
+route_alloc_entry(struct hmap *routes,
+ const struct sbrec_datapath_binding *sb_db,
+ char *logical_port, char *ip_prefix, char *route_type)
+{
+ struct route_entry *route_e = xzalloc(sizeof *route_e);
+
+ route_e->sb_db = sb_db;
+ route_e->logical_port = xstrdup(logical_port);
+ route_e->ip_prefix = xstrdup(ip_prefix);
+ route_e->type = xstrdup(route_type);
+ route_e->stale = false;
+ uint32_t hash = uuid_hash(&sb_db->header_.uuid);
+ hash = hash_string(logical_port, hash);
+ hash = hash_string(ip_prefix, hash);
+ hmap_insert(routes, &route_e->hmap_node, hash);
+
+ return route_e;
+}
+
+static struct route_entry *
+route_lookup_or_add(struct hmap *route_map,
+ const struct sbrec_datapath_binding *sb_db,
+ char *logical_port, const struct in6_addr *prefix,
+ unsigned int plen, char *route_type)
+{
+ struct route_entry *route_e;
+ uint32_t hash;
+
+ char *ip_prefix = normalize_v46_prefix(prefix, plen);
+
+ hash = uuid_hash(&sb_db->header_.uuid);
+ hash = hash_string(logical_port, hash);
+ hash = hash_string(ip_prefix, hash);
+ HMAP_FOR_EACH_WITH_HASH (route_e, hmap_node, hash, route_map) {
+ if (!strcmp(route_e->type, route_type)) {
+ free(ip_prefix);
+ return route_e;
+ }
+ }
+
+ route_e = route_alloc_entry(route_map, sb_db,
+ logical_port, ip_prefix, route_type);
+ free(ip_prefix);
+ return route_e;
+}
+
+static void
+route_erase_entry(struct route_entry *route_e)
+{
+ free(route_e->logical_port);
+ free(route_e->ip_prefix);
+ free(route_e->type);
+ free(route_e);
+}
+
+static void
+routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
+ const struct sbrec_route_table *sbrec_route_table,
+ const struct hmap *parsed_routes)
+{
+ if (!ovnsb_txn) {
+ return;
+ }
+
+ struct hmap sync_routes = HMAP_INITIALIZER(&sync_routes);
+
+ const struct parsed_route *route;
+
+ struct route_entry *route_e;
+ const struct sbrec_route *sb_route;
+ SBREC_ROUTE_TABLE_FOR_EACH (sb_route, sbrec_route_table) {
+ route_e = route_alloc_entry(&sync_routes,
+ sb_route->datapath,
+ sb_route->logical_port,
+ sb_route->ip_prefix,
+ sb_route->type);
+ route_e->stale = true;
+ route_e->sb_route = sb_route;
+ }
+
+ HMAP_FOR_EACH (route, key_node, parsed_routes) {
+ if (route->is_discard_route) {
+ continue;
+ }
+ if (prefix_is_link_local(&route->prefix, route->plen)) {
+ continue;
+ }
+ if (!smap_get_bool(&route->od->nbr->options, "dynamic-routing",
+ false)) {
+ continue;
+ }
+ route_e = route_lookup_or_add(&sync_routes,
+ route->od->sb,
+ route->out_port->key,
+ &route->prefix,
+ route->plen,
+ "advertise");
+ route_e->stale = false;
+
+ if (!route_e->sb_route) {
+ const struct sbrec_route *sr = sbrec_route_insert(ovnsb_txn);
+ sbrec_route_set_datapath(sr, route_e->sb_db);
+ sbrec_route_set_logical_port(sr, route_e->logical_port);
+ sbrec_route_set_ip_prefix(sr, route_e->ip_prefix);
+ sbrec_route_set_type(sr, route_e->type);
+ route_e->sb_route = sr;
+ }
+ }
+
+ HMAP_FOR_EACH_POP (route_e, hmap_node, &sync_routes) {
+ /* `receive` routes are added by ovn-controller we should only read but
+ * not remove them */
+ if (strcmp(route_e->sb_route->type, "receive") &&
+ route_e->stale) {
+ sbrec_route_delete(route_e->sb_route);
+ }
+ route_erase_entry(route_e);
+ }
+ hmap_destroy(&sync_routes);
+}
+
diff --git a/northd/en-routes-sync.h b/northd/en-routes-sync.h
new file mode 100644
index 000000000..ecd41b0b9
--- /dev/null
+++ b/northd/en-routes-sync.h
@@ -0,0 +1,28 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef EN_ROUTES_SYNC_H
+#define EN_ROUTES_SYNC_H 1
+
+#include "lib/inc-proc-eng.h"
+
+/*struct routes_sync_data {
+ struct sset routes;
+};*/
+
+void *en_routes_sync_init(struct engine_node *, struct engine_arg *);
+void en_routes_sync_cleanup(void *data);
+void en_routes_sync_run(struct engine_node *, void *data);
+
+
+#endif /* EN_ROUTES_SYNC_H */
diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index ddc16428a..bc361ce72 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -42,6 +42,7 @@
#include "en-sampling-app.h"
#include "en-sync-sb.h"
#include "en-sync-from-sb.h"
+#include "en-routes-sync.h"
#include "unixctl.h"
#include "util.h"
@@ -103,7 +104,8 @@ static unixctl_cb_func chassis_features_list;
SB_NODE(fdb, "fdb") \
SB_NODE(static_mac_binding, "static_mac_binding") \
SB_NODE(chassis_template_var, "chassis_template_var") \
- SB_NODE(logical_dp_group, "logical_dp_group")
+ SB_NODE(logical_dp_group, "logical_dp_group") \
+ SB_NODE(route, "route")
enum sb_engine_node {
#define SB_NODE(NAME, NAME_STR) SB_##NAME,
@@ -162,6 +164,7 @@ static ENGINE_NODE(route_policies, "route_policies");
static ENGINE_NODE(routes, "routes");
static ENGINE_NODE(bfd, "bfd");
static ENGINE_NODE(bfd_sync, "bfd_sync");
+static ENGINE_NODE(routes_sync, "routes_sync");
void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
struct ovsdb_idl_loop *sb)
@@ -264,6 +267,9 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_bfd_sync, &en_route_policies, NULL);
engine_add_input(&en_bfd_sync, &en_northd, bfd_sync_northd_change_handler);
+ engine_add_input(&en_routes_sync, &en_routes, NULL);
+ engine_add_input(&en_routes_sync, &en_sb_route, NULL);
+
engine_add_input(&en_sync_meters, &en_nb_acl, NULL);
engine_add_input(&en_sync_meters, &en_nb_meter, NULL);
engine_add_input(&en_sync_meters, &en_sb_meter, NULL);
@@ -277,6 +283,7 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_lflow, &en_bfd_sync, NULL);
engine_add_input(&en_lflow, &en_route_policies, NULL);
engine_add_input(&en_lflow, &en_routes, NULL);
+ engine_add_input(&en_lflow, &en_routes_sync, NULL);
engine_add_input(&en_lflow, &en_global_config,
node_global_config_handler);
diff --git a/northd/northd.c b/northd/northd.c
index 0fb571f54..be1564b8b 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -11052,7 +11052,8 @@ route_hash(struct parsed_route *route)
}
static bool
-find_static_route_outport(struct ovn_datapath *od, const struct hmap *lr_ports,
+find_static_route_outport(const struct ovn_datapath *od,
+ const struct hmap *lr_ports,
const struct nbrec_logical_router_static_route *route, bool is_ipv4,
const char **p_lrp_addr_s, struct ovn_port **p_out_port);
@@ -11150,7 +11151,7 @@ parsed_route_add(const struct ovn_datapath *od,
new_pr->route_table_id = route_table_id;
new_pr->is_src_route = is_src_route;
new_pr->hash = route_hash(new_pr);
- new_pr->nbr = od->nbr;
+ new_pr->od = od;
new_pr->ecmp_symmetric_reply = ecmp_symmetric_reply;
new_pr->is_discard_route = is_discard_route;
if (!is_discard_route) {
@@ -11171,7 +11172,8 @@ parsed_route_add(const struct ovn_datapath *od,
}
static void
-parsed_routes_add_static(struct ovn_datapath *od, const struct hmap *lr_ports,
+parsed_routes_add_static(const struct ovn_datapath *od,
+ const struct hmap *lr_ports,
const struct nbrec_logical_router_static_route *route,
const struct hmap *bfd_connections,
struct hmap *routes, struct simap *route_tables,
@@ -11291,7 +11293,8 @@ parsed_routes_add_static(struct ovn_datapath *od, const struct hmap *lr_ports,
}
static void
-parsed_routes_add_connected(struct ovn_datapath *od, const struct ovn_port *op,
+parsed_routes_add_connected(const struct ovn_datapath *od,
+ const struct ovn_port *op,
struct hmap *routes)
{
for (int i = 0; i < op->lrp_networks.n_ipv4_addrs; i++) {
@@ -11320,14 +11323,14 @@ parsed_routes_add_connected(struct ovn_datapath *od, const struct ovn_port *op,
}
void
-build_parsed_routes(struct ovn_datapath *od, const struct hmap *lr_ports,
- const struct hmap *bfd_connections, struct hmap *routes,
- struct simap *route_tables,
- struct hmap *bfd_active_connections)
+build_parsed_routes(const struct ovn_datapath *od, const struct hmap *lr_ports,
+ const struct hmap *bfd_connections, struct hmap *routes,
+ struct simap *route_tables,
+ struct hmap *bfd_active_connections)
{
struct parsed_route *pr;
HMAP_FOR_EACH (pr, key_node, routes) {
- if (pr->nbr == od->nbr) {
+ if (pr->od == od) {
pr->stale = true;
}
}
@@ -11535,7 +11538,8 @@ build_route_match(const struct ovn_port *op_inport, uint32_t rtb_id,
/* Output: p_lrp_addr_s and p_out_port. */
static bool
-find_static_route_outport(struct ovn_datapath *od, const struct hmap *lr_ports,
+find_static_route_outport(const struct ovn_datapath *od,
+ const struct hmap *lr_ports,
const struct nbrec_logical_router_static_route *route, bool is_ipv4,
const char **p_lrp_addr_s, struct ovn_port **p_out_port)
{
diff --git a/northd/northd.h b/northd/northd.h
index eb669f734..77faab65d 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -714,7 +714,7 @@ struct parsed_route {
const struct nbrec_logical_router_static_route *route;
bool ecmp_symmetric_reply;
bool is_discard_route;
- const struct nbrec_logical_router *nbr;
+ const struct ovn_datapath *od;
bool stale;
enum route_source source;
char *lrp_addr_s;
@@ -744,7 +744,7 @@ void northd_indices_create(struct northd_data *data,
void route_policies_init(struct route_policies_data *);
void route_policies_destroy(struct route_policies_data *);
-void build_parsed_routes(struct ovn_datapath *, const struct hmap *,
+void build_parsed_routes(const struct ovn_datapath *, const struct hmap *,
const struct hmap *, struct hmap *, struct simap *,
struct hmap *);
uint32_t get_route_table_id(struct simap *, const char *);
diff --git a/ovn-nb.xml b/ovn-nb.xml
index a7d9d4444..dbe674f0b 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -2930,6 +2930,19 @@ or
option is not present the limit is not set and the zone limit is
derived from OvS default datapath limit.
+
+
+ If set to true
then this
+ can participate in dynamic routing with components outside of OVN.
+
+ It will synchronize all routes to the soutbound
+ table that are relevant for the
+ router. This includes:
+ * all "connected" routes implicitly created by networks associated with
+ this Logical Router
+ * all that are applied to
+ this Logical Router
+
diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema
index 73abf2c8d..22e43dc8a 100644
--- a/ovn-sb.ovsschema
+++ b/ovn-sb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Southbound",
- "version": "20.37.0",
- "cksum": "1950136776 31493",
+ "version": "20.38.0",
+ "cksum": "956398967 32154",
"tables": {
"SB_Global": {
"columns": {
@@ -617,6 +617,19 @@
"type": {"key": "string", "value": "string",
"min": 0, "max": "unlimited"}}},
"indexes": [["chassis"]],
+ "isRoot": true},
+ "Route": {
+ "columns": {
+ "datapath":
+ {"type": {"key": {"type": "uuid",
+ "refTable": "Datapath_Binding"}}},
+ "logical_port": {"type": "string"},
+ "ip_prefix": {"type": "string"},
+ "type": {"type": {"key": {"type": "string",
+ "enum": ["set", ["advertise",
+ "receive"]]},
+ "min": 1, "max": 1}}},
+ "indexes": [["datapath", "logical_port", "ip_prefix"]],
"isRoot": true}
}
}
diff --git a/ovn-sb.xml b/ovn-sb.xml
index 5285cae30..a65bd2cbb 100644
--- a/ovn-sb.xml
+++ b/ovn-sb.xml
@@ -5180,4 +5180,54 @@ tcp.flags = RST;
The set of variable values for a given chassis.
+
+
+
+ Each record represents a route thas is export from ovn or imported to ovn
+ using some dynamic routing logic outside of ovn.
+ It is populated by ovn-northd
based on the addresses, routes
+ and NAT Entries of a OVN_Northbound.Logical_Router_Port
.
+
+
+
+ The datapath belonging to the
+ OVN_Northbound.Logical_Router
that this route is valid
+ for.
+
+
+
+
+ If the type is advertise
then this is the logical_port
+ the router will send packets out.
+
+
+
+ If the type is receive
then this is the logical_port
+ the route was learned on.
+
+
+
+
+
+ IP prefix of this route (e.g. 192.168.100.0/24).
+
+
+
+
+
+ If the route is to be exported from OVN to the outside network or if
+ it is imported from the outside network.
+
+
+ -
+
advertise
: This route should be advertised to the
+ outside network.
+
+ -
+
receive
: This route has been learned from the outside
+ network.
+
+
+
+
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 4588a65c6..f1775c9c5 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -13828,3 +13828,56 @@ check_no_redirect
AT_CLEANUP
])
+
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([dynamic-routing - sync to sb])
+AT_KEYWORDS([dynamic-routing])
+ovn_start
+
+# adding a router - still nothing here
+check ovn-nbctl lr-add lr0
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true
+check_row_count Route 0
+datapath=$(ovn-sbctl --bare --columns _uuid list datapath_binding lr0)
+
+# adding a LRP adds a route entry for the associated network
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24
+check_row_count Route 1
+AT_CHECK([ovn-sbctl --columns ip_prefix,type --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+10.0.0.0/24
+advertise
+])
+
+# adding a second LRP adds an additional route entry
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 10.0.1.1/24
+check_row_count Route 2
+AT_CHECK([ovn-sbctl --columns ip_prefix,type --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+10.0.0.0/24
+advertise
+])
+AT_CHECK([ovn-sbctl --columns ip_prefix,type --bare find Route datapath=$datapath logical_port=lr0-sw1], [0], [dnl
+10.0.1.0/24
+advertise
+])
+
+# adding a static route adds an additional entry
+check ovn-nbctl --wait=sb lr-route-add lr0 192.168.0.0/24 10.0.0.10
+check_row_count Route 3
+check_row_count Route 2 logical_port=lr0-sw0
+check_row_count Route 1 logical_port=lr0-sw0 ip_prefix=192.168.0.0/24
+
+# removing the option:dynamic-routing removes all routes
+check ovn-nbctl --wait=sb remove Logical_Router lr0 option dynamic-routing
+check_row_count Route 0
+
+# and setting it again adds them again
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true
+check_row_count Route 3
+
+# removing the lrp used for the static route removes both route entries
+check ovn-nbctl --wait=sb lrp-del lr0-sw0
+check_row_count Route 1
+check_row_count Route 1 logical_port=lr0-sw1
+
+AT_CLEANUP
+])
From patchwork Tue Nov 26 14:38:09 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015484
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=cSmjpJbV;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=cSmjpJbV;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQGs4YdRz1yCv
for ; Wed, 27 Nov 2024 01:40:37 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id EE0A56FBB2;
Tue, 26 Nov 2024 14:40:35 +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 C-2b90QMxKzQ; Tue, 26 Nov 2024 14:40:29 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F17306FA98
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=cSmjpJbV;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=cSmjpJbV
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id F17306FA98;
Tue, 26 Nov 2024 14:40:08 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 33F12C08C1;
Tue, 26 Nov 2024 14:40:08 +0000 (UTC)
X-Original-To: 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 390A6C08A9
for ; Tue, 26 Nov 2024 14:39:58 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id A59F960BA2
for ; Tue, 26 Nov 2024 14:38:22 +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 86jITNlLsWFR for ;
Tue, 26 Nov 2024 14:38:21 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2607::625;
helo=eur02-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 41505605C7
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 41505605C7
Received: from EUR02-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur02on20625.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2607::625])
by smtp3.osuosl.org (Postfix) with ESMTPS id 41505605C7
for ; Tue, 26 Nov 2024 14:38:21 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=ICQcKWTFPIm5Np1Oz1VwQ4DQbFKVIG0GwM83D47Du/4yqNrfSbRi72cQDq1Tjmq6ZrutLl3ttCF2m+/EfWp+0AJqwb10dqWx9vRhwYYeb0KiKSaFAB8Rf8IFNnA5lh7ZSJ7Op1v0qcBqSYWHe3F3aXhc3rXfkeVLiUJy//AQgwsdjCCaeS0M0gNnPDtiY/5TxO+/lA2101cIwlyoW5TFLPhi1j7L0Ap4J0OrXK/WyRizE+j2H7tM6npRHbz0Z0g0UbBhmUBCjkqDUzmPSBHKcXalqdugCTACMvudWFyM+w4jlQo3VzxfYdAfoM0iRD9BAB5G53Lq6UiDhU/zfdY+tw==
ARC-Message-Signature: i=2; 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=iyh8ZVz/devpQV8sf46xzmI9Z98u0HrVLx3mVzrYsRc=;
b=Vrgou043/8cnSmImWGO4FrJLHZnqYRzC6uQxGXRpMn1OvdDMufmQZrpdlFSNEPUT9W19RzNITm/67vzhhoSDerb0jrAl+T3W6DpcGHOGVtl/yHmzUFvV3zZC9R7XjaYr72EDko4kKTKg2+d3Z5KIy/EN8x3msvYFSHc1Q/XeztsD+0H7cFkBDQgxRwBTBvkSgtAZ9qi+IOh1Jy26lhxH9A8+E0AThQGHQ1E8M4fS3LsZuR5Ao3xkYx80+wSZuMZvAjOp7Sk2s1Jp82dK+b2P2tfCbBH4JhOwRfQ0vRvLulfBfKqwfUnEK9vGwu96wsHTYI5qB46oqHrqa+Kb8UAuCA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=iyh8ZVz/devpQV8sf46xzmI9Z98u0HrVLx3mVzrYsRc=;
b=cSmjpJbVwUJ8/3z0GDgA+B/BadcqcykkdXZ8yy68mPfQpOueNdrf+41/Is/Qm1iOJvw+ksDcC3Yy4KQbxtCCweR2a3Yrhyvih0EVe/piYf6nxxGxDgSf9wY0WGruAebVgqhNAkpzvt5nlNfs0UoTBt6k8mRHOQqYZHSZgFUfk4ESw8rZZEz6Qkq6EK0b9wNmLO7bGGRpWnLuB5e4Twio9a1LxXVisfm4pXOZdQGWfGc302IjSiMFqwaj9hjkTQiozeS0KfFfYM3jOWvHt+nqb6D250yUZyYGzeE/JffNfrP1CXsuu5gFNoznu78AJTQZgsroANSW7UFMFPIkkWoefQ==
Received: from DUZPR01CA0326.eurprd01.prod.exchangelabs.com
(2603:10a6:10:4ba::25) by AS8PR10MB6529.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:20b:568::17) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:15 +0000
Received: from DB5PEPF00014B9C.eurprd02.prod.outlook.com
(2603:10a6:10:4ba:cafe::bb) by DUZPR01CA0326.outlook.office365.com
(2603:10a6:10:4ba::25) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.12 via Frontend Transport; Tue,
26 Nov 2024 14:38:14 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
DB5PEPF00014B9C.mail.protection.outlook.com (10.167.8.170) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:13 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:14
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8611854
X-ExclaimerImprintLatency: 6183214
X-ExclaimerImprintAction: f122ef00bad9407485c715fda7414170
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=JLXNMWCM0wNvTeGVkMr6WF2IdUnBs/QYvte5iTubJV80FmnMfmQ/LMwExKgkAf3sPfKmL4yqgAL7EiSqbFzhxp1H990JLvVzoxbSQXT8JRNdCwxPkifCxly92YL5p8HG3Owd4dnSEEvpxlGP0xA2f/R2nJKUk1BwL74JwFDmvIdLwy8FIkRLqYjZRttb7qiM+3z32onadjdAsh/w4kKWlRGgO896rm4uAK/ks06I3ExfdpZGocXNrT27BsbL1D428qv9TTsPDDRya+QBerf+Z5gd0abNrd/El1flQ9NOJW4sYixOVkwOdMtm3c8wz/s5v+ytfkLSHV+NI7KCLyngzg==
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=iyh8ZVz/devpQV8sf46xzmI9Z98u0HrVLx3mVzrYsRc=;
b=f6m1lUj9w+eY/ANo/yb4b3DzYJHo2lRnknG2wL862p/1ap4wZpWgeM+G5K/Vcpoc2PRVoy/YBUB7ljQPOK56iH7zYH2KyW+vtog+AhCE1k28t2yQuZPeRJYP++F0QMTNbEchLrbQUiG4Q5Q7+voaA75H/V8+UfBeLcrj4ivp/VQq2hTLK3IggNOa6zGw+aABZBAbbPMCgtKPlMCn9bBF1Tq1lTGLmDUsBr0lYowtNS21lycB5/T1/KMtrrvIi6CH7p3uzdACsQX4tVw1YG31aa1Xc3v9csZucivyikaG82a9zBHpKHSXhSItOmBTqr8W7Wbu8CErMPV2fP9gZYOwEA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=iyh8ZVz/devpQV8sf46xzmI9Z98u0HrVLx3mVzrYsRc=;
b=cSmjpJbVwUJ8/3z0GDgA+B/BadcqcykkdXZ8yy68mPfQpOueNdrf+41/Is/Qm1iOJvw+ksDcC3Yy4KQbxtCCweR2a3Yrhyvih0EVe/piYf6nxxGxDgSf9wY0WGruAebVgqhNAkpzvt5nlNfs0UoTBt6k8mRHOQqYZHSZgFUfk4ESw8rZZEz6Qkq6EK0b9wNmLO7bGGRpWnLuB5e4Twio9a1LxXVisfm4pXOZdQGWfGc302IjSiMFqwaj9hjkTQiozeS0KfFfYM3jOWvHt+nqb6D250yUZyYGzeE/JffNfrP1CXsuu5gFNoznu78AJTQZgsroANSW7UFMFPIkkWoefQ==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:11 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:11 +0000
Date: Tue, 26 Nov 2024 15:38:09 +0100
To: dev@openvswitch.org
Message-ID:
<4008ea1c9b092d796cb507758449874d2d22d15a.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|DB5PEPF00014B9C:EE_|AS8PR10MB6529:EE_
X-MS-Office365-Filtering-Correlation-Id: 7dd1e191-b882-4de5-f644-08dd0e27f5ab
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
SJqKlBAYb4cOwn6Z62CLHuDJ3Bw2hfCd1pFB6FOLmwbo+VH2xUA00cMHrjz1BqaUU1uoZWWy0EyCjk/SnP6y3SC1Bqc5k1rva0M9mxuRtY9gr0kxv1xr7/2Jf1rGHDEmfKNfof0WxJWUddZZXyasYYPeYapj6owDVegDQJTPaipEBoUVmIfTl1RghR+JN5PPdDq50YMtZx/hoRdBMjgN9UWi8nUzMoU0WCmutPSUFfA31AekVHuGNJ3yfDa23nEEDEBxM1s6JNa8aAMmg1BR7VmLXZGStJ+5X4LxP7drwmZgc1do7zFRF8KFR0dgWpvOxtHPnkBJ3IX7t6MnvLmpXUjIxWmyNrs5ukjUqwWOSXr79TrSdXD5kX8VUdXkS0ge5MSTXj3G1HrLx3toNYoSwMWWoWCYMszH4Uv86weSK3Khkb4OyUEPOSPUACOx6mebnFf8o25hvgcV8Hn+J6XczP/Bv1BQCOAteFInY+baZoKHiQ1ngyqrH50DBNxSX8b4r76rHH4FWgiXUg7mzNGZYqj8N/J6lxK3XbK9RiR5CzAEWMZqBivwKURadz/eJrw5NlsAtTkMPpPBk+Ot+KTcTqgi3ZVJDpdtmjuQbnGoYLUldGzHt+sevSStuOGVhfeYFSN5mFLBjKAK48CUiCO6wngrIKr3tgp99arC+/6dHtDPjJs9pHhyUy+RaqF8ox7UDUpJShuJU2F0KkHFq4nh/NsfoWemZPCXEPrH2NfTndU+cSKQk5FRC6Rm/4EGFKVkNsVqgkFDxlEBc39PtnJs0j7H4iIkBwM/BrnTuWMa2CcHDF5CAOxfDkoA7VORGnMWiTTIUZEWWUEsIUcsBq+e+eqF8kQe0uGCpq7iF0YTxUMMh3sjUsuAGX4c/oYUDM8kdnsWpo5e9KB5UcQqwVMkU1M2azM/9t8I0ie9Z58n1uJos9xS0AzqhuczlBKBJBYGBkfsJaLgt1iU39rSwEWb/pbz+o/eBLvZVSNFYNjPpYAxRz4ouMDrHp5eClzOI7Fs7gYe4P1N6UO9AHhxcK3wiQP0yqIgWdjuLb4g5MaSEl04hOA3exLFer2PuVVjc0coInn5JGWTEijK7OAb90ixdOeRHWKF0Sm0qx7TJkUWI0nXkKnHREDYdE5ADDCCJjQahvbCq9Xdd9AKTVA9MADHZVfgS2mJEawJ4L6kQu3pgSa3kDvrJMfZTJK745pCXwF1Y/oGiyHrS1fIJrGVxa0gk+hslEKfd7PJuGzgxkPcpQHFUg9BPceup7v62n5LEFTjOipGnVE1jy2gaVtDGMLwVja1g15iDD3kHstzjrfAySWjkaBo5w/6TGeEt6EIxVS3p89zkQi55gQgiOMcOf1cCw==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DB5PEPF00014B9C.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
53f68616-2756-4c8b-a1ed-08dd0e27f396
X-Microsoft-Antispam: BCL:0;
ARA:13230040|1800799024|14060799003|36860700013|376014|35042699022|82310400026;
X-Microsoft-Antispam-Message-Info:
Mkt71nZDxGzMz8D2Z6ZcZnlgM5aOK/DEIQpaAMMu8waO+iivkQ0Pu7EMTg1IlmmiMcGZfRz6QONKS3bvq9HXMnhq2wQupXGLa5v4HMmOYY3qmODH9Y/5brPVP/xU0kgRPj7kehVYSZmKsIdDX8BhHeLaWB+zb6Vm0V6EA3wiwWJ0/yb1oqfW+rWqyEAlMLj7lXJdh7jFj199Adqy1k1Ix79UKhAhV2qHt3hIXU/HotEjZiDRa12rGi+cTeAKp/6VWdaK+p8UvXZMH8fyk0Dne38HPVRfEEvYZyW+wH4IG60mP/HEDO1043+dyGGyWLNJGJScT0xPYBwbSH9QcWnkOkFLrIAEO/JOVn48Ecmqy7Dqkx+MsduqijGl1AN2T4V1ztoYwbN0PV3oskKjU+D1jDgdcK6QgJ35DzM1Ul9JcURh45VJi6xtwDvQu25vRRIGQieYYz8Fia/yb2HB7WjBqJgafI2YUEscMNccDzERHcI6jrHe3tjAn1ZbbVVBpKORZoEBRVMM2kVGGDFZyfeRLZ9avRQbX670tsUHTSqxd5Clx/7NxzVOXY/YVnt34prnqmYvAYpZC1QfKEXTzQM1Zokr52OpQrKDFPb5GHQnzGaE5ScanEeYMz6CW8oKJdEIxOA8nZpZOpxTAeyPaVRo9B1N8RhdKESWtL35y5AmSJG+no8R5Mb+TTlYr1aff5oALlTBeSJV8yiwcSEjbhH9hbrlZWKdjgDAeVgJir8FtZv5Fc7PsfL29TQvrL+yTLG5SrgLhIXoEQFUvE2hJdBTLEBjwyb/bTv96a6LfS0oAm8xqO2RhDkTOLteME6Q+tm/YO9Bm35gm4BhVp0I14WLmnkS6ebnrdsHexEJBiaii19jJ3EavLj0dwYOG/AYKPFoyb8cM61McpJ032wlYjfp0gSwSbIjkGSq9DGt+SVBNEq+cW+QpXIVKrkHCLowSSw+W0qrRFTTg7Oze0e7vDkL+qa05bM/44tnZDb/9Z7n16Jr3NEL4UdOteVysthrxmaXO5iAUU7c8LaI8kfFm5eRXFeKr9s7hgs83b8QFnXw6ueUp7SdUM3gkKTzTSWcZu1hBdUXomolu/z07jqdUOiTWMtkCmqQXHxpFeQamPj4Tp3NtlEMzWNJJHO0/YYZFAE9MI2hNWQEPFFD+6uoelceB47pYpKvDNk8GkhEKJ3nyRtvM+gb/vYdDH4qKkLCv9YFk8eV09CZEXC5/N6VAEOWSvfXGGiZMihaoGotZUg1KM66z5QhfklH+1EBfZ9nmbuI0wYWkSQMNAkpKkBpkbzbdNYGCdQjAYiXOmaR5RGv81reVdYHiI3r5suYSemQn8TqkXZkqbekTpYFYeb00V42jxxCX08TZFNUiaCPMH0N6EX4fHlYMcn5QNqwSIcG/LbnOfcpykvBTBDhrCaRuo+qfY9s0qtS9RKpTc4jz2IDVINepDFJehkDoJ8FKlpFn5Q1
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(1800799024)(14060799003)(36860700013)(376014)(35042699022)(82310400026);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:13.8116 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
7dd1e191-b882-4de5-f644-08dd0e27f5ab
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DB5PEPF00014B9C.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB6529
Subject: [ovs-dev] [PATCH ovn v3 12/33] northd: Add filtering which routes
to advertise.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
previously all routes of a logical router where announced. However in
some cases it makes more sense to only announce static or connected
routes. Therefor we add options to LR and LRP to define which routes to
advertise.
Signed-off-by: Felix Huettner
---
NEWS | 3 ++
northd/en-routes-sync.c | 18 ++++++++++
ovn-nb.xml | 78 +++++++++++++++++++++++++++++++++++++----
tests/ovn-northd.at | 59 ++++++++++++++++++++++++++++++-
4 files changed, 150 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 5e266fed8..3961aa652 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ Post v24.09.0
- Add the option "dynamic-routing" to Logical Routers. If set to true all
static and connected routes attached to the router are shared to the
southbound "Route" table for sharing outside of OVN.
+ The routes can furthe be filtered by setting `dynamic-routing-connected`
+ and `dynamic-routing-static` on the LR or LRP. The LRP settings overwrite
+ the LR settings for all routes using this interface as an exit.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/northd/en-routes-sync.c b/northd/en-routes-sync.c
index bb61e0d51..581f21b8e 100644
--- a/northd/en-routes-sync.c
+++ b/northd/en-routes-sync.c
@@ -15,6 +15,7 @@
#include
#include "openvswitch/vlog.h"
+#include "smap.h"
#include "stopwatch.h"
#include "northd.h"
@@ -128,6 +129,13 @@ route_erase_entry(struct route_entry *route_e)
free(route_e);
}
+static bool
+get_nbrp_or_nbr_option(const struct ovn_port *op, const char *key)
+{
+ return smap_get_bool(&op->nbrp->options, key,
+ smap_get_bool(&op->od->nbr->options, key, false));
+}
+
static void
routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route_table *sbrec_route_table,
@@ -164,6 +172,16 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
false)) {
continue;
}
+ if (route->source == ROUTE_SOURCE_CONNECTED &&
+ !get_nbrp_or_nbr_option(route->out_port,
+ "dynamic-routing-connected")) {
+ continue;
+ }
+ if (route->source == ROUTE_SOURCE_STATIC &&
+ !get_nbrp_or_nbr_option(route->out_port,
+ "dynamic-routing-static")) {
+ continue;
+ }
route_e = route_lookup_or_add(&sync_routes,
route->od->sb,
route->out_port->key,
diff --git a/ovn-nb.xml b/ovn-nb.xml
index dbe674f0b..75fe40c01 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -2935,13 +2935,45 @@ or
If set to true
then this
can participate in dynamic routing with components outside of OVN.
- It will synchronize all routes to the soutbound
- table that are relevant for the
- router. This includes:
- * all "connected" routes implicitly created by networks associated with
- this Logical Router
- * all that are applied to
- this Logical Router
+ Users will need to use the following settings to opt into individual
+ routes types that should be advertised. See:
+ *
+ *
+ *
+ *
+
+
+
+ Only relevant if is set to true
.
+
+ If this is true
as well then northd will synchronize all
+ "connected" routes to the southbound
+ table. "Connected" here means routes implicitly created by networks
+ associated with the LRPs.
+
+ This value can be overwritten on a per LRP basis using
+ .
+
+
+
+ Only relevant if is set to true
.
+
+ If this is true
as well then northd will synchronize all
+ to the southbound
+ table.
+
+ This value can be overwritten on a per LRP basis using
+ .
@@ -3641,6 +3673,38 @@ or
option.
+
+
+ Only relevant if on the respective Logical_Router is set
+ to true
.
+
+ If this is true
as well then northd will synchronize all
+ "connected" routes associated with this LRP to the southbound
+ table. "Connected" here means routes
+ implicitly created by network associated with this LRP.
+
+ If not set the value from will be
+ used.
+
+
+
+ Only relevant if on the respective Logical_Router is set
+ to true
.
+
+ If this is true
as well then northd will synchronize all
+ to the southbound
+ table that use this LRP as an outgoin
+ interface.
+
+ If not set the value from will be
+ used.
+
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index f1775c9c5..9b786bc1f 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -13836,7 +13836,9 @@ ovn_start
# adding a router - still nothing here
check ovn-nbctl lr-add lr0
-check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true \
+ option:dynamic-routing-connected=true \
+ option:dynamic-routing-static=true
check_row_count Route 0
datapath=$(ovn-sbctl --bare --columns _uuid list datapath_binding lr0)
@@ -13881,3 +13883,58 @@ check_row_count Route 1 logical_port=lr0-sw1
AT_CLEANUP
])
+
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([dynamic-routing - sync to sb filtering])
+AT_KEYWORDS([dynamic-routing])
+ovn_start
+
+# we start with announcing everything on a lr with 2 lrps and 2 static routes
+check ovn-nbctl lr-add lr0
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true \
+ option:dynamic-routing-connected=true \
+ option:dynamic-routing-static=true
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 10.0.1.1/24
+check ovn-nbctl --wait=sb lr-route-add lr0 192.168.0.0/24 10.0.0.10
+check ovn-nbctl --wait=sb lr-route-add lr0 192.168.1.0/24 10.0.1.10
+check_row_count Route 4 type=advertise
+datapath=$(ovn-sbctl --bare --columns _uuid list datapath_binding lr0)
+
+# disabeling connected routes just keeps the static ones
+check ovn-nbctl --wait=sb remove Logical_Router lr0 option dynamic-routing-connected
+check_row_count Route 2 type=advertise
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+192.168.0.0/24
+])
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw1], [0], [dnl
+192.168.1.0/24
+])
+
+# enabeling it on lr0-sw0 will just bring this one route back
+check ovn-nbctl --wait=sb set Logical_Router_Port lr0-sw0 option:dynamic-routing-connected=true
+check_row_count Route 3 type=advertise
+check_row_count Route 2 type=advertise logical_port=lr0-sw0
+check_row_count Route 1 type=advertise logical_port=lr0-sw0 ip_prefix=10.0.0.0/24
+check_row_count Route 1 type=advertise logical_port=lr0-sw0 ip_prefix=192.168.0.0/24
+
+# disabeling static routes just keeps the one explicit connected route
+check ovn-nbctl --wait=sb remove Logical_Router lr0 option dynamic-routing-static
+check_row_count Route 1 type=advertise
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+10.0.0.0/24
+])
+
+# enabeling static routes on the LR, but disabeling them on lr0-sw0 also works
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing-static=true
+check ovn-nbctl --wait=sb set Logical_Router_Port lr0-sw0 option:dynamic-routing-static=false
+check_row_count Route 2 type=advertise
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+10.0.0.0/24
+])
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw1], [0], [dnl
+192.168.1.0/24
+])
+
+AT_CLEANUP
+])
From patchwork Tue Nov 26 14:38:11 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015501
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=DUULML5K;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=DUULML5K;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
(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 4XyQJF15PBz1yCv
for ; Wed, 27 Nov 2024 01:41:49 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 549CD853E4;
Tue, 26 Nov 2024 14:41:47 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id fyJ4rQ08oZlU; Tue, 26 Nov 2024 14:41:37 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 73E4C854F2
Authentication-Results: smtp1.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=DUULML5K;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=DUULML5K
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp1.osuosl.org (Postfix) with ESMTPS id 73E4C854F2;
Tue, 26 Nov 2024 14:40:42 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 28920C08BE;
Tue, 26 Nov 2024 14:40:42 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 1BA9DC08C1
for ; Tue, 26 Nov 2024 14:40:37 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 8DD0A4EC42
for ; Tue, 26 Nov 2024 14:38:40 +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 9_zfScXhUm1V for ;
Tue, 26 Nov 2024 14:38:38 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2606::619;
helo=eur02-am0-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 6E9774B530
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6E9774B530
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=DUULML5K;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=DUULML5K
Received: from EUR02-AM0-obe.outbound.protection.outlook.com
(mail-am0eur02on20619.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2606::619])
by smtp4.osuosl.org (Postfix) with ESMTPS id 6E9774B530
for ; Tue, 26 Nov 2024 14:38:36 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=iv3ojambil1bVkBWcQVU0HfZm1RAZArFbFJfrpVa0S7bV7i3sZSsT3OoKWa+2mlkKHz2J40xEWRVmFzCVv1wKAgG4cxc+UV7gZ8ZpBRa3dHqKeocjjTOI2jopMzjaL8Ac8Ajsqs8wWet6kjRi8By0p3f7tA2XRb0rCt6Zh1FpUJgw9Ax+Mdm9ytB7TCTIGeAgkjwMuCioURMtMjGEjO4b27GJjZKBWwjXXl/fUJ5ePsoh9MCuLviiVEOudVOz6i8qotjSEI8oNorDQriRw5E4eI4XGIlbIQr1KDFiK3HJkWbJeUGW9bdp39tzIbifNsHN/ZHJ8Ns858lcmkAaR1EfA==
ARC-Message-Signature: i=2; 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=XH2zp2Qj+R6+RYNd41EcMgHNyTRHL4tiCHZOzByajeI=;
b=x7Z0PU3XZtCIdZwQJFZvbyWyXEqSirK3QXC2UORCQojFNvxIZ+/N9pFa3y0FoXCWwgPQA/39BZBcZY0azNvOtWh8WeFwQcq0CgUqqZXEKrUQNa18YXhSYLKHZvEpkaka3Z1yoKv21HBpRILgrmLqFVQU3UhIL1WvPrc/2A7ncDFkRha7cahuO0XCc9ZT59er8LgitQ96SoewT5g0OwXIqgQ3eXXhXnnX1AmzDEgNMpoWZGmSpnyW9dxZMHkcIElga7O80zVr7LhSNxxyz0GLIvifL13cI3bS+rlsx92+uxLCumglYzcMOCKZsPnb0FKlX6MQbzs0PYsTkTCizXITZw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=XH2zp2Qj+R6+RYNd41EcMgHNyTRHL4tiCHZOzByajeI=;
b=DUULML5KkhNGe3MPY9vnyL/nWE1PgLHn2vGZBTfg/ncW66MG38qpBX1DmKD6lvcdttFYtyDvdsHQ/uDlS6Osu0Ka1/pJXyVJpVMq9WOmqHf7mXnGKBv9K02H49AnckUs5II0GDLaOWlkLeW0xGmiXEDAPEW5fKUoTcHUEjPttsdAmDzFXo4ePpjvPdi3SnzC/4QLZOK1sECOCxds2CPJ2qpBPEmVId4DIJpWMPIDF1pSkKA2pVLYJqhsOZrnoEtJWW/HIuEc2pm9I3kJIl6nBnyrRP6c7qR0RNNE9enj70V5l5erlw1qUjbtF97z7eqB7p8uX90wtvRT0akDyoRn2w==
Received: from AS4P195CA0032.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:65a::6)
by PAVPR10MB7356.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:31f::5) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:19 +0000
Received: from AM4PEPF00025F97.EURPRD83.prod.outlook.com
(2603:10a6:20b:65a:cafe::96) by AS4P195CA0032.outlook.office365.com
(2603:10a6:20b:65a::6) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:19 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
AM4PEPF00025F97.mail.protection.outlook.com (10.167.16.6) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8230.0 via Frontend Transport; Tue, 26 Nov 2024 14:38:17 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:18
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 12586477
X-ExclaimerImprintLatency: 9221643
X-ExclaimerImprintAction: f122c510ec6747b7a898b4dca775c2fc
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=HcUIUbbThlkZApmW+qUf7Ji4pMpzoHf/wHshw6mYO+22dIdQxwQHHDXR1LKeWGpjgPJbu5K7+xKg7MrewvMNa81O4P1noWCcMMjQQDotLpY+buAnCAyPbQ18DVa5Cyf2faG7is5roxw1rpFZ0v6wDFzqyFguxkEoW3niMOvKXlPo6PK6ulQxmXnCpGIdYXhow5fmyvHUB+xN3nw6CUXdCkpmCj1KnEvhqRf7XxGcfW2tvS8Ld5M1lUTvDt7DYR/uJFr/Dbe05eQIdTLPFsIxebpQq+Lh2Spo9zMTHyL6IZVhxovj9nQd06CJ44WMDcMAJ0wKVAVzSyjtQcuA7Cnl1A==
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=XH2zp2Qj+R6+RYNd41EcMgHNyTRHL4tiCHZOzByajeI=;
b=HSUMGwoSjSptXGT/pIj/ELTP1X023VW4V5z3b+z2B8N92lOfy9+fs/c6wlBKZ8LOe4IiNtfWbCloe3aBo5lQQXvtFAVUsOAYF94GpYW9AG0D//QKfpQ5OVOz3S0eOX9m8hgwsJcEGCvlhuKExAGv2eyG5GB/k19seNxIQ9b5iF1FWEgK5BqNq74ZYteHRzEsKULQ7P/E1XRIxydunn1RRhag+xdTKVS4PT7uqa696LqM3/Yo0OqBrZc5bonBsiwHEtWctH8t5yc+gOWEToq3vyknlcmQJ34VomFUElfHK+2iVZ1+V6hG5Rmrxsd3ZHYAB/+QhX/droyJ7h7qEG5yGQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=XH2zp2Qj+R6+RYNd41EcMgHNyTRHL4tiCHZOzByajeI=;
b=DUULML5KkhNGe3MPY9vnyL/nWE1PgLHn2vGZBTfg/ncW66MG38qpBX1DmKD6lvcdttFYtyDvdsHQ/uDlS6Osu0Ka1/pJXyVJpVMq9WOmqHf7mXnGKBv9K02H49AnckUs5II0GDLaOWlkLeW0xGmiXEDAPEW5fKUoTcHUEjPttsdAmDzFXo4ePpjvPdi3SnzC/4QLZOK1sECOCxds2CPJ2qpBPEmVId4DIJpWMPIDF1pSkKA2pVLYJqhsOZrnoEtJWW/HIuEc2pm9I3kJIl6nBnyrRP6c7qR0RNNE9enj70V5l5erlw1qUjbtF97z7eqB7p8uX90wtvRT0akDyoRn2w==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:12 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:12 +0000
Date: Tue, 26 Nov 2024 15:38:11 +0100
To: dev@openvswitch.org
Message-ID:
<3584f6d234e1022b31b0a7adae525e90805c3719.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0107.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::17) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AM4PEPF00025F97:EE_|PAVPR10MB7356:EE_
X-MS-Office365-Filtering-Correlation-Id: e7cf9d3a-49c8-4504-1a2e-08dd0e27f7e5
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
NCECgsliFetI5QVpCtM4su3nYyg7qjofjBANNubKg1MYpEL/kYGJHYVJ1GWmVSvnS4BBdZpPGzsuhWDyDLmQ4ki+wc2i52p3FLaxiyvQsNZP8Ajq0Z3ubhAgifIdeiZfjLwDzQLo/86t69lRBMnIQtzvs/zBapAh8PpPNwtO43yzBQIE3mzbyZo5IHUL2gvKn8DFTr5Q80b5Fr9u9o5Q+Ondgv7biZKVcXKqZ7b2l0C/RQTvCsBouxEoUH1KGXTx/uembOs9jtvP1w9t+phOa5jSqJOABjBHvPtUw6nCJM3XnpifJJ5bqJHkgAIuwlKEd1o6LVQqkgtzSpZnXSSnATzUxMs0GDnXAmzjK0b69WrL1amYONTacZNvUZUuUvwr8ejlPUhtBJK9ZV/BrZ2V8NRCV0jaDeGxmYzi2k9hQWZxRU+gSDny3qzyGKxIC9zcgWLctzQEp/JdzMyZI1v/hK/OVUIXDnTmRGE/LVzqaBYSTGs1cgBZkbVIInqrRVqhs8i/oYqkk7ZN7wDUhYX93rceIl+77dcknHQnzqQoYzNBIvMT9Mox5bOTjMQxpKjKiXRViNZ7TEb/0ZUzSgNhWtfrZlUurDs15lLcHkTub1kr1EMNkjOejjfThawGQ/DwzotkZ+NCjdNMjjydAHqrF48UVOVQ2cui7XzM4utftvhML+oW93VEWetUOQX8zUu3WlXQuDm9lJSMpIpp4n6WjMvl0WpaNFo80pUrZHWfodHVq1QGiyUoxlv6CEguowazb8vHtQuf9kGk4tEFKEtn+3Bz8cEL0sZtgcaag+OuNzpxnx2JrmuVwfWRTHHY5R1DlV9sqFUJRkQVy1rSlwsHS9nYUnkbhKX0bQ2v0pjN2H8AQ0AJ7tgbrF+WZPV/fFC4fwQa6sf1oMdtgehHiJrvxR8vbT6IyMO6JqZ1EhGoM8B5+U6vJ2h9DkZ7j7M+2a0DKDj4UrezfkQhdqSuWx30CLKv3/nYSV6lkX6fz6pZEBnOClAVlKYHwWQ/uuCVjjT9lw8NbWTKlTtDVU3R0Y2pzDpV8iXw6IB0DV3pLnrQPVJAE6RaPvC6vA+x64Cxd87SUK6yFSXG0b6Nf+Hw3H2jJhIX9+FZvtIA/LhVZr7HAfRyR0IYVgGkb6R0x+bSLqDlxBxN1W0HiOqXXz94BwsG7xULnjkPgpmCzp5CKKkyGGjyO9zqcdiQ3YykHRDbh12xGExDVmhUrw/rAmD5I1EuFk9EVyvRjHBW3MSKngfLluR3Di4inWhVQMVy8xNC7UpUXrXnlOXeJCOblNuD1coqbyANYWsCpzQJ4XrILGQ7xaqs2PRiteGPA6DsBi2O3z7Uwk71zdlo6fYyhypC+ciqsQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM4PEPF00025F97.EURPRD83.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
5ba81071-29ef-4661-1da4-08dd0e27f492
X-Microsoft-Antispam: BCL:0;
ARA:13230040|1800799024|35042699022|82310400026|36860700013|376014|14060799003;
X-Microsoft-Antispam-Message-Info:
iF5CuWN6zpsUB829D0NE70t1qpeCNv/Ye3T0vpPFqHCZ+u/hlyzDui61cXEozDlE2/glK6eW7f+9u5sohQ4J0/UsJyw+K9FfDoOaYUeAs28bhscZVfpxVKX/BpUJ7HTS4biWg/lstJFthdoxz4BmswUhoC5dae0zp2T/Vc3p8Gb7BdornC1tbwEliq1WaQ6MsM+oQmF2S3guqc3q9q1Enrp8tEo6OecZmh6sF2qfiXjZawiidgfBn22Oijq0Nc4L2ZeX3wrWPIXwhmFx01BrSWevZDoDM4GSU88a0IVHBe/Mi4yweMKKXzAQQfZPuwm4VI8SAiQKPCdkDc2qqgCPIX2v1HKTNcKYMO/Go9fcdgZCVdp6Nq5yDE1f/c+yAasn71dWWd3hbEjRzOthAVQutsIU9i1TM1ME5dfagbgSc4hUDKhFpvbMgeSbRNyJuDQbGxVhBz9aUX7DXrdASVs5B9/rZ41C/DrtscjBzaVXjPJixhlQOA3OKSV66xBPbQllOu9keEpeO7fwphr9fhTJSsHNvkUrPQN0ic/7ZK3Kv5P3Mcw0iqL4LbpRuvxYf3bErTmNR586hrn5g06IkAbaoRjOLKGHlvJd41A71YfwbReF0UVix7pu0kiWcXXCLe1DmjehiXAcKQj8GXE94MXjGQeVZEfaYLa70UxRE5RaLB8bJq6T+3DlOYAXBO0830YA8CdTBwOUNXFE1A6Cv7RjhdFa1z7IOlzL605juoifTx5XhdBq8L4293tX8Fliaa00rlJcS6Gx3p4gL3gAofLHdsEeBK2HoFTfofwdL6tKesr/T+uDVjjmYbpOQax7vImfwnjel9S9VLhTkirjrxXxp8OlkbEGAEUCntXAFqU0C+xu/KQgv9t6YsfwQ1yCWwMLwu5DCDlRNsSOUqjus1J6AxtpgwERvFtwtz+P/rMN96l2FTj4V0c9rkQveOx8uS4t9CTdP/C55ht9swcTQ6SEvbKuRKMarGDa+GnWEHZeTXmUCrT5Ts1S5uuK5lkuQtgSeh5iat7X/uML9vfreIIJxAU7DtCyfjTjVMBWCMqB30dOREbT+/yw7AyirJDZobhJMp7WU20AYvHqBUtSbPMFGCDLA2TjnQ7lgjm8KUEJhy+5A+Rxfrzs3nB4lyR/4Riw8dxyH8TuO4kVN5nQYvh5JXt9QH/CLj662jQpP4GxyRqM0YJZRfxn8X1bPDc8pi6nvHa7lDagkRbEtlxPmfAz6adiU1Id6Wh6JeU/eCLahILrJ3uyBoo3FUKsMa4sRlFCI6OuFyT4GOVDYBpJwgI1AE5mQTTu7auA4Ql/AJYRXWzn3it7qhtL0isryqCLY9+fvK1T2YXAWrcEfPpcnIkWgg65m/fyXQUKJdyX8GQOy1QP0utxb7nUnl7TCU8BzR9mHwDja3sm2lE4knAzdaG59vYo6HPwenXo9ftAORkWl5AGefLpB9tYWVgQugpqXUHs
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(1800799024)(35042699022)(82310400026)(36860700013)(376014)(14060799003);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:17.1978 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
e7cf9d3a-49c8-4504-1a2e-08dd0e27f7e5
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM4PEPF00025F97.EURPRD83.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR10MB7356
Subject: [ovs-dev] [PATCH ovn v3 13/33] northd: Handle learned routes.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
here we expand the previous routes-sync engine node to not only
advertise routes to the southbound table, but also learn received routes
from this table.
These routes are then passed to the same logic that connected and static
routes are using for flow generation.
However we prioritize these routes lower than connected or static routes
as information in cluster (for the same prefix length) should always be
more correct then learned routes.
This is also consistent with the behaviour of phyiscal routers.
Signed-off-by: Felix Huettner
---
NEWS | 4 +
northd/en-lflow.c | 4 +-
northd/en-routes-sync.c | 157 +++++++++++++++++++++++++-
northd/en-routes-sync.h | 6 +-
northd/inc-proc-northd.c | 2 +
northd/northd.c | 232 +++++++++++++++++++++++----------------
northd/northd.h | 31 +++++-
ovn-sb.ovsschema | 5 +-
ovn-sb.xml | 11 ++
tests/ovn-northd.at | 133 ++++++++++++++++++----
10 files changed, 458 insertions(+), 127 deletions(-)
diff --git a/NEWS b/NEWS
index 3961aa652..efb42b32b 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,10 @@ Post v24.09.0
The routes can furthe be filtered by setting `dynamic-routing-connected`
and `dynamic-routing-static` on the LR or LRP. The LRP settings overwrite
the LR settings for all routes using this interface as an exit.
+ - Allow Logical Routers to dynamically learn routes from outside the fabric.
+ Routes entered into the "Route" table in the southbound database will be
+ learned by the respective LR. They are included in the route table with
+ a lower priority than static routes.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/northd/en-lflow.c b/northd/en-lflow.c
index fa1f0236d..8995f0300 100644
--- a/northd/en-lflow.c
+++ b/northd/en-lflow.c
@@ -46,6 +46,8 @@ lflow_get_input_data(struct engine_node *node,
engine_get_input_data("bfd_sync", node);
struct routes_data *routes_data =
engine_get_input_data("routes", node);
+ struct routes_sync_data *routes_sync_data =
+ engine_get_input_data("routes_sync", node);
struct route_policies_data *route_policies_data =
engine_get_input_data("route_policies", node);
struct port_group_data *pg_data =
@@ -82,7 +84,7 @@ lflow_get_input_data(struct engine_node *node,
lflow_input->lb_datapaths_map = &northd_data->lb_datapaths_map;
lflow_input->svc_monitor_map = &northd_data->svc_monitor_map;
lflow_input->bfd_ports = &bfd_sync_data->bfd_ports;
- lflow_input->parsed_routes = &routes_data->parsed_routes;
+ lflow_input->parsed_routes = &routes_sync_data->parsed_routes;
lflow_input->route_tables = &routes_data->route_tables;
lflow_input->route_policies = &route_policies_data->route_policies;
diff --git a/northd/en-routes-sync.c b/northd/en-routes-sync.c
index 581f21b8e..ed23c82f4 100644
--- a/northd/en-routes-sync.c
+++ b/northd/en-routes-sync.c
@@ -29,33 +29,86 @@ VLOG_DEFINE_THIS_MODULE(en_routes_sync);
static void
routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route_table *sbrec_route_table,
- const struct hmap *parsed_routes);
+ const struct hmap *parsed_routes,
+ const struct hmap *lr_ports,
+ const struct ovn_datapaths *lr_datapaths,
+ struct hmap *parsed_routes_out);
+
+static void
+routes_sync_init(struct routes_sync_data *data)
+{
+ hmap_init(&data->parsed_routes);
+}
+
+static void
+routes_sync_destroy(struct routes_sync_data *data)
+{
+ struct parsed_route *r;
+ HMAP_FOR_EACH_POP (r, key_node, &data->parsed_routes) {
+ parsed_route_free(r);
+ }
+ hmap_destroy(&data->parsed_routes);
+}
+
+bool
+routes_sync_northd_change_handler(struct engine_node *node,
+ void *data OVS_UNUSED)
+{
+ struct northd_data *northd_data = engine_get_input_data("northd", node);
+ if (!northd_has_tracked_data(&northd_data->trk_data)) {
+ return false;
+ }
+
+ /* This node uses the below data from the en_northd engine node.
+ * See (lr_stateful_get_input_data())
+ * 1. northd_data->lr_datapaths
+ * 2. northd_data->lr_ports
+ * This data gets updated when a logical router or logical router port
+ * is created or deleted.
+ * Northd engine node presently falls back to full recompute when
+ * this happens and so does this node.
+ * Note: When we add I-P to the created/deleted logical routers or
+ * logical router ports, we need to revisit this handler.
+ */
+ return true;
+}
void
*en_routes_sync_init(struct engine_node *node OVS_UNUSED,
struct engine_arg *arg OVS_UNUSED)
{
- return NULL;
+ struct routes_sync_data *data = xzalloc(sizeof *data);
+ routes_sync_init(data);
+ return data;
}
void
-en_routes_sync_cleanup(void *data_ OVS_UNUSED)
+en_routes_sync_cleanup(void *data)
{
+ routes_sync_destroy(data);
}
void
-en_routes_sync_run(struct engine_node *node, void *data_ OVS_UNUSED)
+en_routes_sync_run(struct engine_node *node, void *data)
{
+ routes_sync_destroy(data);
+ routes_sync_init(data);
+
+ struct routes_sync_data *routes_sync_data = data;
struct routes_data *routes_data
= engine_get_input_data("routes", node);
const struct engine_context *eng_ctx = engine_get_context();
const struct sbrec_route_table *sbrec_route_table =
EN_OVSDB_GET(engine_get_input("SB_route", node));
+ struct northd_data *northd_data = engine_get_input_data("northd", node);
stopwatch_start(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
routes_table_sync(eng_ctx->ovnsb_idl_txn, sbrec_route_table,
- &routes_data->parsed_routes);
+ &routes_data->parsed_routes,
+ &northd_data->lr_ports,
+ &northd_data->lr_datapaths,
+ &routes_sync_data->parsed_routes);
stopwatch_stop(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
engine_set_node_state(node, EN_UPDATED);
@@ -136,10 +189,94 @@ get_nbrp_or_nbr_option(const struct ovn_port *op, const char *key)
smap_get_bool(&op->od->nbr->options, key, false));
}
+static void
+parse_route_from_sbrec_route(struct hmap *parsed_routes_out,
+ const struct hmap *lr_ports,
+ const struct hmap *lr_datapaths,
+ const struct sbrec_route *route)
+{
+ const struct ovn_datapath *od = ovn_datapath_from_sbrec(
+ NULL, lr_datapaths, route->datapath);
+
+ /* Verify that the next hop is an IP address with an all-ones mask. */
+ struct in6_addr *nexthop = xmalloc(sizeof(*nexthop));
+ unsigned int plen;
+ if (!ip46_parse_cidr(route->nexthop, nexthop, &plen)) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "bad 'nexthop' %s in learned route "
+ UUID_FMT, route->nexthop,
+ UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
+ return;
+ }
+ if ((IN6_IS_ADDR_V4MAPPED(nexthop) && plen != 32) ||
+ (!IN6_IS_ADDR_V4MAPPED(nexthop) && plen != 128)) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "bad next hop mask %s in learned route "
+ UUID_FMT, route->nexthop,
+ UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
+ return;
+ }
+
+ /* Parse ip_prefix */
+ struct in6_addr prefix;
+ if (!ip46_parse_cidr(route->ip_prefix, &prefix, &plen)) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "bad 'ip_prefix' %s in learned route "
+ UUID_FMT, route->ip_prefix,
+ UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
+ return;
+ }
+
+ /* Verify that ip_prefix and nexthop have same address familiy. */
+ if (IN6_IS_ADDR_V4MAPPED(&prefix) != IN6_IS_ADDR_V4MAPPED(nexthop)) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "Address family doesn't match between 'ip_prefix'"
+ " %s and 'nexthop' %s in learned route "UUID_FMT,
+ route->ip_prefix, route->nexthop,
+ UUID_ARGS(&route->header_.uuid));
+ free(nexthop);
+ return;
+ }
+
+ /* Verify that ip_prefix and nexthop are on the same network. */
+ const char *lrp_addr_s = NULL;
+ struct ovn_port *out_port = NULL;
+ if (!find_route_outport(lr_ports, route->logical_port,
+ route->ip_prefix, route->nexthop,
+ IN6_IS_ADDR_V4MAPPED(&prefix),
+ false,
+ &out_port, &lrp_addr_s)) {
+ free(nexthop);
+ return;
+ }
+
+ parsed_route_add(
+ od,
+ nexthop,
+ prefix,
+ plen,
+ false,
+ lrp_addr_s,
+ out_port,
+ 0,
+ false,
+ false,
+ ROUTE_SOURCE_LEARNED,
+ &route->header_,
+ parsed_routes_out
+ );
+}
+
static void
routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route_table *sbrec_route_table,
- const struct hmap *parsed_routes)
+ const struct hmap *parsed_routes,
+ const struct hmap *lr_ports,
+ const struct ovn_datapaths *lr_datapaths,
+ struct hmap *parsed_routes_out)
{
if (!ovnsb_txn) {
return;
@@ -152,6 +289,12 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
struct route_entry *route_e;
const struct sbrec_route *sb_route;
SBREC_ROUTE_TABLE_FOR_EACH (sb_route, sbrec_route_table) {
+ if (!strcmp(sb_route->type, "receive")) {
+ parse_route_from_sbrec_route(parsed_routes_out, lr_ports,
+ &lr_datapaths->datapaths,
+ sb_route);
+ }
+
route_e = route_alloc_entry(&sync_routes,
sb_route->datapath,
sb_route->logical_port,
@@ -162,6 +305,8 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
}
HMAP_FOR_EACH (route, key_node, parsed_routes) {
+ hmap_insert(parsed_routes_out, &parsed_route_clone(route)->key_node,
+ parsed_route_hash(route));
if (route->is_discard_route) {
continue;
}
diff --git a/northd/en-routes-sync.h b/northd/en-routes-sync.h
index ecd41b0b9..391f17452 100644
--- a/northd/en-routes-sync.h
+++ b/northd/en-routes-sync.h
@@ -16,10 +16,8 @@
#include "lib/inc-proc-eng.h"
-/*struct routes_sync_data {
- struct sset routes;
-};*/
-
+bool routes_sync_northd_change_handler(struct engine_node *node,
+ void *data OVS_UNUSED);
void *en_routes_sync_init(struct engine_node *, struct engine_arg *);
void en_routes_sync_cleanup(void *data);
void en_routes_sync_run(struct engine_node *, void *data);
diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index bc361ce72..741295709 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -269,6 +269,8 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_routes_sync, &en_routes, NULL);
engine_add_input(&en_routes_sync, &en_sb_route, NULL);
+ engine_add_input(&en_routes_sync, &en_northd,
+ routes_sync_northd_change_handler);
engine_add_input(&en_sync_meters, &en_nb_acl, NULL);
engine_add_input(&en_sync_meters, &en_nb_meter, NULL);
diff --git a/northd/northd.c b/northd/northd.c
index be1564b8b..0002c31a2 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -300,11 +300,14 @@ BUILD_ASSERT_DECL(ACL_OBS_STAGE_MAX < (1 << 2));
/*
* Route offsets implement logic to prioritize traffic for routes with
* same ip_prefix values:
- * - connected route overrides static one;
- * - static route overrides src-ip route. */
-#define ROUTE_PRIO_OFFSET_MULTIPLIER 3
-#define ROUTE_PRIO_OFFSET_STATIC 1
-#define ROUTE_PRIO_OFFSET_CONNECTED 2
+ * 1. (highest priority) connected routes
+ * 2. static routes
+ * 3. routes learned from the outside via ovn-controller (e.g. bgp)
+ * 4. (lowest priority) src-ip routes */
+#define ROUTE_PRIO_OFFSET_MULTIPLIER 4
+#define ROUTE_PRIO_OFFSET_LEARNED 1
+#define ROUTE_PRIO_OFFSET_STATIC 2
+#define ROUTE_PRIO_OFFSET_CONNECTED 3
/* Returns the type of the datapath to which a flow with the given 'stage' may
* be added. */
@@ -11045,7 +11048,7 @@ build_route_table_lflow(struct ovn_datapath *od, struct lflow_table *lflows,
}
static uint32_t
-route_hash(struct parsed_route *route)
+route_hash(const struct parsed_route *route)
{
return hash_bytes(&route->prefix, sizeof route->prefix,
(uint32_t)route->plen);
@@ -11095,7 +11098,7 @@ parsed_route_lookup(struct hmap *routes, size_t hash,
continue;
}
- if (pr->route != new_pr->route) {
+ if (pr->source_hint != new_pr->source_hint) {
continue;
}
@@ -11121,14 +11124,43 @@ parsed_route_lookup(struct hmap *routes, size_t hash,
return NULL;
}
-static void
+struct parsed_route * parsed_route_clone(const struct parsed_route *pr) {
+ struct parsed_route *new_pr = xzalloc(sizeof *new_pr);
+ new_pr->prefix = pr->prefix;
+ new_pr->plen = pr->plen;
+ if (pr->nexthop) {
+ new_pr->nexthop = xmemdup(pr->nexthop, sizeof(*pr->nexthop));
+ }
+ new_pr->route_table_id = pr->route_table_id;
+ new_pr->is_src_route = pr->is_src_route;
+ new_pr->hash = route_hash(pr);
+ new_pr->ecmp_symmetric_reply = pr->ecmp_symmetric_reply;
+ new_pr->is_discard_route = pr->is_discard_route;
+ new_pr->od = pr->od;
+ new_pr->stale = pr->stale;
+ new_pr->source = pr->source;
+ new_pr->source_hint = pr->source_hint;
+ if (pr->lrp_addr_s) {
+ new_pr->lrp_addr_s = xstrdup(pr->lrp_addr_s);
+ }
+ if (pr->out_port) {
+ new_pr->out_port = pr->out_port;
+ }
+ return new_pr;
+}
+
+size_t parsed_route_hash(const struct parsed_route *pr) {
+ return uuid_hash(&pr->od->key);
+}
+
+void
parsed_route_free(struct parsed_route *pr) {
free(pr->lrp_addr_s);
free(pr->nexthop);
free(pr);
}
-static void
+void
parsed_route_add(const struct ovn_datapath *od,
struct in6_addr *nexthop,
const struct in6_addr prefix,
@@ -11136,11 +11168,11 @@ parsed_route_add(const struct ovn_datapath *od,
bool is_discard_route,
const char *lrp_addr_s,
const struct ovn_port *out_port,
- const struct nbrec_logical_router_static_route *route,
uint32_t route_table_id,
bool is_src_route,
bool ecmp_symmetric_reply,
enum route_source source,
+ const struct ovsdb_idl_row *source_hint,
struct hmap *routes)
{
@@ -11159,9 +11191,9 @@ parsed_route_add(const struct ovn_datapath *od,
}
new_pr->out_port = out_port;
new_pr->source = source;
- new_pr->route = route;
+ new_pr->source_hint = source_hint;
- size_t hash = uuid_hash(&od->key);
+ size_t hash = parsed_route_hash(new_pr);
struct parsed_route *pr = parsed_route_lookup(routes, hash, new_pr);
if (!pr) {
hmap_insert(routes, &new_pr->key_node, hash);
@@ -11287,8 +11319,8 @@ parsed_routes_add_static(const struct ovn_datapath *od,
}
parsed_route_add(od, nexthop, prefix, plen, is_discard_route, lrp_addr_s,
- out_port, route, route_table_id, is_src_route,
- ecmp_symmetric_reply, source,
+ out_port, route_table_id, is_src_route,
+ ecmp_symmetric_reply, source, &route->header_,
routes);
}
@@ -11304,9 +11336,9 @@ parsed_routes_add_connected(const struct ovn_datapath *od,
parsed_route_add(od, NULL, prefix, addr->plen,
false, addr->addr_s, op,
- NULL, 0, false,
+ 0, false,
false, ROUTE_SOURCE_CONNECTED,
- routes);
+ &op->nbrp->header_, routes);
}
for (int i = 0; i < op->lrp_networks.n_ipv6_addrs; i++) {
@@ -11316,9 +11348,9 @@ parsed_routes_add_connected(const struct ovn_datapath *od,
parsed_route_add(od, NULL, prefix, addr->plen,
false, addr->addr_s, op,
- NULL, 0, false,
+ 0, false,
false, ROUTE_SOURCE_CONNECTED,
- routes);
+ &op->nbrp->header_, routes);
}
}
@@ -11509,12 +11541,30 @@ build_route_prefix_s(const struct in6_addr *prefix, unsigned int plen)
return prefix_s;
}
+static int
+route_source_to_offset(enum route_source source)
+{
+ switch (source) {
+ case ROUTE_SOURCE_CONNECTED:
+ return ROUTE_PRIO_OFFSET_CONNECTED;
+ case ROUTE_SOURCE_STATIC:
+ return ROUTE_PRIO_OFFSET_STATIC;
+ case ROUTE_SOURCE_LEARNED:
+ return ROUTE_PRIO_OFFSET_LEARNED;
+ default:
+ OVS_NOT_REACHED();
+ }
+}
+
static void
build_route_match(const struct ovn_port *op_inport, uint32_t rtb_id,
const char *network_s, int plen, bool is_src_route,
- bool is_ipv4, struct ds *match, uint16_t *priority, int ofs)
+ bool is_ipv4, struct ds *match, uint16_t *priority,
+ enum route_source source)
{
const char *dir;
+ int ofs = route_source_to_offset(source);
+
/* The priority here is calculated to implement longest-prefix-match
* routing. */
if (is_src_route) {
@@ -11529,13 +11579,53 @@ build_route_match(const struct ovn_port *op_inport, uint32_t rtb_id,
if (op_inport) {
ds_put_format(match, "inport == %s && ", op_inport->json_key);
}
- if (rtb_id || ofs == ROUTE_PRIO_OFFSET_STATIC) {
+ if (rtb_id || source == ROUTE_SOURCE_STATIC ||
+ source == ROUTE_SOURCE_LEARNED) {
ds_put_format(match, "%s == %d && ", REG_ROUTE_TABLE_ID, rtb_id);
}
ds_put_format(match, "ip%s.%s == %s/%d", is_ipv4 ? "4" : "6", dir,
network_s, plen);
}
+bool
+find_route_outport(const struct hmap *lr_ports, const char *output_port,
+ const char *ip_prefix, const char *nexthop, bool is_ipv4,
+ bool force_out_port,
+ struct ovn_port **out_port, const char **lrp_addr_s)
+{
+ *out_port = ovn_port_find(lr_ports, output_port);
+ if (!*out_port) {
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
+ VLOG_WARN_RL(&rl, "Bad out port %s for static route %s",
+ output_port, ip_prefix);
+ return false;
+ }
+ if (nexthop[0]) {
+ *lrp_addr_s = find_lrp_member_ip(*out_port, nexthop);
+ }
+ if (!*lrp_addr_s) {
+ if (!force_out_port) {
+ return false;
+ }
+ /* There are no IP networks configured on the router's port via
+ * which 'route->nexthop' is theoretically reachable. But since
+ * 'out_port' has been specified, we honor it by trying to reach
+ * 'route->nexthop' via the first IP address of 'out_port'.
+ * (There are cases, e.g in GCE, where each VM gets a /32 IP
+ * address and the default gateway is still reachable from it.) */
+ if (is_ipv4) {
+ if ((*out_port)->lrp_networks.n_ipv4_addrs) {
+ *lrp_addr_s = (*out_port)->lrp_networks.ipv4_addrs[0].addr_s;
+ }
+ } else {
+ if ((*out_port)->lrp_networks.n_ipv6_addrs) {
+ *lrp_addr_s = (*out_port)->lrp_networks.ipv6_addrs[0].addr_s;
+ }
+ }
+ }
+ return true;
+}
+
/* Output: p_lrp_addr_s and p_out_port. */
static bool
find_static_route_outport(const struct ovn_datapath *od,
@@ -11546,33 +11636,10 @@ find_static_route_outport(const struct ovn_datapath *od,
const char *lrp_addr_s = NULL;
struct ovn_port *out_port = NULL;
if (route->output_port) {
- out_port = ovn_port_find(lr_ports, route->output_port);
- if (!out_port) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
- VLOG_WARN_RL(&rl, "Bad out port %s for static route %s",
- route->output_port, route->ip_prefix);
+ if (!find_route_outport(lr_ports, route->output_port, route->ip_prefix,
+ route->nexthop, is_ipv4, true, &out_port, &lrp_addr_s)) {
return false;
}
- if (route->nexthop[0]) {
- lrp_addr_s = find_lrp_member_ip(out_port, route->nexthop);
- }
- if (!lrp_addr_s) {
- /* There are no IP networks configured on the router's port via
- * which 'route->nexthop' is theoretically reachable. But since
- * 'out_port' has been specified, we honor it by trying to reach
- * 'route->nexthop' via the first IP address of 'out_port'.
- * (There are cases, e.g in GCE, where each VM gets a /32 IP
- * address and the default gateway is still reachable from it.) */
- if (is_ipv4) {
- if (out_port->lrp_networks.n_ipv4_addrs) {
- lrp_addr_s = out_port->lrp_networks.ipv4_addrs[0].addr_s;
- }
- } else {
- if (out_port->lrp_networks.n_ipv6_addrs) {
- lrp_addr_s = out_port->lrp_networks.ipv6_addrs[0].addr_s;
- }
- }
- }
} else {
/* output_port is not specified, find the
* router port matching the next hop. */
@@ -11611,7 +11678,6 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
struct ds *route_match,
struct lflow_ref *lflow_ref)
{
- const struct nbrec_logical_router_static_route *st_route = route->route;
struct ds match = DS_EMPTY_INITIALIZER;
struct ds actions = DS_EMPTY_INITIALIZER;
struct ds ecmp_reply = DS_EMPTY_INITIALIZER;
@@ -11628,12 +11694,12 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
free(cidr);
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_DEFRAG, 100,
ds_cstr(&match), "ct_next;",
- &st_route->header_, lflow_ref);
+ route->source_hint, lflow_ref);
/* And packets that go out over an ECMP route need conntrack */
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_DEFRAG, 100,
ds_cstr(route_match), "ct_next;",
- &st_route->header_, lflow_ref);
+ route->source_hint, lflow_ref);
/* Save src eth and inport in ct_label for packets that arrive over
* an ECMP route.
@@ -11649,7 +11715,7 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
out_port->sb->tunnel_key);
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_ECMP_STATEFUL, 100,
ds_cstr(&match), ds_cstr(&actions),
- &st_route->header_,
+ route->source_hint,
lflow_ref);
/* Bypass ECMP selection if we already have ct_label information
@@ -11669,13 +11735,13 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
port_ip, out_port->json_key);
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_IP_ROUTING, 10300,
ds_cstr(&match), ds_cstr(&actions),
- &st_route->header_,
+ route->source_hint,
lflow_ref);
/* Egress reply traffic for symmetric ECMP routes skips router policies. */
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_POLICY, 65535,
ds_cstr(&ecmp_reply), "next;",
- &st_route->header_,
+ route->source_hint,
lflow_ref);
/* Use REG_ECMP_ETH_FULL to pass the eth field from ct_label to eth.dst to
@@ -11692,7 +11758,7 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
" pop(" REG_ECMP_ETH_FULL "); next;";
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_ARP_RESOLVE,
200, ds_cstr(&ecmp_reply),
- action, &st_route->header_,
+ action, route->source_hint,
lflow_ref);
ds_destroy(&match);
@@ -11700,19 +11766,6 @@ add_ecmp_symmetric_reply_flows(struct lflow_table *lflows,
ds_destroy(&ecmp_reply);
}
-static int
-route_source_to_offset(enum route_source source)
-{
- switch (source) {
- case ROUTE_SOURCE_CONNECTED:
- return ROUTE_PRIO_OFFSET_CONNECTED;
- case ROUTE_SOURCE_STATIC:
- return ROUTE_PRIO_OFFSET_STATIC;
- default:
- OVS_NOT_REACHED();
- }
-}
-
static void
build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
struct ecmp_groups_node *eg, struct lflow_ref *lflow_ref)
@@ -11724,9 +11777,9 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
struct ds route_match = DS_EMPTY_INITIALIZER;
char *prefix_s = build_route_prefix_s(&eg->prefix, eg->plen);
- int ofs = route_source_to_offset(eg->source);
build_route_match(NULL, eg->route_table_id, prefix_s, eg->plen,
- eg->is_src_route, is_ipv4, &route_match, &priority, ofs);
+ eg->is_src_route, is_ipv4, &route_match, &priority,
+ eg->source);
free(prefix_s);
struct ds actions = DS_EMPTY_INITIALIZER;
@@ -11760,17 +11813,16 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
struct ds match = DS_EMPTY_INITIALIZER;
struct sset visited_ports = SSET_INITIALIZER(&visited_ports);
LIST_FOR_EACH (er, list_node, &eg->route_list) {
- const struct parsed_route *route_ = er->route;
- const struct nbrec_logical_router_static_route *route = route_->route;
+ const struct parsed_route *route = er->route;
/* Symmetric ECMP reply is only usable on gateway routers.
* It is NOT usable on distributed routers with a gateway port.
*/
if (smap_get(&od->nbr->options, "chassis") &&
- route_->ecmp_symmetric_reply && sset_add(&visited_ports,
- route_->out_port->key)) {
- add_ecmp_symmetric_reply_flows(lflows, od, route_->lrp_addr_s,
- route_->out_port,
- route_, &route_match,
+ route->ecmp_symmetric_reply && sset_add(&visited_ports,
+ route->out_port->key)) {
+ add_ecmp_symmetric_reply_flows(lflows, od, route->lrp_addr_s,
+ route->out_port,
+ route, &route_match,
lflow_ref);
}
ds_clear(&match);
@@ -11780,19 +11832,19 @@ build_ecmp_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
ds_clear(&actions);
ds_put_format(&actions, "%s = ",
is_ipv4 ? REG_NEXT_HOP_IPV4 : REG_NEXT_HOP_IPV6);
- ipv6_format_mapped(route_->nexthop, &actions);
+ ipv6_format_mapped(route->nexthop, &actions);
ds_put_format(&actions, "; "
"%s = %s; "
"eth.src = %s; "
"outport = %s; "
"next;",
is_ipv4 ? REG_SRC_IPV4 : REG_SRC_IPV6,
- route_->lrp_addr_s,
- route_->out_port->lrp_networks.ea_s,
- route_->out_port->json_key);
+ route->lrp_addr_s,
+ route->out_port->lrp_networks.ea_s,
+ route->out_port->json_key);
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_IP_ROUTING_ECMP, 100,
ds_cstr(&match), ds_cstr(&actions),
- &route->header_, lflow_ref);
+ route->source_hint, lflow_ref);
}
sset_destroy(&visited_ports);
ds_destroy(&match);
@@ -11814,8 +11866,6 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
uint16_t priority;
const struct ovn_port *op_inport = NULL;
- int ofs = route_source_to_offset(source);
-
/* IPv6 link-local addresses must be scoped to the local router port. */
if (!is_ipv4) {
struct in6_addr network;
@@ -11825,7 +11875,7 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
}
}
build_route_match(op_inport, rtb_id, network_s, plen, is_src_route,
- is_ipv4, &match, &priority, ofs);
+ is_ipv4, &match, &priority, source);
struct ds common_actions = DS_EMPTY_INITIALIZER;
struct ds actions = DS_EMPTY_INITIALIZER;
@@ -11871,19 +11921,17 @@ add_route(struct lflow_table *lflows, struct ovn_datapath *od,
static void
build_route_flow(struct lflow_table *lflows, struct ovn_datapath *od,
- const struct parsed_route *route_,
+ const struct parsed_route *route,
const struct sset *bfd_ports,
struct lflow_ref *lflow_ref)
{
- const struct nbrec_logical_router_static_route *route = route_->route;
-
- char *prefix_s = build_route_prefix_s(&route_->prefix, route_->plen);
- add_route(lflows, route_->is_discard_route ? od : route_->out_port->od,
- route_->out_port, route_->lrp_addr_s, prefix_s,
- route_->plen, route_->nexthop, route_->is_src_route,
- route_->route_table_id, bfd_ports,
- route ? &route->header_ : &route_->out_port->nbrp->header_,
- route_->is_discard_route, route_->source, lflow_ref);
+ char *prefix_s = build_route_prefix_s(&route->prefix, route->plen);
+ add_route(lflows, route->is_discard_route ? od : route->out_port->od,
+ route->out_port, route->lrp_addr_s, prefix_s,
+ route->plen, route->nexthop, route->is_src_route,
+ route->route_table_id, bfd_ports,
+ route->source_hint,
+ route->is_discard_route, route->source, lflow_ref);
free(prefix_s);
}
diff --git a/northd/northd.h b/northd/northd.h
index 77faab65d..ebf94be48 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -186,6 +186,10 @@ struct routes_data {
struct hmap bfd_active_connections;
};
+struct routes_sync_data {
+ struct hmap parsed_routes;
+};
+
struct route_policies_data {
struct hmap route_policies;
struct hmap bfd_active_connections;
@@ -701,6 +705,8 @@ enum route_source {
ROUTE_SOURCE_CONNECTED,
/* the route is derived from a northbound static route entry */
ROUTE_SOURCE_STATIC,
+ /* the route is learned by an ovn-controller */
+ ROUTE_SOURCE_LEARNED,
};
struct parsed_route {
@@ -711,16 +717,39 @@ struct parsed_route {
bool is_src_route;
uint32_t route_table_id;
uint32_t hash;
- const struct nbrec_logical_router_static_route *route;
bool ecmp_symmetric_reply;
bool is_discard_route;
const struct ovn_datapath *od;
bool stale;
enum route_source source;
+ const struct ovsdb_idl_row *source_hint;
char *lrp_addr_s;
const struct ovn_port *out_port;
};
+struct parsed_route * parsed_route_clone(const struct parsed_route *pr);
+size_t parsed_route_hash(const struct parsed_route *pr);
+void parsed_route_free(struct parsed_route *pr);
+void parsed_route_add(const struct ovn_datapath *od,
+ struct in6_addr *nexthop,
+ const struct in6_addr prefix,
+ unsigned int plen,
+ bool is_discard_route,
+ const char *lrp_addr_s,
+ const struct ovn_port *out_port,
+ uint32_t route_table_id,
+ bool is_src_route,
+ bool ecmp_symmetric_reply,
+ enum route_source source,
+ const struct ovsdb_idl_row *source_hint,
+ struct hmap *routes);
+
+bool
+find_route_outport(const struct hmap *lr_ports, const char *output_port,
+ const char *ip_prefix, const char *nexthop, bool is_ipv4,
+ bool force_out_port,
+ struct ovn_port **out_port, const char **lrp_addr_s);
+
void ovnnb_db_run(struct northd_input *input_data,
struct northd_data *data,
struct ovsdb_idl_txn *ovnnb_txn,
diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema
index 22e43dc8a..74540782e 100644
--- a/ovn-sb.ovsschema
+++ b/ovn-sb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Southbound",
"version": "20.38.0",
- "cksum": "956398967 32154",
+ "cksum": "1944407838 32212",
"tables": {
"SB_Global": {
"columns": {
@@ -625,11 +625,12 @@
"refTable": "Datapath_Binding"}}},
"logical_port": {"type": "string"},
"ip_prefix": {"type": "string"},
+ "nexthop": {"type": "string"},
"type": {"type": {"key": {"type": "string",
"enum": ["set", ["advertise",
"receive"]]},
"min": 1, "max": 1}}},
- "indexes": [["datapath", "logical_port", "ip_prefix"]],
+ "indexes": [["datapath", "logical_port", "ip_prefix", "nexthop"]],
"isRoot": true}
}
}
diff --git a/ovn-sb.xml b/ovn-sb.xml
index a65bd2cbb..493b7e839 100644
--- a/ovn-sb.xml
+++ b/ovn-sb.xml
@@ -5213,6 +5213,17 @@ tcp.flags = RST;
+
+
+ If the type is advertise
then this is empty.
+
+
+
+ If the type is receive
then this is the nexthop ip we
+ from the outside.
+
+
+
If the route is to be exported from OVN to the outside network or if
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 9b786bc1f..13301257e 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -6810,9 +6810,9 @@ AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
table=??(lr_in_ip_routing ), priority=10300, match=(ct_mark.ecmp_reply_port == 1 && reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; eth.src = 00:00:20:20:12:13; reg1 = 192.168.0.1; outport = "lr0-public"; next;)
table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = 1; next;)
+ table=??(lr_in_ip_routing ), priority=130 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
])
AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | ovn_strip_lflows], [0], [dnl
@@ -6828,9 +6828,9 @@ AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
table=??(lr_in_ip_routing ), priority=10300, match=(ct_mark.ecmp_reply_port == 1 && reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; eth.src = 00:00:20:20:12:13; reg1 = 192.168.0.1; outport = "lr0-public"; next;)
table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+ table=??(lr_in_ip_routing ), priority=130 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
])
AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | sed 's/192\.168\.0\..0/192.168.0.??/' | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing_ecmp), priority=0 , match=(1), action=(drop;)
@@ -6857,9 +6857,9 @@ AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
table=??(lr_in_ip_routing ), priority=10300, match=(ct_mark.ecmp_reply_port == 1 && reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; eth.src = 00:00:20:20:12:13; reg1 = 192.168.0.1; outport = "lr0-public"; next;)
table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+ table=??(lr_in_ip_routing ), priority=130 , match=(reg7 == 0 && ip4.dst == 1.0.0.1/32), action=(ip.ttl--; flags.loopback = 1; reg8[[0..15]] = 1; reg8[[16..31]] = select(1, 2);)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-public" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:20ff:fe20:1213; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
])
AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | sed 's/192\.168\.0\..0/192.168.0.??/' | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing_ecmp), priority=0 , match=(1), action=(drop;)
@@ -6875,14 +6875,14 @@ check ovn-nbctl --wait=sb lr-route-add lr0 1.0.0.0/24 192.168.0.10
ovn-sbctl dump-flows lr0 > lr0flows
AT_CHECK([grep -e "lr_in_ip_routing.*192.168.0.10" lr0flows | ovn_strip_lflows], [0], [dnl
- table=??(lr_in_ip_routing ), priority=73 , match=(reg7 == 0 && ip4.dst == 1.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 1.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
])
check ovn-nbctl --wait=sb lr-route-add lr0 2.0.0.0/24 lr0-public
ovn-sbctl dump-flows lr0 > lr0flows
AT_CHECK([grep -e "lr_in_ip_routing.*2.0.0.0" lr0flows | ovn_strip_lflows], [0], [dnl
- table=??(lr_in_ip_routing ), priority=73 , match=(reg7 == 0 && ip4.dst == 2.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 2.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; flags.loopback = 1; next;)
])
AT_CLEANUP
@@ -7306,16 +7306,16 @@ AT_CHECK([grep "lr_in_ip_routing_pre" lr0flows | ovn_strip_lflows], [0], [dnl
grep -e "(lr_in_ip_routing ).*outport" lr0flows
AT_CHECK([grep -e "(lr_in_ip_routing ).*outport" lr0flows | ovn_strip_lflows], [0], [dnl
- table=??(lr_in_ip_routing ), priority=1 , match=(reg7 == 0 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=1 , match=(reg7 == 2 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lrp0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lrp1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:101; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=194 , match=(inport == "lrp2" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:201; eth.src = 00:00:00:00:02:01; outport = "lrp2"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=73 , match=(reg7 == 1 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.1.10; reg1 = 192.168.1.1; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.1.1; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=74 , match=(ip4.dst == 192.168.2.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.2.1; eth.src = 00:00:00:00:02:01; outport = "lrp2"; flags.loopback = 1; next;)
- table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 2 && ip4.dst == 1.1.1.1/32), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.20; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=130 , match=(reg7 == 2 && ip4.dst == 1.1.1.1/32), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.20; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=2 , match=(reg7 == 0 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=2 , match=(reg7 == 2 && ip4.dst == 0.0.0.0/0), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.0.10; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lrp0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lrp1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:101; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lrp2" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:201; eth.src = 00:00:00:00:02:01; outport = "lrp2"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 1 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 192.168.1.10; reg1 = 192.168.1.1; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.0.1; eth.src = 00:00:00:00:00:01; outport = "lrp0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.1.1; eth.src = 00:00:00:00:01:01; outport = "lrp1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 192.168.2.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 192.168.2.1; eth.src = 00:00:00:00:02:01; outport = "lrp2"; flags.loopback = 1; next;)
])
AT_CLEANUP
@@ -13936,5 +13936,96 @@ AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath log
192.168.1.0/24
])
+AT_CLEANUP
+])
+
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([dynamic-routing - learning routes from sb])
+AT_KEYWORDS([dynamic-routing])
+ovn_start
+
+# we start with announcing routes on a lr with 2 lrps and 2 static routes
+check ovn-nbctl lr-add lr0
+check ovn-nbctl --wait=sb set Logical_Router lr0 option:dynamic-routing=true \
+ option:dynamic-routing-connected=true \
+ option:dynamic-routing-static=true
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24
+check ovn-nbctl --wait=sb lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 10.0.1.1/24
+check ovn-nbctl --wait=sb lr-route-add lr0 192.168.0.0/24 10.0.0.10
+check ovn-nbctl --wait=sb lr-route-add lr0 192.168.1.0/24 10.0.1.10
+check_row_count Route 4 type=advertise
+datapath=$(ovn-sbctl --bare --columns _uuid list datapath_binding lr0)
+
+# validate the routes
+ovn-sbctl dump-flows lr0 > lr0flows
+AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
+ table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff01; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff02; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.10; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.1.10; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+])
+
+# learn a route to 172.16.0.0/24 via 10.0.0.11 learned on lr0-sw0
+ovn-sbctl create Route type=receive datapath=$datapath logical_port=lr0-sw0 ip_prefix=172.16.0.0/24 nexthop=10.0.0.11
+check ovn-nbctl --wait=sb sync
+check_row_count Route 4 type=advertise
+check_row_count Route 1 type=receive
+ovn-sbctl dump-flows lr0 > lr0flows
+AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
+ table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff01; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff02; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 172.16.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.11; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.10; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.1.10; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+])
+
+# learn a route to 172.16.1.0/24 via 100.100.100.100 learned on lr0-sw1
+# this is not reachable so will not produce a lflow
+ovn-sbctl create Route type=receive datapath=$datapath logical_port=lr0-sw1 ip_prefix=172.16.1.0/24 nexthop=100.100.100.100
+check ovn-nbctl --wait=sb sync
+check_row_count Route 4 type=advertise
+check_row_count Route 2 type=receive
+ovn-sbctl dump-flows lr0 > lr0flows
+AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
+ table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff01; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff02; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 172.16.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.11; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.10; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.1.10; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+])
+
+# if we now add 100.100.100.10/24 as an additional network to lr0-sw1 we will
+# get another connected route and the previous received route will be active
+check ovn-nbctl --wait=sb set Logical_Router_Port lr0-sw1 networks="10.0.1.1/24 100.100.100.10/24"
+check_row_count Route 5 type=advertise
+check_row_count Route 2 type=receive
+ovn-sbctl dump-flows lr0 > lr0flows
+AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
+ table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff01; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw1" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff02; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 172.16.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.11; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 172.16.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 100.100.100.100; reg1 = 100.100.100.10; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.10; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.1.10; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.1.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.1.1; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 100.100.100.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 100.100.100.10; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
+])
+
+
AT_CLEANUP
])
From patchwork Tue Nov 26 14:38:12 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015477
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=PKEgBMBK;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=PKEgBMBK;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
(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 4XyQGB3nh1z1yQY
for ; Wed, 27 Nov 2024 01:40:02 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id CAE0343570;
Tue, 26 Nov 2024 14:40:00 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id 2K_JnjuGeH-j; Tue, 26 Nov 2024 14:39:58 +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 smtp2.osuosl.org C3C17434C4
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=PKEgBMBK;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=PKEgBMBK
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp2.osuosl.org (Postfix) with ESMTPS id C3C17434C4;
Tue, 26 Nov 2024 14:39:57 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id DC5D5C08B9;
Tue, 26 Nov 2024 14:39:56 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
by lists.linuxfoundation.org (Postfix) with ESMTP id 0EEA5C08AA
for ; Tue, 26 Nov 2024 14:39:54 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id BEF22434D8
for ; Tue, 26 Nov 2024 14:38:24 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id fbnMM5IE2tAM for ;
Tue, 26 Nov 2024 14:38:23 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:c201::3;
helo=as8pr04cu009.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 1A36F434BD
Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1A36F434BD
Received: from AS8PR04CU009.outbound.protection.outlook.com
(mail-westeuropeazlp170110003.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c201::3])
by smtp2.osuosl.org (Postfix) with ESMTPS id 1A36F434BD
for ; Tue, 26 Nov 2024 14:38:22 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=ofMg/YUfBvQOLy9C50UuNKEh7agv4A8wqeBBpWPdjIxruU+1I0X75xooCb4L5Qbwmf00jQGjnq4vmDP6UE5/X2zJ3pIIlkN9uj5In8nuIJmn/iqZc0h+3P/6SgyK070Zk5jdkgQGbVlZH4jg7UUEKnPTkbIQ2ZlbBZTqlLETvQ6Zhhi7ZPthsvr2QXhjdCbIBHHNcincbWHALpbj74DtfwF9fN2RHJ4utkw0vH9WB3lhihMJGKnzvPyO5sgKgLWH3dpVjvE8NZ+IwohQGRt55gelAyh31HpFLY7rswPj1z8uccjv3iV+M9unuyhIOe7HiflHhe94kHxJvCOkM+wRFA==
ARC-Message-Signature: i=2; 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=feeNrwHHNYmLlebHofM21Bd+g7h4/f+BgcIP8A56GCc=;
b=c7WnL3k7Sa+/3aUNCC21xLwaIzKwctKzT7ThpcHzLT9bNxqSd50We7GtTRgUJeywkUBEH9N7HJ3/bjNEX2VpYLB/006xnO4/u4U45qSvvAXmcrUZH0XKIzGS595n7yzFvC0A+T3HRzp2PBkBEPKonVFlEoA5L5Yu6pZaKyAGzvGPEMGmjUl7kjgXRtWAT57sEqta55CTjJD8fALHbiuw9mClxaF1nIHh42vDQ2XPSsNTYvj6w90oKoZXaFI0mxZKcu23LMx7ThsAd0pdZu0Vae6Pb6rXW8dXbU9lsWeBqvLZlcU9I5eWhzBu5vRnm5FKrUYoMlK2cSlP9FQN4sWznQ==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=feeNrwHHNYmLlebHofM21Bd+g7h4/f+BgcIP8A56GCc=;
b=PKEgBMBK6F0XfcyscTOiyus9z0p447/H3E4BjazxTD+iWXs5CYSKMa9K6AKUW1qb0vmFHIgDv5F8VnNcuUsiVnsiPs//3GtjMOqzStnN6/V6e+fo/5nDQnNER9DHpXYdR57XZmfzyu6aKfMxVqdtu4W+QKZO9DwDC2tMpvegx+XJ/eD/D1aG5pM+aCCAEbbNkLbVhcLYWd/Z26aOFBemUj0NQlY+jU+ajc492kz9I4wLvrXjNMU1C6UIr8u7pW7ltHr/9P7ABlouB/y4wYxZStGP/DJQB4kCQ99vZHVzPwkOHP4jpnq4yqU8ON4AixYdF48WbADqIDMsCYejgS0I6w==
Received: from AS9P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:50f::16)
by DB8PR10MB3749.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:167::11)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:18 +0000
Received: from AMS0EPF000001B1.eurprd05.prod.outlook.com
(2603:10a6:20b:50f:cafe::81) by AS9P251CA0018.outlook.office365.com
(2603:10a6:20b:50f::16) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:18 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS0EPF000001B1.mail.protection.outlook.com (10.167.16.165) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:16 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.42)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:17
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8068245
X-ExclaimerImprintLatency: 3718350
X-ExclaimerImprintAction: 83f5f630ec134e8790b0611fe0f5b447
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=BOOx4yIslX4LVH56mDVj0p200JSeNCGmZV8S+K/HfhAi64bHSkU+MxKx1hsHHqpdxe0YHTy/AjIwkS1rUT86+IZwNim12yN9oswAiTrzJAjhaTFtk+RwapFvjfELoCanCQPXIZfc2pzw2D6xIWHdps9ShdDEdpjpUDpcD1+upV3kTCIKnBbOUpUZv388eK+T0WaXwz2TgpjqwGtb/Y3QkWFo39rvUXl0M7U4KHndJ1jqVSMtP+FsFCxWbulQWCImcLrEWOOZdttvexZDuRZkbmBVJ1fj9McTXTQ8Z0J54JgOz+qKY3i55srnu4cj/mr5SRPZkCJSHWJwy4uHWTdh1g==
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=feeNrwHHNYmLlebHofM21Bd+g7h4/f+BgcIP8A56GCc=;
b=sPhx/RfP8hZU5jZkq1RR6haX1r5rNMfVn5iaDbLElnb5xbRzqZzKtj6Y2G+gvDy5FSZXWq+8t50U5H6OJw/m5vsfB0LCsm9HcwGLjR6p7upNcrSOD2gbIJnrrO3UGaXO6Kibr9O30SSMw5sj63iMHivOdpT1D/ufZ+qUtpgzQbaFB6vR+bFusxBBl46en3pGgvFZQ4rKk+ScYIZl9OyGRQHZ8OZ8OAgMA/LfOPYNLlbJMvcV8jG5hOWO481AOIvfixtByRSIJQPI2Y+1bICSX073vsDujHsgyzlY3uls2kaVg3taKiydNfxydS2RdEWOswepZzwyyl8kw/TV7BQ4Tg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=feeNrwHHNYmLlebHofM21Bd+g7h4/f+BgcIP8A56GCc=;
b=PKEgBMBK6F0XfcyscTOiyus9z0p447/H3E4BjazxTD+iWXs5CYSKMa9K6AKUW1qb0vmFHIgDv5F8VnNcuUsiVnsiPs//3GtjMOqzStnN6/V6e+fo/5nDQnNER9DHpXYdR57XZmfzyu6aKfMxVqdtu4W+QKZO9DwDC2tMpvegx+XJ/eD/D1aG5pM+aCCAEbbNkLbVhcLYWd/Z26aOFBemUj0NQlY+jU+ajc492kz9I4wLvrXjNMU1C6UIr8u7pW7ltHr/9P7ABlouB/y4wYxZStGP/DJQB4kCQ99vZHVzPwkOHP4jpnq4yqU8ON4AixYdF48WbADqIDMsCYejgS0I6w==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:14 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:14 +0000
Date: Tue, 26 Nov 2024 15:38:12 +0100
To: dev@openvswitch.org
Message-ID:
<958697f33fa3838dadfa14ed7d3e93f0c97147e7.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0112.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::15) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AMS0EPF000001B1:EE_|DB8PR10MB3749:EE_
X-MS-Office365-Filtering-Correlation-Id: 6bc09008-e5ba-4cfe-0484-08dd0e27f76c
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
o/0jmaK9phToALX/DCspp3A724qdoVFPiZRBqaeBw0y3WcFsAFcS+wA6JZsdmsdPqO1pO+Otu209tfR33t/QKTe55p9ldKCVWqerJ2OGXmQQkRFWCZZMdWpFimbnoqPQlEZoxqlv2F3wMWdv5M1T39Ks+GMUGTahlhAAB1OOepWZZkbkxCvQBCk4mNr70irwJOlF8BgBOE+4k2J788NhUg5IhzcMIj2z8YThXh4WFSKCZiJQoGIL3vl8Z8COjrAoZWqcbHjspYkIv1DfM2jP9MO0ttYchuKLXTi0zEg6d3bVKoHG0kwQeb1OO5e9f4vvI4yr30NlBXsI+7bt5UVdQu9QzRonnFgHKOIr+bs+UaAbPOkC6V+0qLGlifTPy2u/smVNkPUcs5qi8rqDjEkUkkb0SQG6jPcR3Qf23+MaHVPBtt/pi5sG1EdoUqVDG6kjBA44Xcwz0yQcNJSYaAFZxShFYm/xJlOlOgp7teeR5QAWaoa2nhXpXe7d0UmAfppohxjTqX4nCaSHqKsnjtjIRExoFFrapaJ4EW08EUpiVM7UOWK9kyYdBXk6TDyT2dPXoocDuGaWq2rcxuEPfLmJ/Xt3Je03FjtT3Q7149+ylThdPHx/LkyhPQBQ5MCJzymxARRSYBAh7Guh7j9Fep65WmSWvr7Jr2D5eDazgrWhX9u0ihlfgl7M8YIPHEmriyoQ9pfDN/DCV7NV+2GYNIGlA1p+RW5NhAfKxmoYtNZH9akD9eFOUFGnmQNnxiBNTgVwHUqNLQrdrHRRbzLi72ZeHxNpRCeZcNPcGgJUVTMpxTyNWOGtr4RtryGtQjdXbc6n+Rv3q5HbORo9hbLetRZ5t/ryDx09/60D1tR2Yl8iP+wSuJ3xfjiYYDIHkefVDxWGTq2QSMoTgs64SnQWtUH5nnjEUj+54kUb9ryOwBZYC2f/jaOXSxoJy0BZKXiIbL3fbxb+CUS39VC5GtweSbVx/Xjkn9gC91BSScbA+SyikV59TqGnFhK7HmdkMfgua/MxB/YkAVgEJYMPE4jT6ZkzQt44RssGiJ/CKLcHYEhlr5geEhomsW8m9GONjXkN2TBQooy9E81fBYHL/IqDozfb9Mo0OIorXER5053PhIsZgs1Y7a0ZeKjAvjtnz5BKKM+B5fTg1aA2/c9zCRpWaq12Fk2qywsZUeqKvdnzjizz6vDIPILts/3omrEqBb0Pgsw/7UL+Vtzr+TN5UpLgljSnPOUgUEhy3cySIpo8lmKOZBRFGrkVzENJZw0jtFLKklRjlur72QwrSauLB1/P+rsi43k8BL2s8ln9unxfUWWycMXnESymm1E4+eA84rpcudBHmuenR1BTEVm5xhlAOqEIlQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF000001B1.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
c18a681e-f9b7-4d9f-2ca5-08dd0e27f596
X-Microsoft-Antispam: BCL:0;
ARA:13230040|1800799024|14060799003|36860700013|376014|35042699022|82310400026;
X-Microsoft-Antispam-Message-Info:
xJH4kp3AchvZ6IYW1pNjW0PBgh+WDWbLC2OaKo7kQOvXDRMMP1zHSvKfR0QXnujbeaOviekjPG9e8v59Q7tlDAniqSbemuheVQEZQIS1/9DSK9/DJfVLd72WbZHlwMWH4wEXkdKSEq+Lt7sewcUKrCgZYwVnFPx1iYWslqcsrB0VFxhJQS1SbGgPNlvige8vLmOqEVulM6t+fg790JnkxbNia6lKjp+6zU4tsPbO9f4Xb5hrqje9CAz8JcBXff5s78XeFORXIAfhDgktPGgFQYueqy3zMCxFvSBIY4gyOL5jcjmIa8RGH88/mWpk5hFrMRJJfVzNnSbHQIY+LNZmYWNRUr5M8JNVQ7u7YNejBbr89jtwgMwp0VxSAzV3dO2DJe9FobloghcBXuqSZomLBECg4cdxYmdOR3Evq8Qv2mNhVpI0fVxY5iT0gjt/Z8gVhY7AWExGZfO4r7VOmzBIh3EGDLDHR+j1q4okFDypv3JoE+iPIhGCqEC0SUhfa2ntUFUHJZE6Z/HAklzUoOC5Zw9G9DcOv2mdltP+EoEYuVYSeFsUL0ZvoD7KwPtHgRPVW3AKfvG/72kjJE/8mWhf0yyQ5Z/cH6vGpJz74t2i/4pOzcjmPEvoN7xHbwbRZ8mh7aEY235SXFybiSxSYu7h/YxSIcLLWMaDbqtlFRkfUTVyOYe8Gfkp/WPbjobMsWBOSSXVdOo3iPIeU11fkU0ML/oXsBCUOeSAAXBizUeX4wT7QAaJNOTfkTMll+DlYjPI1NlrdApL2mGeoKXD6Q04csTJbhH2ErqjBsgcUHuFJFbAgsgtG6MmCYIYM0GfvnUPe04vVMrHzRWWG9NWLGTyrXZPQsP1fdl6t8Ur6K8ain4ekUqqxbX9c8K7guuFRi8l/nbKs2g2PY4AnLfk+uZ+n1VIKM+sMfFqYe817SdPsV76WOTh0rLcqcm8FnaZjZTuvczmB6p59qSOF0IyiSJXVpcFrRdRektDAeYQS724BQXaYM6QXrUK7TzuxVuO1Eu28Aq9/imyZsR+xdx46PUBk0BLlFkGoqS4AoS8ElpOTNuUFRwZeuwrGlD9C1Fj4X+nzNUDZdoti/fIJza3mLJ2ad9OFc9YiJzB67rGIduGmGc0dkbC2EQOUl1bHH9wxe7vJcvZrK2swBfj6hFellZDmrdAcgWvc0Dawwjjc1pIeRX5u86/ttl+Va4gk4ABaURVq92bDB16yhjV1KXjZ4EnKVnO9DZJGKb8Tc5vY1mYzhf2f5fo10wuG0Q5zbndUusWgvwJnyH18OP6IU+8oWHGNvHTWCpny2yqvRI0HQ/CtxIlbrTMDcFtNJdgUFu3tvSR6GBM2DHThfvZWYDnyy8jwuN+lSSqvIKSy5zJ+57jYVIKWPX/VB4gcwiSvViJDlWgAKe5N2nlTEXlgFe10/LBpWvfLDQ+IPXvvcMWtfKLOapZPkkYmWh88+1cG4fzFkua
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(1800799024)(14060799003)(36860700013)(376014)(35042699022)(82310400026);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:16.9512 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
6bc09008-e5ba-4cfe-0484-08dd0e27f76c
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF000001B1.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3749
Subject: [ovs-dev] [PATCH ovn v3 14/33] northd: Remove learned routes if lrp
is removed.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
learned routes must be bound to a lrp on which the routes where learned.
In case the lrp is deleted for whatever reason no ovn-controller would
clean these routes up, therefor we do this in northd.
Signed-off-by: Felix Huettner
---
northd/en-routes-sync.c | 4 ++++
northd/northd.c | 35 +----------------------------------
northd/northd.h | 34 ++++++++++++++++++++++++++++++++++
tests/ovn-northd.at | 15 +++++++++++++++
4 files changed, 54 insertions(+), 34 deletions(-)
diff --git a/northd/en-routes-sync.c b/northd/en-routes-sync.c
index ed23c82f4..7ca87c76a 100644
--- a/northd/en-routes-sync.c
+++ b/northd/en-routes-sync.c
@@ -290,6 +290,10 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route *sb_route;
SBREC_ROUTE_TABLE_FOR_EACH (sb_route, sbrec_route_table) {
if (!strcmp(sb_route->type, "receive")) {
+ if (!ovn_port_find(lr_ports, sb_route->logical_port)) {
+ sbrec_route_delete(sb_route);
+ continue;
+ }
parse_route_from_sbrec_route(parsed_routes_out, lr_ports,
&lr_datapaths->datapaths,
sb_route);
diff --git a/northd/northd.c b/northd/northd.c
index 0002c31a2..4439a74da 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -1287,34 +1287,6 @@ ovn_port_destroy(struct hmap *ports, struct ovn_port *port)
}
}
-/* Returns the ovn_port that matches 'name'. If 'prefer_bound' is true and
- * multiple ports share the same name, gives precendence to ports bound to
- * an ovn_datapath.
- */
-static struct ovn_port *
-ovn_port_find__(const struct hmap *ports, const char *name,
- bool prefer_bound)
-{
- struct ovn_port *matched_op = NULL;
- struct ovn_port *op;
-
- HMAP_FOR_EACH_WITH_HASH (op, key_node, hash_string(name, 0), ports) {
- if (!strcmp(op->key, name)) {
- matched_op = op;
- if (!prefer_bound || op->od) {
- return op;
- }
- }
- }
- return matched_op;
-}
-
-static struct ovn_port *
-ovn_port_find(const struct hmap *ports, const char *name)
-{
- return ovn_port_find__(ports, name, false);
-}
-
static bool
lsp_is_clone_to_unknown(const struct nbrec_logical_switch_port *nbsp)
{
@@ -1329,12 +1301,6 @@ lsp_is_clone_to_unknown(const struct nbrec_logical_switch_port *nbsp)
return false;
}
-static struct ovn_port *
-ovn_port_find_bound(const struct hmap *ports, const char *name)
-{
- return ovn_port_find__(ports, name, true);
-}
-
/* Returns true if the logical switch port 'enabled' column is empty or
* set to true. Otherwise, returns false. */
static bool
@@ -3416,6 +3382,7 @@ cleanup_mac_bindings(
}
}
+
static void
cleanup_sb_ha_chassis_groups(
const struct sbrec_ha_chassis_group_table *sbrec_ha_chassis_group_table,
diff --git a/northd/northd.h b/northd/northd.h
index ebf94be48..991ba5f9f 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -902,4 +902,38 @@ is_vxlan_mode(const struct smap *nb_options,
uint32_t get_ovn_max_dp_key_local(bool _vxlan_mode);
+/* Returns the ovn_port that matches 'name'. If 'prefer_bound' is true and
+ * multiple ports share the same name, gives precendence to ports bound to
+ * an ovn_datapath.
+ */
+static struct ovn_port *
+ovn_port_find__(const struct hmap *ports, const char *name,
+ bool prefer_bound)
+{
+ struct ovn_port *matched_op = NULL;
+ struct ovn_port *op;
+
+ HMAP_FOR_EACH_WITH_HASH (op, key_node, hash_string(name, 0), ports) {
+ if (!strcmp(op->key, name)) {
+ matched_op = op;
+ if (!prefer_bound || op->od) {
+ return op;
+ }
+ }
+ }
+ return matched_op;
+}
+
+static inline struct ovn_port *
+ovn_port_find(const struct hmap *ports, const char *name)
+{
+ return ovn_port_find__(ports, name, false);
+}
+
+static inline struct ovn_port *
+ovn_port_find_bound(const struct hmap *ports, const char *name)
+{
+ return ovn_port_find__(ports, name, true);
+}
+
#endif /* NORTHD_H */
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 13301257e..213536707 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -14026,6 +14026,21 @@ AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 100.100.100.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 100.100.100.10; eth.src = 00:00:00:00:ff:02; outport = "lr0-sw1"; flags.loopback = 1; next;)
])
+# deleting lr0-sw1 will remove the flows and also the learned route
+check ovn-nbctl --wait=sb lrp-del lr0-sw1
+check_row_count Route 2 type=advertise
+check_row_count Route 1 type=receive
+check_row_count Route 1 type=receive logical_port=lr0-sw0
+ovn-sbctl dump-flows lr0 > lr0flows
+AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
+ table=??(lr_in_ip_routing ), priority=0 , match=(1), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=10550, match=(nd_rs || nd_ra), action=(drop;)
+ table=??(lr_in_ip_routing ), priority=259 , match=(inport == "lr0-sw0" && ip6.dst == fe80::/64), action=(ip.ttl--; reg8[[0..15]] = 0; xxreg0 = ip6.dst; xxreg1 = fe80::200:ff:fe00:ff01; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=97 , match=(reg7 == 0 && ip4.dst == 172.16.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.11; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=98 , match=(reg7 == 0 && ip4.dst == 192.168.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = 10.0.0.10; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+ table=??(lr_in_ip_routing ), priority=99 , match=(ip4.dst == 10.0.0.0/24), action=(ip.ttl--; reg8[[0..15]] = 0; reg0 = ip4.dst; reg1 = 10.0.0.1; eth.src = 00:00:00:00:ff:01; outport = "lr0-sw0"; flags.loopback = 1; next;)
+])
+
AT_CLEANUP
])
From patchwork Tue Nov 26 14:38:14 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015491
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=MTmelnt7;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=MTmelnt7;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQHM0mkWz1yQb
for ; Wed, 27 Nov 2024 01:41:02 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 357A56FA77;
Tue, 26 Nov 2024 14:41:01 +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 lYEa9J1BXlMZ; Tue, 26 Nov 2024 14:40:57 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9D6306FB2C
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=MTmelnt7;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=MTmelnt7
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 9D6306FB2C;
Tue, 26 Nov 2024 14:40:16 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 26F9CC08C0;
Tue, 26 Nov 2024 14:40:16 +0000 (UTC)
X-Original-To: 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 17195C08B4
for ; Tue, 26 Nov 2024 14:40:01 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 4915E605C7
for ; Tue, 26 Nov 2024 14:38:25 +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 PA7wAVpD30_J for ;
Tue, 26 Nov 2024 14:38:23 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2612::61b;
helo=eur05-am6-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 288D46F4FC
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 288D46F4FC
Received: from EUR05-AM6-obe.outbound.protection.outlook.com
(mail-am6eur05on2061b.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2612::61b])
by smtp3.osuosl.org (Postfix) with ESMTPS id 288D46F4FC
for ; Tue, 26 Nov 2024 14:38:23 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=RKNoeYVc139KN24edhMpxPD+RcQiM6rl7L0B/0RwNqrrcSbZOjS/pLQhgJCmJCGf/x9yzY5GlhaiudmEqMlJPHSnC7iXzjCi3sjQ/DaDExJEjGU4D+QD8zMQ8Eq1X5tVQP6YsCj9+UG8Iz8OKGzLar+vLuf2vYj9kYRTlG1C72NKzLpT/M8PZFbPMo0spjW/vS2hn904WeHQoLZUaxoPr8avCXqoofRnforr/AHcffoa07lhnVsxqfvhgoYmzOm2ISZuSYqBNU78kkSosKoLOU72mnToxTIXlXYuaYsp/VEIQdMomnDRAQSCO3bQgYRg5tHaM7qCiO1I55Zl8bRWgA==
ARC-Message-Signature: i=2; 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=+LaSiyjQKaRkfSu7owccJmHDZLLouD0QJw4BgtlzbEM=;
b=HW8r5ojioWDolAnVu1o+FFCNdg3IIMijNa6b4xR1nQrxl120NwfNu53GGlEWYCPMk7tHyPfalkbqgcLmkEuPGz9jikg9HglWiQU0oKBKKRcHHpHHitTWMw/EVjyndFifzU8n+eLrd2P6X2pnFFgXiraWtslGaCVjQ9ZMndzAfmhyvaxxBcgmNnjLbz3Cn94OnhLf7Q+qj2yATkt4r+OjnraSn5AnFv78w0iGoX0FnHVfOMNYfHkJJ1CoDIms+IyLLI48aRDY4CoKtcZF0oiqUzkNrmx2bTdO0vPrSOdcEoiSgN1EJvmOex9AfrkV12aNDF2fvTXs+VEXZfHg7wF8mw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=+LaSiyjQKaRkfSu7owccJmHDZLLouD0QJw4BgtlzbEM=;
b=MTmelnt73lsEHVgeepE4mkFWtzZSnp8JTiVipvLgsqZgoBTKLJ2qAKLbhZ3DtjYmtgg8sCt0w3lVsxwFBOsb/orhFnqlVdTGnay3tqE3rEXdb4HK61BgPpO88TaqetCV++SHRiTWHnL5nhFWgPKz85TpXk/z9Modgw4MSXnaY3oW399sjB53KPZ3t/Uai5VZ8zgVDqvnkUgHFja8chhW1LUtWleEbHoweWqJ9KrStGX1vsDAiQe6xHsRu2eYY7ySLqjqKfk70DCth/IcgtdTvhVPyR+kDOBcQu2GjcZ5YrHBCmKG2PcTPKUAwTqFQHZXsoYzYHa86ewnkX5kt77emg==
Received: from AS4P191CA0054.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::12)
by DB4PR10MB6240.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:380::6) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:19 +0000
Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com
(2603:10a6:20b:657:cafe::3f) by AS4P191CA0054.outlook.office365.com
(2603:10a6:20b:657::12) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:19 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:18 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.42)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:19
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 11326819
X-ExclaimerImprintLatency: 9312113
X-ExclaimerImprintAction: 4cd16ea015d94eb88bbd6b96193c7cc0
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Osh+otnqFkzMK6E8VkksD34rlamChYuYYn7r4XN/OhduGxq9+hQQQtEL4+62KRrjYMW8MXrsS8P1wautPsUb2lntvBVdT/zeLK3VpGeuUb2niVALB4K3FqcGo0QNJxoBBrLl6TaRUDoJPTJq9kQK2rKQPVYvlQSYsxlbU1dGWyksZwyutPFCq1UIdquYKTwwX3084hjLxIM/4Nr26VExOr2P9YlBSkhY5Yd+TEPivLurbio1nsVjqkl1RyiVZLNuZa/FhM3MvS6pV9Qc4wWyVM9zDVIxWuLHWNI7u5MT1l9/PIJkp8mwiT9g3nmkfS/5Rc0hhmD9F96PLzLT4aWF4w==
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=+LaSiyjQKaRkfSu7owccJmHDZLLouD0QJw4BgtlzbEM=;
b=D0JwD6pfdvgTZwEt3X5nFPfufuL5iidhjOi+3aX4n65i7I6XCKVK6CdhHltxib/JDOG5HclSdeoASGb+kXc2rWezot0wyme4W6KEsiZVJeZbgM8sqLYdfP78p+aH66OEpmtx6RgVDluc/hZ+dAaVwpj4XXiGtOHBYApTaJDmSQFSk4gNb7FP4GgPspg5QgZUQnTFAhmI02XxjoJUYi4NmdmRQvaW7JsWC02OXqrxwvcmXGKGDbKDknZ8aRxAFMHtbNiVaID1supOHSkXnqFLwn3FznA7gjUzHIwbFGVzk4SozVuQO0auhTqo732quZTLL1urwiJh3gBOPqT0ZuiJeg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=+LaSiyjQKaRkfSu7owccJmHDZLLouD0QJw4BgtlzbEM=;
b=MTmelnt73lsEHVgeepE4mkFWtzZSnp8JTiVipvLgsqZgoBTKLJ2qAKLbhZ3DtjYmtgg8sCt0w3lVsxwFBOsb/orhFnqlVdTGnay3tqE3rEXdb4HK61BgPpO88TaqetCV++SHRiTWHnL5nhFWgPKz85TpXk/z9Modgw4MSXnaY3oW399sjB53KPZ3t/Uai5VZ8zgVDqvnkUgHFja8chhW1LUtWleEbHoweWqJ9KrStGX1vsDAiQe6xHsRu2eYY7ySLqjqKfk70DCth/IcgtdTvhVPyR+kDOBcQu2GjcZ5YrHBCmKG2PcTPKUAwTqFQHZXsoYzYHa86ewnkX5kt77emg==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:16 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:16 +0000
Date: Tue, 26 Nov 2024 15:38:14 +0100
To: dev@openvswitch.org
Message-ID:
<3eac90770394f381eb5191c264802755dd825a2f.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0116.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::20) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AMS0EPF000001A8:EE_|DB4PR10MB6240:EE_
X-MS-Office365-Filtering-Correlation-Id: 6d2fbca5-52c0-4e68-4769-08dd0e27f8b2
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
J2XZ2IC+CpqM8qreXhSUqbzAgHpYzrPe475QfQc3vN2zRWBA+puzqEe6bcIkIfBb/8J0L2Srw7nz6FrfzGAvRNRIxdJfnGIqh3TWmNF9CzTfEoV6m0bd+Dxn9xXqngQIyQBFHeoZE3j64vgjagwjpME+6glCcysbzW8lzCzTA3lVudlGemVaeliv+3q3PcHidgo8T4STbSw6h6j+6LS4yzG0NLq6QgwtCs5fnNdIdCRpl50zULpA/TbHhl/os8zLpYTto818pjczzUCzb8rlbo1zxY8kOPZUdkSWLB63+ptobOLYqNJnLVfKm/qCiRrFRhqYhI2vCQkb5u23Vqmi3zgw0mtP+Ok5J/Nd/f4pG6jt3/iDD5qzwOv9E8Hd2LAK6f4OQy0OVtbDqN3s/tvbxiMZ8ra6/w5lcGuO+dUXwRtM7PUjPKJ2I492obq1sh44g8JXBhhU0LqWnVfj38iEHUMSmfcPBO+X3uKOUoQBwIcuVUCxsHw4DCSiBnkr0zQXXIqBs1kLMrVKcsuyId8BR3qHRji6VFnPtvN8uxmnrlqz0AmFTe3mXYGTC+WQKGqt0d362PzRb8mICQxR1XA79AcNEddPKZez/jZYaBGIx7KomrdRm3KuQv6DBlYrjCJ1mCKrxy6vuietNSU1nz/DS98poV1hO6wj9WuEysZnX0rzCEp1gp0+okiIdwiulbB2vYbTYGOlYRyqOgtIuDnpfAyCfIRqPC0loqRkMBI6RfryHcn74CsjeG5xUth9Bdo/998+oz0roaA+g6UwzokfG4WEjUuUjm2ns1xzw/gR+cWBOxYBX4vmKjIAbjLWjswufrAVZFdfFD7JUdGdjwKoOGmfkFmWYObWYiVUwH8JCgfCLiC0sPhH6D9DV5OYWDYGn+W/Kq7jOiM182+EAw0N6bVCt3Plwn2pT7PIZ3VSVQiKDDj/31Ut3QeiJxj4/95d4RggoNluhGeplE9jc697un3hgQUfAML2mfru271wrtNKMiPItPz9ZROSb6DeePuinRBqlKzybxyC0A8PEYSb8LLKwkDWpH4b313X50+zDTX0e1udsOkt8DFzcfUQdk3YV/xIvhpktqsOLmht4uPAVT5l7jMNO1NKyLxsnxA5ofZDABoZZZPE4Y7ZtjnUamvyM7oVaUIY4qepdpUF9MIkMc/OPlMINnVXnqXmjGv2JvafBAAvzGg9dd92r0bV0eFHQJgTKQGLQjGEmZ5TkfOTTFaO1E87mN6Wm+3nb78+8ayqOjj8CgfDLHja4ISL71Adx+nI+meG6lvnbMKz3QVp50OefDNw/0fpnCmoVdtI3VqNxhLhx4NrOcQGrcHq7tY7crd/YfU8UfEM4kbC4usgvw==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF000001A8.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
fd942906-094f-4971-cd81-08dd0e27f696
X-Microsoft-Antispam: BCL:0;
ARA:13230040|36860700013|14060799003|376014|1800799024|82310400026|35042699022;
X-Microsoft-Antispam-Message-Info:
HixMWjiNSMJywXTRD8fFGf0SogIxSHEBkAZsIWIdu4rnsgRo1A0DQBHTeGDkPr8UKp6Blix3ioctbnRPYS/+WXRolyJCqmDMQ1QQcrUXXxHO7FoACRd4aYE9+vXmmCMafqqR/DLVXO18ewpfkJaDs7f34ifyo3V1K1sNJWn3yUL3qkLLPIIw+RR3T8oSW72T///hips9sAd5AeLUUI7Hskweeaksw53PMy1oxhdX4dG+pyULEqZ5Y0MdqsMuf5WLEZHNgnoDcY497xv2cs428//9vXZZbdMIzr8imyDrCMnFAWT6XSN91OmXMEk2QyLpX/CpjDfBym8w+Hdh3oDmrzhqLUstthA8rIq1KPgQ5pky4xvICIfnqlPB5WH/CBuMp2bWWjbKhRVEvlrIKdXR+XNvqWGqZiUWUN6836jpjjeB1C6IfGDvKDCJLucVVsFkAB3mdpQVS6RZvrKnCBO5BrFYP9shOh1DyRyTZN8uLKeYDN1kjdxfA8DPwpC20t7LU769qUr6JpcFXRQe2IFgzzsxt2Wmk+djZHrSQHeMD8DvtqO5H90WNkK+hpguaPnX1eVqrBtDmPAR+pUwVk9fXLCPoM0r40NfVivP+k9Ov2FOw7mnoFfU+dtJc4DzzKSnUUp489XatYAhZvpVAfcn9tU0+DkbT5VT70M1a2mrG3EzldCPDDuoTkFqgIAfGt2W2VNr5vQuZhhN6LPU+ld0aYG8V4NIE/8NIbhf9ikItTW8yVmtKk3t175xpd//ZcdQlrbG6pcp/jPATp7GfNBVEzCAHFibmS3FU7kltebDS7KOL+UmrvtIQoA+80AqmbOsn5WGhKSafjy3bVeo36bSV3EfT8fU+rfIKwbQbrQzYSYZtBoTdtG+BlpweTGv2wVmgjvelSNC+CLFzwyQxAS9cNKDAVRaBObuTpyKVwLaz9cH0w3n32anybQ2AxLnuGLOpyDKYAZ7VxMh0ATABvw5zE+6UyaU1aA0ZRAfCRzv0usedySRVLBxNUi0Wza/m2yIsngYpMB9QSHSmNm55Qd92UjjFyWaJSrHqEcQAWQ+k4LmdwqDvKUejJqAMW3uUa35p39ks0olJxJN0ZCHBMV9ZlUdYprKKMtGRt4dUdZsT+eGj/KzYBEOqJBQh78vZT/e4mptrTHgsj4lll8t40t8DSidfaK5t7iNEvp+9KaCRAvjGXN6Afa8zcfzPmI/dAxDYpHy4eigoMzIOkwybW27BAMTKzTSTl1B2FqI+jOcFr6JO1vCD7GO+RwZwOdWBxj/3vu3Kb3niZQoRVg+AeNyo3RXTlcQtQ8dCijo4b32/yBmcTAtnN1CfhJpLbnN+t2X7YHgggRmJiQp9j1ib/DnbE2V4w2WThBwD0kPwZqgH+lWtGD/A0gcpsMSewON8NcdFce7QjKukkzQwbjPZo19AgBX7y1ScvR/jtibGKQOUx15UJqbQvbqFJILbDTQnp9u
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(36860700013)(14060799003)(376014)(1800799024)(82310400026)(35042699022);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:18.5112 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
6d2fbca5-52c0-4e68-4769-08dd0e27f8b2
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF000001A8.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR10MB6240
Subject: [ovs-dev] [PATCH ovn v3 15/33] northd: Allow announcing individual
host routes.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
sometimes we want to use individual host routes instead of the connected
routes of LRPs.
This allows the network fabric to know which adresses are actually in
use and e.g. drop traffic to adresses that are not used anyway.
Signed-off-by: Felix Huettner
---
NEWS | 2 +
northd/en-lflow.c | 1 +
northd/en-routes-sync.c | 270 ++++++++++++++++++++++++++++++++++-----
northd/en-routes-sync.h | 22 +++-
northd/inc-proc-northd.c | 2 +
northd/northd.c | 32 ++---
northd/northd.h | 25 +++-
ovn-nb.xml | 27 ++++
ovn-sb.ovsschema | 3 +-
ovn-sb.xml | 13 ++
tests/ovn-northd.at | 67 ++++++++++
11 files changed, 406 insertions(+), 58 deletions(-)
diff --git a/NEWS b/NEWS
index efb42b32b..a780940fc 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@ Post v24.09.0
Routes entered into the "Route" table in the southbound database will be
learned by the respective LR. They are included in the route table with
a lower priority than static routes.
+ - Add the option "dynamic-routing-connected-as-host-routes" to LRPs. If set
+ to true then connected routes are announced as individual host routes.
OVN v24.09.0 - 13 Sep 2024
--------------------------
diff --git a/northd/en-lflow.c b/northd/en-lflow.c
index 8995f0300..aabba943e 100644
--- a/northd/en-lflow.c
+++ b/northd/en-lflow.c
@@ -26,6 +26,7 @@
#include "en-northd.h"
#include "en-meters.h"
#include "en-sampling-app.h"
+#include "en-routes-sync.h"
#include "lflow-mgr.h"
#include "lib/inc-proc-eng.h"
diff --git a/northd/en-routes-sync.c b/northd/en-routes-sync.c
index 7ca87c76a..d5a534f86 100644
--- a/northd/en-routes-sync.c
+++ b/northd/en-routes-sync.c
@@ -13,6 +13,7 @@
*/
#include
+#include
#include "openvswitch/vlog.h"
#include "smap.h"
@@ -20,6 +21,7 @@
#include "northd.h"
#include "en-routes-sync.h"
+#include "en-lr-stateful.h"
#include "lib/stopwatch-names.h"
#include "openvswitch/hmap.h"
#include "ovn-util.h"
@@ -29,15 +31,19 @@ VLOG_DEFINE_THIS_MODULE(en_routes_sync);
static void
routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route_table *sbrec_route_table,
+ const struct lr_stateful_table *lr_stateful_table,
const struct hmap *parsed_routes,
const struct hmap *lr_ports,
const struct ovn_datapaths *lr_datapaths,
- struct hmap *parsed_routes_out);
+ struct hmap *parsed_routes_out,
+ struct routes_sync_tracked_data *trk_data);
static void
routes_sync_init(struct routes_sync_data *data)
{
hmap_init(&data->parsed_routes);
+ uuidset_init(&data->trk_data.nb_lr_stateful);
+ uuidset_init(&data->trk_data.nb_ls);
}
static void
@@ -48,12 +54,15 @@ routes_sync_destroy(struct routes_sync_data *data)
parsed_route_free(r);
}
hmap_destroy(&data->parsed_routes);
+ uuidset_destroy(&data->trk_data.nb_lr_stateful);
+ uuidset_destroy(&data->trk_data.nb_ls);
}
bool
routes_sync_northd_change_handler(struct engine_node *node,
- void *data OVS_UNUSED)
+ void *data_)
{
+ struct routes_sync_data *data = data_;
struct northd_data *northd_data = engine_get_input_data("northd", node);
if (!northd_has_tracked_data(&northd_data->trk_data)) {
return false;
@@ -69,7 +78,58 @@ routes_sync_northd_change_handler(struct engine_node *node,
* this happens and so does this node.
* Note: When we add I-P to the created/deleted logical routers or
* logical router ports, we need to revisit this handler.
+ * 3. Indirectly northd_data->ls_ports if we announce host routes
+ * This is what we check below
*/
+
+ struct hmapx_node *hmapx_node;
+ const struct ovn_port *op;
+ HMAPX_FOR_EACH (hmapx_node, &northd_data->trk_data.trk_lsps.created) {
+ op = hmapx_node->data;
+ if (uuidset_contains(&data->trk_data.nb_ls,
+ &op->od->nbs->header_.uuid)) {
+ return false;
+ }
+ }
+ HMAPX_FOR_EACH (hmapx_node, &northd_data->trk_data.trk_lsps.updated) {
+ op = hmapx_node->data;
+ if (uuidset_contains(&data->trk_data.nb_ls,
+ &op->od->nbs->header_.uuid)) {
+ return false;
+ }
+ }
+ HMAPX_FOR_EACH (hmapx_node, &northd_data->trk_data.trk_lsps.deleted) {
+ op = hmapx_node->data;
+ if (uuidset_contains(&data->trk_data.nb_ls,
+ &op->od->nbs->header_.uuid)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool
+routes_sync_lr_stateful_change_handler(struct engine_node *node,
+ void *data_)
+{
+ /* We only actually use lr_stateful data if we expose individual host
+ * routes. In this case we for now just recompute.
+ * */
+ struct ed_type_lr_stateful *lr_stateful_data =
+ engine_get_input_data("lr_stateful", node);
+ struct routes_sync_data *data = data_;
+
+ struct hmapx_node *hmapx_node;
+ const struct lr_stateful_record *lr_stateful_rec;
+ HMAPX_FOR_EACH (hmapx_node, &lr_stateful_data->trk_data.crupdated) {
+ lr_stateful_rec = hmapx_node->data;
+ if (uuidset_contains(&data->trk_data.nb_lr_stateful,
+ &lr_stateful_rec->nbr_uuid)) {
+ return false;
+ }
+ }
+
return true;
}
@@ -101,14 +161,18 @@ en_routes_sync_run(struct engine_node *node, void *data)
const struct sbrec_route_table *sbrec_route_table =
EN_OVSDB_GET(engine_get_input("SB_route", node));
struct northd_data *northd_data = engine_get_input_data("northd", node);
+ struct ed_type_lr_stateful *lr_stateful_data =
+ engine_get_input_data("lr_stateful", node);
stopwatch_start(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
routes_table_sync(eng_ctx->ovnsb_idl_txn, sbrec_route_table,
+ &lr_stateful_data->table,
&routes_data->parsed_routes,
&northd_data->lr_ports,
&northd_data->lr_datapaths,
- &routes_sync_data->parsed_routes);
+ &routes_sync_data->parsed_routes,
+ &routes_sync_data->trk_data);
stopwatch_stop(ROUTES_SYNC_RUN_STOPWATCH_NAME, time_msec());
engine_set_node_state(node, EN_UPDATED);
@@ -122,6 +186,7 @@ struct route_entry {
char *logical_port;
char *ip_prefix;
+ char *tracked_port;
char *type;
bool stale;
};
@@ -129,7 +194,10 @@ struct route_entry {
static struct route_entry *
route_alloc_entry(struct hmap *routes,
const struct sbrec_datapath_binding *sb_db,
- char *logical_port, char *ip_prefix, char *route_type)
+ const char *logical_port,
+ const char *ip_prefix,
+ const char *route_type,
+ const char *tracked_port)
{
struct route_entry *route_e = xzalloc(sizeof *route_e);
@@ -137,6 +205,9 @@ route_alloc_entry(struct hmap *routes,
route_e->logical_port = xstrdup(logical_port);
route_e->ip_prefix = xstrdup(ip_prefix);
route_e->type = xstrdup(route_type);
+ if (tracked_port) {
+ route_e->tracked_port = xstrdup(tracked_port);
+ }
route_e->stale = false;
uint32_t hash = uuid_hash(&sb_db->header_.uuid);
hash = hash_string(logical_port, hash);
@@ -149,27 +220,72 @@ route_alloc_entry(struct hmap *routes,
static struct route_entry *
route_lookup_or_add(struct hmap *route_map,
const struct sbrec_datapath_binding *sb_db,
- char *logical_port, const struct in6_addr *prefix,
- unsigned int plen, char *route_type)
+ const char *logical_port, const char *ip_prefix,
+ const char *route_type, const char *tracked_port)
{
struct route_entry *route_e;
uint32_t hash;
- char *ip_prefix = normalize_v46_prefix(prefix, plen);
-
hash = uuid_hash(&sb_db->header_.uuid);
hash = hash_string(logical_port, hash);
hash = hash_string(ip_prefix, hash);
HMAP_FOR_EACH_WITH_HASH (route_e, hmap_node, hash, route_map) {
- if (!strcmp(route_e->type, route_type)) {
- free(ip_prefix);
- return route_e;
+ if (!uuid_equals(&sb_db->header_.uuid,
+ &route_e->sb_db->header_.uuid)) {
+ continue;
}
+
+ if (strcmp(logical_port, route_e->logical_port)) {
+ continue;
+ }
+
+ if (strcmp(ip_prefix, route_e->ip_prefix)) {
+ continue;
+ }
+
+ if (strcmp(route_type, route_e->type)) {
+ continue;
+ }
+
+ if (!streq(tracked_port, route_e->tracked_port)) {
+ continue;
+ }
+
+ return route_e;
+ }
+
+ route_e = route_alloc_entry(route_map, sb_db,
+ logical_port, ip_prefix, route_type,
+ tracked_port);
+ return route_e;
+}
+
+static struct route_entry *
+route_sync_to_sb(struct ovsdb_idl_txn *ovnsb_txn, struct hmap *route_map,
+ const struct sbrec_datapath_binding *sb_db,
+ const char *logical_port, const char *ip_prefix,
+ const char *route_type, const char *tracked_port)
+{
+ struct route_entry *route_e = route_lookup_or_add(route_map,
+ sb_db,
+ logical_port,
+ ip_prefix,
+ route_type,
+ tracked_port);
+ route_e->stale = false;
+
+ if (!route_e->sb_route) {
+ const struct sbrec_route *sr = sbrec_route_insert(ovnsb_txn);
+ sbrec_route_set_datapath(sr, route_e->sb_db);
+ sbrec_route_set_logical_port(sr, route_e->logical_port);
+ sbrec_route_set_ip_prefix(sr, route_e->ip_prefix);
+ sbrec_route_set_type(sr, route_e->type);
+ if (route_e->tracked_port) {
+ sbrec_route_set_tracked_port(sr, route_e->tracked_port);
+ }
+ route_e->sb_route = sr;
}
- route_e = route_alloc_entry(route_map, sb_db,
- logical_port, ip_prefix, route_type);
- free(ip_prefix);
return route_e;
}
@@ -179,6 +295,7 @@ route_erase_entry(struct route_entry *route_e)
free(route_e->logical_port);
free(route_e->ip_prefix);
free(route_e->type);
+ free(route_e->tracked_port);
free(route_e);
}
@@ -270,13 +387,95 @@ parse_route_from_sbrec_route(struct hmap *parsed_routes_out,
);
}
+static void
+publish_lport_addresses(struct ovsdb_idl_txn *ovnsb_txn,
+ struct hmap *route_map,
+ const struct sbrec_datapath_binding *sb_db,
+ char *logical_port,
+ struct lport_addresses *addresses,
+ struct ovn_port *tracking_port)
+{
+ for (int i = 0; i < addresses->n_ipv4_addrs; i++) {
+ const struct ipv4_netaddr *addr = &addresses->ipv4_addrs[i];
+ char *addr_s = xasprintf("%s/32", addr->addr_s);
+ route_sync_to_sb(ovnsb_txn, route_map,
+ sb_db,
+ logical_port,
+ addr_s,
+ "advertise",
+ tracking_port->sb->logical_port);
+ free(addr_s);
+ }
+ for (int i = 0; i < addresses->n_ipv6_addrs; i++) {
+ if (in6_is_lla(&addresses->ipv6_addrs[i].network)) {
+ continue;
+ }
+ const struct ipv6_netaddr *addr = &addresses->ipv6_addrs[i];
+ char *addr_s = xasprintf("%s/128", addr->addr_s);
+ route_sync_to_sb(ovnsb_txn, route_map,
+ sb_db,
+ logical_port,
+ addr_s,
+ "advertise",
+ tracking_port->sb->logical_port);
+ free(addr_s);
+ }
+}
+
+
+static void
+publish_host_routes(struct ovsdb_idl_txn *ovnsb_txn,
+ struct hmap *route_map,
+ const struct lr_stateful_table *lr_stateful_table,
+ const struct parsed_route *route,
+ struct routes_sync_tracked_data *trk_data)
+{
+ struct ovn_port *port;
+ struct ovn_datapath *lsp_od = route->out_port->peer->od;
+ uuidset_insert(&trk_data->nb_ls, &lsp_od->nbs->header_.uuid);
+ HMAP_FOR_EACH (port, dp_node, &lsp_od->ports) {
+ if (port->peer) {
+ /* This is a LSP connected to an LRP */
+ struct lport_addresses *addresses = &port->peer->lrp_networks;
+ publish_lport_addresses(ovnsb_txn, route_map, route->od->sb,
+ route->out_port->key,
+ addresses, port->peer);
+
+ const struct lr_stateful_record *lr_stateful_rec;
+ lr_stateful_rec = lr_stateful_table_find_by_index(
+ lr_stateful_table, port->peer->od->index);
+ uuidset_insert(&trk_data->nb_lr_stateful,
+ &lr_stateful_rec->nbr_uuid);
+ struct ovn_port_routable_addresses addrs = get_op_addresses(
+ port->peer, lr_stateful_rec, false);
+ for (int i = 0; i < addrs.n_addrs; i++) {
+ publish_lport_addresses(ovnsb_txn, route_map, route->od->sb,
+ route->out_port->key,
+ &addrs.laddrs[i],
+ port->peer);
+ }
+ destroy_routable_addresses(&addrs);
+ } else {
+ /* This is just a plain LSP */
+ for (int i = 0; i < port->n_lsp_addrs; i++) {
+ publish_lport_addresses(ovnsb_txn, route_map, route->od->sb,
+ route->out_port->key,
+ &port->lsp_addrs[i],
+ port);
+ }
+ }
+ }
+}
+
static void
routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
const struct sbrec_route_table *sbrec_route_table,
+ const struct lr_stateful_table *lr_stateful_table,
const struct hmap *parsed_routes,
const struct hmap *lr_ports,
const struct ovn_datapaths *lr_datapaths,
- struct hmap *parsed_routes_out)
+ struct hmap *parsed_routes_out,
+ struct routes_sync_tracked_data *trk_data)
{
if (!ovnsb_txn) {
return;
@@ -303,7 +502,8 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
sb_route->datapath,
sb_route->logical_port,
sb_route->ip_prefix,
- sb_route->type);
+ sb_route->type,
+ sb_route->tracked_port);
route_e->stale = true;
route_e->sb_route = sb_route;
}
@@ -321,32 +521,34 @@ routes_table_sync(struct ovsdb_idl_txn *ovnsb_txn,
false)) {
continue;
}
- if (route->source == ROUTE_SOURCE_CONNECTED &&
- !get_nbrp_or_nbr_option(route->out_port,
+ if (route->source == ROUTE_SOURCE_CONNECTED) {
+ if (!get_nbrp_or_nbr_option(route->out_port,
"dynamic-routing-connected")) {
- continue;
+ continue;
+ }
+ if (smap_get_bool(&route->out_port->nbrp->options,
+ "dynamic-routing-connected-as-host-routes",
+ false)) {
+ publish_host_routes(ovnsb_txn, &sync_routes,
+ lr_stateful_table, route, trk_data);
+ continue;
+ }
}
if (route->source == ROUTE_SOURCE_STATIC &&
!get_nbrp_or_nbr_option(route->out_port,
"dynamic-routing-static")) {
continue;
}
- route_e = route_lookup_or_add(&sync_routes,
- route->od->sb,
- route->out_port->key,
- &route->prefix,
- route->plen,
- "advertise");
- route_e->stale = false;
- if (!route_e->sb_route) {
- const struct sbrec_route *sr = sbrec_route_insert(ovnsb_txn);
- sbrec_route_set_datapath(sr, route_e->sb_db);
- sbrec_route_set_logical_port(sr, route_e->logical_port);
- sbrec_route_set_ip_prefix(sr, route_e->ip_prefix);
- sbrec_route_set_type(sr, route_e->type);
- route_e->sb_route = sr;
- }
+ char *ip_prefix = normalize_v46_prefix(&route->prefix,
+ route->plen);
+ route_sync_to_sb(ovnsb_txn, &sync_routes,
+ route->od->sb,
+ route->out_port->key,
+ ip_prefix,
+ "advertise",
+ NULL);
+ free(ip_prefix);
}
HMAP_FOR_EACH_POP (route_e, hmap_node, &sync_routes) {
diff --git a/northd/en-routes-sync.h b/northd/en-routes-sync.h
index 391f17452..10f33ce91 100644
--- a/northd/en-routes-sync.h
+++ b/northd/en-routes-sync.h
@@ -15,9 +15,29 @@
#define EN_ROUTES_SYNC_H 1
#include "lib/inc-proc-eng.h"
+#include "lib/uuidset.h"
+#include "openvswitch/hmap.h"
+
+struct routes_sync_tracked_data {
+ /* Contains the uuids of all NB Logical Routers where we used a
+ * lr_stateful_record during computation. */
+ struct uuidset nb_lr_stateful;
+ /* Contains the uuids of all NB Logical Switches where we rely on port
+ * port changes for host routes. */
+ struct uuidset nb_ls;
+};
+
+struct routes_sync_data {
+ struct hmap parsed_routes;
+
+ /* Node's tracked data. */
+ struct routes_sync_tracked_data trk_data;
+};
bool routes_sync_northd_change_handler(struct engine_node *node,
- void *data OVS_UNUSED);
+ void *data);
+bool routes_sync_lr_stateful_change_handler(struct engine_node *node,
+ void *data);
void *en_routes_sync_init(struct engine_node *, struct engine_arg *);
void en_routes_sync_cleanup(void *data);
void en_routes_sync_run(struct engine_node *, void *data);
diff --git a/northd/inc-proc-northd.c b/northd/inc-proc-northd.c
index 741295709..84072d6ce 100644
--- a/northd/inc-proc-northd.c
+++ b/northd/inc-proc-northd.c
@@ -271,6 +271,8 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_routes_sync, &en_sb_route, NULL);
engine_add_input(&en_routes_sync, &en_northd,
routes_sync_northd_change_handler);
+ engine_add_input(&en_routes_sync, &en_lr_stateful,
+ routes_sync_lr_stateful_change_handler);
engine_add_input(&en_sync_meters, &en_nb_acl, NULL);
engine_add_input(&en_sync_meters, &en_nb_meter, NULL);
diff --git a/northd/northd.c b/northd/northd.c
index 4439a74da..a2e59dcfc 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -1094,19 +1094,6 @@ build_datapaths(struct ovsdb_idl_txn *ovnsb_txn,
ods_build_array_index(lr_datapaths);
}
-/* Structure representing logical router port
- * routable addresses. This includes DNAT and Load Balancer
- * addresses. This structure will only be filled in if the
- * router port is a gateway router port. Otherwise, all pointers
- * will be NULL and n_addrs will be 0.
- */
-struct ovn_port_routable_addresses {
- /* The parsed routable addresses */
- struct lport_addresses *laddrs;
- /* Number of items in the laddrs array */
- size_t n_addrs;
-};
-
static bool lsp_can_be_inc_processed(const struct nbrec_logical_switch_port *);
/* This function returns true if 'op' is a gateway router port.
@@ -1141,7 +1128,7 @@ is_cr_port(const struct ovn_port *op)
return op->primary_port;
}
-static void
+void
destroy_routable_addresses(struct ovn_port_routable_addresses *ra)
{
for (size_t i = 0; i < ra->n_addrs; i++) {
@@ -1154,12 +1141,14 @@ static char **get_nat_addresses(const struct ovn_port *op, size_t *n,
bool routable_only, bool include_lb_ips,
const struct lr_stateful_record *);
-static struct ovn_port_routable_addresses
-get_op_routable_addresses(struct ovn_port *op,
- const struct lr_stateful_record *lr_stateful_rec)
+struct ovn_port_routable_addresses
+get_op_addresses(struct ovn_port *op,
+ const struct lr_stateful_record *lr_stateful_rec,
+ bool routable_only)
{
size_t n;
- char **nats = get_nat_addresses(op, &n, true, true, lr_stateful_rec);
+ char **nats = get_nat_addresses(op, &n, routable_only, true,
+ lr_stateful_rec);
if (!nats) {
return (struct ovn_port_routable_addresses) {
@@ -1192,6 +1181,13 @@ get_op_routable_addresses(struct ovn_port *op,
};
}
+static struct ovn_port_routable_addresses
+get_op_routable_addresses(struct ovn_port *op,
+ const struct lr_stateful_record *lr_stateful_rec)
+{
+ return get_op_addresses(op, lr_stateful_rec, true);
+}
+
static void
ovn_port_set_nb(struct ovn_port *op,
diff --git a/northd/northd.h b/northd/northd.h
index 991ba5f9f..dc51630ed 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -25,6 +25,7 @@
#include "openvswitch/hmap.h"
#include "simap.h"
#include "ovs-thread.h"
+#include "en-lr-stateful.h"
struct northd_input {
/* Northbound table references */
@@ -186,10 +187,6 @@ struct routes_data {
struct hmap bfd_active_connections;
};
-struct routes_sync_data {
- struct hmap parsed_routes;
-};
-
struct route_policies_data {
struct hmap route_policies;
struct hmap bfd_active_connections;
@@ -936,4 +933,24 @@ ovn_port_find_bound(const struct hmap *ports, const char *name)
return ovn_port_find__(ports, name, true);
}
+/* Structure representing logical router port
+ * routable addresses. This includes DNAT and Load Balancer
+ * addresses. This structure will only be filled in if the
+ * router port is a gateway router port. Otherwise, all pointers
+ * will be NULL and n_addrs will be 0.
+ */
+struct ovn_port_routable_addresses {
+ /* The parsed routable addresses */
+ struct lport_addresses *laddrs;
+ /* Number of items in the laddrs array */
+ size_t n_addrs;
+};
+
+struct ovn_port_routable_addresses get_op_addresses(
+ struct ovn_port *op,
+ const struct lr_stateful_record *lr_stateful_rec,
+ bool routable_only);
+
+void destroy_routable_addresses(struct ovn_port_routable_addresses *ra);
+
#endif /* NORTHD_H */
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 75fe40c01..d67a3d07a 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -3705,6 +3705,33 @@ or
key="dynamic-routing-static" table="Logical_Router_Port"/> will be
used.
+
+ Only relevant if on the respective Logical_Router is set
+ to true
and also
+ is enabled on
+ the LR or LRP.
+
+ In this case the prefix connected to the LRP is not advertised as a
+ whole. Rather each individual IP address that is actually in use inside
+ this prefix is announced as a host route.
+
+ This can be used to:
+
+ -
+ allow the fabric outside of OVN to drop traffic towards IP
+ addresses that are not actually used. This traffic would otherwise
+ hit this LR and then be dropped.
+
+
+ -
+ If this LR has multiple LRPs connected to the fabric on different
+ chassis: allows the fabric outside of OVN to steer packets to the
+ chassis which already hosts this backing ip address.
+
+
+
diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema
index 74540782e..01df9cc6b 100644
--- a/ovn-sb.ovsschema
+++ b/ovn-sb.ovsschema
@@ -1,7 +1,7 @@
{
"name": "OVN_Southbound",
"version": "20.38.0",
- "cksum": "1944407838 32212",
+ "cksum": "1452226583 32264",
"tables": {
"SB_Global": {
"columns": {
@@ -626,6 +626,7 @@
"logical_port": {"type": "string"},
"ip_prefix": {"type": "string"},
"nexthop": {"type": "string"},
+ "tracked_port": {"type": "string"},
"type": {"type": {"key": {"type": "string",
"enum": ["set", ["advertise",
"receive"]]},
diff --git a/ovn-sb.xml b/ovn-sb.xml
index 493b7e839..bf587153a 100644
--- a/ovn-sb.xml
+++ b/ovn-sb.xml
@@ -5224,6 +5224,19 @@ tcp.flags = RST;
+
+
+ Only relevant for type advertise
and if
+ options:dynamic-routing-connected-as-host-routes
is
+ set on the OVN_Northbound.Logical_Router_Port
.
+
+ In this case this lists the name of the Port_Binding
+ that is holding this ip address. ovn-controller can use this
+ information to determine the distance and therefor the route priority
+ of a published route
+
+
+
If the route is to be exported from OVN to the outside network or if
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 213536707..b40eb24e6 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -14042,5 +14042,72 @@ AT_CHECK([grep -w "lr_in_ip_routing" lr0flows | ovn_strip_lflows], [0], [dnl
])
+AT_CLEANUP
+])
+
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([dynamic-routing - host routes])
+AT_KEYWORDS([dynamic-routing])
+ovn_start
+
+# we start with announcing routes on a lr with 2 lrps
+# lr0-sw0 is connected to ls sw0
+check ovn-nbctl lr-add lr0
+check ovn-nbctl set Logical_Router lr0 option:dynamic-routing=true \
+ option:dynamic-routing-connected=true \
+ option:dynamic-routing-static=true
+check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24
+check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 10.0.1.1/24
+check ovn-nbctl ls-add sw0
+check ovn-nbctl lsp-add sw0 sw0-lr0
+check ovn-nbctl --wait=sb set Logical_Switch_Port sw0-lr0 type=router options:router-port=lr0-sw0
+check_row_count Route 2 type=advertise tracked_port='""'
+datapath=$(ovn-sbctl --bare --columns _uuid list datapath_binding lr0)
+
+# configuring the LRP lr0-sw0 to send host routes
+# as sw0 is quite empty we will only see the addresses of lr0-sw0
+check ovn-nbctl --wait=sb set Logical_Router_Port lr0-sw0 options:dynamic-routing-connected-as-host-routes=true
+check_row_count Route 2 type=advertise
+AT_CHECK([ovn-sbctl --columns ip_prefix,tracked_port --bare find Route datapath=$datapath logical_port=lr0-sw0], [0], [dnl
+10.0.0.1/32
+lr0-sw0
+])
+
+# adding a VIF to the LS sw0 will advertise it as well
+check ovn-nbctl lsp-add sw0 sw0-vif0
+check ovn-nbctl --wait=sb lsp-set-addresses sw0-vif0 "00:aa:bb:cc:dd:ee 10.0.0.2"
+check_row_count Route 3 type=advertise
+check_row_count Route 2 type=advertise tracked_port!='""'
+AT_CHECK([ovn-sbctl --columns tracked_port --bare find Route datapath=$datapath logical_port=lr0-sw0 ip_prefix=10.0.0.2/32], [0], [dnl
+sw0-vif0
+])
+
+# adding a LR lr1 to the LS sw0 will advertise the LRP of the new router
+check ovn-nbctl lr-add lr1
+check ovn-nbctl lrp-add lr1 lr1-sw0 00:00:00:01:ff:01 10.0.0.10/24
+check ovn-nbctl lsp-add sw0 sw0-lr1
+check ovn-nbctl --wait=sb set Logical_Switch_Port sw0-lr1 type=router options:router-port=lr1-sw0
+check_row_count Route 4 type=advertise
+check_row_count Route 3 type=advertise tracked_port!='""'
+AT_CHECK([ovn-sbctl --columns tracked_port --bare find Route datapath=$datapath logical_port=lr0-sw0 ip_prefix=10.0.0.10/32], [0], [dnl
+lr1-sw0
+])
+
+# adding a NAT rule to lr1 will advertise it as well
+check ovn-nbctl --wait=sb lr-nat-add lr1 dnat_and_snat 10.0.0.100 192.168.0.1
+check_row_count Route 5 type=advertise
+check_row_count Route 4 type=advertise tracked_port!='""'
+AT_CHECK([ovn-sbctl --columns tracked_port --bare find Route datapath=$datapath logical_port=lr0-sw0 ip_prefix=10.0.0.100/32], [0], [dnl
+lr1-sw0
+])
+
+# adding a static route to lr1 will be advertised just normally
+check ovn-nbctl --wait=sb lr-route-add lr0 172.16.0.0/24 10.0.0.200
+check_row_count Route 6 type=advertise
+check_row_count Route 4 type=advertise tracked_port!='""'
+AT_CHECK([ovn-sbctl --columns ip_prefix --bare find Route datapath=$datapath logical_port=lr0-sw0 ip_prefix=172.16.0.0/24], [0], [dnl
+172.16.0.0/24
+])
+
AT_CLEANUP
])
From patchwork Tue Nov 26 14:38:16 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015486
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=OlTPZ9nX;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=OlTPZ9nX;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
(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 4XyQGz3Dw5z1yCv
for ; Wed, 27 Nov 2024 01:40:43 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 368624350E;
Tue, 26 Nov 2024 14:40:41 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id bk7XPxJEGLim; Tue, 26 Nov 2024 14:40:39 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CF1F6435E7
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=OlTPZ9nX;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=OlTPZ9nX
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp2.osuosl.org (Postfix) with ESMTPS id CF1F6435E7;
Tue, 26 Nov 2024 14:40:14 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 9BC9BC08A8;
Tue, 26 Nov 2024 14:40:14 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
by lists.linuxfoundation.org (Postfix) with ESMTP id 23143C08BA
for ; Tue, 26 Nov 2024 14:40:00 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 0F9DF84CB6
for ; Tue, 26 Nov 2024 14:38:27 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id FMOtpVP94e5c for ;
Tue, 26 Nov 2024 14:38:26 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:c200::4;
helo=duzpr83cu001.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 0ABD885319
Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0ABD885319
Authentication-Results: smtp1.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=OlTPZ9nX;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=OlTPZ9nX
Received: from DUZPR83CU001.outbound.protection.outlook.com
(mail-northeuropeazlp170130004.outbound.protection.outlook.com
[IPv6:2a01:111:f403:c200::4])
by smtp1.osuosl.org (Postfix) with ESMTPS id 0ABD885319
for ; Tue, 26 Nov 2024 14:38:25 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=xoKBiFwFtCGCMKJfqYAnR7+Dhe9oOuh/GLFvfitGDYHTuFkEPIPgXb/2WuzuMBj5Pkc13pZ+0bdVX0zh3fdm2x1oEhgriEvpGJ9R5YbXdGziMzbG8bL0tUG1SG71+6LOSocIEmzQ7kiyb2HRDA6IuHQQSN5hyqmxjOw4vqcw3DRryCGvcrkEcHP5Q2DXG9ckWC7D2ygRLL3/Ph+hlwljo/nY8kB4ofVxQbRSgal3IvPHGxdd/7uXtm4xBEFjcqVY+mYz89g5UluJVimMAvLbSu9rhItvjStnKolqVfvGIlNiNjUmL+m8foUE/eA4orl11fwZz2whs7BGa6xgS8Br8w==
ARC-Message-Signature: i=2; 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=MU2aahXYMRpdgQAiGR0M2WBcijteqoOdQh5BULe9s4E=;
b=q/r0PASWQxiYOm1us9GwhixfsZgcOkXLS+YIFRppAWpMaQY+fGN3IJ6dHqBVbhtZhnOjSTJcAMMMI79n/mKfVrtWe0Ybd7s83KgtqntjwBkP3DP9CAKDAZ4Za8su9TZdVTunxBaaJoUlFzr8bSOhUZTmUjkS/MMYR0/pYDb8USHlBhs9CpxyjEvS3KtetrBOJca7Os+24j9c8HqUJlSxgFer0i3MmN5qnlNyOFldOEJVJwhRh/wjSwT8+k679y2UF9sKjPDBB4H8y6zSyZu7Vk8pAKfSRHjn4swCQU3pL3dy1ed7X92a2pz3QOfhPfMwflIaFgmXVT0MWW+bCeDCSA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=MU2aahXYMRpdgQAiGR0M2WBcijteqoOdQh5BULe9s4E=;
b=OlTPZ9nXHnCMsutEpVYINBdRjzH5YbYBcpbp6ko/3vNL9fvNTgu/VGBtMKKn2/onbfraP9rbusE+ZvinxqZzPTSYOWOo29gZBHNMUwLkBDWOI13QfG+tRDAf40t3dXLtEO2fULkApoBPtJ+5/RD9bvA3Ir+q8d/l0Hcf5S5hTn/txqR9ZjaQKT1zB3uUVVKTGtVBN5oqsinZl4ZROoKOoSptjJ5ZQfmgZYiQeaRLnFrMTkV56gzV/3hxUENBbY2gzh54ATD577LUo8kM3QkwdTOhBM3if8gLzBn/4BLqMMaSUVSAVh78SRwGIxZq66UMJoEFeTKd/dYIKkQ2XCUibQ==
Received: from AM9P192CA0002.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::7)
by PA2PR10MB8942.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:416::9) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:20 +0000
Received: from AM2PEPF0001C710.eurprd05.prod.outlook.com
(2603:10a6:20b:21d:cafe::e2) by AM9P192CA0002.outlook.office365.com
(2603:10a6:20b:21d::7) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:20 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AM2PEPF0001C710.mail.protection.outlook.com (10.167.16.180) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:20 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.42)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:20
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 5054558
X-ExclaimerImprintLatency: 3135773
X-ExclaimerImprintAction: 5334dc00fd1f48f28f1a9994c52f87ed
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=mzdJMFT4zhSHIHciMOvXkmhSj8LuAZdAfVOVL532YQvX3WZIupLbjP/Udytgp2YC7kVoWRoVNVOaOeHtp6gvDWJhFkwFKnfhhnCvuEtdSDUxzsEg1G4qqQyNr/t4ZQZWUiCjIOnNntnyXPTW0JTVYgANtPTotn++1MhAklVtGkThX9R4IpNg0VpoEi51W96Rj79whGD1fAWPqxJiOENJr0fDdCl7UOtNIkE4s6UxQAmMTgxV2IH8svOYJ9jzTlpH5dw1C3Av58sh2uEm4uJhZJcRUnHEi0EWDSUBI8iRYGkvBxhquX0W+u6TR2tNjTa/MK4lWcgjR1ggsBmLeDEY7Q==
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=MU2aahXYMRpdgQAiGR0M2WBcijteqoOdQh5BULe9s4E=;
b=fhTrx0jxiF2ZxtSuXQuUiXUfUaTFJ+3SuA1P4S4JMSte35DdgzkC4kGshd2fwYhxqRWFN8dxkiD9ZTtDgSqGR5LF0ZxL8Z8uhnxmoNwGScmtBzS3MRkRRff5ZlmTb7MMK/AtUiwrA+sBmCpaUBJw63j1iyeLu5xnlF29367kTP0oAPnad0+gekKqLaZlAmK2ghbhYzzR0Wn/FqWZ6jRd+hkLK6/Z99nIyxKXi0osto0H6LTl9iqx2jYetfqkeQ+yfMc1c0d2GwE70D3aG+kE249ZYZNj4OkFpRf9Tf2Db4K16IFKwgXEh3Vfu5oa8hSozjTiU5agl+X7VRrwaFCGoQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=MU2aahXYMRpdgQAiGR0M2WBcijteqoOdQh5BULe9s4E=;
b=OlTPZ9nXHnCMsutEpVYINBdRjzH5YbYBcpbp6ko/3vNL9fvNTgu/VGBtMKKn2/onbfraP9rbusE+ZvinxqZzPTSYOWOo29gZBHNMUwLkBDWOI13QfG+tRDAf40t3dXLtEO2fULkApoBPtJ+5/RD9bvA3Ir+q8d/l0Hcf5S5hTn/txqR9ZjaQKT1zB3uUVVKTGtVBN5oqsinZl4ZROoKOoSptjJ5ZQfmgZYiQeaRLnFrMTkV56gzV/3hxUENBbY2gzh54ATD577LUo8kM3QkwdTOhBM3if8gLzBn/4BLqMMaSUVSAVh78SRwGIxZq66UMJoEFeTKd/dYIKkQ2XCUibQ==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:17 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:17 +0000
Date: Tue, 26 Nov 2024 15:38:16 +0100
To: dev@openvswitch.org
Message-ID:
<0a5b8b40be92ccf945f6024db85acaf61ac1bc21.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AM2PEPF0001C710:EE_|PA2PR10MB8942:EE_
X-MS-Office365-Filtering-Correlation-Id: 5434c1b3-ef31-488b-27be-08dd0e27f941
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
DtZ6bKCmNli5vD5EoCbl4+Tt3+g214WD092FIFhxdcnIqykS76nFxJMHPXUFjfjAbthHISyC6PMCIsY4DQ5agvvhDVQYwE/xzGABLj18KjbA+OHZmGO20OWqS31gIN+Yd6nvO/r5Ybz72IHvKgS8ONcuQz4ycCM36ou25w8SEJtq+Ci11AJ2OIiI3D6FshEaKcslvIhefX9F0CQoa8YeB2GLwuChyByIKV24LcSRIERB1cL11en1MIVQM1JZPy/+L5tks54mzBAOgQZkTkzsAdGXNMif+QR4KhVOAOLFpELAve3SM615SjXjMYk3G7GzaaEShnA08L+9M9m5Lt68DHIfU8/l4T8znNnqdfKwwolUCE7qjf/2vcgbbxZLnzkB2M1/Bg+nkr6ABCtPqtLTBQy1tZZaNAXkAHneT+AeWEaJwQUwQJwcm9AVAHqUkcWHqUSB5bSK8clt0IKL6VCF+oMU/FM5NbRoA257+jlo/4iQtL76D265HIKuKeawKjgVMn8VUKupO9QwPRiZE+EazkLramFCxqqcFdhQhQsbUI2IQyEZv9j1xTxPmChXf23D9XqPbqe7ZJij/73jhl/s/bj9eRmL68DjMgNfVJ3X9O7Ab5F5Ce6VG7VT1oW1E/Khp/QL4y1te1Jog4amyznjACzykg5Q2ITt+YjI6cpF+eo7UWubpebMX0x4BE9DBxNomCR/znzC7AF3K72Xn9wYMybXri44Q+WjjPOVX321Js+6mlcOsYKbXW306wxIMc8STMdYy09jI4u+eByLQxgZP4jt9v4GmB6mgxrNfUkv+Z+NABr3dO/iUkRiJcpW5gtcS7CGJ6d2KhLvOKCNOtAG88dk/aoJPmJDTeWBfFeou/lmJBrOWzUxSiT9JHjIcAJIj0au7NvD1QsutJpRdbwXV+iUI6EJ8QeFy5h7Okx/ReQXrY7EHhLEWcsr8SHnUEULLP0M5qyfTA2OJXPeapS3ZKZFcr1QGSSAxoxCRVKZua/0bvP4IQizlThcOKyDdtLDtb2dxx3ZxrwiMMNCFWVRQyQflArpwWCnQ+mXpIoc5ePwxdcDaYwaq+SJR3kUOJuCFToZesdTxpBK7MLq/9PGcrUWP70OGRdX4kiPjx2ocED4hnF/y7pco8jd392Fgzom1ycpf+efLiJ8RZPvhR88D4v/V0iTrtBAHTUHwuD0+LkHU9NUrNkL/mDkNY5LGpIApCG6UJmptGIhjDqFRANHclHZPRD2/qJMjuHHN3GG8Hc1iIb/aPLypEB0rMovZ/0DLXSMrbW1do3pjePQzSMrPzUz7+5EEdswK1omGMi4CapTBUi1MpsaOS6yZuYUZ0lw1lUfdgV10KPhq5n7ZKp9vA==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM2PEPF0001C710.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
849a9835-26cc-4083-e124-08dd0e27f79b
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|35042699022|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
HH4e6QR02I2YDHV9NT/FPTkhP+nEpjhN0QxFAdrbpwqqj7bSRJegLWpfvQVOjpDZ7QRb4bWqYuSO6IVFTcdgK+gnb3HVRERhTpx/ovGS8mZXQzngqfFXZr9ReWVjgbvI2IzSPkcBKZKRgkDttkvZ07oi2oV1NAPndDwU5C5DrVJrltrlvPD9m/Q+5qfWt5zrtgci0d1DxNL5SjMbc7TxJQuqhQ6B5uC6Z57ARYCzJhVkazfc94yqJFd1MMh4T6jK1YWnaHoV/cu+tFUvLPoiPDqMjyjQuKzNODesq67ztlaSEcsYZshzsffRlF4qh8HqTOE2r9bKM0C023osl3JO1X+kW6eWRVcQW+mhiW80NO1/eN/djhOZZsmLGaeQPH7Or+ZsFHmpQCYwHuJ4bXANZFopH/Z4EtEt2xQZTxb0VyAskjcvZIUxdKpaFpGlzhcct4mmdraiJ3OuY0calQ503yxYtXod3DkwOdI+WxP+WZjz5Z4Xgg3PBp+U3kplsqxCLMFuo9P3351oSSwEZU91FfMXz01fBoLkTgXREYRjTspkoQ0cHHR2rABCZVhl88GN3hKLoRdtIJKlaiTL6KmEfMfzgDc0wwtcw7tjde0VnjCK7l4DRNlBQggJVC0gEUhu+0VGgye/8YZXKsFtbSmTxHO1Hw8LdQvc00BoS9dYYAv+YiWiYIWxgEWwqL5hPNAlX2iOJI7cV7i21LfymhDKbdfcsRtwIKuAdq0poXkOsU874/sp510+OyuvWENqYKfzRa8OoleWT96ZUcGBkHD2MXzzwYr1MnhoOCo2C81Qq9aQ92bMjuTDSI73FEpmoRJg9XzrV5oNbIBFykb6xNer4o3FBX/91hLH+PGgcgteblaD90RMCIFUXfHBjq45YWsS3xukZrds6R4f+2llT1eE68rCzXRtL5IxgNLyfvraT8nVVHzfEnh9eW/kDdJe5McnW7iTAYBaTgzmS6WazrE6gwRpt7LcTorsHcxHiOzFF+bZJW0XMddXVrBaLfeAEhY1v4GvvITIk0jw7ocaIrbNLHRBLT+62RfZnqQUxbV9JKJlb4ut+nsqFTe68rCRTxQuTlg05oz0oWDyRpDWT+v9/sqCi3zOBJQAJm1vWK7+KhLV5n30HDC4QCuEVfMR7S963haFIj3/61IbPM+Q+ZEyKAdhe/K8b+p+HxyE8ykoB+ExAyuQW9bLehOrOOB0hM3tr4+HPTvrnGdFS2tINCLHbci+BW/E4lBzBrQ4lPMQ7XI+RXPT4xdjQrbCqX9KNFDBdPO3jW92SogQrstP51RGpQOZEp1T7VdX+lXiloYMYnmPRrz6fnu+rV1pT9lOZxEsqJSBy8BECwHN18iVlM35s9Q7yy8gL4P5hLrf6MaJI+wSpmL0P42UOnY/wq0cZRuf9XZRyaKFtfciNG6uMDoc5CUIit6+7ojWXmybPLsRZH8iAlG3DbsUr3qwctEDbwx4
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(35042699022)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:20.1038 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
5434c1b3-ef31-488b-27be-08dd0e27f941
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM2PEPF0001C710.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR10MB8942
Subject: [ovs-dev] [PATCH ovn v3 16/33] northd: Sync routing data to pb.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
this allows the the ovn-controller to later find all ports that
participate in dynamic routing.
Signed-off-by: Felix Huettner
---
northd/northd.c | 15 +++++++++++++++
ovn-nb.xml | 23 +++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/northd/northd.c b/northd/northd.c
index a2e59dcfc..b637a7183 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -4058,6 +4058,21 @@ sync_pb_for_lrp(struct ovn_port *op,
}
}
+ if (is_cr_port(op) || chassis_name) {
+ if (smap_get_bool(&op->nbrp->options, "maintain-vrf", false)) {
+ smap_add(&new, "maintain-vrf", "true");
+ }
+ if (smap_get_bool(&op->od->nbr->options, "dynamic-routing", false)) {
+ smap_add(&new, "dynamic-routing", "true");
+ }
+ const char *ifname = smap_get(&op->nbrp->options,
+ "dynamic-routing-ifname");
+ if (ifname) {
+ smap_add(&new, "dynamic-routing-ifname", ifname);
+ }
+ }
+
+
const char *ipv6_pd_list = smap_get(&op->sb->options, "ipv6_ra_pd_list");
if (ipv6_pd_list) {
smap_add(&new, "ipv6_ra_pd_list", ipv6_pd_list);
diff --git a/ovn-nb.xml b/ovn-nb.xml
index d67a3d07a..b99a273ec 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -3732,6 +3732,29 @@ or
+
+
+ Only relevant if on the respective Logical_Router is set
+ to true
.
+
+ If this LRP is bound to a specific chassis then the ovn-controller of
+ this chassis will maintain a vrf named "ovnvrf" with the datapath id
+ of the Logical Router appended to it.
+ This vrf will contain all the routes that should be announced from
+ this LRP.
+
+
+
+ Only relevant if on the respective Logical_Router is set
+ to true
.
+
+ Only learn routes associated with the interface specified here.
+ This allows a single chassis to learn different routes on separate
+ LRPs bound to this chassis.
+
From patchwork Tue Nov 26 14:38:17 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015480
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WuIq+ikR;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=WuIq+ikR;
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 4XyQGZ0hF6z1yCv
for ; Wed, 27 Nov 2024 01:40:22 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 5D3684ED79;
Tue, 26 Nov 2024 14:40:20 +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 vFSO37dCvmUM; Tue, 26 Nov 2024 14:40:18 +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 01AF34ED28
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WuIq+ikR;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=WuIq+ikR
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp4.osuosl.org (Postfix) with ESMTPS id 01AF34ED28;
Tue, 26 Nov 2024 14:40:13 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 56ADFC08C0;
Tue, 26 Nov 2024 14:40:12 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
by lists.linuxfoundation.org (Postfix) with ESMTP id 1A159C08BF
for ; Tue, 26 Nov 2024 14:39:59 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 91B9C434CF
for ; Tue, 26 Nov 2024 14:38:32 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id 9YG7avyljmDm for ;
Tue, 26 Nov 2024 14:38:31 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2613::626;
helo=eur05-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 2ACE8408C0
Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2ACE8408C0
Authentication-Results: smtp2.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=WuIq+ikR;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=WuIq+ikR
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur05on20626.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2613::626])
by smtp2.osuosl.org (Postfix) with ESMTPS id 2ACE8408C0
for ; Tue, 26 Nov 2024 14:38:31 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=KzQZ7zBidXXncMwAopzBsPHEn2vbzQg6H+Ogra9k5ob6M/r73vaT/7AiuJv4FtfKomNZwrq8vf5vmi3L/i4YzAMAo/UjyafYPF3a+GmDlRzuDFKFJUn1AgOQxvQD1rLZiYRfJwFPNInOeL7fOO9XLweVNHB4EPeJFugqH66sE9dcLCMjOwDJzDar/YzbjTHS1S/Tl1aCVdhgjSrOZ7I5j3a+h9NGZEV21Qzyk0QOf9MIf4GMGY6qswFv8CbQVXCbweTERs8KWdp7HLaol9JxWfYS3s8SOB7nqJKLPzqV8vABzAuS6c16jR9JfoJ4mGs8cnW41nhWwGfBPmwURKkdvQ==
ARC-Message-Signature: i=2; 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=Xammn85ACP2fOBY6wLAef23XHREY7Elg//Nwtv7P/wQ=;
b=PsIq68999z6ftWbZljFx/GlhYbPS2BsMlm1d3feK5VPN7R+rkyv+f5XWpMJ8Z3riSrvRjCzaVfz5B8+dyWuTLECp2Y5EumHrlqSCONq5dPJmSkbDg13yvZ2qqDrtKYQ7fc0HR3gHM2A55QRO8qrxmoPWCAzvs/fVmRwKJ5VuCMgfQuyOTUm3mnRwZrTuW8AslxC3FP37Z1v89MeaoE7WgtGZSz4srsYnh1JOetDWmmDqIxuRWki43bIO5ukdoLZpeM8T6EF3Sn/E4mQV8EepKbKJ41Gl4Wu4OinqXMfXCxGBqShpP9yS2e2yY5zB0h8Pmt3u0WXlcvrWAv/xFQ5Msg==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Xammn85ACP2fOBY6wLAef23XHREY7Elg//Nwtv7P/wQ=;
b=WuIq+ikRzhFzT9ACtr7roK8cq9pF0ffzoqIb06gHmgwcSleTbNvO4mUP4qjTrF3Lb7kepSUgHXd7fYpR2cONzxGOyBBUN78FI/m0Nh49kH7w4DVTzB6LVEzXKULSI6ttC0I0oQCOR9gsJv5WZUAvIEvm9t6DuFi8ykclxXs+BaUFGLXjRQFjtduP3B90DjxG6xcjFQ1UpxKxKMcBy/yWmKHSgPtAtkNGBcvWFN8xekXlGkzIb4ZbXxSZCqUMlKWqgakv1kvFHcmzF3U+Y/R0B1qHNzS8hwn6vcrqjdyOtfJZksFSEhaTLX41HBZooGyYQkkPLrTfQ9hYQUo7YHmtZg==
Received: from DUZPR01CA0206.eurprd01.prod.exchangelabs.com
(2603:10a6:10:4b6::21) by AM8PR10MB3985.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:20b:1e2::8) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:23 +0000
Received: from DU2PEPF0001E9C5.eurprd03.prod.outlook.com
(2603:10a6:10:4b6:cafe::a2) by DUZPR01CA0206.outlook.office365.com
(2603:10a6:10:4b6::21) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:23 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
DU2PEPF0001E9C5.mail.protection.outlook.com (10.167.8.74) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:22 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.42)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:22
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 7474441
X-ExclaimerImprintLatency: 3645238
X-ExclaimerImprintAction: 72916890e7a74ba3af362011926c1dd2
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=FprWR06gUb4/GMbw9fDTkW8Kp/bS/VFDrSUaMwHrkdnOeqBJ7XfRP7vVtIX64UQ/trQCV2Yhf23kZB5C55DG2KGVqmSaCO2M1bovoexfTZIZHdeBtU0TxnVfagAH7j6RAULOE+2KE6iDi/tXL+KcAUT7qEmbiakRc+WIPMNb+Lvitum7Nt1dsljlbKg9p2fDKSM/toAo9sP2UZLvFug9X3Kwr2q2g6UnM2u5N0Ne7DD/jilmOVRfzgb6KnvSSoX5JIBmc708EuoqtUwLQlETcw+3SK3cPsphM5VmXV54cxyTKjdDh/SvQ/01K5RGAIfdL+0iQ8/H8/LeFIV6C3YlHQ==
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=Xammn85ACP2fOBY6wLAef23XHREY7Elg//Nwtv7P/wQ=;
b=TLllVOKPvSnPjDJLd7AdCeSEcrwH8EyZA6McbIUIfwqddV1Zl17qCcTaObYfBKymMZZ5MK3FEtauoWx/NfudvifvvwZ/sMiZq92y9xchIcF+kBdmMlc/Tq0TYO/fBc3WvwPyD1xDk8e+uzTCQUzqI4jnCP54eHhwUiamp98R0jHQIYPBd8zwYgIyhFLk3mZLyq5johZQ9yJMIUyswVVm+GwrHwfwm/y3hrByq6RJOpmrmJ7U/ql4Z9lMqCvEajgoO87/fEliPj1DAYCAMhfFQ0DjQxRLGV8X2YxREpOc6xlXjjKwvEU6LnMXkRjYRxXS9tRi1HrBUL2vwMiuIfS4kA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Xammn85ACP2fOBY6wLAef23XHREY7Elg//Nwtv7P/wQ=;
b=WuIq+ikRzhFzT9ACtr7roK8cq9pF0ffzoqIb06gHmgwcSleTbNvO4mUP4qjTrF3Lb7kepSUgHXd7fYpR2cONzxGOyBBUN78FI/m0Nh49kH7w4DVTzB6LVEzXKULSI6ttC0I0oQCOR9gsJv5WZUAvIEvm9t6DuFi8ykclxXs+BaUFGLXjRQFjtduP3B90DjxG6xcjFQ1UpxKxKMcBy/yWmKHSgPtAtkNGBcvWFN8xekXlGkzIb4ZbXxSZCqUMlKWqgakv1kvFHcmzF3U+Y/R0B1qHNzS8hwn6vcrqjdyOtfJZksFSEhaTLX41HBZooGyYQkkPLrTfQ9hYQUo7YHmtZg==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:19 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:19 +0000
Date: Tue, 26 Nov 2024 15:38:17 +0100
To: dev@openvswitch.org
Message-ID:
<9e69cf6e9724e733ed56ade9801a1bf1e76c4fa9.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0112.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::15) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|DU2PEPF0001E9C5:EE_|AM8PR10MB3985:EE_
X-MS-Office365-Filtering-Correlation-Id: 81ade6f3-bcd8-4a80-a719-08dd0e27fa99
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
oGhxoJXdF96mVUaK2qyfVf+C6agfv7gvVNxD3Qitfc+pONCOPn/QUp0pDnrHlmjS/h7Rdd1FLO7blIA+zifpNW9uZYETVujmJxB/NPMdu2qbwPy9BaopJTQEvAn0kqjNAxQSRQyvoTm/897KDSSTpNo3BLAUhDHxgXYgNnltnXqN4Hjs8QXzoYjw22ygh+XJiUCYXcE5VO9BU/FbYUsB29Nli7LKhTmFhNhIGNOaYFphp4xKaFs6p8C1qEh0KfcodO/GbV4VqGqqG8tJ4hCc3TR8qtCwXJckFwbg8BQ+Ch8SLJwG1jvba9Y0uBnt54aOgSx5ETrmVdbsLKgTopoFYYqOPTQH7/nfq6n5vzTnJYhRJilIHdm/WrrH+cYPAy2UM3tGo3Ue56oxLL9CyBE172JoWrJpvKGGqEI0gPFHAxNhYj8Fwefkq9bNbUfKaX5y7KoOdR/q9YgvTJDtXaw7Z2x7GtEXevMsfo8naNuRd+hhBvh3fxNCp3tERnHL+AZhy34NDhPJEhTTnbQHoHA3QaHLLXYBXjqQCVcQCpZRGdCaIzUQOEarl5Nwo1IZRxXHNc/LK95HD13uhb1h2sTfkC0/1eZeq7V8LsnnYUevQ1WVCAH/e2RLQT1Mu90XwfCV/vOrT2E6R/L72NM9gfY+jELhcEtMi+pj/aOluAfxlkU0Wae2DU6724Ag8YbsWnyo1GRRRVDa+1OFlP9DpJJqWihn6sRDAUPxXwyoY9U3L9ALdo/i+6lTNDSa7oR2I9N1/oQEk6mJo3hCwvcf4JlpUAr9uirdP7tTIK8RlIi6b8u/VfSAETgjs4b+ZVkcQHggaotU9ZoZnnnuCQ5OIHGh6Q5xU5UEq/3FAqU9E9sv9niYo9/miQB7NJY2XtQBwPAxis8y99kyaYyWimVXQ/lgd35QAtLoM7560GVSpD0BiozwI11sGa14feUEAkE04LvVcaUecrt+VGt46cueNtCaJ+GLZJkv+TtY6+i+WwlstIuSZk9MsYd7zOug0YMef/r8J81enHhommCNiXUjhYv4HTMq2wSIRH7ikDVshDkPJtozLpgS1LXLltqoSFMeI2j616qpjumSH2NF9Wr3Ig0K48dzYN5tlFoFOROcxVdUU0KEOK27XzcxI92jTT9fzXFguctF19MoufnQAtLM0o8rDkU9eGA9IPw4Yrxn1yLV2hjsUqvJnw1Tzby8ppztgNXFDp2omhyvdztsCY3vCk63020zP70SeBjJ3FMusk45ScQqfezojPix08Sf8NbQxkGypTqgtdamdh6/vXyn5j3hJFWis3qiZelPs1tFTo9AAa089ksNLMS1CDYjG7L1XWb8ADnYSObIEFBFIwPsIr5FRg==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU2PEPF0001E9C5.eurprd03.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
3273d3f9-7495-4a19-382e-08dd0e27f897
X-Microsoft-Antispam: BCL:0;
ARA:13230040|14060799003|1800799024|36860700013|376014|35042699022|82310400026;
X-Microsoft-Antispam-Message-Info:
S3hzMkmNDfYugMu2RQbehpLlPAZsFi2acKOeMysj01fEHfCMC65LL0bnIRHdUbf4M0CQY7XWFfnIO0Uun8UqeLl0Ouu+VKonvtkOz5PaxptzRwwqNLRNFKbOjSlgoiwp+KaQNVWQvptHSJFmRcvMRrIZNI71maPKvO1cHKG2wbgZWpwiER+ThLKn78/lFUscrR40JTvkm2UDRQBwym+4ayQBpo+egtQxr6AFmZ82or4QsezueMU2bTayXxT2Okq0BQ/8j71jgK9a6Qs+ptJtDzADUhd7VflPcrKq2+Tdep81XjJuxtubezKkpIE2IY5VeNgR8AMUtsIyGWjp+PAcUywtz6GMlecFXrt6dzcrPfZjG8lOye4tHOHg1FMHU/BImcTp6kMpyQS4uGrWa7WambwImia+WdBXzdpNABqMYbozUlfv5SSXPvqxuJNsvA+gziQ37kqT/OBEpJzpK8vrX0RLYQ5P7v2U7TN2V8sYjXpNvUF9xzwNjDywTPbV6VuGndZZ+Lj5MOZuqMl9VBSa8tJgV3ZHVNF14SbqqNKHded4dxucY+sCjnzF+33wQnnxo3iOeHfmGoDYeyBK21yybzAZa4+oUTjhpp9XEga9yDBKPerZbaT2V5y6zfhClvhJqbhQxkad56imv91wn45uAWZV33bCrsWV/3LiOKpPXlD65rQKE0MHMH4gbbjBrzjJSZlJWOs9uVL8TMk4uWWaf8w4slsHHDrbpxHD0LT+jFOa8edRmzJ3uQkG0j8BMVuVkTCD1LB8VilkVcwPKzehUZuJIVRz6QKlKdCLr453WAVEnnN+nR5chv6kjl31zok6jJ+jd6sISvXZrTAVYaxh6MNOTp95wwhrUQaeDi8tB2VzKY2EKNBvy9LowTdBvt+/o5UTn1I7rknVDFve/b243rTCpjdFe6W2xNYVfePlGOwgUXWJBaJRi5JzwMfIu5ICg/o0ZmQcXxPrEqHJzh3Pq53BVLWl6CS+R/EGENIGOA5dDNcg4rOmpjAq9lPbq4YG/pug/u/1SZYLzjoEub7p3HQVuenUoR1g2Zv+HSZuMazXYgi73YW74jeWNmTi3b3r1bKmPNHFNYWJuuCAEZxjuxEE78AqspxHzd/DT3KgEeuyDc56u/XTNVuJSA578qYx4y9dQB+iOa32cwHadyNnxy7NliRzA2zBQY3OstuS/7Eb4lTl//FCAOG7DBjYawRhPaCWSm25enIT0FjlVyVqA7Y3BRq3CmkS3jzswcrcIgQ25FAkhK/Nn935z/ytDmTfmv+x3lARXiuIiWT7WvEiZx+hHoYquzYioKpDhNHmc1dHvGAhp8RugnS2qJNF4FFtkmaeAtta3FHbeAwujt7onAxsd5zj7w9NYNIJ8HFJ5a8IjFHa9YTr+PdV8kC3V5U24fLETwE5AcqznRJMBbXXi4BtCKn2IXqRLQ6Yu+lmZZiJow55aTPJosl/OEgfWSRG
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(14060799003)(1800799024)(36860700013)(376014)(35042699022)(82310400026);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:22.2834 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
81ade6f3-bcd8-4a80-a719-08dd0e27fa99
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF0001E9C5.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR10MB3985
Subject: [ovs-dev] [PATCH ovn v3 17/33] DO NOT APPLY: Use my ovs repo and
bump.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
this patchset depends on some additional features in the OVS repo. As
they are not yet in there at the time of development i just reference to
my repo here to make ci testing work.
Ideally i have sent a link in the cover-letter to the OVS patchset that
is needed for this change. Once this is merged we should replace this
commit with a bump of the ovs repo.
Signed-off-by: Felix Huettner
---
.gitmodules | 3 ++-
ovs | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index f0d1f8cbe..41b1ebf35 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,4 @@
[submodule "ovs"]
path = ovs
- url = https://github.com/openvswitch/ovs.git
+ url = https://github.com/felixhuettner/ovs.git
+ branch = test_active_active_routing_v4
diff --git a/ovs b/ovs
index c598c05c8..ae0e6bfd8 160000
--- a/ovs
+++ b/ovs
@@ -1 +1 @@
-Subproject commit c598c05c85b2d38874a0ce8f7f088f6aae4fdabc
+Subproject commit ae0e6bfd8de70097c3333ec6885bdf57875e807a
From patchwork Tue Nov 26 14:38:19 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015495
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KEma4N8A;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=KEma4N8A;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
(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 4XyQHk3C5Nz1yCv
for ; Wed, 27 Nov 2024 01:41:22 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id BE53F436A7;
Tue, 26 Nov 2024 14:41:20 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id WIsLraFDU8Uz; Tue, 26 Nov 2024 14:41:18 +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 smtp2.osuosl.org 89971434FE
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KEma4N8A;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=KEma4N8A
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp2.osuosl.org (Postfix) with ESMTPS id 89971434FE;
Tue, 26 Nov 2024 14:40:35 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id E395BC08BA;
Tue, 26 Nov 2024 14:40:34 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 1A881C08C1
for ; Tue, 26 Nov 2024 14:40:32 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 2CD364B0ED
for ; Tue, 26 Nov 2024 14:38:32 +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 NVxLk-045kSR for ;
Tue, 26 Nov 2024 14:38:30 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2614::617;
helo=eur05-db8-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 45E2E4B530
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 45E2E4B530
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=KEma4N8A;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=KEma4N8A
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
(mail-db8eur05on20617.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2614::617])
by smtp4.osuosl.org (Postfix) with ESMTPS id 45E2E4B530
for ; Tue, 26 Nov 2024 14:38:30 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=us5slfTdoYrfcUgvLW10LUiHjczzIb6BeuqhJ1VzCXuAjGNn86M+VH25a4fLtJTUZok0IWbPSrOnj8M6PxQH/SR/4LqssFyCUETveQe0LdSGklfZJ8mG2hlmq8mbjvT1NRXuh1w5C09pmjL21L5MVQkgnNkZmAq3rGFBpdUyfO9FZPmUdGU8R5bL1VbrzEdHyOZREmCYOq/6pC/7LsJG92wI0cbvrXSSjTuTcKtrqRZCetmvRghSVEWEISCS7b8pWwd/5I2Es8DxLGa7tntMB5c33dTaB1mNeTRHLrFylL+R+X4P3KyrJcLDEiTmtafpriaGUyGYCKcnJrw154eYpw==
ARC-Message-Signature: i=2; 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=Kss53cjHbmN9F7rBLNKgGFJ4WZWJo1xMnj6qrWRcNTs=;
b=JLitB3MZFdUac71nFW8XuRlbLLBfp6OwEkyGYrL/YGgpBH3+TzEBew8v1cZ+gsvWqnb13j7SQfCEPaOFPR0+dy/3Rhy0YZ/mHIFvA3rCsDGWhVR11Yg1MIqCAQYWLlgaxqdIY51qkVJvEMWjmCKcc2NFDI6wE1HT74KMTS9wN7NhTRNsIvb8SzlMy4dz/2EtYDwebmzSteVXM2Go8AEJ5HVxq6ELSf8mHVk/xnwbnlykzgh8z2uVutdJO+OzKGqYzeu17b14FPuZQtuOfsx2Rb1b0xw0aPcX+X/al34F/kYZbUwRrrEMVHe4TefAtJ8bZVYF6EmuL/FCA0dKbTwN6A==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Kss53cjHbmN9F7rBLNKgGFJ4WZWJo1xMnj6qrWRcNTs=;
b=KEma4N8AWcUYNqVD+rXvxel2/LkMSOaEzFsBDpNrh7sohVnvfYJQ7WFCOKiwG+FspJvwe0J8EPFyHMzv0oUvU2tu2K4YsLuvp4gdYkQqwvfVfcaXcUZfPg0lHIjkmLcso4uYZNbEgdAI/29ejpaWlDYhRU4DfkJbzqzkJpvTVItpnrlEKm8fpyCKhPgW0GQfmmsko53GmsBexzaVMKpPY61v1SRDW9zZGaEbXRPWeufHi0CmhANfs+D7wRGj5vR2+PbvsOqLfQXUiBjGcOp5jeZxZw48JTTyqIcV+kb3F6RqhV5+pMs9yJXkYRv3TBCy2O5sb1Enw0xFc8HSA42EJw==
Received: from AS4P191CA0027.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d9::10)
by AS8PR10MB6221.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:54e::15)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:26 +0000
Received: from AMS1EPF0000004B.eurprd04.prod.outlook.com
(2603:10a6:20b:5d9:cafe::83) by AS4P191CA0027.outlook.office365.com
(2603:10a6:20b:5d9::10) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:26 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AMS1EPF0000004B.mail.protection.outlook.com (10.167.16.136) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:24 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.43)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:24
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 6598525
X-ExclaimerImprintLatency: 4055759
X-ExclaimerImprintAction: c39afbb02680420f85d7b4724577bb2b
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Hn2bptebvo83rC05SVtI9etD4sk+6X2+aUqVtlbcQZg2GTAw3JZUeRluMmftjaiGVlnvUSLNVYzMmz+8u0+i9o4SGUXGUyUegwpECkmlZ1E0+rV+QGvxjSw8izHcceFi4ezFixESXs4gGkGirv8bfC0MCnGlWgxF4wjOq70ZKxQXasujOY8G1qWMWuuLAB3TOXzjxCcM5ToMxUIrjiMdkfBvCV5ztDQAvDvSOdvnFkdhByoyzCmVqFwy54nCRyUyR7eJVhyGvREykaB+mQjdoWoLCb/4cZcSrCTSoIPKMn7iSNEth9ZCXF7KuDayXPTpG8g208xwCeQhIhpu1ZF8yQ==
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=Kss53cjHbmN9F7rBLNKgGFJ4WZWJo1xMnj6qrWRcNTs=;
b=DmB9eR3c4FOkBX3JFnBqnGGMugrIlkQn8AZ+MsCFh6F7xdz+71nyioQxbcfIW55eywGdknMr8x7Bi3Wzk60WI5P8UXDWDWWmkCPNOg2sTLka+yXzNd6yeLo+yubjRaPIGCPO0xz7KiDzB7xikAGOO+YeJCFTmMvvBErmA8JPF4DV1IW5A5GttSp2mQQ+CyJq9Qd9fr6nHfKL871WbczlyR3xNQh1qQngrOXRo8NPFUUkKeioZTc+OuT46kP3hFuraTGUOpZQLJASgwCPHPkP4k+09G9dhhw2Xvm54BVi4w/eJlqmVHUNyDMUm2EbYgteDJmm6Nt3OQURK2SedW1T8g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Kss53cjHbmN9F7rBLNKgGFJ4WZWJo1xMnj6qrWRcNTs=;
b=KEma4N8AWcUYNqVD+rXvxel2/LkMSOaEzFsBDpNrh7sohVnvfYJQ7WFCOKiwG+FspJvwe0J8EPFyHMzv0oUvU2tu2K4YsLuvp4gdYkQqwvfVfcaXcUZfPg0lHIjkmLcso4uYZNbEgdAI/29ejpaWlDYhRU4DfkJbzqzkJpvTVItpnrlEKm8fpyCKhPgW0GQfmmsko53GmsBexzaVMKpPY61v1SRDW9zZGaEbXRPWeufHi0CmhANfs+D7wRGj5vR2+PbvsOqLfQXUiBjGcOp5jeZxZw48JTTyqIcV+kb3F6RqhV5+pMs9yJXkYRv3TBCy2O5sb1Enw0xFc8HSA42EJw==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:21 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:21 +0000
Date: Tue, 26 Nov 2024 15:38:19 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0119.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::19) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AMS1EPF0000004B:EE_|AS8PR10MB6221:EE_
X-MS-Office365-Filtering-Correlation-Id: 487ff913-9fa2-4668-512e-08dd0e27fbc4
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
otun64jz3YLafw0ncYmNPvOLA88FRgm2QMES87VJ4gkhIZuEASLaV56+sDjGrCSMkozVMbEJdxe9TfrVcRhkADD08Se2VWGwv2E0MZjLfi8lIYim8JkSkwjt5ttQYXpEk3ljvCHUdtZWZKZcs7wNvha/33yEMeM1C3vMWKt25chO+D8Te9rxvVSd8Uv336S9C6PI+oI2inWH1JqYB2SyeNPCLZJqVQFVN+nhtIVJBuIZak3XQyVm8VJRQHKOdZFxUJnx6xTGzE0CRZNhweMcAaxX9vaGekLFsiDeSDzww5aZHOzceMLb91EDUTZ4pku+o4Q9dHUG0W0icPvNTxoz3qFKOkV6YhYY5MKugsbEMZu+RabVRh0oyE9El+iVMf5eOsELVc+vzlDaJFW64h5orGHq/2nu53i4vRq5/M5yxgngH1SJDq/vSyb51BtwO+HK+jxJ8zxZ1qr8cooc0GURoz2NvSZwPBqmhnMEvca+ndEGxEtKVsvFpLTPNN50eH8cb7CUdqp9XXIHxQABUO1p603RtETCBoc0WLx9EjxByqtb1MgVsBfeuPVNkCK4OJWavuvGEr02590UwImrOaRS8rzjdtDD8/N1G66hP+2b0iCSQ9YUKY5/buvcgPg5y63lBH7IYoX54Kyfp8xJcZkv1kOziiThdAGQ3n4NeE48Y1ZguFZLN8qqDHWUO2OA0pa9O95/Z2wTVEXXJ+onRXOVnG9EpSnjG96ODeyEyjNsfSZczdcaSdDWB2mo0+TT5vcxxmb+k8H45t1xlkIZz3Q0jJI5ojPHWwcg/qynz5A0pcBZgk/vV4PiM4ovzwqdu5B63UyymN23X4lsYRIBi+wQGvNwkitCNfpeyTki1i0PH8Cq0jkQ9xSbNuDLJjIiadjC4kTT1q747sr4SmjIPjyiUyAO8Jd6f6zk/mGSgfeNOATYa8PpXS3FyE5NYNX+wAk/kKoY5upqroUB4nhT2XqG0gE6xNrJeG8ClB+YCiA7xm7Hw93EzZ5o1YJGZy6kZEtdtF9uDS+4QTPEPKpP9zwkPrS5xgpMHzoiyefvybJEP316ztwqDPFqROJKtKNqwmvMi4vjvYX9gI4Pck2nJOBfDB1t4913KQUIXSo1u+RNAkyvH3230zZYLaFGgTfv4the90Q7TT+bu/j7SxiRvmKeMtz+hBylbo7Chso1ps73CoMUCsgbo98DY6h6GqkEIBa4rBEpsXCzqMS02loxCTEyno3PDCb619l9e2LPcn6biX8NAkc6SS686pRggAM5DbQetnuz4+GxHndXY8TN13O70o7HhDyIrosogO2dpqZB7ilCgiQ0ZxV5NM2HVUCMmpT2nW2LsRS7X1h5cOuueCQeJg==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS1EPF0000004B.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
efa21121-6ba6-4f68-f5ee-08dd0e27f99d
X-Microsoft-Antispam: BCL:0;
ARA:13230040|35042699022|376014|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
X67TuYaob8rgSMQ6SmKduojcvgkWdG41BnUCOIkm/NY5p27qDaUz9/B07feGKAENwNDOZ5CVjBVwhs1+l47MYL4xmf1mbe6DQAXN38Bm27ps0VoIXFF8BWGKeefzHspILMnzEDa916Od3rNcW3OFeIXP0c0T3s41iwJ79o3SB5Jc4ecK27NExxpbxjfWM63/nLqJdjbOq7dEPmPhkIhGjELYi7NClJUPalX+AshMASjdBSQUiN20z7iw8ReaxcWYcDiDEbI/izGhuBZH7DDMNNlFEN1Bzyniq8TtCkgxMMSdaxdW2dCR3BiJSABgwihnRqv0jrecntw6Mqf+SJYy9es0GAUN5E9roQXrPTvdgDIq8y5B4bmBjh3P9t4aFuxomuFlJWtntfzjI2/5jkbhuFuepqrV7G5mJRIJnj/TTHDiz+DpGnuS7pYzFS7EdVFAAvwcN1ot5TMLlCE6nJHObyzbNn2Umu3SERz7V0R3v1/NrZ3Wf5VefNl+RSxcnzgYZ4r/2e/kRphhAB1a1dKcLv9Ixd/5xr6H754WvTgrNnwbLNZyWWt/f62NUYzEoP7e9EeVTEZD/atBpYbaVWmvKEY50KTnsK9661iWsctf0P68HydqT3eg/4SWm70R1Yww6tPUwSj6iupOEQ5P6GeinAbxLoyo3qzcM9Ex/0PnrcmaAguO2o3jl25f96m5YlxY2JID2m4I2Dh1oNo4VWsWekGjQboKGc1LwJnMb4xe/195TF0SQdaIyWX+Is0MGdnMN6+7XEXjW3+KXyjYLdLcEZ14pMsk+jWDSK+Nml2E3haM5PqzUuAJUe0RM6PVeZ2Ed7BkeXI27C624ZYUCVX2dnvdlL65MyOMiagPEYkt/3Tz4fEZMKVjBnjUHrAm5CLKYagcX8iqqi5jOF5GvnV2RlgKC/GK1YL2MKO8IaV9tX0luah+yOlD9ghonAa8GUbycQQDZ2Xta57vvRvKCRhJNUl8LJH6HNa0ORCB5tiI0T2f3ZX7HpgRhiq7dqVn+S4827AkMWqm1+abLQQLraWqgUsL8QzpBBbGl30Foli5IavQ68Bat0RxBGB+BSelMICUWIJHVxZbbtfsUqMq++1aXcIHAdUaL/LTPfQEJ/xeIaz3cXoN0LA3J/+MyOk/MvtNABttPV2HaWAsi3BQNHGXtWB0rikQ4vgnh2OwdkJEga4ppaCtpT3HtoTdAE0tzUuiLH/sHMU5THkmNIh+m4VomGowdx8k8Ac/5hLk1D8x0ljpW80sM1CbwywocM7bLuRyyhjZMJtQbNv/12BQ52GWGr7L7CSKgZIM6u3+YQM6pKt/d1jxWAHuzIrIzmM6E2I4ZQZQkNULPNiLJLEJJob9ovSWNueHzinrM0Z7kexbp8NcFCh4g7XiKfgWRnA3+0Y/ukSQTOT2xILtQsxK98oIlARyFfHOGk2Ty+HTpmSkApAWPvYHE+LLxDbvrbMZnRRU
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(35042699022)(376014)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:24.2407 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
487ff913-9fa2-4668-512e-08dd0e27fbc4
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS1EPF0000004B.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB6221
Subject: [ovs-dev] [PATCH ovn v3 18/33] ci: Manage host/system level
dependencies.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
From: Frode Nordahl
Most dependencies are managed in the `prepare-container` job,
but there are some host/system level dependencies.
This will be used by a subsequent patch that adds system tests
that require the `vrf` kernel module to be loaded.
Signed-off-by: Frode Nordahl
---
.github/workflows/test.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 82e09fbef..12fac0c59 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -108,6 +108,11 @@ jobs:
- { arch: x86, compiler: gcc, opts: --disable-ssl }
steps:
+ - name: system-level-dependencies
+ run: |
+ sudo apt update
+ sudo apt -y install linux-modules-extra-$(uname -r)
+
- name: checkout
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/checkout@v4
From patchwork Tue Nov 26 14:38:21 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015494
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=rWQ9ZAiT;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=rWQ9ZAiT;
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 4XyQHX401zz1yCv
for ; Wed, 27 Nov 2024 01:41:12 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id D3E394EEF8;
Tue, 26 Nov 2024 14:41:10 +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 8el155FGYVZG; Tue, 26 Nov 2024 14:41:07 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6D9374EE07
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=rWQ9ZAiT;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=rWQ9ZAiT
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp4.osuosl.org (Postfix) with ESMTPS id 6D9374EE07;
Tue, 26 Nov 2024 14:40:37 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 66446C08BE;
Tue, 26 Nov 2024 14:40:36 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 1BC95C08C1
for ; Tue, 26 Nov 2024 14:40:33 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 9F20E4C65F
for ; Tue, 26 Nov 2024 14:38:32 +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 jqIrk-U_Rkxg for ;
Tue, 26 Nov 2024 14:38:30 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2607::623;
helo=eur02-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 828754D81E
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 828754D81E
Received: from EUR02-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur02on20623.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2607::623])
by smtp4.osuosl.org (Postfix) with ESMTPS id 828754D81E
for ; Tue, 26 Nov 2024 14:38:30 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=WBa0ED4wtSRqGTs650nWzuU09+UgH07EMuES6urCwJPoUQepo7jz+gJ+XHlACd+BfEGXx/Mz0BbLk5XPapUqeNqJCQkHoFUYgiQQAc85WzYr4UummC5UR3Invm403rlLNkWEXRyy5ciUIPNbkyTbcpaSgkHPnv5jM8Au0bQC5430I8LVuYq2uq2lpoU+kFuWy0/yrGQNxiocY8tT/M9X6BuGgv/zhfJ/H/opuQHOeK/TcA9iUHgqGvVz4Qe4TDSArhYKVSo7M1r9GT6r9VAVU//Dd2vgKXRAVWaNv6ZZgQw4nCMBtinWAUSh89cMf5rCuGYi24wPVZfq1v9wRnEtpw==
ARC-Message-Signature: i=2; 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=qiOM5Bmm2Qc77y/tnBLwTUabTuh5DIwyYRdPtQcZBpY=;
b=rnG2H4RLBmKYdsSvQ2ANtCtsORiB12FYtmh3gDVf/2dFE4OJqq7T1tk/I0JQMJcCQT9jUyZmHz4sJllh1IYlonzZw1Q6h26It+ft8Tx8Zn0VgFwSWEvgNObjw55hTKVBrxQvVMsOEosP/f2jN7g7vFKLl4uvZZHpNjkEp4ijgCbU91FKg3EVnzp5AhmSOJnB1rHvr7t1lD4YrPFVMerfQj1cJnrg9apLKLlkHtnuPQhWdl3jUuwFs/XsgvxAc3SJkCJojx2OKXiCOj0O+R5U2vNEFd1+smHeeWpCgT9403KP+lRSc+2mrSlv9sipnSGLfNrSfLjg8OOCceL2HIJqpA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=qiOM5Bmm2Qc77y/tnBLwTUabTuh5DIwyYRdPtQcZBpY=;
b=rWQ9ZAiTUnMqYlVTPoPJIrs4q/a1kTkaRMMVSCbN0oP1RG62K8X+WNuf1h8hKu1S6s+9/qpkiEbz1EiwtyRLhAoojz0/AJv7U7e0VTKmt+GbzR6kjTiQL0kkNo3u2ANC/9JzQ4xwjQX2XVCcayVamQm5TNR0Qkub1ZHdbjC92639c1kZwY6jQm/7mIMnTsd0RO9mijUEJ04PPFASK0LIwzu3tgwVLuJrZDg5GYp7eZCYnJrumB3iLCjtZ3lJ7PnlKu7NPWNrVT8eOZ1wrDLVNdbrBngjwmLJyuNi79j0Ke9UumBoEPOJ+jYXDBXaBYBK8quFdu6zLY8NoovfSHxnvw==
Received: from AM0PR02CA0204.eurprd02.prod.outlook.com (2603:10a6:20b:28f::11)
by GV1PR10MB8658.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:1ce::17)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:26 +0000
Received: from AM3PEPF0000A794.eurprd04.prod.outlook.com
(2603:10a6:20b:28f:cafe::2a) by AM0PR02CA0204.outlook.office365.com
(2603:10a6:20b:28f::11) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:26 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
AM3PEPF0000A794.mail.protection.outlook.com (10.167.16.123) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:24 +0000
Received: from EUR03-VI1-obe.outbound.protection.outlook.com (104.47.30.109)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:25
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 20258427
X-ExclaimerImprintLatency: 16512782
X-ExclaimerImprintAction: 536c8270058744d9a01ae540aac01f35
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=TFcc9S1c5DrUXvdfc+5YBLs7uHDEUJCE9XcEFvtUC6AThPZCLSs4Z/GxbIfRjbnOqh1/Avp00nxrRJvLcJR3CDoNfPd/FIEtX4iB6VtwfhG21s9qqQQWxCXe7sKJkgOtla2lX3/H93e0hkM7oQbx73DyD+bcgDAjJlxkF/NvP2Fz2uch2rFcFmIJCdexz+90EWJ9TRu7gW8Xie1LSNE8lvCMvuzcNWWIUu9TmGnd62MC6uYmjKMqLQ9IVYhCeAitc7myCASFn9s9eEr3IjeTMiIBiG6UvLO62A7PKtx58iBiLtB4IexlOYCxtdlAUt1axQGDZXYTWHivEQgjZ9mcxw==
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=qiOM5Bmm2Qc77y/tnBLwTUabTuh5DIwyYRdPtQcZBpY=;
b=F/9NbDPLqF6b7dOxd1arQP2V827MVYkvwItLk3lJKi9gaguEb+G8qYO4n1xi7x1aBeINBeoQ7sThrVCDnj+Wfv7tWlSFzSvT57GAEtbvCn3nNUu8dv7559ksRsPw2DFWmjqobsd3X72beOE8YbzVM7C8HCY2n4N8KTnz9irctvdrv8NAVFnOjSBC3b1za5trm4iG94dcaOKrSRp6M7UwKfTYfBCPlmRVB4dAYE9nz3ANZ5of85riWk7qZZJ5KhtSHjy9gepTIjuMa34UDE6otJwD2v79i5GYuIux3WatXCwS1ULkJ7JIiRxDTqhSQnh3mQ1wPPspMJM4P/pkqgOA2Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=qiOM5Bmm2Qc77y/tnBLwTUabTuh5DIwyYRdPtQcZBpY=;
b=rWQ9ZAiTUnMqYlVTPoPJIrs4q/a1kTkaRMMVSCbN0oP1RG62K8X+WNuf1h8hKu1S6s+9/qpkiEbz1EiwtyRLhAoojz0/AJv7U7e0VTKmt+GbzR6kjTiQL0kkNo3u2ANC/9JzQ4xwjQX2XVCcayVamQm5TNR0Qkub1ZHdbjC92639c1kZwY6jQm/7mIMnTsd0RO9mijUEJ04PPFASK0LIwzu3tgwVLuJrZDg5GYp7eZCYnJrumB3iLCjtZ3lJ7PnlKu7NPWNrVT8eOZ1wrDLVNdbrBngjwmLJyuNi79j0Ke9UumBoEPOJ+jYXDBXaBYBK8quFdu6zLY8NoovfSHxnvw==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:22 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:22 +0000
Date: Tue, 26 Nov 2024 15:38:21 +0100
To: dev@openvswitch.org
Message-ID:
<87e63bac5f4719a9cc5d471b08d869851511b76e.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0118.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::13) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AM3PEPF0000A794:EE_|GV1PR10MB8658:EE_
X-MS-Office365-Filtering-Correlation-Id: 2aa1f3a0-2652-4c2f-b496-08dd0e27fcb6
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
c5IE75/tu4/pOXA8JzaCIzoiywPkTW1avg6dHO7UU7vcHBD1mcjhnzDO7PGqtsysLAh8cc446wBKj1z6ycXryZo9Wfgh5Fusdng1Zg4wAta0pUuATgkP0LWaLr5VIysjT89o1bdsdX2D3wTvNKl+wbaCPfFqjHnb7kNzNjpSahTux4V3s1hyBl1aeOe1m1KogoXewm6537d/xIS00KRY2a0d1GsDemZgNp8DUvSYyVITlYY92fM/IU1tNtbwVRu8VLO1MUHYj+KJP/bftziHt6rIcBt1yuNUBGEL/RO4belb4r4Vp336wEOCYKwyBFmJ4JRQWSzWcR3vaLrGMYt3uBquR3GLS1+m/7X05xD/MJOvxrqjI/V2xX+of6++37m7b5bbcQ+pLJXIIsimsuvYmDtUDH6ig4YIVmaY13pRvmoTyqKUw+Ab8aeQYsW+dHk0mwcECWtH2nBJXHESZ/1QyhwpXsYTZ60+2nhS8cO2q3EdrLRMwB+dB7EDzQVLDgIuFDuZxG0FJ7+VQA/HzFvztbmPvyzlVrQfsNMJMLHMH/LNF8tWHsyY56QkXae2bL0WZHKw7wX3X/JbiS2oAphzzUc5giPcJ79HUPr7ZJ4tSjHL2y1wv6YCWzk14DU8LFDqzhefIvUbhU6qv5Xeag573dq7QKsBhIugNXyJuEYVGcCCDCq4+UKfWixuwhU5cj2QMKI6fg2ng3k0M4A0T9Z5xw8IXwEIZsmymFNLbdspNCw5pREvtfQwcggdESJmYwr+dVqgC8reQzmBoYvPSiXyeDYQwI+aZ0+2Z1R4U1Yo+COmEKWFV/c25tOnoGUlxw5f06NxUmgKBP5TXL73tZiTllxcpZHsLOSszhdkWQGjOGqnOx0ytPfFTOOeuZYmeNk7cwWQz+rMKO1yOZd6O9ih+01j6PiHG7wTgQqRKiKOWAcfJe4FHo/BbcblvlF5IWQY/RRVyFVItPngPP9fSvq1Qf0OeZnlukevMgxjsfLkqKF286q+Bk1lrOs5rwWtU5Ag8+xG8jQlSjPN+6UmOrXHUk5RNaXC8UIDrYbl4aEQMeBD1/zAJI7Pt2i9Rwm+Be2mBmGWZZgZvxLtuODsWCtFZJD5XmzRGe1TFOMx+/3Y4FCfP3x7lbXsTiKp+ARYspK6QV63s7PIYr/9DdxCTaaJJmhnx6OmpHxolNcn5wj4O0keVNLx1wjbZgMV/ogCtg3JGVcP7s7GOkLErpIhhQwTvL/kzrQeJC8+h53s7XCoaBJ24GWLV/YSeRLV+UaszpPh5dLGuh4KCA5iHm5il6dnofg04MCHUbYYNwYfaOEai3L7FOUIimLSA44ZjM3dEVqDOGaWtnZyNRlLtR0oJ/nMCg==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM3PEPF0000A794.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
319b60bd-984c-4970-bc8d-08dd0e27fa9a
X-Microsoft-Antispam: BCL:0;
ARA:13230040|82310400026|376014|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
Bh0cmHa1+/hIHXrvWNhM0mlT/PYsRMIru4rl3Y0/LSO9V2WY098B01w8kXIrxDrZNFDeLXar02wXFtT4uTt+gRpQxyQrKabqh1DWWyWt3qE+9lP6ZqzoCgOI9egLDStFGlku/kJSewT3CjXPa5Jne+vgiBJ2DYUj/MqfkBbumVIGyQxh7QxkwzWFa86lndvxcNRvGOl9D8wqq0GPBxnSa8quada5QcPvzKw1RMN/tWMJIM2C4oVbrBSUJE/8G849hdDWfP0r4DQvugj50Ns6GYhN+aHix5Bjm+tgzPBoZblgAZkE3pNUxBY3Z/7lmp5L0kCjpyLzOJu2r3Y0V+KwrGshQZr/8WX0tcbyD1/5AYivPU6W2mnEu3yrS9r3bbPE+HANPBK2QCYMi4wxyrNJHkRVcB9KDMYv2Cy/g7PivlU3QwW8/n2Nw7sSbIUX8cgpnjXsRDXbsr4RnrsBjBv+oCiJ2fegpF0rJODLyrKcbQxbq3fX82oze6a12ZXYGK/oUYFCE+I2pIDathDWzw6YaN4U3N7Gpv+bYYhMMAHzxLkgwdIyPYNpWInyvLwI5fi665XGpnDfIOaGJfL3mlAdtShImHOk/lVqAc2QZYmloiq0ph+YG5154REO9aVMC9pd/pTj5/nf/tYK8em37PikrD1sjKUS6fy4n6cuxanMHRWdWGHXPVdMSw4l83SugLWu5ck9Y0ZQwgUybUVefTjjljdMQk+Gm79cixaw6SWH/va66hnvO7ZCcT7WqQOT3O/BC5lqr1pMPLr0E1qwjNvq/b2fbaEeVzWtiOpp3wpvruvS9I8o07CrDaLMmpUdNR1m/SRa1xBmcNgdJ6eHLC9QJTaFnS46fEMoJXYhCQCHNu9WvZtTJHmNPQd/s7olUUcQh1NAI5X6p8581pFaVB1jBPZMh5yf7UYBSKbQHF+SunI3qQjC2oAKafFFXq1crkXhncPBS7y0tcpvkIUaM2zeuRZ/1kc7e8XuRXoJED9Tkzmc+fQ5wlMyQCBPSn8HTIKrWzVThynWI4WGDzb7vQTRLILpc31hIEK+okAQnKj8mkkGanmoMNoBGmb8wna96WQUVKZm1LOJwLpwapUj5boVBmXwyO2WUbJ/qKeXxLomawDyJzmThKdmIbcj0lt4LrrSbcaIqDiMgWjJNNEKHSq6Z/DanRIvijUToCYheVIfX8HQzLwlJcLWHguQF3NLJC9u2A0eZfmAStJWTQzj8HCUsDmIjM4KPf+cRSHwk9/YcL88UkPyEze61zyXdi50P0v2CWhtdTIDLJVzmavwC/zumU2HGsqafPWV8Y662UmwpPtht1NXWBsXLVuQkF197tbRlq70z1SEMDdhC6Xntb8b+j76CZLa5cDB0ndVmfzlvS9SXMM4/fAu0G3Ufwr8WhJJfjo3h9NjJaHUoVGKKqiBCOJix4aS9yTUHHzQlnRQMwvTbC4+LZmD7+G8NXmzatMX
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(82310400026)(376014)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:24.2667 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
2aa1f3a0-2652-4c2f-b496-08dd0e27fcb6
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM3PEPF0000A794.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB8658
Subject: [ovs-dev] [PATCH ovn v3 19/33] system-ovn: Remove route without
nexthop.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
for yet unclear reasons some versions of scapy are confused by this
route. It causes them to log
"MAC address to reach destination not found. Using broadcast."
instead of using the dst mac address that is already known by linux.
It then sends some packets with a broadcast dst mac which are completly
ignored by ovn. Additionally it seems to attempt arp resolution.
This slows down the requests long enough that the test runs longer than
1 second causing multiple packets to get through and failing the test.
Signed-off-by: Felix Huettner
---
tests/system-ovn.at | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index d12e9111f..72e39db84 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -7502,6 +7502,7 @@ ADD_NAMESPACES(server)
NS_CHECK_EXEC([server], [ip link set dev lo up])
ADD_VETH(s1, server, br-ext, "172.16.1.50/24", "f0:00:00:01:02:05", \
"172.16.1.1")
+NS_CHECK_EXEC([server], [ip route del 172.16.1.1 dev s1])
AT_CHECK([ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=phynet:br-ext])
check ovn-nbctl lsp-add public public1 \
From patchwork Tue Nov 26 14:38:22 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015485
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=RTkC/Tni;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=RTkC/Tni;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.137; helo=smtp4.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.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 4XyQGx4HV4z1yCv
for ; Wed, 27 Nov 2024 01:40:41 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id D292B4EE19;
Tue, 26 Nov 2024 14:40:39 +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 0LEl6Q-zF-sM; Tue, 26 Nov 2024 14:40:36 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 412284ED75
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=RTkC/Tni;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=RTkC/Tni
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp4.osuosl.org (Postfix) with ESMTPS id 412284ED75;
Tue, 26 Nov 2024 14:40:20 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id E49AFC08B9;
Tue, 26 Nov 2024 14:40:19 +0000 (UTC)
X-Original-To: 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 10D4BC08C3
for ; Tue, 26 Nov 2024 14:40:04 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id D00CB6F71A
for ; Tue, 26 Nov 2024 14:38:41 +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 FRp4NgvOlYrj for ;
Tue, 26 Nov 2024 14:38:40 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2607::60f;
helo=eur02-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org C62BA6F568
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C62BA6F568
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=RTkC/Tni;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=RTkC/Tni
Received: from EUR02-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur02on2060f.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2607::60f])
by smtp3.osuosl.org (Postfix) with ESMTPS id C62BA6F568
for ; Tue, 26 Nov 2024 14:38:39 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=IH1PjGqNVfB4Ws+po2/PT8ZidEmUM4Hsv2x+apQfL35AOPA2xIGAxL5BQu6Tlcj7onIQtI4S6PAUwyOJlOb8E9TrDmIGqVuSjn7KGI0F9GfTXch40ldP4JlRTb4DwbsuEJwhd+UPW9hhYxyujWPYVXGefN042ARoEfCeC/s7se8C7Whax46FkrvhGMR9H0B6i5qPJQSFdZMSRppiIAlFmQTMK1/iecQ5rKrmZWB6hmGmeAwi7dYajhcv8bwmpMkEnUycqVWq1uymmqWFT7VvnQDcx5IZ5c70U0LgY4RQBWrk3XjX8YwtyrscXBrbjtUHIsEkkwksR5Ia2QJnqr9YLQ==
ARC-Message-Signature: i=2; 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=4x6an8OX6jE13rJPGScLuX1YiQowDpCHrOlYWX9UAbg=;
b=C/6s6oURVc7lxyoRy9E26JKvdXJNAENfXiiWW+wYNyhHc9UOgY40OEBTKyS+EdXIwk3t96FPeNghMCxSvHRJGWYEvRBXOQhqVibrVwHTnJHkxkc4yCI4BgWi53yIN8P+jk88ztkLm3yGv73ji/BTlY2ZEW6YSFDR7SH7snh/8O8nzWnG9Mvziao8S+v/AoQI73ePEPx9sE/ThCPJmQC5bshSFrJUhe2OqF0j2tf/BBd4FlBwo9icWlQURp/EZgU2yg8sGwvtbVosC9EcSBRthNZjbJHQ5Lkz0IRrvjBfqE0Rt0xNRDYx9Zkzmteb9zWtet2L+yl093g+Mbky4VZvOQ==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=4x6an8OX6jE13rJPGScLuX1YiQowDpCHrOlYWX9UAbg=;
b=RTkC/TniABEJLuEdmuHAapLZQsiq0s0othTGM1sVozmycRMvFD9OiRUEXfPvchPK8gTBRW06/abTuyJxAaNp0zJMreYdJBokS+qJCBXs0w4LDMVBkcTDmQG/Zh1uc+h4Vue6LfcsiCXa8+atrB1r/HCcs/XPzpmest2gB+XSf/RqrZ3zsWz0bmWjI8Jb34A6oqoV5M5DiTBHa4EeLBVxYcLlHIMEq9/yyik7ruGKkSf9NPEDLAT0C4CpO4VS9vrSsigdhG7xIjsV58iBAfNyUfTZbW5IeJ2P3kBrOChIpMhLWV352l9kATWaVJI7sesw75TwBuxJl8lg959o4ud36Q==
Received: from AS4P191CA0037.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:657::16)
by DU4PR10MB8654.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:55c::22)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:28 +0000
Received: from AM3PEPF00009B9D.eurprd04.prod.outlook.com
(2603:10a6:20b:657:cafe::6f) by AS4P191CA0037.outlook.office365.com
(2603:10a6:20b:657::16) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.16 via Frontend Transport; Tue,
26 Nov 2024 14:38:28 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AM3PEPF00009B9D.mail.protection.outlook.com (10.167.16.22) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:27 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.43)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:27
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8440762
X-ExclaimerImprintLatency: 5246909
X-ExclaimerImprintAction: 20e810101f1543e08a10c40bab27e221
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=HJaQ5q4iysZQmz1TmhnfYVaN5VWkTR4Gn3u7aUBFnK0v9cUN2tbm3T0S++7JdNtx3iPq3j/VpghlZD+PbhvUVJCP0lx1KJq4GPispgePJ81bmmJVwJ6Rz+ngLUhigZuvFH022ZGwoMkN7ygIpBpvqm9JOzonzf+ZHXLyLBdmrD8cJiaRXw0YHWsXk1o1hH9JLwWycNWUvoHf41/iHeP0+sQRa7qGAFtp6En5suutCS0GPlVkdMTW7YEdcLiBHWwBKhVunfWsTbX8i/SKhVf4BtSlark4Nz2xNQlQwsRTwmuIJ9G85atOrdefi9qyVJgHawdy6YfDP9B6Wfxh+Dkmnw==
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=4x6an8OX6jE13rJPGScLuX1YiQowDpCHrOlYWX9UAbg=;
b=gRni8tQZV7VDFFR0SIebz+XbpBEJy1qFsNZYzBeYNP0yprLGNj7oWIg9UXYSrvrOrbYVKLc04npu3V37czXmy/G1nRMXCFNbehEahSY8iomYUQKC6qcSW3eYQXNWJMP6huGEeN5T80WcWQvrOH5IGBLshxPDFerJ4Ojv4kgy5rSvtaiCb4XU1BPclWnvyal9QcnOYnC6Bz8wuR9cpy20EY/tVO+O4JgiZJ1/XwZP2lpQAPX+QW5xEvh/RfOWmF1l0vQvE5nfCTMY9abEhDq552iYLiIABR4ML3HvTuTq/hLJaXb7+0YvVaZjZH/obdpfQ+kcsn7jZQRvGYh4PGBNDg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=4x6an8OX6jE13rJPGScLuX1YiQowDpCHrOlYWX9UAbg=;
b=RTkC/TniABEJLuEdmuHAapLZQsiq0s0othTGM1sVozmycRMvFD9OiRUEXfPvchPK8gTBRW06/abTuyJxAaNp0zJMreYdJBokS+qJCBXs0w4LDMVBkcTDmQG/Zh1uc+h4Vue6LfcsiCXa8+atrB1r/HCcs/XPzpmest2gB+XSf/RqrZ3zsWz0bmWjI8Jb34A6oqoV5M5DiTBHa4EeLBVxYcLlHIMEq9/yyik7ruGKkSf9NPEDLAT0C4CpO4VS9vrSsigdhG7xIjsV58iBAfNyUfTZbW5IeJ2P3kBrOChIpMhLWV352l9kATWaVJI7sesw75TwBuxJl8lg959o4ud36Q==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:24 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:24 +0000
Date: Tue, 26 Nov 2024 15:38:22 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0112.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::15) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AM3PEPF00009B9D:EE_|DU4PR10MB8654:EE_
X-MS-Office365-Filtering-Correlation-Id: 5e155ca9-a370-446b-e1bc-08dd0e27fd7c
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
UhHQmbAI332e04/0AAD6GaWBBra63iM89eHeWYUwoRf8mIm9ypQDnOHD32v6Ptra1c/cm9IijwrYgzQWHaTzReW1p9HEvxTgPZDg1WBsTixWpVE6T07nd/O2tTLhsHXS6m+FgPnuBAzogweeKYeYRixjeF+j6uYmmNTLRA06ZDvCHQTCS1b6KQWOn2ImWUC9TYwwdWkrzidfkFhwdq4Hg4jgp9F7MR7PAcGjvvgQVLWaFshfevu8EKhGuFkBtKJYOWG0NN6RrdCQsbySXWZ5ttvLYUqZaF+UMj7ulsxX8KQTjH+fB9hIJmB4Lqp0eToiAXC06fLRMojUp6pd/af6WeI8N/Jc7gB9QCGR5j8TWFV2NMFgXssDP0+HWmyWc4cmdFa8yNxfl3jB99u+nZuUd6k8TEai5MTWkTwUNBNBWHNONyJ8MPmYAOnIQOkpvObhIxqDjkVWjn17stQ6/aaU1GJ/HTS//GGX+1aHdlpqes3viQejma0jGVHVmJK1+GWeWZxK/Uz1sGxlWudncdsSwwylMlYyIrdd8ho+vs1U8iC3UGxVZuD07TIeKoN6lC7UkfSDivcmKoUuMpwzFXbhlwR9f6n5UxOuJs57rSpnNuFzo3IQ8j5qpW3I+pM3UY9LRRLajpQ0bKm+cmIXFHFFFAAWkZPVNPJ+qOVL8Z7sjYzoUl4XbZDqVlKJIUXTpEcaJeue1FRdgfSi14SJkMMc+Xm7kv33kLtCo/k+rBEIZskI3wn5CUaRTECiTQ0qYg2mgRNidNfOxkb/WONquExR0F6UfbmqrMvCfRc9T5Nz7JSvSN2DgLTEUMuMMNn1oReLrpeWEwfCvNiknJEq86YUGSX5mJZJ7Z5Q/STfiyYDx10OqgmGAN4YljTT/mAv3hEyLJAQtTLkNekp7MBiPImFqYFUnXDlCjxwuoV9l5dIYndJs5RkwkJ+nJwDvA57TQt6IkutpO0mYoHbwTay7dwuDKS2EhArnBBvXdRdGbf5kl0nuvp3IdBpTW0qr+Tzo8opB5FCPTJrZ0QHn0XMda8sGCInLIYCp5XaZ6Vc6s4TCGu9mH5rhHCaqhJ1my1OwWuXZVnZAkFsbtrHH1xZyKxg3LGPR+0FnrCZjDWU4f57AuTI5Cu7jnPp/tDgg7Mny39OL330NBBrYQvphxmm4Afj1ag1j6ItLKjwh84ptCeCm9Yviyg8vh+9CLHfGj/31GU1E26NFt/KFO2DMnFoyyYhP5pSgPuwRwPcbVWwYxeDwLYDf2/C3DUPSaGMw+0aGa0kdSYBzR+v1p13R4Xb7KIfc9mzHKJzsFvHY6ll7DHYUAdhYXxpeahT4smjzhACjviSlNQ4812BqR1g81kX3E+QkiS3xDWmiJRB8AwYtmMnpJg=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM3PEPF00009B9D.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
0041f14d-18cc-4d11-816a-08dd0e27fb98
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
q9BHb9fO4qF/OW1dyLqkOd0RX+oU6xDjJwX7iAR7HqdA6103gU4pGqFp0E48xqYQMfLYuhzdfi+B32MFCVSM0Un8reGT+7MwKWQ8uuAMSimCkoO3o1VgWlgkTpA7XvFRWexvIJQH7hJ03jtIdCD/udEDgZXTakC91Y7KdrsMh0ZnBkn/wCoUx/sBjXUswDS+cXMualWK8LwDPw++/NlOOM3spQ6++lcHWaHg0VhEDJgllcURCOj2n4dDttXY995GG87f594rKfKzUJmVn17JCQjT+hxR3yIUyuVGctCHiK7XNMibn0sIexVsltwU1XfvrSo1/0/ikD8ib5RWEmnftrJwMSx+mrlNkFezwuwUUVEozvWg7iHQ8Spn7Vk91Ht6fMg4ymZOkCEvvd3Mpd9YSBngnHOSMlxx+UmoGyHjjoasqIlymoQFUlVvL9gFUJbM48WwguiSsSjyjhWXX1Ve9buUk4SC+E7G08AVjHub4PscNxtKFa/T7JASRCobr92GyecQpT4jLw8v7Nh41oNDyLdzFGWZn3tnUDeG7CSwu4qNWirTN6gz5YP0P63SAkZRnaCanvtePBIfWuazfJkweTfVevCQzls2Hzcj3tWA45IMAsAsWwZsN3zmgeIp9tKV4E/F4BcjTuGJg0Xc61v7ImVVnYswKYjG6R722SJZpLSiH1PMtuITnuQylt4pp+ko6v9YUm17RD+t/OJv4UJd0QQ2/VV2IQhHRB/bWlb8ANTslcQiNMiqveHDVh2Vced5eJbMAZszPZa43giBeoti28cYRYFpaN4gNCcpwZqsc4eSHVp3z2Xt6y+C4Rpgo1FK2FfWgzZpfEiwlNShIQSHa9HfKEBrasuRB1LFMEo5IFXwvhGlvnosrd7iOgPqHt8mlarEPaamMoYf9hJylHvAF6Dq5+YD1zkeYa3Ec9lXGXB39K1m3gQtms9GWkL1bGd1hdJh5m23YsTi61JkzPk3civCa1nwg/aH6OunrN6VsQx48nVa3MIqXukm4ygA0OCeAtnwSWDCOJFm1SBpylxJtqwI0E98iepCYXn7Ti2MiRWnbLt3dB2qSXWKvRgoLvh/E9fD3EoeAuKsoT1r89vS8705lyKlpJu5g/qwkFYu5M6EiiRJVDZvexiv523Z2VdAEgsd2+MjLYu2hcxb8MD+SfVDikfzXWyLh/fXZ2M5ThH+m8rL22Xfxw5TVgKedBGNLIDwSMbTYXSFQH+xDnIqBV42DlxL3lPXBTleJeoa+wHEJkNxfTlRoeJjXW1yPpv/0na8/CiiQ+AnHcdMDfGmZLJpCuN7K1orTwLqhC8YllDnqZCY65mstQfRBGhFONElrXwdh9DfVjfKQxuY8ns9q7p7FP4PHZ8fMyRZHXpEk5TlFpRAWadEo2iWl/Ze2eDGPoCru/RJcukWAA1WWoq9Kpkbz9YNjMcBs0j/WF29LP0QGCwnO9jcLBYC2vW9RjOn
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:27.0030 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
5e155ca9-a370-446b-e1bc-08dd0e27fd7c
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM3PEPF00009B9D.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR10MB8654
Subject: [ovs-dev] [PATCH ovn v3 20/33] controller: Introduce route node.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
this engine node determines the routes that the ovn-controller should
export.
Signed-off-by: Felix Huettner
---
controller/automake.mk | 4 +-
controller/ovn-controller.c | 188 ++++++++++++++++++++++++++++++++++-
controller/route.c | 191 ++++++++++++++++++++++++++++++++++++
controller/route.h | 73 ++++++++++++++
tests/automake.mk | 1 +
5 files changed, 455 insertions(+), 2 deletions(-)
create mode 100644 controller/route.c
create mode 100644 controller/route.h
diff --git a/controller/automake.mk b/controller/automake.mk
index ed93cfb3c..fc1f3cbc0 100644
--- a/controller/automake.mk
+++ b/controller/automake.mk
@@ -49,7 +49,9 @@ controller_ovn_controller_SOURCES = \
controller/statctrl.h \
controller/statctrl.c \
controller/ct-zone.h \
- controller/ct-zone.c
+ controller/ct-zone.c \
+ controller/route.h \
+ controller/route.c
controller_ovn_controller_LDADD = lib/libovn.la $(OVS_LIBDIR)/libopenvswitch.la
man_MANS += controller/ovn-controller.8
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index c40fb3d43..36da1c9c3 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -87,6 +87,7 @@
#include "statctrl.h"
#include "lib/dns-resolve.h"
#include "ct-zone.h"
+#include "route.h"
VLOG_DEFINE_THIS_MODULE(main);
@@ -861,7 +862,8 @@ ctrl_register_ovs_idl(struct ovsdb_idl *ovs_idl)
SB_NODE(fdb, "fdb") \
SB_NODE(meter, "meter") \
SB_NODE(static_mac_binding, "static_mac_binding") \
- SB_NODE(chassis_template_var, "chassis_template_var")
+ SB_NODE(chassis_template_var, "chassis_template_var") \
+ SB_NODE(route, "route")
enum sb_engine_node {
#define SB_NODE(NAME, NAME_STR) SB_##NAME,
@@ -4785,6 +4787,172 @@ pflow_lflow_output_sb_chassis_handler(struct engine_node *node,
return true;
}
+struct ed_type_route {
+ /* Contains struct tracked_datapath entries for local datapaths subject to
+ * route exchange. */
+ struct hmap tracked_route_datapaths;
+ /* Contains struct advertise_datapath_entry */
+ struct hmap announce_routes;
+};
+
+static void
+en_route_run(struct engine_node *node, void *data)
+{
+ struct ed_type_route *re_data = data;
+ route_cleanup(&re_data->announce_routes);
+
+ const struct ovsrec_open_vswitch_table *ovs_table =
+ EN_OVSDB_GET(engine_get_input("OVS_open_vswitch", node));
+ const char *chassis_id = get_ovs_chassis_id(ovs_table);
+ ovs_assert(chassis_id);
+
+ struct ovsdb_idl_index *sbrec_chassis_by_name =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_chassis", node),
+ "name");
+ const struct sbrec_chassis *chassis
+ = chassis_lookup_by_name(sbrec_chassis_by_name, chassis_id);
+ ovs_assert(chassis);
+
+ struct ovsdb_idl_index *sbrec_port_binding_by_name =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_port_binding", node),
+ "name");
+ struct ed_type_runtime_data *rt_data =
+ engine_get_input_data("runtime_data", node);
+
+ struct ovsdb_idl_index *sbrec_route_by_datapath =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_route", node), "datapath");
+
+ struct route_ctx_in r_ctx_in = {
+ .ovnsb_idl_txn = engine_get_context()->ovnsb_idl_txn,
+ .sbrec_port_binding_by_name = sbrec_port_binding_by_name,
+ .chassis = chassis,
+ .active_tunnels = &rt_data->active_tunnels,
+ .local_datapaths = &rt_data->local_datapaths,
+ .local_lports = &rt_data->local_lports,
+ .sbrec_route_by_datapath = sbrec_route_by_datapath,
+ };
+
+ struct route_ctx_out r_ctx_out = {
+ .tracked_re_datapaths = &re_data->tracked_route_datapaths,
+ .announce_routes = &re_data->announce_routes,
+ };
+
+ route_run(&r_ctx_in, &r_ctx_out);
+
+ engine_set_node_state(node, EN_UPDATED);
+}
+
+
+static void *
+en_route_init(struct engine_node *node OVS_UNUSED,
+ struct engine_arg *arg OVS_UNUSED)
+{
+ struct ed_type_route *data = xzalloc(sizeof *data);
+
+ hmap_init(&data->tracked_route_datapaths);
+ hmap_init(&data->announce_routes);
+
+ return data;
+}
+
+static void
+en_route_cleanup(void *data)
+{
+ struct ed_type_route *re_data = data;
+
+ tracked_datapaths_destroy(&re_data->tracked_route_datapaths);
+ route_cleanup(&re_data->announce_routes);
+ hmap_destroy(&re_data->announce_routes);
+}
+
+static bool
+route_runtime_data_handler(struct engine_node *node, void *data)
+{
+ struct ed_type_route *re_data = data;
+ struct ed_type_runtime_data *rt_data =
+ engine_get_input_data("runtime_data", node);
+
+ if (!rt_data->tracked) {
+ return false;
+ }
+
+ struct tracked_datapath *t_dp;
+ HMAP_FOR_EACH (t_dp, node, &rt_data->tracked_dp_bindings) {
+ struct tracked_datapath *re_t_dp =
+ tracked_datapath_find(&re_data->tracked_route_datapaths, t_dp->dp);
+
+ if (re_t_dp) {
+ /* Until we get I-P support for route exchange we need to request
+ * recompute. */
+ return false;
+ }
+
+ struct shash_node *shash_node;
+ SHASH_FOR_EACH (shash_node, &t_dp->lports) {
+ struct tracked_lport *lport = shash_node->data;
+ if (route_exchange_relevant_port(lport->pb)) {
+ /* Until we get I-P support for route exchange we need to
+ * request recompute. */
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+static bool
+route_sb_port_binding_data_handler(struct engine_node *node, void *data)
+{
+ struct ed_type_route *re_data = data;
+ const struct sbrec_port_binding_table *pb_table =
+ EN_OVSDB_GET(engine_get_input("SB_port_binding", node));
+
+ const struct sbrec_port_binding *sbrec_pb;
+ SBREC_PORT_BINDING_TABLE_FOR_EACH_TRACKED (sbrec_pb, pb_table) {
+ struct tracked_datapath *re_t_dp =
+ tracked_datapath_find(&re_data->tracked_route_datapaths,
+ sbrec_pb->datapath);
+ if (re_t_dp) {
+ /* Until we get I-P support for route exchange we need to request
+ * recompute. */
+ return false;
+ }
+
+ if (route_exchange_relevant_port(sbrec_pb)) {
+ /* Until we get I-P support for route exchange we need to
+ * request recompute. */
+ return false;
+ }
+
+ }
+ return true;
+}
+
+static bool
+route_sb_route_data_handler(struct engine_node *node, void *data)
+{
+ struct ed_type_route *re_data = data;
+ const struct sbrec_route_table *route_table =
+ EN_OVSDB_GET(engine_get_input("SB_route", node));
+
+ const struct sbrec_route *sbrec_route;
+ SBREC_ROUTE_TABLE_FOR_EACH_TRACKED (sbrec_route, route_table) {
+ struct tracked_datapath *re_t_dp =
+ tracked_datapath_find(&re_data->tracked_route_datapaths,
+ sbrec_route->datapath);
+ if (re_t_dp) {
+ /* Until we get I-P support for route exchange we need to request
+ * recompute. */
+ return false;
+ }
+ }
+ return true;
+}
+
/* Returns false if the northd internal version stored in SB_Global
* and ovn-controller internal version don't match.
*/
@@ -4993,6 +5161,9 @@ main(int argc, char *argv[])
struct ovsdb_idl_index *sbrec_chassis_template_var_index_by_chassis
= ovsdb_idl_index_create1(ovnsb_idl_loop.idl,
&sbrec_chassis_template_var_col_chassis);
+ struct ovsdb_idl_index *sbrec_route_index_by_datapath
+ = ovsdb_idl_index_create1(ovnsb_idl_loop.idl,
+ &sbrec_route_col_datapath);
ovsdb_idl_track_add_all(ovnsb_idl_loop.idl);
ovsdb_idl_omit_alert(ovnsb_idl_loop.idl,
@@ -5075,6 +5246,7 @@ main(int argc, char *argv[])
ENGINE_NODE_WITH_CLEAR_TRACK_DATA(lb_data, "lb_data");
ENGINE_NODE(mac_cache, "mac_cache");
ENGINE_NODE(bfd_chassis, "bfd_chassis");
+ ENGINE_NODE(route, "route");
#define SB_NODE(NAME, NAME_STR) ENGINE_NODE_SB(NAME, NAME_STR);
SB_NODES
@@ -5097,6 +5269,15 @@ main(int argc, char *argv[])
engine_add_input(&en_lb_data, &en_runtime_data,
lb_data_runtime_data_handler);
+ engine_add_input(&en_route, &en_ovs_open_vswitch, NULL);
+ engine_add_input(&en_route, &en_sb_chassis, NULL);
+ engine_add_input(&en_route, &en_sb_port_binding,
+ route_sb_port_binding_data_handler);
+ engine_add_input(&en_route, &en_runtime_data,
+ route_runtime_data_handler);
+ engine_add_input(&en_route, &en_sb_route,
+ route_sb_route_data_handler);
+
engine_add_input(&en_addr_sets, &en_sb_address_set,
addr_sets_sb_address_set_handler);
engine_add_input(&en_port_groups, &en_sb_port_group,
@@ -5277,6 +5458,9 @@ main(int argc, char *argv[])
controller_output_mac_cache_handler);
engine_add_input(&en_controller_output, &en_bfd_chassis,
controller_output_bfd_chassis_handler);
+ /* This is just temporary until the route output is actually used. */
+ engine_add_input(&en_controller_output, &en_route,
+ controller_output_bfd_chassis_handler);
struct engine_arg engine_arg = {
.sb_idl = ovnsb_idl_loop.idl,
@@ -5307,6 +5491,8 @@ main(int argc, char *argv[])
sbrec_static_mac_binding_by_datapath);
engine_ovsdb_node_add_index(&en_sb_chassis_template_var, "chassis",
sbrec_chassis_template_var_index_by_chassis);
+ engine_ovsdb_node_add_index(&en_sb_route, "datapath",
+ sbrec_route_index_by_datapath);
engine_ovsdb_node_add_index(&en_ovs_flow_sample_collector_set, "id",
ovsrec_flow_sample_collector_set_by_id);
engine_ovsdb_node_add_index(&en_ovs_port, "qos", ovsrec_port_by_qos);
diff --git a/controller/route.c b/controller/route.c
new file mode 100644
index 000000000..98618e46a
--- /dev/null
+++ b/controller/route.c
@@ -0,0 +1,191 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include
+
+#include "openvswitch/vlog.h"
+
+#include "lib/ovn-sb-idl.h"
+
+#include "binding.h"
+#include "ha-chassis.h"
+#include "local_data.h"
+#include "route.h"
+
+
+VLOG_DEFINE_THIS_MODULE(exchange);
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
+
+/* While the linux kernel can handle 2^32 routing tables, only so many can fit
+ * in the corresponding VRF interface name. */
+#define MAX_TABLE_ID 1000000000
+
+bool
+route_exchange_relevant_port(const struct sbrec_port_binding *pb)
+{
+ return (pb && smap_get_bool(&pb->options, "dynamic-routing", false));
+}
+
+uint32_t
+advertise_route_hash(const struct in6_addr *dst, unsigned int plen)
+{
+ uint32_t hash = hash_bytes(dst->s6_addr, 16, 0);
+ return hash_int(plen, hash);
+}
+
+static const struct sbrec_port_binding*
+find_local_crp(struct ovsdb_idl_index *sbrec_port_binding_by_name,
+ const struct sbrec_chassis *chassis,
+ const struct sset *active_tunnels,
+ const struct sbrec_port_binding *pb)
+{
+ if (!pb) {
+ return NULL;
+ }
+ const char *crp = smap_get(&pb->options, "chassis-redirect-port");
+ if (!crp) {
+ return NULL;
+ }
+ if (!lport_is_chassis_resident(sbrec_port_binding_by_name, chassis,
+ active_tunnels, crp)) {
+ return NULL;
+ }
+ return lport_lookup_by_name(sbrec_port_binding_by_name, crp);
+}
+
+static void
+advertise_datapath_cleanup(struct advertise_datapath_entry *ad)
+{
+ struct advertise_route_entry *ar;
+ HMAP_FOR_EACH_SAFE (ar, node, &ad->routes) {
+ hmap_remove(&ad->routes, &ar->node);
+ free(ar);
+ }
+ hmap_destroy(&ad->routes);
+ sset_destroy(&ad->bound_ports);
+ free(ad);
+}
+
+void
+route_run(struct route_ctx_in *r_ctx_in,
+ struct route_ctx_out *r_ctx_out)
+{
+ const struct local_datapath *ld;
+ HMAP_FOR_EACH (ld, hmap_node, r_ctx_in->local_datapaths) {
+ if (!ld->n_peer_ports || ld->is_switch) {
+ continue;
+ }
+
+ bool relevant_datapath = false;
+ struct advertise_datapath_entry *ad = xzalloc(sizeof(*ad));
+ ad->key = ld->datapath->tunnel_key;
+ ad->db = ld->datapath;
+ hmap_init(&ad->routes);
+ sset_init(&ad->bound_ports);
+
+ /* This is a LR datapath, find LRPs with route exchange options
+ * that are bound locally. */
+ for (size_t i = 0; i < ld->n_peer_ports; i++) {
+ const struct sbrec_port_binding *local_peer
+ = ld->peer_ports[i].local;
+ const struct sbrec_port_binding *sb_crp = find_local_crp(
+ r_ctx_in->sbrec_port_binding_by_name,
+ r_ctx_in->chassis,
+ r_ctx_in->active_tunnels,
+ local_peer);
+ if (!route_exchange_relevant_port(sb_crp)) {
+ continue;
+ }
+
+ ad->maintain_vrf |= smap_get_bool(&sb_crp->options,
+ "maintain-vrf", false);
+ ad->use_netns |= smap_get_bool(&sb_crp->options,
+ "use-netns", false);
+ relevant_datapath = true;
+ sset_add(&ad->bound_ports, local_peer->logical_port);
+ }
+
+ if (!relevant_datapath) {
+ advertise_datapath_cleanup(ad);
+ continue;
+ }
+ tracked_datapath_add(ld->datapath, TRACKED_RESOURCE_NEW,
+ r_ctx_out->tracked_re_datapaths);
+
+ /* While tunnel_key would most likely never be negative, the compiler
+ * has opinions if we don't check before using it in snprintf below. */
+ if (ld->datapath->tunnel_key < 0 ||
+ ld->datapath->tunnel_key > MAX_TABLE_ID) {
+ VLOG_WARN_RL(&rl,
+ "skip route sync for datapath "UUID_FMT", "
+ "tunnel_key %"PRIi64" would make VRF interface name "
+ "overflow.",
+ UUID_ARGS(&ld->datapath->header_.uuid),
+ ld->datapath->tunnel_key);
+ goto cleanup;
+ }
+
+ if (ad->maintain_vrf && ad->use_netns) {
+ VLOG_WARN_RL(&rl,
+ "For Datapath %"PRIu64" both maintain-vrf and "
+ "use-netns are set, this will never work",
+ ld->datapath->tunnel_key);
+ goto cleanup;
+ }
+
+ struct sbrec_route *route_filter = sbrec_route_index_init_row(
+ r_ctx_in->sbrec_route_by_datapath);
+ sbrec_route_index_set_datapath(route_filter, ld->datapath);
+ struct sbrec_route *route;
+ SBREC_ROUTE_FOR_EACH_EQUAL (route, route_filter,
+ r_ctx_in->sbrec_route_by_datapath) {
+ if (!strcmp(route->type, "receive")) {
+ continue;
+ }
+ struct in6_addr prefix;
+ unsigned int plen;
+ if (!ip46_parse_cidr(route->ip_prefix, &prefix, &plen)) {
+ VLOG_WARN_RL(&rl, "bad 'ip_prefix' %s in route "
+ UUID_FMT, route->ip_prefix,
+ UUID_ARGS(&route->header_.uuid));
+ continue;
+ }
+
+ struct advertise_route_entry *ar = xzalloc(sizeof(*ar));
+ hmap_insert(&ad->routes, &ar->node,
+ advertise_route_hash(&prefix, plen));
+ ar->addr = prefix;
+ ar->plen = plen;
+ }
+ sbrec_route_index_destroy_row(route_filter);
+
+ hmap_insert(r_ctx_out->announce_routes, &ad->node, ad->key);
+ continue;
+
+cleanup:
+ advertise_datapath_cleanup(ad);
+ }
+}
+
+void
+route_cleanup(struct hmap *announce_routes)
+{
+ struct advertise_datapath_entry *ad;
+ HMAP_FOR_EACH_SAFE (ad, node, announce_routes) {
+ hmap_remove(announce_routes, &ad->node);
+ advertise_datapath_cleanup(ad);
+ }
+}
diff --git a/controller/route.h b/controller/route.h
new file mode 100644
index 000000000..ca309c7be
--- /dev/null
+++ b/controller/route.h
@@ -0,0 +1,73 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ROUTE_H
+#define ROUTE_H 1
+
+#include
+#include
+#include "openvswitch/hmap.h"
+#include "sset.h"
+
+struct hmap;
+struct ovsdb_idl_index;
+struct sbrec_chassis;
+struct sbrec_port_binding;
+struct sset;
+
+struct route_ctx_in {
+ struct ovsdb_idl_txn *ovnsb_idl_txn;
+ struct ovsdb_idl_index *sbrec_port_binding_by_name;
+ const struct sbrec_chassis *chassis;
+ const struct sset *active_tunnels;
+ struct hmap *local_datapaths;
+ const struct sset *local_lports;
+ struct ovsdb_idl_index *sbrec_route_by_datapath;
+};
+
+struct route_ctx_out {
+ struct hmap *tracked_re_datapaths;
+ /* Contains struct advertise_datapath_entry */
+ struct hmap *announce_routes;
+};
+
+struct advertise_datapath_entry {
+ struct hmap_node node;
+ /* tunnel_key of the datapath */
+ int64_t key;
+ const struct sbrec_datapath_binding *db;
+ bool maintain_vrf;
+ bool use_netns;
+ struct hmap routes;
+ /* the name of the port bindings locally bound for this datapath and
+ * running route exchange logic. */
+ struct sset bound_ports;
+};
+
+struct advertise_route_entry {
+ struct hmap_node node;
+ struct in6_addr addr;
+ unsigned int plen;
+ /* used by the route-exchange module to determine if the route is
+ * already installed */
+ bool installed;
+};
+
+bool route_exchange_relevant_port(const struct sbrec_port_binding *pb);
+uint32_t advertise_route_hash(const struct in6_addr *dst, unsigned int plen);
+void route_run(struct route_ctx_in *,
+ struct route_ctx_out *);
+void route_cleanup(struct hmap *announce_routes);
+
+#endif /* ROUTE_H */
diff --git a/tests/automake.mk b/tests/automake.mk
index 3899c9e80..9244532fa 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -305,6 +305,7 @@ tests_ovstest_LDADD = $(OVS_LIBDIR)/daemon.lo \
controller/ovsport.$(OBJEXT) \
controller/patch.$(OBJEXT) \
controller/vif-plug.$(OBJEXT) \
+ controller/route.$(OBJEXT) \
northd/ipam.$(OBJEXT)
# Python tests.
From patchwork Tue Nov 26 14:38:24 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015503
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=qUB/VBlG;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=qUB/VBlG;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQJc3NHGz1yCv
for ; Wed, 27 Nov 2024 01:42:08 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id C0AA86FBD8;
Tue, 26 Nov 2024 14:42:06 +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 lY3_3lXYmfGG; Tue, 26 Nov 2024 14:42:03 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 439C56FBD9
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=qUB/VBlG;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=qUB/VBlG
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp3.osuosl.org (Postfix) with ESMTPS id 439C56FBD9;
Tue, 26 Nov 2024 14:40:41 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 78BF7C08A8;
Tue, 26 Nov 2024 14:40:40 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 1EE93C08BD
for ; Tue, 26 Nov 2024 14:40:36 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 70416411BB
for ; Tue, 26 Nov 2024 14:38:40 +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 hT2D2ncEhTCV for ;
Tue, 26 Nov 2024 14:38:39 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2606::625;
helo=eur02-am0-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 9B7104DC33
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9B7104DC33
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=qUB/VBlG;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=qUB/VBlG
Received: from EUR02-AM0-obe.outbound.protection.outlook.com
(mail-am0eur02on20625.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2606::625])
by smtp4.osuosl.org (Postfix) with ESMTPS id 9B7104DC33
for ; Tue, 26 Nov 2024 14:38:38 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=aLUeg+LZhBDj9Ri05qcjAccla+KQIsuR8PaiimidKWlhOiOJQTPiwoOAON+rgnyRBEeuuPSfdGviwSc4pbRoWgRzrBnGvNcXjgc7D8tQ/ZE+3Hzig049+KK43tmj2V94aIsF68j1qwtEEmwi1V6+xyETrS1U7S1PqW4Oe/2bQgiVyDoIcsXik01ufsZeignI29xsgA8DZOEOuqt8YccX4qVbKdHlQD/k7/XmUSGM80Tq7mAKN3FWfgEzAlEB0Eo3eG3tqjTnSZzy6WghWXfE5X+dyuhXg55v1Ug/MWEosSCk1kLpKv2urSaNtLxz3T35b+MSU+M7eFiBrGOGeNR+IQ==
ARC-Message-Signature: i=2; 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=6AdJcufITthnsvmAJMJASuvAL8zFtmqIRj3JgnoyTjw=;
b=r3wBFPmIOPh8a1xVyP7ygVn0bmsGu9ND3856iewCSrphX0OwUV0leWF9YNcsCiEyDP4p0h4xDz1U/bEsioXfMrseK2nxNQFvHYWPb5ihqKKAEkp2621nNXeYOYHs4CG84OPg+6xaU7KYgcgqp/KFKyPMjJBr+nc/YFxI++03sFhsP6J9QWNLnovkjF6s/vpWiOm2K5sgZNrS0OW6ef1p7LHxb3+eym8TCT5hLCF2nP9gCOZLD9aVmDB7qE30ipm8e8w1b4N5JdxDDbmIgT6VC3zI06k+/FFmKHruTvYfhQAPZCfPpufRY+9sZd9i4sol3rP3YuqKH/NtlydqP86CWw==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=6AdJcufITthnsvmAJMJASuvAL8zFtmqIRj3JgnoyTjw=;
b=qUB/VBlG0Zm++qH/rkRi7/Q/+6Y1D92uJyZNJGNFX4eqR20BsLw4/jonwIwqVLWH9V1iNY6BuGtKJhOLQLrav+pYBh/5VXB3CIEK7wwUP40sOg1ol+lpdpMbfEkcvsrvXusqIKb2rfAKeRfeDzdzCK6YG/6OQt5nRJmZ83hhNfuKHEMHEzNsk+wnl37qPXdCDCwRssq2U3rpPgntDSVjFVQC24IWb832Zr9/cAKEoisGphyGDUwbuLdLkvspsWCoJ7FYIqGpth0tJM7daZnnQhVhzYIj+ek+8OgpohAluEX4an9mOhmH8aVPxP9ju6oR64fmKrmrPksDD06s6fzXwA==
Received: from DU7PR01CA0039.eurprd01.prod.exchangelabs.com
(2603:10a6:10:50e::12) by PR3PR10MB4096.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:a5::7) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:35 +0000
Received: from DU6PEPF0000A7E2.eurprd02.prod.outlook.com
(2603:10a6:10:50e:cafe::11) by DU7PR01CA0039.outlook.office365.com
(2603:10a6:10:50e::12) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:35 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
DU6PEPF0000A7E2.mail.protection.outlook.com (10.167.8.42) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:33 +0000
Received: from EUR02-VI1-obe.outbound.protection.outlook.com (104.47.11.47)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:34
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 18040192
X-ExclaimerImprintLatency: 8436874
X-ExclaimerImprintAction: ccd8e4c0510446ecbeed9ccd6fb9a081
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=me8R9jQ+gICCTondn+5LF52zj0JDHK6H96ZMlm3s74T3QzZ6rNTV71gJg4fBjAkjeTdce+624BT4sOqzrGcJy/QjbMiMXV3aXy1IJC7W/F+ay+Pt2I0YhhQdPVcudwIzcefeirB8+wR1GhfMMNefvl53xP+GIRWRk4a6ci1dQO0Q/mJiMgIbjE3svyF1zLlHPT2w4jHvGNYoqIDpxm56P/yQP/jiuJZxNzQYbpsImMnkTHcQlpOpR9zNljj7OsDwzpsGgSY0z4jOvx3hV8GqEptU4WbtER7XcM4PNw68Lz0/LGUvfByZ2OENalQsvSAjj8iD4waqsRyKVs6fHzu/iQ==
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=6AdJcufITthnsvmAJMJASuvAL8zFtmqIRj3JgnoyTjw=;
b=Dz+eQTOqr2OGI5wjm0/MCEq4mCEgZ/9jyHcZv3rJf3Ozg1v0J/4rwKW5PWjM6BxXWbmV67OuLsEIUPH2dEv1UXRvyHxnlN9xevJddhUQVrEsJwzpC1Hfl7fa+L1K6FgIiKRzUEPwXuvaB5/ZaP4C0w+vbfJQt3uPRO1cp/iIozeKZD9A23je036+QUYi45py6v/pvt/qiCOxMQn2FOj5IvD50eFnx7z4ViOmBcJTceOnayyc7jsWT8qm81Kr7Iv5/yrBPdR1Rxp+pnyYqWN+CI/37kf+V3SAYzTzXy9HIhtU5buBDdWCFGIQ0/kshjweoqjiQtkns4pIJvIiJ7itHw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=6AdJcufITthnsvmAJMJASuvAL8zFtmqIRj3JgnoyTjw=;
b=qUB/VBlG0Zm++qH/rkRi7/Q/+6Y1D92uJyZNJGNFX4eqR20BsLw4/jonwIwqVLWH9V1iNY6BuGtKJhOLQLrav+pYBh/5VXB3CIEK7wwUP40sOg1ol+lpdpMbfEkcvsrvXusqIKb2rfAKeRfeDzdzCK6YG/6OQt5nRJmZ83hhNfuKHEMHEzNsk+wnl37qPXdCDCwRssq2U3rpPgntDSVjFVQC24IWb832Zr9/cAKEoisGphyGDUwbuLdLkvspsWCoJ7FYIqGpth0tJM7daZnnQhVhzYIj+ek+8OgpohAluEX4an9mOhmH8aVPxP9ju6oR64fmKrmrPksDD06s6fzXwA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:26 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:26 +0000
Date: Tue, 26 Nov 2024 15:38:24 +0100
To: dev@openvswitch.org
Message-ID:
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0115.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::10) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|DU6PEPF0000A7E2:EE_|PR3PR10MB4096:EE_
X-MS-Office365-Filtering-Correlation-Id: e2108d74-9210-4533-36f1-08dd0e280170
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
a986L8Tq167yP9i0uIclFdHvJzcwvGPU0OSoaJSAXChJz1VXPSFwZO0WV2c7qGQINzpcaLhuLA27z6aNbzWhZPDKofAlS45x0DYmNo6jGDNb9gVkTLNDTX6ogj/Q7MnSh2EKkHjQ4HutbogLh5b1OGA6D9Ho2Jix2P4QRzk/ACds+2YylkxRu2dAPT7JZMpUkq1tSqkFE13/i2esyXdg1BLfm3IgOHIQotvGdbKvS+HNfKmEbHh8e/Keoc9J+mibOp8Rp5cl4YBJ+v7JyBsyohbfpsyhe6NkqM6JBGmVSAuK0QfJ+URVO6Jj3nyfaul5zj4xFWQgKOjYC354Yt21OgBtLucKN7MBXmPNiAiT5vzctWGxuU44P/DAOIXhn4arTkYc864W6fFWVtsYuuw+4GjZbbAkgsV9Vs20m7MgI6NVcIVN9tm7wbPgBZ7EcFCgAllzdztwn/53PP26RdVQNOIocQCiwGzJPmQ4W2kWnBMGqG7ue9RFSGn+My5OlWqSD3/dAJJIBw1qhjxzf6ObJSX56JpUodSColtt94/pLT3V9bayJIe+ghAUJQcklyb5Y8C1FbqUsF8AmEM6sM5mcZ78IqY8rXmUWShKxq7HbOmskfnUsVu1M23OyX+HZwRTlR7ni0i5hYzhsKA4a+joABFXSXSmxKrlHtqgeCFiZQtbj4Y8sE8hHGixoG5IdiCjpjmND35WqS9KfNnoQIKqcrCtuwppFujn5u1yx6ZGhBfS8qX2ed0DRUqEdi6bJ55Ojgo78HOTKf8O7uPt/nJxh5UGfnl3MUtApBmoFEWyscHZqB8a7LnsEjPGEeuoo+1pzgswAni2QnwwKHG3MbdtzVr80tOaMjIv+ELyw5gK2t37Opt8t3MRlF/0B6uZosz870u4tZIx9jIbS4iDsVcUqMtDkiy6t+wys6nW5aKK60OKz+8M4O03QNxqfMBXNd6bb2atu1QJtZiEyIs2v6ebDKqeknel3zJbl0ZNXFRWAo51r3cy6Rg8C4rsG1Y6wpb2g7rihhVgz5/5fMw4HM7cVhLUv0NFbHpk3Yrb0sbrnPUENxThGgQroH9/tL8q7/pexOaRmph2h0EZFDO1l9gsauh2QU3/ueI1c/4TJJaacA0Zu0qpE4sHvBZQOWNhhc7qO3clSfLmY1/oN25+wygHc2MQyPexTd2I0lohdVsOMw5wN9Vf/vV5nV7aUEK1q/fmUiVECnsknY0XoMn9W+FReo8zffr/qBtEQXwXLSdO3UBWUDZb1ZibY/SLXzBBXAFhuW6Hvs/hFq3Z34QJ0mPJSUZEGZHUtYRGtdYbnxhkCLTqZV1KBF3TEQz1u62tF4SzW4bcSlo7CG9ligpgakdzlK4zkabvpOkl63MWNwGFKUw=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU6PEPF0000A7E2.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
5f924ecf-a016-4a78-8ce6-08dd0e27fcb6
X-Microsoft-Antispam: BCL:0;
ARA:13230040|14060799003|1800799024|36860700013|376014|35042699022|82310400026;
X-Microsoft-Antispam-Message-Info:
x3hVSVN+DAPoFhc76qGEmC7zuesaf4nEkKXUsMUCugWkYfG7W6Wmnvl4gDlT6+lCGpuXx0yZ9xBAaaK7Tef/ErgOHTVUK7k4PGQ9xs7LlIOlEGRJ3M2+qGO2PLsukB18E7qPMLPFnX6IU0Ma5C91b9ZmjUHBCjahKzDlNPhI1seCYnhZRdxLqB9Xc7yGvmHAZ+aREOX+Yb6NXxokRfiLr0Pk6wqK1YzRNj773AeOiGsf7ujzvJbuLELrpmbU2v909OtHsJK9RBlkYGgxNwVj5RPG1ez9izvuSZnE0TnrigyGIoNQwVtP3Np7dsfEbIkGu5pOT8cHTxDyD/IG0/HdD2sVVkkmmZFT2mQ8kHCSmrFRNM2a0aAL5u7CR+Ch+1JtkTtViqkB2gbS80XyRKD98S1ZXvnMykhGonotNTH4x8YSfG+lYWx226sikW9kTSfeImG5qJFhCRLn//opQZw8Suluw6EsOkFqoZ3K7cW5uwNGyh7KX3SwG4Rjj4v3MmloddsNUohT5kB+8z5ZJuXDqPcjF2N/a0zWYjfQLAr3f6JP3b966Qnl1OUlIHdYxRGmo4aoYj70MnaV53IC++UNm5Z567hLzKuAd4z5gu225Bza6gNQmQirdDW1LSobrsHVmMSv+iYF5APLzc2eUPuNOEf77Zsq8z7yUpyVdkektKYUqRTwrdgynJ30KzZJAm7+Esjl1Vsy2VyAl14Sw4gCitLM2y5aGk6nQQvBmtCT4GzoCQgVO8OQtyYbaxJgOrGHE4pdyoVOqmqFPQ8jUFMAad8muv0iwTwjDqlSJxSvW7mzlrmvnPEGaBB6NbfM+4TQtwDbs8wH1NYuNaxS+vGxSO14QqeMh8cBIm6RFs2MGx/V+C5mQJPQKAoWla1xYiW850NLid4zfU5aZY5CQlqUXMJCIplRlWL8p9CmQuM5ui5PNMQK6b4/FwPVvOfSTx55HCKDDkTNQbTmayPE+8kszLnyr9GB0e+pbPIIDyvuEI7mIClFEGu2gQ6Gv4pWhVmWWKYCXKwUrbZuoFShtXsuBsk+FsrcDmBxf06USOA2jImFUUogk9p9wANUDEE78/r8ryLnoKWm5raROSC3Naitgthf0TX3InIsGAVGH6VJ28jyom2zxG0AzqB+5aWiaR9Asyrbv0ZdauWTLLnHtTCAlAW1yZT5QvySEwjOUNDanOkFDWkL4v+9J28NfpATtM4i2XzZgop/oc/2+ifooJ6z+O/xWR34pdq0Hs1shVOHiaZZU4t88AR19rQY7Q5gJb5NrNtMkablppRaQTy3lLYFxCWEOmwp86bsMb4GrNQynLe4hAwxXLysqvyLURTRvWKMirJpCDrh9Wfge0oPSUFcHqmAZ6LlQfAjyT2fWhpcH7/2olaBL2lB2xJm770QyvU03MElxD+I2Q4xO54W9DlgsY31kZiRUSXCnF3yGbmTpivaHDMPSpR/niA1TpudUjqM
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(14060799003)(1800799024)(36860700013)(376014)(35042699022)(82310400026);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:33.1934 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
e2108d74-9210-4533-36f1-08dd0e280170
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU6PEPF0000A7E2.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR10MB4096
Subject: [ovs-dev] [PATCH ovn v3 21/33] controller: Introduce
route-exchange-netlink.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
Introduce route-exchange-netlink module which implements interface
for maintaining VRFs [0] and routes through Netlink.
There is a desire to do this without having to (re-)implement
routing protocol state machines in OVN, and to accomplish this we
make use of Netlink.
Netlink was chosen because:
* Its ubiquitous nature with availability on any Linux system as
as well other platforms.
* Presence of a very good Netlink library implementation in our
sibling project and library, Open vSwitch.
* Popular routing protocol software conveniently already have
support for redistributing routes to/from Netlink.
* Support for interacting with Virtual Routing and Forwarding
domains [0], allowing full isolation between virtual network
resources defined within OVN and the hosting system while
retaining access to all system network interfaces.
It is important to note that the purpose of this integration is
generic exchange of control plane information, while allowing to
keep the datapath in OVS/OVN, enabling users to leverage its full
range of user-, kernel- and mixed- space datapath implementations.
0: https://docs.kernel.org/networking/vrf.html
This was orignally built by Frode Nordahl
Signed-off-by: Felix Huettner
---
configure.ac | 2 +
controller/automake.mk | 6 +
controller/route-exchange-netlink.c | 249 ++++++++++++++++++++++++++++
controller/route-exchange-netlink.h | 40 +++++
m4/ovn.m4 | 25 +++
tests/automake.mk | 5 +
tests/system-common-macros.at | 12 ++
7 files changed, 339 insertions(+)
create mode 100644 controller/route-exchange-netlink.c
create mode 100644 controller/route-exchange-netlink.h
diff --git a/configure.ac b/configure.ac
index 4a63b84d4..cf9b4a6fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,8 @@ OVS_CHECK_WIN32
OVS_CHECK_VISUAL_STUDIO_DDK
OVN_CHECK_COVERAGE
OVS_CHECK_NDEBUG
+OVS_CHECK_NETLINK
+OVS_CHECK_LINUX_NETLINK
OVS_CHECK_OPENSSL
OVN_CHECK_LOGDIR
OVN_CHECK_PYTHON3
diff --git a/controller/automake.mk b/controller/automake.mk
index fc1f3cbc0..54855a3f9 100644
--- a/controller/automake.mk
+++ b/controller/automake.mk
@@ -53,6 +53,12 @@ controller_ovn_controller_SOURCES = \
controller/route.h \
controller/route.c
+if HAVE_NETLINK
+controller_ovn_controller_SOURCES += \
+ controller/route-exchange-netlink.h \
+ controller/route-exchange-netlink.c
+endif
+
controller_ovn_controller_LDADD = lib/libovn.la $(OVS_LIBDIR)/libopenvswitch.la
man_MANS += controller/ovn-controller.8
EXTRA_DIST += controller/ovn-controller.8.xml
diff --git a/controller/route-exchange-netlink.c b/controller/route-exchange-netlink.c
new file mode 100644
index 000000000..804cf7901
--- /dev/null
+++ b/controller/route-exchange-netlink.c
@@ -0,0 +1,249 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include "netlink-socket.h"
+#include "netlink.h"
+#include "openvswitch/hmap.h"
+#include "openvswitch/ofpbuf.h"
+#include "openvswitch/vlog.h"
+#include "packets.h"
+#include "route-table.h"
+#include "route.h"
+
+#include "route-exchange-netlink.h"
+
+VLOG_DEFINE_THIS_MODULE(route_exchange_netlink);
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
+
+#define TABLE_ID_VALID(table_id) (table_id != RT_TABLE_UNSPEC && \
+ table_id != RT_TABLE_COMPAT && \
+ table_id != RT_TABLE_DEFAULT && \
+ table_id != RT_TABLE_MAIN && \
+ table_id != RT_TABLE_LOCAL && \
+ table_id != RT_TABLE_MAX)
+
+static int
+modify_vrf(uint32_t type, uint32_t flags_arg,
+ const char *ifname, uint32_t table_id)
+{
+ uint32_t flags = NLM_F_REQUEST | NLM_F_ACK;
+ size_t linkinfo_off, infodata_off;
+ struct ifinfomsg *ifinfo;
+ struct ofpbuf request;
+ int err;
+
+ flags |= flags_arg;
+
+ ofpbuf_init(&request, 0);
+ nl_msg_put_nlmsghdr(&request, 0, type, flags);
+ ifinfo = ofpbuf_put_zeros(&request, sizeof *ifinfo);
+ nl_msg_put_string(&request, IFLA_IFNAME, ifname);
+ if (type == RTM_DELLINK) {
+ goto out;
+ }
+
+ ifinfo->ifi_change = ifinfo->ifi_flags = IFF_UP;
+ linkinfo_off = nl_msg_start_nested(&request, IFLA_LINKINFO);
+ nl_msg_put_string(&request, IFLA_INFO_KIND, "vrf");
+ infodata_off = nl_msg_start_nested(&request, IFLA_INFO_DATA);
+ nl_msg_put_u32(&request, IFLA_VRF_TABLE, table_id);
+ nl_msg_end_nested(&request, infodata_off);
+ nl_msg_end_nested(&request, linkinfo_off);
+
+out:
+ err = nl_transact(NETLINK_ROUTE, &request, NULL);
+
+ ofpbuf_uninit(&request);
+
+ return err;
+}
+
+int
+re_nl_create_vrf(const char *ifname, uint32_t table_id)
+{
+ uint32_t flags = NLM_F_CREATE | NLM_F_EXCL;
+ uint32_t type = RTM_NEWLINK;
+
+ if (!TABLE_ID_VALID(table_id)) {
+ VLOG_WARN_RL(&rl,
+ "attempt to create VRF using invalid table id %"PRIu32,
+ table_id);
+ return EINVAL;
+ }
+
+ return modify_vrf(type, flags, ifname, table_id);
+}
+
+int
+re_nl_delete_vrf(const char *ifname)
+{
+ return modify_vrf(RTM_DELLINK, 0, ifname, 0);
+}
+
+static int
+modify_route(uint32_t type, uint32_t flags_arg, uint32_t table_id,
+ const struct in6_addr *dst, unsigned int plen)
+{
+ uint32_t flags = NLM_F_REQUEST | NLM_F_ACK;
+ bool is_ipv4 = IN6_IS_ADDR_V4MAPPED(dst);
+ struct ofpbuf request;
+ struct rtmsg *rt;
+ int err;
+
+ flags |= flags_arg;
+
+ ofpbuf_init(&request, 0);
+ nl_msg_put_nlmsghdr(&request, 0, type, flags);
+ rt = ofpbuf_put_zeros(&request, sizeof *rt);
+ rt->rtm_family = is_ipv4 ? AF_INET : AF_INET6;
+ rt->rtm_table = RT_TABLE_UNSPEC; /* RTA_TABLE attribute allows id > 256 */
+ /* Manage only OVN routes */
+ rt->rtm_protocol = RTPROT_OVN;
+ rt->rtm_type = RTN_BLACKHOLE;
+ if (type == RTM_DELROUTE) {
+ rt->rtm_scope = RT_SCOPE_NOWHERE;
+ } else {
+ rt->rtm_scope = RT_SCOPE_UNIVERSE;
+ }
+ rt->rtm_dst_len = plen;
+
+ nl_msg_put_u32(&request, RTA_TABLE, table_id);
+
+ if (is_ipv4) {
+ nl_msg_put_be32(&request, RTA_DST, in6_addr_get_mapped_ipv4(dst));
+ } else {
+ nl_msg_put_in6_addr(&request, RTA_DST, dst);
+ }
+
+ err = nl_ns_transact(NULL, NETLINK_ROUTE, &request, NULL);
+ ofpbuf_uninit(&request);
+
+ return err;
+}
+
+int
+re_nl_add_route(uint32_t table_id, const struct in6_addr *dst,
+ unsigned int plen)
+{
+ uint32_t flags = NLM_F_CREATE | NLM_F_EXCL;
+ uint32_t type = RTM_NEWROUTE;
+
+ if (!TABLE_ID_VALID(table_id)) {
+ VLOG_WARN_RL(&rl,
+ "attempt to add route using invalid table id %"PRIu32,
+ table_id);
+ return EINVAL;
+ }
+
+ return modify_route(type, flags, table_id, dst, plen);
+}
+
+int
+re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
+ unsigned int plen)
+{
+ if (!TABLE_ID_VALID(table_id)) {
+ VLOG_WARN_RL(&rl,
+ "attempt to delete route using invalid table id %"PRIu32,
+ table_id);
+ return EINVAL;
+ }
+
+ return modify_route(RTM_DELROUTE, 0, table_id, dst, plen);
+}
+
+struct route_msg_handle_data {
+ const struct hmap *routes;
+};
+
+static void
+handle_route_msg_delete_routes(const struct route_table_msg *msg, void *data)
+{
+ const struct route_data *rd = &msg->rd;
+ struct route_msg_handle_data *handle_data = data;
+ const struct hmap *routes = handle_data->routes;
+ struct advertise_route_entry *ar;
+ int err;
+
+ /* This route is not from us, we should not touch it. */
+ if (rd->rtm_protocol != RTPROT_OVN) {
+ return;
+ }
+
+ uint32_t arhash = advertise_route_hash(&rd->rta_dst, rd->plen);
+ HMAP_FOR_EACH_WITH_HASH (ar, node, arhash, routes) {
+ if (ipv6_addr_equals(&ar->addr, &rd->rta_dst)
+ && ar->plen == rd->plen) {
+ ar->installed = true;
+ return;
+ }
+ }
+ err = re_nl_delete_route(rd->rta_table_id, &rd->rta_dst,
+ rd->plen);
+ if (err) {
+ char addr_s[INET6_ADDRSTRLEN + 1];
+ VLOG_WARN_RL(&rl, "Delete route table_id=%"PRIu32" dst=%s plen=%d: %s",
+ rd->rta_table_id,
+ ipv6_string_mapped(
+ addr_s, &rd->rta_dst) ? addr_s : "(invalid)",
+ rd->plen,
+ ovs_strerror(err));
+ }
+}
+
+void
+re_nl_sync_routes(uint32_t table_id,
+ const struct hmap *routes)
+{
+ struct advertise_route_entry *ar;
+ HMAP_FOR_EACH (ar, node, routes) {
+ ar->installed = false;
+ }
+
+ /* Remove routes from the system that are not in the host_routes hmap and
+ * remove entries from host_routes hmap that match routes already installed
+ * in the system. */
+ struct route_msg_handle_data data = {
+ .routes = routes,
+ };
+ route_table_dump_one_table(NULL, table_id, handle_route_msg_delete_routes,
+ &data);
+
+ /* Add any remaining routes in the host_routes hmap to the system routing
+ * table. */
+ HMAP_FOR_EACH (ar, node, routes) {
+ if (ar->installed) {
+ continue;
+ }
+ int err = re_nl_add_route(table_id, &ar->addr, ar->plen);
+ if (err) {
+ char addr_s[INET6_ADDRSTRLEN + 1];
+ VLOG_WARN_RL(&rl, "Add route table_id=%"PRIu32" dst=%s "
+ "plen=%d: %s",
+ table_id,
+ ipv6_string_mapped(
+ addr_s, &ar->addr) ? addr_s : "(invalid)",
+ ar->plen,
+ ovs_strerror(err));
+ }
+ }
+}
diff --git a/controller/route-exchange-netlink.h b/controller/route-exchange-netlink.h
new file mode 100644
index 000000000..f87ebd75d
--- /dev/null
+++ b/controller/route-exchange-netlink.h
@@ -0,0 +1,40 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ROUTE_EXCHANGE_NETLINK_H
+#define ROUTE_EXCHANGE_NETLINK_H 1
+
+#include
+
+/* This value is arbitrary but currently unused.
+ * See https://github.com/iproute2/iproute2/blob/main/etc/iproute2/rt_protos */
+#define RTPROT_OVN 84
+
+struct in6_addr;
+struct hmap;
+
+int re_nl_create_vrf(const char *ifname, uint32_t table_id);
+int re_nl_delete_vrf(const char *ifname);
+
+int re_nl_add_route(uint32_t table_id, const struct in6_addr *dst,
+ unsigned int plen);
+int re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
+ unsigned int plen);
+
+void re_nl_dump(uint32_t table_id);
+
+void re_nl_sync_routes(uint32_t table_id,
+ const struct hmap *host_routes);
+
+#endif /* route-exchange-netlink.h */
diff --git a/m4/ovn.m4 b/m4/ovn.m4
index ebe4c9612..e8f30e0ac 100644
--- a/m4/ovn.m4
+++ b/m4/ovn.m4
@@ -576,3 +576,28 @@ AC_DEFUN([OVN_CHECK_UNBOUND],
fi
AM_CONDITIONAL([HAVE_UNBOUND], [test "$HAVE_UNBOUND" = yes])
AC_SUBST([HAVE_UNBOUND])])
+
+dnl Checks for Netlink support.
+AC_DEFUN([OVS_CHECK_NETLINK],
+ [AC_CHECK_HEADER([linux/netlink.h],
+ [HAVE_NETLINK=yes],
+ [HAVE_NETLINK=no],
+ [#include
+ ])
+ AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
+ if test "$HAVE_NETLINK" = yes; then
+ AC_DEFINE([HAVE_NETLINK], [1],
+ [Define to 1 if Netlink protocol is available.])
+ fi])
+
+dnl OVS_CHECK_LINUX_NETLINK
+dnl
+dnl Configure Linux netlink compat.
+AC_DEFUN([OVS_CHECK_LINUX_NETLINK], [
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([#include ], [
+ struct nla_bitfield32 x = { 0 };
+ ])],
+ [AC_DEFINE([HAVE_NLA_BITFIELD32], [1],
+ [Define to 1 if struct nla_bitfield32 is available.])])
+])
diff --git a/tests/automake.mk b/tests/automake.mk
index 9244532fa..11696f159 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -308,6 +308,11 @@ tests_ovstest_LDADD = $(OVS_LIBDIR)/daemon.lo \
controller/route.$(OBJEXT) \
northd/ipam.$(OBJEXT)
+if HAVE_NETLINK
+tests_ovstest_LDADD += \
+ controller/route-exchange-netlink.$(OBJEXT)
+endif
+
# Python tests.
CHECK_PYFILES = \
tests/test-l7.py \
diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index c59556173..0ed5bc567 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -530,3 +530,15 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
/failed to query port patch-.*/d
/.*terminating with signal 15.*/d"])
]))
+
+# CHECK_VRF()
+#
+# Perform a requirements check for running VRF tests.
+#
+m4_define([CHECK_VRF],
+[
+ rc=0
+ modprobe vrf || rc=$?
+ AT_SKIP_IF([test $rc -ne 0])
+ on_exit 'modprobe -r vrf'
+])
From patchwork Tue Nov 26 14:38:26 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015496
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=azmEb4kF;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=azmEb4kF;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
(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 4XyQHy6yCXz1yCv
for ; Wed, 27 Nov 2024 01:41:34 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 25BFD435F3;
Tue, 26 Nov 2024 14:41:33 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id 6DSISY2k6y8C; Tue, 26 Nov 2024 14:41:30 +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 smtp2.osuosl.org 0FF7043538
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=azmEb4kF;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=azmEb4kF
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp2.osuosl.org (Postfix) with ESMTPS id 0FF7043538;
Tue, 26 Nov 2024 14:40:39 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 07EB9C08BD;
Tue, 26 Nov 2024 14:40:38 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 0A420C08C1
for ; Tue, 26 Nov 2024 14:40:34 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id ADBB44EC34
for ; Tue, 26 Nov 2024 14:38:39 +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 iw2021vmqssc for ;
Tue, 26 Nov 2024 14:38:36 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2612::610;
helo=eur05-am6-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org BEB574CB02
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org BEB574CB02
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=azmEb4kF;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=azmEb4kF
Received: from EUR05-AM6-obe.outbound.protection.outlook.com
(mail-am6eur05on20610.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2612::610])
by smtp4.osuosl.org (Postfix) with ESMTPS id BEB574CB02
for ; Tue, 26 Nov 2024 14:38:35 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=a+houo45dVcw5QEQHoHuiBnBQzYh2mC9AjewoHrEGuha4ui2B1ZleMxKS6wRefWmv65DhOw0kMMmIIosZHIl/r4+VytoCN2sChm4o+MhSjqlucgFQbFQKizQapCwIwFKRcALJ80HFE4RKktsswtU0CQTvJ536dLGppcmHR/Ex956pwwK46QTn6XjJhB2/+CqrpRDYjmnqyv83eAmyye9OUwBsgVDZVHqq2h6y8wmwM81If/8DamdP3SqRlmVJD8fV62XWz+XIlrcDmeh+fJtvFmf9KaD8jOhnpsVYDdSJvHUjJdlEYek0iCf5ip/Ej0Zs1THYq9ta/MjFGbrz3YVMg==
ARC-Message-Signature: i=2; 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=Q2vvuwB1lhOBHZCuwznRnaf1Y79InJybQZbqd0bp5QU=;
b=sUpa36Mk0AR5Ga6taAjqJY0O9yzg7JlWanoVfXBtf7G/tsf0hdV8jTSK66EncJ/Y6ZcZtNgUtSmkx8AArDhAdywLx2xbZGB5EBu8eFi6StM1skGWJQh9HNKfAjy2MAvl0WO2PxsQJ70MI1p6eFjyykDP/ZSPP5BbhMYbd+g0Jb+UJnwevgXSbnkuddrCMC25Qvihw4fiKqdQtRa+ifDhPeQVVy51b0k7AE4UxT5upAiUJLcbrKODrY+H8OnnCHR8atA6d5i/OaNi9JrhqU9VZsE6klDo77tMfBHczbEgqeizmi+IbUGSOQVqvx5TPOHSKcRwk+dbu3m+a4tPlG7aYQ==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Q2vvuwB1lhOBHZCuwznRnaf1Y79InJybQZbqd0bp5QU=;
b=azmEb4kFR/T3YcImliHpfhztHLQpR8v0AbhbhjWiOO2HUYzgNqu7X4nmx7pjcxLosknMpFr+d0oqBV/Joet0qQp7OVtixK0Xdqo4K1ay+Hno7xCx2C/eZYQQbe3cOijSdEA06K9gpNwNEDEiwK9RfjxxzJAJKnc6LWZ5fOXkwRKxBBkYWvZAWAs4yk5dcZC8Z/mX1BV70AoGADAPpauoR5eDAiXRuP/mXVKp6QIG/MKZUTQHMzmi9Pl+UUMTyYBlWNkWXZQ5sXKB1OzAh5dW12CWyon/uIyhdEOkEYpJ4DPDPfD/o0AY2xQx0oLwis8oGhyUfGs/TqsKJHvjQmKPkw==
Received: from DUZPR01CA0024.eurprd01.prod.exchangelabs.com
(2603:10a6:10:46b::11) by GV1PR10MB8673.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:150:1d5::16) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:32 +0000
Received: from DU2PEPF00028D02.eurprd03.prod.outlook.com
(2603:10a6:10:46b:cafe::dc) by DUZPR01CA0024.outlook.office365.com
(2603:10a6:10:46b::11) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:32 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
DU2PEPF00028D02.mail.protection.outlook.com (10.167.242.186) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:30 +0000
Received: from EUR03-AM7-obe.outbound.protection.outlook.com (104.47.51.237)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:31
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 8958720
X-ExclaimerImprintLatency: 6554179
X-ExclaimerImprintAction: cce49dc096f04bc3ba9ffd8e386f60d1
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=OSg7FAPlNkbBpo1UwO0Edw5+7U/Y2wlY7c00KIbeQl6z9DdfziMPharKMXA5UIrzRXovK0gBQJ6eb9rDIOHJS4IZBklNVlHXzJvrDXsui8E8ke3tl1bvffXYkIjwjGxf7VqYCWJxdBLO639Om1MFZDdZJbWGZ+OZt+m4iIiYwPiqc/4PIk057SgOv+Ph689BGmCgzMdVmcMRcFx8wyy1anF4+28N1a1qhyqclmYvOrWn0Zx6ykgoQKicldAlj2u69mgD0gi0oyUSHCjl2Z0hdgfnMJyKtZrdF+Qm8DScKVy9RqHfGyr4hO4YvoFcqEF5tdEoWCx9iWnRFHnF8ZL25A==
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=Q2vvuwB1lhOBHZCuwznRnaf1Y79InJybQZbqd0bp5QU=;
b=CC1ofSN2G25ymBg10qP7SCJyWtJwO/JJI9nbat2M1KJIO1GSsr3dzyITQGcBBOOthvjWPo3cFQ5sja2/6ZCu6dOYEQf+tlwoiQBNkvAfhYcN0/yJQ6OkgQRTSEB+gpwMTmFzl7y+BhpoWacfdP2eBLtNnFaUyYZ02Q8y72HS2HI6nohextfdLetdF9CDnlG5DG35y25bYZ/+bIWoNM8eni9g0B4I6PiY7hS6W9OlWDst4jB+4p2kqMkR6zi10X3FNjkVnlGb4EoWssFLuI2g2y3haxplVbGNtwYuoXEKwIq696cjNfAP9HqM2UktkNJxlg8gsxF9H9kGHoQ9lPKU4g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Q2vvuwB1lhOBHZCuwznRnaf1Y79InJybQZbqd0bp5QU=;
b=azmEb4kFR/T3YcImliHpfhztHLQpR8v0AbhbhjWiOO2HUYzgNqu7X4nmx7pjcxLosknMpFr+d0oqBV/Joet0qQp7OVtixK0Xdqo4K1ay+Hno7xCx2C/eZYQQbe3cOijSdEA06K9gpNwNEDEiwK9RfjxxzJAJKnc6LWZ5fOXkwRKxBBkYWvZAWAs4yk5dcZC8Z/mX1BV70AoGADAPpauoR5eDAiXRuP/mXVKp6QIG/MKZUTQHMzmi9Pl+UUMTyYBlWNkWXZQ5sXKB1OzAh5dW12CWyon/uIyhdEOkEYpJ4DPDPfD/o0AY2xQx0oLwis8oGhyUfGs/TqsKJHvjQmKPkw==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:28 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:28 +0000
Date: Tue, 26 Nov 2024 15:38:26 +0100
To: dev@openvswitch.org
Message-ID:
<9342d2143895754effff0a598cc03fe4f3df371c.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0109.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::9) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|DU2PEPF00028D02:EE_|GV1PR10MB8673:EE_
X-MS-Office365-Filtering-Correlation-Id: 0deecb0f-6aec-4af9-efad-08dd0e27ffef
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
70j6nbF9S1sSFJuDOsCX6qYtuueCRQQOyku4mw8uQtGtMqm9gYPkcC9Lk+VCUA6ISPSDsEXCEKkqFP/1ufvwRM0myIqB6lkJz1RuWjT73X8GRJnZQroeXqHZN/Wr7BGvdCoN+xD4720H7p0oCSACxw88QE4kfC6tnQQmu8cWAQkt8bGMrMsCIZ2JXxxozbjjc3NH0Frxy6CBJLXhlK1rvfJUqzULusVCWbaCI1pKCNcoO/oEVgOnInUKNw9ZNWEad9I3ukFQDlh0W8Ap+ob/WEFdKa3OdNCGkJYltjxa7QnDI2awGIQpwJbnaGXSAQV85SNv3dYtegwdWRNkpwGChySoNsqr7kjWJoBzXx+0k29G8o7UjGP7FYXb/zv1U74Q3aVwipIbcI5mFTPyxKk0eN/V2ThEq9guhwWq/mHLgL9uW781eht+MI+tl1ig1ATdPmxz+e52fsI2z6Js5F2afey5ow/d0ULVsw5HeoczolSSHlDdup52P3xrC6PxG1sMn+IoG3uCk3jc0kbdm1dYE+zTNsQTmfydhaB6eFp9YF52LSTtyRJ2jbHi5/wkqKg4S4hNFqI4F3LGfpanZ2csEeGAqFsv7e+lSGTdo4/5wuaEiVaFYe8cAwMLjwsjPMuNruR6hvqJl97hE95zvSs2iwKB9FJw2WbiqBD9V1OsemHnwi2QbYizyusZOlqbZAhBUB9U2fOfpYeLYHkW1t4ptPaHfDTgEM3Y6IUZ+UK8QAr0zUc9B1CGh/DtMb/30d4D9BYoPnIH4jb5w+e9aiR/32v3+YFXN2Fkp8tvUPIbs59N7+od1Fko+OF0a3hFpVDDbcHzPxoYdBp9VEnzKkz3JNAqRBnjHPXhjn4GAzioMlZjgJK5v5++pcS0Ib0ljpdt0kRLKzLzIz1X5tCgOmhTv2MkMDuCnE6qeh5uniidn4vZXs9k9F8faYyPlVYVeFrj8fa58IYfvzQMRtvyEIQGoSiYmfZOsXUeNy02FMHP5faTz8LBlE5Prv1uPN+59YJTBRjqR5bESPenLf8qISPgHvmowxAfs0u0c75KgiO0zeA9k41KpAFVgLOyMw9fNPBOY+KHR//5Wy8iklEakmEIu6j00oy0wj0RJW4jwniGF1oPNdHjET0x11IAikq7Sgn+ze2W/F0jP0c5sqNS2DU5jmdcIP8gelmMDyGFoRNVcm5CKw/iyZeuM3O5QUJCevE9R1t6GcXfGemKVmeCQK5zPb7Jb3lREezQu5wCVreWFkAp/tyoI8p1X9yagjVcroWl/UQsEFD3AdyDrLTGjHAHzjthq0llOYwOIdkpQgSnsOIBPAzRvHRw5Ou2lRMdu0JCXOivfUKmUsGSiiSkPhymsQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU2PEPF00028D02.eurprd03.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
2afb3cfa-6fbe-4784-5773-08dd0e27fdae
X-Microsoft-Antispam: BCL:0;
ARA:13230040|82310400026|376014|35042699022|14060799003|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
RpK7DfnCB/T5x74msT11VwxEP5aSxvtQaP1yy/8nyoEsmJAyNDMoGlrxM6CNZofZzDOU3Ty5tk0B4hiM5SOZUem8cZOPyc+KFvJ12f4gepVEfJk/FgKDnAZKdRapp8n7ggf1bdxP2dsly2VFLZTB1lH7vO/kJTLqT9XxbZJThj/5icvFUQ4IZj3UbFnwXlStrpQYP1UIOSx0/e4g4dRvn1y4nKSxNl4YIgLBDX20mQkvBoqnopzHeTA/9/RCm5kOAun6fwkc+Ra2a39VevUbvmmWB52+mfE06/5w4/d6MwZ0lFC+6hPyuoU/3hfcpnp6PFga2PaxeGnCDC5BRF94Kg3hxtJPfLU6JSEcEtP2jbHf2OfcuIaKhW/V1yDtf1s/rEyc94xxxQKQvuKdszYcnlojWZVZ1Iu/aaeWl2GABy+XZctiJf2gdU36toZJ8cCxPSSXUqEEU2yQEB+J8KYMasxVnxxAnYF6+O5k04WyvqlHgHJ8POj+OUVYvHXp3npSgAyHfIoY7+om/y8pu/cBd0JC7mVD7LMYoziPvfrFh1FH0D7J08z3zJ1F+qicC90FP2vbRQWs2QzL3+Fj8JQsyfZsalUh9XbJpGyHmLy3L6+ATSi91ZVaZBjBM0f5BTxiUllJdVwbHEh85U3elUqoIugckZ7kpu2KgFFEdYZYGMjcQoBB176wggVjlY2mXYHPhL2ugvlNkgKN++ago9Pa6/nhXPflfhZ+YeoWcMw9cSAf2m7kLqHxpHBYxTt1s0iG8ANkFi2E8V0xP8XwZTMmlyC4O7jK1cb8RXgX67jVoHZUj0QnyCsZSY3q6mLBa3OJBxVm/EP5fR3dVkfg3jL21PDpxBPC1jg3mpmeD87+qD1L2cA880D1TpB1dwFgJbIDBQ6BoIKVhgb/ZAD88meQhMlceKRCCKUnpyYDr6ugmfz/5q9Rli6MtUNgNQ7IUa8cc8jEPiU2sjw/l/Jxm8Ry/bE1jGCARr5BKYpgCvtg+9VipFhkWQzqUluKOblVHAvqM+5sqreKSvBxtKIKWKkXbdeav4GnXJPIyhC8UuCQ2lTlqoTUaT/sscZXQ/xUFCF+ThcvijmTAI2YQMexbFk0RykzmBOoS4A+g8ggvNjZVNXokxf8yrUAqMOZZRlloI9+3US0qy0ax7XsD6yHANav18iENqZD8RRnOM2YSg50wIN+vhpNxgsIJnWhqTmB0T7GnQsgcg6cl74lbK5/YhYrT0CDvSsiWHJNU/872Gz8pApGb1nW9AH7X3f4HYDpuZKsmZuOdh5sCvThk+nG8OjNiyf2eLbrsOKssmL6WDHKEZAV/kQ/hoNIQPh1dczcgslkMUZk/hdHrQsPpe9gBSZft7JQXuuWMkYjdVV1CEAr0PTfEYk1MOh0/yi8qCD2Qn2Goermz+2hWHOuwP6KMs6WAzPMpMwIzGdfhfGxq1CMdpu/faZ7ZRwfasiBEBvEG4xc
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(82310400026)(376014)(35042699022)(14060799003)(1800799024)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:30.9562 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
0deecb0f-6aec-4af9-efad-08dd0e27ffef
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF00028D02.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB8673
Subject: [ovs-dev] [PATCH ovn v3 22/33] controller: Announce routes via
route-exchange.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
This engine node takes the routes from the "route" engine node and ensures
they are written to the linux side.
It is separate from the "route" engine node as it will also be used to
learn routes in the future.
Signed-off-by: Felix Huettner
---
controller/automake.mk | 7 +-
controller/ovn-controller.c | 48 +++++++-
controller/route-exchange-stub.c | 42 +++++++
controller/route-exchange.c | 102 ++++++++++++++++
controller/route-exchange.h | 33 +++++
tests/ovs-macros.at | 11 ++
tests/system-common-macros.at | 15 +++
tests/system-ovn.at | 201 +++++++++++++++++++++++++++++++
8 files changed, 455 insertions(+), 4 deletions(-)
create mode 100644 controller/route-exchange-stub.c
create mode 100644 controller/route-exchange.c
create mode 100644 controller/route-exchange.h
diff --git a/controller/automake.mk b/controller/automake.mk
index 54855a3f9..b1bb23e78 100644
--- a/controller/automake.mk
+++ b/controller/automake.mk
@@ -50,13 +50,18 @@ controller_ovn_controller_SOURCES = \
controller/statctrl.c \
controller/ct-zone.h \
controller/ct-zone.c \
+ controller/route-exchange.h \
controller/route.h \
controller/route.c
if HAVE_NETLINK
controller_ovn_controller_SOURCES += \
controller/route-exchange-netlink.h \
- controller/route-exchange-netlink.c
+ controller/route-exchange-netlink.c \
+ controller/route-exchange.c
+else
+controller_ovn_controller_SOURCES += \
+ controller/route-exchange-stub.c
endif
controller_ovn_controller_LDADD = lib/libovn.la $(OVS_LIBDIR)/libopenvswitch.la
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 36da1c9c3..6039c35d9 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -88,6 +88,7 @@
#include "lib/dns-resolve.h"
#include "ct-zone.h"
#include "route.h"
+#include "route-exchange.h"
VLOG_DEFINE_THIS_MODULE(main);
@@ -4764,6 +4765,14 @@ controller_output_bfd_chassis_handler(struct engine_node *node,
return true;
}
+static bool
+controller_output_route_exchange_handler(struct engine_node *node,
+ void *data OVS_UNUSED)
+{
+ engine_set_node_state(node, EN_UPDATED);
+ return true;
+}
+
/* Handles sbrec_chassis changes.
* If a new chassis is added or removed return false, so that
* flows are recomputed. For any updates, there is no need for
@@ -4953,6 +4962,36 @@ route_sb_route_data_handler(struct engine_node *node, void *data)
return true;
}
+static void
+en_route_exchange_run(struct engine_node *node, void *data OVS_UNUSED)
+{
+ struct ed_type_route *route_data =
+ engine_get_input_data("route", node);
+
+ struct route_exchange_ctx_in r_ctx_in = {
+ .announce_routes = &route_data->announce_routes,
+ };
+
+ struct route_exchange_ctx_out r_ctx_out = {
+ };
+
+ route_exchange_run(&r_ctx_in, &r_ctx_out);
+
+ engine_set_node_state(node, EN_UPDATED);
+}
+
+
+static void *
+en_route_exchange_init(struct engine_node *node OVS_UNUSED,
+ struct engine_arg *arg OVS_UNUSED)
+{
+ return NULL;
+}
+
+static void
+en_route_exchange_cleanup(void *data OVS_UNUSED)
+{}
+
/* Returns false if the northd internal version stored in SB_Global
* and ovn-controller internal version don't match.
*/
@@ -5247,6 +5286,7 @@ main(int argc, char *argv[])
ENGINE_NODE(mac_cache, "mac_cache");
ENGINE_NODE(bfd_chassis, "bfd_chassis");
ENGINE_NODE(route, "route");
+ ENGINE_NODE(route_exchange, "route_exchange");
#define SB_NODE(NAME, NAME_STR) ENGINE_NODE_SB(NAME, NAME_STR);
SB_NODES
@@ -5277,6 +5317,7 @@ main(int argc, char *argv[])
route_runtime_data_handler);
engine_add_input(&en_route, &en_sb_route,
route_sb_route_data_handler);
+ engine_add_input(&en_route_exchange, &en_route, NULL);
engine_add_input(&en_addr_sets, &en_sb_address_set,
addr_sets_sb_address_set_handler);
@@ -5458,9 +5499,8 @@ main(int argc, char *argv[])
controller_output_mac_cache_handler);
engine_add_input(&en_controller_output, &en_bfd_chassis,
controller_output_bfd_chassis_handler);
- /* This is just temporary until the route output is actually used. */
- engine_add_input(&en_controller_output, &en_route,
- controller_output_bfd_chassis_handler);
+ engine_add_input(&en_controller_output, &en_route_exchange,
+ controller_output_route_exchange_handler);
struct engine_arg engine_arg = {
.sb_idl = ovnsb_idl_loop.idl,
@@ -6178,6 +6218,7 @@ loop_done:
poll_block();
}
+ route_exchange_cleanup();
}
free(ovn_version);
@@ -6207,6 +6248,7 @@ loop_done:
service_stop();
ovsrcu_exit();
dns_resolve_destroy();
+ route_exchange_destroy();
exit(retval);
}
diff --git a/controller/route-exchange-stub.c b/controller/route-exchange-stub.c
new file mode 100644
index 000000000..2ca644b06
--- /dev/null
+++ b/controller/route-exchange-stub.c
@@ -0,0 +1,42 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include
+
+#include "openvswitch/compiler.h"
+#include "route-exchange.h"
+
+bool
+route_exchange_relevant_port(const struct sbrec_port_binding *pb OVS_UNUSED)
+{
+ return false;
+}
+
+void
+route_exchange_run(struct route_exchange_ctx_in *r_ctx_in OVS_UNUSED,
+ struct route_exchange_ctx_out *r_ctx_out OVS_UNUSED)
+{
+}
+
+void
+route_exchange_cleanup(void)
+{
+}
+
+void
+route_exchange_destroy(void)
+{
+}
diff --git a/controller/route-exchange.c b/controller/route-exchange.c
new file mode 100644
index 000000000..90144f75f
--- /dev/null
+++ b/controller/route-exchange.c
@@ -0,0 +1,102 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include
+#include
+
+#include "openvswitch/vlog.h"
+
+#include "lib/ovn-sb-idl.h"
+
+#include "binding.h"
+#include "ha-chassis.h"
+#include "local_data.h"
+#include "route.h"
+#include "route-exchange.h"
+#include "route-exchange-netlink.h"
+
+
+VLOG_DEFINE_THIS_MODULE(route_exchange);
+static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
+
+static struct sset _maintained_vrfs = SSET_INITIALIZER(&_maintained_vrfs);
+
+void
+route_exchange_run(struct route_exchange_ctx_in *r_ctx_in,
+ struct route_exchange_ctx_out *r_ctx_out OVS_UNUSED)
+{
+ struct sset old_maintained_vrfs = SSET_INITIALIZER(&old_maintained_vrfs);
+ sset_swap(&_maintained_vrfs, &old_maintained_vrfs);
+
+ const struct advertise_datapath_entry *ad;
+ HMAP_FOR_EACH (ad, node, r_ctx_in->announce_routes) {
+ struct hmap received_routes
+ = HMAP_INITIALIZER(&received_routes);
+ char vrf_name[IFNAMSIZ + 1];
+ snprintf(vrf_name, sizeof vrf_name, "ovnvrf%"PRIi64,
+ ad->key);
+
+ if (ad->maintain_vrf) {
+ int error = re_nl_create_vrf(vrf_name, ad->key);
+ if (error && error != EEXIST) {
+ VLOG_WARN_RL(&rl,
+ "Unable to create VRF %s for datapath "
+ "%"PRId64": %s.",
+ vrf_name, ad->key,
+ ovs_strerror(error));
+ continue;
+ }
+ sset_add(&_maintained_vrfs, vrf_name);
+ } else {
+ /* a previous maintain-vrf flag was removed. We should therfor
+ * also not delete it even if we created it previously. */
+ sset_find_and_delete(&_maintained_vrfs, vrf_name);
+ sset_find_and_delete(&old_maintained_vrfs, vrf_name);
+ }
+
+ re_nl_sync_routes(ad->key, &ad->routes);
+ }
+
+ /* Remove VRFs previously maintained by us not found in the above loop. */
+ const char *vrf_name;
+ SSET_FOR_EACH_SAFE (vrf_name, &old_maintained_vrfs) {
+ if (!sset_find(&_maintained_vrfs, vrf_name)) {
+ re_nl_delete_vrf(vrf_name);
+ }
+ sset_delete(&old_maintained_vrfs, SSET_NODE_FROM_NAME(vrf_name));
+ }
+ sset_destroy(&old_maintained_vrfs);
+}
+
+void
+route_exchange_cleanup(void)
+{
+ const char *vrf_name;
+ SSET_FOR_EACH_SAFE (vrf_name, &_maintained_vrfs) {
+ re_nl_delete_vrf(vrf_name);
+ }
+}
+
+void
+route_exchange_destroy(void)
+{
+ const char *vrf_name;
+ SSET_FOR_EACH_SAFE (vrf_name, &_maintained_vrfs) {
+ sset_delete(&_maintained_vrfs, SSET_NODE_FROM_NAME(vrf_name));
+ }
+
+ sset_destroy(&_maintained_vrfs);
+}
diff --git a/controller/route-exchange.h b/controller/route-exchange.h
new file mode 100644
index 000000000..2c2a9ab84
--- /dev/null
+++ b/controller/route-exchange.h
@@ -0,0 +1,33 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ROUTE_EXCHANGE_H
+#define ROUTE_EXCHANGE_H 1
+
+#include
+
+struct route_exchange_ctx_in {
+ /* Contains struct advertise_datapath_entry */
+ struct hmap *announce_routes;
+};
+
+struct route_exchange_ctx_out {
+};
+
+void route_exchange_run(struct route_exchange_ctx_in *,
+ struct route_exchange_ctx_out *);
+void route_exchange_cleanup(void);
+void route_exchange_destroy(void);
+
+#endif /* ROUTE_EXCHANGE_H */
diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 0e3b1bcd6..60e1433f0 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -285,6 +285,17 @@ m4_define([OVS_WAIT_UNTIL],
[check_ovs_wait_until_args "$#" "$2"
OVS_WAIT([$1], [$2], [AT_LINE], [until $1])])
+dnl OVS_WAIT_UNTIL_EQUAL(COMMAND, OUTPUT)
+dnl
+dnl Executes shell COMMAND in a loop until it returns zero and the output
+dnl equals OUTPUT. If COMMAND does not return zero or a desired output within
+dnl a reasonable time limit, fails the test.
+m4_define([OVS_WAIT_UNTIL_EQUAL],
+ [AT_FAIL_IF([test "$#" -ge 3])
+ echo "$2" > wait_until_expected
+ OVS_WAIT_UNTIL([$1 | diff -u wait_until_expected - ])])
+
+
dnl OVS_WAIT_FOR_OUTPUT(COMMAND, EXIT-STATUS, STDOUT, STDERR)
dnl OVS_WAIT_FOR_OUTPUT_UNQUOTED(COMMAND, EXIT-STATUS, STDOUT, STDERR)
dnl
diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index 0ed5bc567..3b320859f 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -542,3 +542,18 @@ m4_define([CHECK_VRF],
AT_SKIP_IF([test $rc -ne 0])
on_exit 'modprobe -r vrf'
])
+
+# VRF_RESERVE([id])
+#
+# Helper to ensure we actually support vrfs and the vrf in question has no
+# route entries in it and is not existing.
+# We need to add it before deleting as routes can actually survive in a
+# deleted vrf.
+m4_define([VRF_RESERVE],
+ [
+ CHECK_VRF()
+ ip link add "ovnvrf$1" type vrf table "$1"
+ ip route flush vrf "ovnvrf$1"
+ ip link del "ovnvrf$1"
+ ]
+)
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 72e39db84..83bb51ffb 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -14153,3 +14153,204 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
/.*terminating with signal 15.*/d"])
AT_CLEANUP
])
+
+OVN_FOR_EACH_NORTHD([
+AT_SETUP([dynamic-routing - DGP])
+
+VRF_RESERVE([1337])
+
+# This test uses dynamic routing on a simulated multi-tenant internet
+# connection.
+# Tenant 1 (pr1, p1, vif1) is connected to the internet via NAT on pr1.
+# Tenant 2 (pr2, p2, vif2) is connected to the internet via routing.
+# The connections of pr1 and pr2 to public are using DGPs.
+# The connection from internet to phys is also using a DGP.
+# The LR internet is running dynamic-routing.
+# The LS phys is assumed to be used for peering with a router outside OVN
+#
+#
+# +----+ +----+
+# |vif1| |vif2|
+# +--+-+ +--+-+
+# | |
+# +--+--+ +--+--+
+# |LS p1| |LS p2|
+# +--+--+ +--+--+
+# | |
+# +--+---+ +--+---+
+# |LR pr1| |LR pr2|
+# +-----++ ++-----+
+# | |
+# ++-------++
+# |LS public|
+# +-----+---+
+# |
+# +-----+-----+
+# |LR internet|
+# +-----+-----+
+# |
+# +---+---+
+# |LS phys|
+# +-------+
+
+ovn_start
+OVS_TRAFFIC_VSWITCHD_START()
+
+ADD_BR([br-int])
+ADD_BR([br-ext])
+
+check ovs-ofctl add-flow br-ext action=normal
+# Set external-ids in br-int needed for ovn-controller
+check ovs-vsctl \
+ -- set Open_vSwitch . external-ids:system-id=hv1 \
+ -- set Open_vSwitch . external-ids:ovn-remote=unix:$ovs_base/ovn-sb/ovn-sb.sock \
+ -- set Open_vSwitch . external-ids:ovn-encap-type=geneve \
+ -- set Open_vSwitch . external-ids:ovn-encap-ip=169.0.0.1 \
+ -- set bridge br-int fail-mode=secure other-config:disable-in-band=true
+
+# Start ovn-controller
+start_daemon ovn-controller
+
+# LS setup
+
+check ovn-nbctl ls-add public
+check ovn-nbctl ls-add phys
+check ovn-nbctl ls-add p1
+check ovn-nbctl ls-add p2
+
+# LR internet setup
+
+check ovn-nbctl lr-add internet \
+ -- set Logical_Router internet options:dynamic-routing=true \
+ options:requested-tnl-key=1337
+
+check ovn-nbctl lrp-add internet internet-public \
+ 00:00:02:01:02:03 192.0.2.1/24 \
+ -- set Logical_Router_Port internet-public \
+ options:dynamic-routing-connected=true \
+ options:dynamic-routing-static=true
+check ovn-nbctl lsp-add public public-internet \
+ -- set Logical_Switch_Port public-internet type=router \
+ options:router-port=internet-public \
+ -- lsp-set-addresses public-internet router
+
+check ovn-nbctl lrp-add internet internet-phys \
+ 00:00:ff:00:00:01 192.168.10.1/24 \
+ -- set Logical_Router_Port internet-phys \
+ options:maintain-vrf=true
+check ovn-nbctl lrp-set-gateway-chassis internet-phys hv1
+check ovn-nbctl lsp-add phys phys-internet \
+ -- set Logical_Switch_Port phys-internet type=router \
+ options:router-port=internet-phys \
+ -- lsp-set-addresses phys-internet router
+
+# LR pr1 setup
+
+check ovn-nbctl lr-add pr1 \
+ -- set Logical_Router pr1 options:requested-tnl-key=1338
+
+check ovn-nbctl lrp-add pr1 pr1-public \
+ 00:00:02:01:02:04 192.0.2.2/24
+check ovn-nbctl lrp-set-gateway-chassis pr1-public hv1
+check ovn-nbctl lsp-add public public-pr1 \
+ -- set Logical_Switch_Port public-pr1 type=router \
+ options:router-port=pr1-public \
+ -- lsp-set-addresses public-pr1 router
+
+check ovn-nbctl lrp-add pr1 pr1-p1 \
+ 00:00:03:00:00:01 10.0.0.1/24
+check ovn-nbctl lsp-add p1 p1-pr1 \
+ -- set Logical_Switch_Port p1-pr1 type=router \
+ options:router-port=pr1-p1 \
+ -- lsp-set-addresses p1-pr1 router
+
+check ovn-nbctl lr-route-add pr1 0.0.0.0/0 192.0.2.1
+
+# LR pr2 setup
+
+check ovn-nbctl lr-add pr2 \
+ -- set Logical_Router pr2 options:requested-tnl-key=1339
+
+check ovn-nbctl lrp-add pr2 pr2-public \
+ 00:00:02:01:02:05 192.0.2.3/24
+check ovn-nbctl lrp-set-gateway-chassis pr2-public hv1
+check ovn-nbctl lsp-add public public-pr2 \
+ -- set Logical_Switch_Port public-pr2 type=router \
+ options:router-port=pr2-public \
+ -- lsp-set-addresses public-pr2 router
+
+check ovn-nbctl lrp-add pr2 pr2-p2 \
+ 00:00:04:00:00:01 198.51.100.1/24
+check ovn-nbctl lsp-add p2 p2-pr2 \
+ -- set Logical_Switch_Port p2-pr2 type=router \
+ options:router-port=pr2-p2 \
+ -- lsp-set-addresses p2-pr2 router
+
+check ovn-nbctl lr-route-add pr2 0.0.0.0/0 192.0.2.1
+
+# Setup lsp "vif1" with NAT
+check ovn-nbctl lsp-add p1 vif1 \
+ -- lsp-set-addresses vif1 "00:00:ff:ff:ff:01 10.0.0.2"
+check ovn-nbctl lr-nat-add pr1 dnat_and_snat 192.0.2.10 10.0.0.2
+
+# Setup lsp "vif2" with a static route on LR internet
+check ovn-nbctl lsp-add p2 vif2 \
+ -- lsp-set-addresses vif2 "00:00:ff:ff:ff:02 198.51.100.10"
+check ovn-nbctl lr-route-add internet 198.51.100.0/24 192.0.2.3
+
+# Configure external connectivity
+check ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=phynet:br-ext
+check ovn-nbctl lsp-add phys phys1 \
+ -- lsp-set-addresses phys1 unknown \
+ -- lsp-set-type phys1 localnet \
+ -- lsp-set-options phys1 network_name=phynet
+
+check ovn-nbctl --wait=hv sync
+
+# now the ovn-controller should have setup a vrf named "ovnvrf1337"
+# it should contain routes for:
+# * 192.0.2.0/24
+# * 198.51.100.0/24
+
+AT_CHECK([ip vrf show ovnvrf1337], [0], [dnl
+ovnvrf1337 1337
+])
+
+# ip route list output has a trailing space on each line
+# the awk magic removes all trailing spaces.
+OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
+blackhole 192.0.2.0/24 proto 84
+blackhole 198.51.100.0/24 proto 84])
+
+# we now switch to announcing host routes and expect 192.0.2.0/24 to be gone
+# and the following to be added:
+# * 192.0.2.1/32
+# * 192.0.2.2/32
+# * 192.0.2.3/32
+# * 192.0.2.10/32
+check ovn-nbctl --wait=hv set Logical_Router_Port internet-public \
+ options:dynamic-routing-connected-as-host-routes=true
+
+OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
+blackhole 192.0.2.1 proto 84
+blackhole 192.0.2.2 proto 84
+blackhole 192.0.2.3 proto 84
+blackhole 192.0.2.10 proto 84
+blackhole 198.51.100.0/24 proto 84])
+
+OVS_APP_EXIT_AND_WAIT([ovn-controller])
+
+as ovn-sb
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+
+as ovn-nb
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+
+as northd
+OVS_APP_EXIT_AND_WAIT([ovn-northd])
+
+as
+OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
+/.*terminating with signal 15.*/d"])
+AT_CLEANUP
+])
From patchwork Tue Nov 26 14:38:28 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015488
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=xFl0vYYq;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=xFl0vYYq;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
(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 4XyQHC2rNsz1yCv
for ; Wed, 27 Nov 2024 01:40:55 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 9413943600;
Tue, 26 Nov 2024 14:40:53 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id H3nYB31-tZJr; Tue, 26 Nov 2024 14:40:51 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 453834359C
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=xFl0vYYq;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=xFl0vYYq
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp2.osuosl.org (Postfix) with ESMTPS id 453834359C;
Tue, 26 Nov 2024 14:40:22 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id C847FC08BA;
Tue, 26 Nov 2024 14:40:21 +0000 (UTC)
X-Original-To: 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 11BD3C08C2
for ; Tue, 26 Nov 2024 14:40:06 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 4EAB56F4FC
for ; Tue, 26 Nov 2024 14:38:43 +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 GX4nuWjznr2y for ;
Tue, 26 Nov 2024 14:38:40 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2613::62d;
helo=eur05-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 0D07C6F707
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0D07C6F707
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=xFl0vYYq;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=xFl0vYYq
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur05on2062d.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2613::62d])
by smtp3.osuosl.org (Postfix) with ESMTPS id 0D07C6F707
for ; Tue, 26 Nov 2024 14:38:39 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=npBeWdZqskvV3S6TDhwNao15P5HyXSMhD5dKuffYdvQCoclOpJSgK2QxYSrFg8MuycQeHPdB7rqLdUIncXU5mZ62gjquXj16HraD/KFdGbVHJ60NL9vC5TPq+4hH6jmt8hvtell22D4Rwmu1TYtutHz/Bh817rtkjOnhPzDjFwvwIMvuBwM9F3PZ48LzRBejkpMEaZKr20xvcmm9Z/l8bJnvjiWPpFVcp+zS4QKmrmuUGlTpt0qYvLs3pzOd+rdO5U0p/spSX9OODqxFcqXOTQIEmQ+mXwVWhtfXqK26OzFm/gLdCoL0boi4tO+kzE1lyc3LvtatlhUwyleUyZrjYw==
ARC-Message-Signature: i=2; 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=kNVuoZh35CTwvRxT2P2mCVb3eFp+VgWAf7WmbL/KMTk=;
b=I7aclvSKOkcMgumLTghOF/PlLcHOd1z/TAt9MAHh6aSyGofRYYHFMLj5qYe3+5jGcYwv7+CiN4euUlBlZkFCWAyERle0T30e77/zS8/S/t5VQt8E3Zfe0c6ibcvqO6i6Yr8oQ/P+9rZ4os2SRZwP9z46Q6VxPIPn1CJX4gi2b/tHZwx7tpizOF2H3XSWaBXXJBRkR5AH2z76QtLjhH77DXugPsMNEP5bsWZXKUkYQZLjK60H4ecGZS+VxwC04+vVBzIzQUCyr150WH2JAFHQV/THFTRG+/IOnXpVFM6lXcw/35+NM1lHk52pTHfHwERIjPJ64zIgLJU6Pt1d9mFWsQ==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
52.169.0.179) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=stackit.cloud;
dmarc=pass (p=reject sp=none pct=100) action=none header.from=stackit.cloud;
dkim=pass (signature was verified) header.d=stackit.cloud; arc=pass (0 oda=1
ltdi=1 spf=[1,1,smtp.mailfrom=stackit.cloud]
dkim=[1,1,header.d=stackit.cloud] dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=kNVuoZh35CTwvRxT2P2mCVb3eFp+VgWAf7WmbL/KMTk=;
b=xFl0vYYqNchzQJ8RPSg9b3xzm/qbC2UhtDWn6TeRvfr0u0iNErFw113cxRAxWSTRz1gE7ooLn5e/RsHAt8gMv2gRunSSthBVo7DKPi01fAEiJdbQRiZZP6Q/xooPUOFim2wxJzgZU6hvp6o8MXsTu1bGcBtnomp2ruMrol0psQiu7bD1Z3IMsW9yDIkvNsk6lRW2EQl97D9iLyUEkMYodejPHLAEVaQ3NmknkN4vCGobpzWJLOwtqbjoSQyqJzogp+8aqe9TERiA0Fki6PJPWPmKzXoOpVVC2o76es9m4VSDTEGZaXzeldH5Mfc1D+ndzMBMo3lFaFCQUXWRnNPNVA==
Received: from AS9PR06CA0721.eurprd06.prod.outlook.com (2603:10a6:20b:487::7)
by DB8PR10MB3674.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:131::19)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:34 +0000
Received: from AMS0EPF000001AB.eurprd05.prod.outlook.com
(2603:10a6:20b:487:cafe::6e) by AS9PR06CA0721.outlook.office365.com
(2603:10a6:20b:487::7) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.19 via Frontend Transport; Tue,
26 Nov 2024 14:38:33 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 52.169.0.179)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 52.169.0.179 as permitted sender) receiver=protection.outlook.com;
client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net;
Received: from eu2.smtp.exclaimer.net (52.169.0.179) by
AMS0EPF000001AB.mail.protection.outlook.com (10.167.16.151) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:32 +0000
Received: from EUR03-AM7-obe.outbound.protection.outlook.com (104.47.51.237)
by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager
ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:33
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 7983176
X-ExclaimerImprintLatency: 4661973
X-ExclaimerImprintAction: 7d44aeb018f2424ab79bc70c9d63679d
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=siD2wSsnF+21TUt/XM6HU94Lso7t7yTnupkgSNkF7M1u7CZck2Qm1fhu6Kp9CBsuMi3Luadm6QmiNy0G8yedm7sl7Zhbt+RDr7s1+D38fEwutST/Kv0n8nyc82qx0J3+6jrT4/nxv+hw1yFWL1e1S3T6LqysTm6d7KMnlf39GFbE/aZtoeOT5IdW736oXh+MRd+DzHedRTZcKYg+LDqr2+ocqwbaZS8lNGdqKfLSd6D0TKiZCnU6jtbaQzYuu8Ld7ISyxBUs2xf7Bc+5Y1vY9Qk6qOXCP+txJeJd/0P1pMLH1OevYFopzkcshuZ77l1pujvhkiIYR4azl6o2QMkcIQ==
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=kNVuoZh35CTwvRxT2P2mCVb3eFp+VgWAf7WmbL/KMTk=;
b=rCPZsCFQ1WPoIAM1zX5n4JgIlAYZs4hQaH+Fnwkovj/pNpv3ahj5LDaJeMqCD+j03LNEegx/rKqao+j6IDew5CSAtS8xNp+56rD1ynlN6QS2Jm7EfiZcKy3tT5BMWhmpGKGARrJI094M8T99eh55t8aT1BkgqpE8SR8vjw9DFj4wWg+e1vZpKYC6L7XWkPqLWh6llUUqH+RpMlZIcCJn9mQjweJonVARnMOKk/ZoMKOIRmXLqqGhQvvLq4qKH6O50HG8qf1OEwJIzU9rd+2DjOodAWDu9xAmPHKtIWGTdkeY7Uwtbf1VtYP3RyMiOLexpRtelZ0ZmtOL9q4BtNzK1A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=kNVuoZh35CTwvRxT2P2mCVb3eFp+VgWAf7WmbL/KMTk=;
b=xFl0vYYqNchzQJ8RPSg9b3xzm/qbC2UhtDWn6TeRvfr0u0iNErFw113cxRAxWSTRz1gE7ooLn5e/RsHAt8gMv2gRunSSthBVo7DKPi01fAEiJdbQRiZZP6Q/xooPUOFim2wxJzgZU6hvp6o8MXsTu1bGcBtnomp2ruMrol0psQiu7bD1Z3IMsW9yDIkvNsk6lRW2EQl97D9iLyUEkMYodejPHLAEVaQ3NmknkN4vCGobpzWJLOwtqbjoSQyqJzogp+8aqe9TERiA0Fki6PJPWPmKzXoOpVVC2o76es9m4VSDTEGZaXzeldH5Mfc1D+ndzMBMo3lFaFCQUXWRnNPNVA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by VI0PR10MB9155.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:234::14)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov
2024 14:38:30 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:29 +0000
Date: Tue, 26 Nov 2024 15:38:28 +0100
To: dev@openvswitch.org
Message-ID:
<8ea39e05765722fde5e170826f49f825c130701c.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0106.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::16) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|VI0PR10MB9155:EE_|AMS0EPF000001AB:EE_|DB8PR10MB3674:EE_
X-MS-Office365-Filtering-Correlation-Id: c53cafcc-f299-469d-e7f3-08dd0e280105
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info-Original:
hhLtppkw/eAlhnUEvdFOOa5O5uetQx3kCtj4iueGZxDFqIMMLxzySrdWzHLnB+zkhbTsVTMu1ZwEjQwB7/AFGO742b7s6JbuqRQN8mKlm59Fy3+t6Z0SNTCu7ySiUATNKQ/hLgZrYcm3qItZrpZw1+7eCXlaFotQmbmZLpE1e+AYGmvgelRDvjt130aktn+KYorcaEJ+dBDK5TFv1WKnXS0AkqHsPT9FXDUqfmH2Yy2nRU0ofmSuRY3r9egtq7jd7zdZWPHw94fqZ6lpbBtEtq84CmSWq+PlU6WTvjV8cAbj7NIGxXAgYRWKfVCPVrgCafgXzeAcTb7p0xw43nnOuel6cqkC260lJA7i5WzJxwOcuPis7rntwPlFL+Vm3F5fpuuRum6WCK27bpJXXXHmoAhb8C+ZUsUZj+Qm+WhqfEcJRiq3vz/CvvmolpERT9KL8uTYWYndy79me39TC3e+rFybYaMsDe7JgNDdVfDUaauMD5NJfbS1FYunpshuPd9q7wTTUGnkla67aFH6ZXT5+uGpRE/GJ5c0UpwhmfPHYQT9v8IdMF2ww5DjY2jRT2/vyxtkL2kOjBKVc1xGj8A2p9ATZMbOD57Lhxt8mCy46WY0YXAeb8at4MDBD3DlSeTEt4F3Z9WoXohsyasWumZAVcK1v3LUZcHyh4OZ0VoelIq+ULeRYaH7dTyNUgI5CmbjXvxdrJxIwLTz+3pOSSo37KlS4IXyl2Pk/A0BkTWMJ4l6Vu6MOq1P84oOukpUk64wvSXMlbT7ZSE/GsWq9qsyvz96RVOYiNW9sLoa6khlkhpNNcbyam7ZqFNR5yy75NHXGwMXtY3QXpS3et05zvTqNEi3vqNHslX7Ogl0LLiSI/X8QXxhlfrcM0iqeGZXRbUEJDTpzAlPneUumVWAtAuI5RL9wLiKMxcZE4H553eJq+r0AMgjR7o6+fR4XbmjjKdk5OFBqJM+n92xl8vuh1kaTRZFMUOGSFEo55j1rQte29Yga9CxYMcBzvQXWRqO1mSTS+vaS3qqSStzmzPBp8/74X5jyzcsqgJxkcIM7OWtLc3d10Y9Zl3Trq9sEU70JD3VvhY8Hlcwp61O7L+zH9++KCzJM77/RO0gNG3RQMHQPmNhKqOIxN78zLOfJS+/o65QOcQeBwlRTtuqqiECwmYiF+nAM+neBC9TNVYLhQ1Uc41+/3yctikPQSYryHJm/wQV2fCR05bFFmZ/ka4wp48X6uUsejAQaHeLdigwd/bShN3nVeZu0AMghU0mWKQOGYZMGMWKzNFa2vSYmzdKG56mKNoDJvdK9GIj5Yj07M/N71reezCs/z+5Dz42bZSU82sGYmtFS0CeMSw/sr5fESds5AqytR1Y/bhTKz8Xy7ccIO4=
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR10MB9155
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AMS0EPF000001AB.eurprd05.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
67c4d210-9724-4956-b919-08dd0e27feb4
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
vrG0onWmtW/JWAWaArECyY3ICKtHdbC+NNezJUwjJ962ZRXJMPpbtcKzuBkN/TZuKw/vmRa5x/ETJSyCLkLOAYheMHjc9pxweMxcM32eF4ommsvjsvfNpd/c41c/xVUQwREQKwj8NGdnCt17Wt9jbFKtf5JdEcpeJ9N8gPQCRP2Z/yvOoTY2OQ/XO0ZcLBgnHPLRp+oFxxOO2svO1Vhhf1BTZJAev4ea85CRbZd4/KxqbGfNa7xloR1RcUwrTEN+wILgIBXojsp3CimOJ2Yvhs2kjW3rmCXH6rRzi46CLPkS1WVrgPBRuCEEaEnUbCJfks1xD2SBFQjXxv4fvRZMHQUXyremH+hEPo7m0/k9O+oqaLxVJCN5Tz+mvbAzYP7o4KwMagK6I0VQ7U4WquucMOtAXYoUb5wQAFLr2/+Tcv+1NL2Eome81WHNTTKgFVCNo7e9bVvaNZ/OT0SGbuTBSZxx3fDmqhUQPp04yOhxjLXBxBFgSJoV7XG0J3ZI/ffiuTwX2xTOhEWxtxhMtMgeoFY6VGUSQ2Dpm03xxZ56ie2/LK5qhtjVYzquabvxRCSnCxBRcP+PwUqfpJHolGRuyT+1COhelCJ0OQskG+r6K03vjiKUDBAZ3rDEX+m4GVYj+HznoGK5jt0pUPUPZkrlSHp9QnvtUkMU+YBEZ6XS+cidWG7HlsUmEIPgerU24Fa/peK7OcjoIQCh29Nnecr5YWQ5CSeNjrW50OV0dZ9FVj2DRI7X6HASECSh7/pLTy/m2dNXDe6C4GVQexaMkowTc3Czw8s0SN+7UG7KepKxY58QxGiejno6mdDsaSb1YheXfL9z5d7ImITTdBEowMKLsw8cMD4iVRZDicbZadT15P1dE7Lne1byplu5lfG6jJErs8zxHui9br5gnwCFwK3gATzFmMHxpOG4CJL6GCNo8z1bkq+8gAtiCVUNFot0GNsxw7pbdNFubf+4bphGUf/MISl6+uK4W+HYy7Chb+9sLJuQkIQuo1yPnA/1zGphZmRWksvCm9kFZTlsZs1zBr5rGwb5F/4rio8/FD8ESsgZBC+zA8hvrKCXl8IrS9S5czXw+FOSk9+TjQOQQo9Bdnbs9xLE5iRF2aCUHomJrvxAXON1Gtj1liq5cRMxhcVO+jAfZnv1fXZVkL7aB8nKTgr/ZifNec84uewFtrhskKzbtZv8tflxof3eeikrhDmaWk2l4Yr9a4P7v6UNpzB/DVl6l+ouGGALXL1U/w8WWPd7GdWM96yWXMpcV/NPgjwUNqtSVDrYZgMwklM2728CtQvW/iRmZ0DqyT/Ma1ynoG2s/qmmvYWO0uBRRgn24utMMtQ+XJoZAGsOVYMiYR1qIcFRJCNJreLMoQbO8BLdUfy6CKj9CMWzOlk6WISNf8v5vGye0xqB3+ZAYrrk+hWXe6+hTe1LsYpw1w/uM3V289XwoeUPn/TQ5t6hApFbBHkl0qhe
X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:;
IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:32.9654 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
c53cafcc-f299-469d-e7f3-08dd0e280105
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[52.169.0.179];
Helo=[eu2.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AMS0EPF000001AB.eurprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3674
Subject: [ovs-dev] [PATCH ovn v3 23/33] controller: Support learning routes.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
we now learn all routes inside the vrfs we also advertise routes on.
The routes are then placed in the southbound database for processing by
northd.
Routes are only selected if matching the following rules:
1. must not be a route advertised by us
2. must not be a local connected route (as we want to not learn transfer
networks)
3. the prefix must not be a link local address
However we can not reliably determine over which link we learned the
route in case we have two LRPs of the same LR on the same chassis.
For now we just assume the routes on both links are identical.
Future commits will refine this.
Signed-off-by: Felix Huettner
---
controller/ovn-controller.c | 8 ++
controller/route-exchange-netlink.c | 41 +++++++-
controller/route-exchange-netlink.h | 13 ++-
controller/route-exchange.c | 146 +++++++++++++++++++++++++++-
controller/route-exchange.h | 2 +
lib/ovn-util.c | 10 ++
lib/ovn-util.h | 1 +
tests/system-ovn.at | 13 +++
8 files changed, 229 insertions(+), 5 deletions(-)
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 6039c35d9..f8de23945 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -4965,10 +4965,16 @@ route_sb_route_data_handler(struct engine_node *node, void *data)
static void
en_route_exchange_run(struct engine_node *node, void *data OVS_UNUSED)
{
+ struct ovsdb_idl_index *sbrec_route_by_datapath =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_route", node), "datapath");
+
struct ed_type_route *route_data =
engine_get_input_data("route", node);
struct route_exchange_ctx_in r_ctx_in = {
+ .ovnsb_idl_txn = engine_get_context()->ovnsb_idl_txn,
+ .sbrec_route_by_datapath = sbrec_route_by_datapath,
.announce_routes = &route_data->announce_routes,
};
@@ -5318,6 +5324,8 @@ main(int argc, char *argv[])
engine_add_input(&en_route, &en_sb_route,
route_sb_route_data_handler);
engine_add_input(&en_route_exchange, &en_route, NULL);
+ engine_add_input(&en_route_exchange, &en_sb_route,
+ engine_noop_handler);
engine_add_input(&en_addr_sets, &en_sb_address_set,
addr_sets_sb_address_set_handler);
diff --git a/controller/route-exchange-netlink.c b/controller/route-exchange-netlink.c
index 804cf7901..eb2adb6d6 100644
--- a/controller/route-exchange-netlink.c
+++ b/controller/route-exchange-netlink.c
@@ -26,6 +26,7 @@
#include "openvswitch/ofpbuf.h"
#include "openvswitch/vlog.h"
#include "packets.h"
+#include "ovn-util.h"
#include "route-table.h"
#include "route.h"
@@ -171,8 +172,27 @@ re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
return modify_route(RTM_DELROUTE, 0, table_id, dst, plen);
}
+static uint32_t
+route_hash(const struct in6_addr *dst, unsigned int plen)
+{
+ uint32_t hash = hash_bytes(dst->s6_addr, 16, 0);
+ return hash_int(plen, hash);
+}
+
+void
+re_nl_received_routes_destroy(struct hmap *host_routes)
+{
+ struct re_nl_received_route_node *rr;
+ HMAP_FOR_EACH_SAFE (rr, hmap_node, host_routes) {
+ hmap_remove(host_routes, &rr->hmap_node);
+ free(rr);
+ }
+ hmap_destroy(host_routes);
+}
+
struct route_msg_handle_data {
const struct hmap *routes;
+ struct hmap *learned_routes;
};
static void
@@ -184,8 +204,24 @@ handle_route_msg_delete_routes(const struct route_table_msg *msg, void *data)
struct advertise_route_entry *ar;
int err;
- /* This route is not from us, we should not touch it. */
+ /* This route is not from us, so we learn it. */
if (rd->rtm_protocol != RTPROT_OVN) {
+ if (prefix_is_link_local(&rd->rta_dst, rd->plen)) {
+ return;
+ }
+ for (int i = 0; i < rd->n_nexthops; i++) {
+ if (ipv6_is_zero(&rd->nexthops[i].rta_gw)) {
+ /* This is most likely an address on the local link.
+ * As we just want to learn remote routes we do not need it.*/
+ continue;
+ }
+ struct re_nl_received_route_node *rr = xzalloc(sizeof *rr);
+ hmap_insert(handle_data->learned_routes, &rr->hmap_node,
+ route_hash(&rd->rta_dst, rd->plen));
+ rr->addr = rd->rta_dst;
+ rr->plen = rd->plen;
+ rr->nexthop = rd->nexthops[i].rta_gw;
+ }
return;
}
@@ -212,7 +248,7 @@ handle_route_msg_delete_routes(const struct route_table_msg *msg, void *data)
void
re_nl_sync_routes(uint32_t table_id,
- const struct hmap *routes)
+ const struct hmap *routes, struct hmap *learned_routes)
{
struct advertise_route_entry *ar;
HMAP_FOR_EACH (ar, node, routes) {
@@ -224,6 +260,7 @@ re_nl_sync_routes(uint32_t table_id,
* in the system. */
struct route_msg_handle_data data = {
.routes = routes,
+ .learned_routes = learned_routes,
};
route_table_dump_one_table(NULL, table_id, handle_route_msg_delete_routes,
&data);
diff --git a/controller/route-exchange-netlink.h b/controller/route-exchange-netlink.h
index f87ebd75d..566b38fde 100644
--- a/controller/route-exchange-netlink.h
+++ b/controller/route-exchange-netlink.h
@@ -16,6 +16,8 @@
#define ROUTE_EXCHANGE_NETLINK_H 1
#include
+#include "openvswitch/hmap.h"
+#include
/* This value is arbitrary but currently unused.
* See https://github.com/iproute2/iproute2/blob/main/etc/iproute2/rt_protos */
@@ -24,6 +26,13 @@
struct in6_addr;
struct hmap;
+struct re_nl_received_route_node {
+ struct hmap_node hmap_node;
+ struct in6_addr addr;
+ unsigned int plen;
+ struct in6_addr nexthop;
+};
+
int re_nl_create_vrf(const char *ifname, uint32_t table_id);
int re_nl_delete_vrf(const char *ifname);
@@ -34,7 +43,9 @@ int re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
void re_nl_dump(uint32_t table_id);
+void re_nl_received_routes_destroy(struct hmap *);
void re_nl_sync_routes(uint32_t table_id,
- const struct hmap *host_routes);
+ const struct hmap *host_routes,
+ struct hmap *learned_routes);
#endif /* route-exchange-netlink.h */
diff --git a/controller/route-exchange.c b/controller/route-exchange.c
index 90144f75f..4929cccb1 100644
--- a/controller/route-exchange.c
+++ b/controller/route-exchange.c
@@ -34,6 +34,139 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
static struct sset _maintained_vrfs = SSET_INITIALIZER(&_maintained_vrfs);
+struct route_entry {
+ struct hmap_node hmap_node;
+
+ const struct sbrec_route *sb_route;
+
+ const struct sbrec_datapath_binding *sb_db;
+ char *logical_port;
+ char *ip_prefix;
+ char *nexthop;
+ bool stale;
+};
+
+static struct route_entry *
+route_alloc_entry(struct hmap *routes,
+ const struct sbrec_datapath_binding *sb_db,
+ const char *logical_port,
+ const char *ip_prefix, const char *nexthop)
+{
+ struct route_entry *route_e = xzalloc(sizeof *route_e);
+
+ route_e->sb_db = sb_db;
+ route_e->logical_port = xstrdup(logical_port);
+ route_e->ip_prefix = xstrdup(ip_prefix);
+ route_e->nexthop = xstrdup(nexthop);
+ route_e->stale = false;
+ uint32_t hash = uuid_hash(&sb_db->header_.uuid);
+ hash = hash_string(logical_port, hash);
+ hash = hash_string(ip_prefix, hash);
+ hmap_insert(routes, &route_e->hmap_node, hash);
+
+ return route_e;
+}
+
+static struct route_entry *
+route_lookup_or_add(struct hmap *route_map,
+ const struct sbrec_datapath_binding *sb_db,
+ const char *logical_port, const char *ip_prefix,
+ const char *nexthop)
+{
+ struct route_entry *route_e;
+ uint32_t hash;
+
+ hash = uuid_hash(&sb_db->header_.uuid);
+ hash = hash_string(logical_port, hash);
+ hash = hash_string(ip_prefix, hash);
+ HMAP_FOR_EACH_WITH_HASH (route_e, hmap_node, hash, route_map) {
+ if (!strcmp(route_e->nexthop, nexthop)) {
+ return route_e;
+ }
+ }
+
+ route_e = route_alloc_entry(route_map, sb_db,
+ logical_port, ip_prefix, nexthop);
+ return route_e;
+}
+
+static void
+route_erase_entry(struct route_entry *route_e)
+{
+ free(route_e->logical_port);
+ free(route_e->ip_prefix);
+ free(route_e->nexthop);
+ free(route_e);
+}
+
+static void
+sb_sync_learned_routes(const struct sbrec_datapath_binding *datapath,
+ const struct hmap *learned_routes,
+ const struct sset *bound_ports,
+ struct ovsdb_idl_txn *ovnsb_idl_txn,
+ struct ovsdb_idl_index *sbrec_route_by_datapath)
+{
+ struct hmap sync_routes = HMAP_INITIALIZER(&sync_routes);
+ struct route_entry *route_e;
+ const struct sbrec_route *sb_route;
+
+ struct sbrec_route *filter =
+ sbrec_route_index_init_row(sbrec_route_by_datapath);
+ sbrec_route_index_set_datapath(filter, datapath);
+ SBREC_ROUTE_FOR_EACH_EQUAL (sb_route, filter, sbrec_route_by_datapath) {
+ if (strcmp(sb_route->type, "receive")) {
+ continue;
+ }
+ /* If the port is not local we don't care about it.
+ * Some other ovn-controller will handle it. */
+ if (!sset_contains(bound_ports, sb_route->logical_port)) {
+ continue;
+ }
+ route_e = route_alloc_entry(&sync_routes,
+ sb_route->datapath,
+ sb_route->logical_port,
+ sb_route->ip_prefix,
+ sb_route->nexthop);
+ route_e->stale = true;
+ route_e->sb_route = sb_route;
+ }
+ sbrec_route_index_destroy_row(filter);
+
+ struct re_nl_received_route_node *learned_route;
+ HMAP_FOR_EACH (learned_route, hmap_node, learned_routes) {
+ char *ip_prefix = normalize_v46_prefix(&learned_route->addr,
+ learned_route->plen);
+ char *nexthop = normalize_v46(&learned_route->nexthop);
+
+ const char *logical_port;
+ SSET_FOR_EACH (logical_port, bound_ports) {
+ route_e = route_lookup_or_add(&sync_routes,
+ datapath,
+ logical_port, ip_prefix, nexthop);
+ route_e->stale = false;
+ if (!route_e->sb_route) {
+ sb_route = sbrec_route_insert(ovnsb_idl_txn);
+ sbrec_route_set_datapath(sb_route, datapath);
+ sbrec_route_set_logical_port(sb_route, logical_port);
+ sbrec_route_set_ip_prefix(sb_route, ip_prefix);
+ sbrec_route_set_nexthop(sb_route, nexthop);
+ sbrec_route_set_type(sb_route, "receive");
+ route_e->sb_route = sb_route;
+ }
+ }
+ free(ip_prefix);
+ free(nexthop);
+ }
+
+ HMAP_FOR_EACH_POP (route_e, hmap_node, &sync_routes) {
+ if (route_e->stale) {
+ sbrec_route_delete(route_e->sb_route);
+ }
+ route_erase_entry(route_e);
+ }
+ hmap_destroy(&sync_routes);
+}
+
void
route_exchange_run(struct route_exchange_ctx_in *r_ctx_in,
struct route_exchange_ctx_out *r_ctx_out OVS_UNUSED)
@@ -57,7 +190,7 @@ route_exchange_run(struct route_exchange_ctx_in *r_ctx_in,
"%"PRId64": %s.",
vrf_name, ad->key,
ovs_strerror(error));
- continue;
+ goto out;
}
sset_add(&_maintained_vrfs, vrf_name);
} else {
@@ -67,7 +200,16 @@ route_exchange_run(struct route_exchange_ctx_in *r_ctx_in,
sset_find_and_delete(&old_maintained_vrfs, vrf_name);
}
- re_nl_sync_routes(ad->key, &ad->routes);
+ re_nl_sync_routes(ad->key, &ad->routes,
+ &received_routes);
+
+ sb_sync_learned_routes(ad->db, &received_routes,
+ &ad->bound_ports,
+ r_ctx_in->ovnsb_idl_txn,
+ r_ctx_in->sbrec_route_by_datapath);
+
+out:
+ re_nl_received_routes_destroy(&received_routes);
}
/* Remove VRFs previously maintained by us not found in the above loop. */
diff --git a/controller/route-exchange.h b/controller/route-exchange.h
index 2c2a9ab84..d19e83403 100644
--- a/controller/route-exchange.h
+++ b/controller/route-exchange.h
@@ -18,6 +18,8 @@
#include
struct route_exchange_ctx_in {
+ struct ovsdb_idl_txn *ovnsb_idl_txn;
+ struct ovsdb_idl_index *sbrec_route_by_datapath;
/* Contains struct advertise_datapath_entry */
struct hmap *announce_routes;
};
diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index 55a081ab1..5d0db1a5a 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -802,6 +802,16 @@ normalize_v46_prefix(const struct in6_addr *prefix, unsigned int plen)
}
}
+char *
+normalize_v46(const struct in6_addr *prefix)
+{
+ if (IN6_IS_ADDR_V4MAPPED(prefix)) {
+ return normalize_ipv4_prefix(in6_addr_get_mapped_ipv4(prefix), 32);
+ } else {
+ return normalize_ipv6_prefix(prefix, 128);
+ }
+}
+
char *
str_tolower(const char *orig)
{
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index a4dd5b311..4e3147e67 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -205,6 +205,7 @@ bool ip46_parse(const char *ip_str, struct in6_addr *ip);
char *normalize_ipv4_prefix(ovs_be32 ipv4, unsigned int plen);
char *normalize_ipv6_prefix(const struct in6_addr *ipv6, unsigned int plen);
char *normalize_v46_prefix(const struct in6_addr *prefix, unsigned int plen);
+char *normalize_v46(const struct in6_addr *prefix);
/* Returns a lowercase copy of orig.
* Caller must free the returned string.
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 83bb51ffb..1ad4248ce 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -14338,6 +14338,19 @@ blackhole 192.0.2.3 proto 84
blackhole 192.0.2.10 proto 84
blackhole 198.51.100.0/24 proto 84])
+# now we test route learning
+check_row_count Route 0 type=receive
+check ip route add 233.252.0.0/24 via 192.168.10.10 dev lo onlink vrf ovnvrf1337
+# for now we trigger a recompute as route watching is not yet implemented
+check ovn-appctl -t ovn-controller inc-engine/recompute
+check ovn-nbctl --wait=hv sync
+check_row_count Route 1 type=receive
+AT_CHECK([ovn-sbctl --columns ip_prefix,nexthop,logical_port --bare find Route type=receive], [0], [dnl
+233.252.0.0/24
+192.168.10.10
+internet-phys
+])
+
OVS_APP_EXIT_AND_WAIT([ovn-controller])
as ovn-sb
From patchwork Tue Nov 26 14:38:29 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015500
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=ZZFAWDnX;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=ZZFAWDnX;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])
(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 4XyQJ74PQ8z1yCv
for ; Wed, 27 Nov 2024 01:41:43 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 50E1443526;
Tue, 26 Nov 2024 14:41:41 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp2.osuosl.org ([127.0.0.1])
by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id g_0oeukAweLY; Tue, 26 Nov 2024 14:41:38 +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 smtp2.osuosl.org 24344435EE
Authentication-Results: smtp2.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=ZZFAWDnX;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=ZZFAWDnX
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp2.osuosl.org (Postfix) with ESMTPS id 24344435EE;
Tue, 26 Nov 2024 14:40:44 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 8F50FC08BA;
Tue, 26 Nov 2024 14:40:43 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 0DE22C08C1
for ; Tue, 26 Nov 2024 14:40:38 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 7813E4BB4C
for ; Tue, 26 Nov 2024 14:38:50 +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 jsG8Looq9qJF for ;
Tue, 26 Nov 2024 14:38:49 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2613::607;
helo=eur05-vi1-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org A0B414B530
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A0B414B530
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=ZZFAWDnX;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=ZZFAWDnX
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
(mail-vi1eur05on20607.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2613::607])
by smtp4.osuosl.org (Postfix) with ESMTPS id A0B414B530
for ; Tue, 26 Nov 2024 14:38:48 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=VcvRJrayWLcDSHXckMKampoBlfdhwQfqceVstI9nXdyAJCX610Fctv4aQxzP10bRCqthtJTTIclWBpPdVuiOs8+TcLVLuHEnh2eya9kUUKtsQT43Kv/ZH3VODyOHENig/unZxamdICGdjT2+OqlntzK1rWUhXY+2PuFyX9ivYtjxUUxbAXIK3rJ4JXjtclYcdwedOnESWxBZcZTkNDeHE9smPjCLkVMDcUb3BUWV8D/LwRdQZvBNggt8pySu7JC42ONQlT64Q+gkka2nLyXfddQXK7gyprC7nYbNVABipWULSaA3sQ1Pq2fV9eYg2ohK2ZuBmY8mzXh1NOAUKYqk+w==
ARC-Message-Signature: i=2; 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=SXNtNP6zwzzUOSNY0XjBG3hhojmf/qI7QNl/cgimSrg=;
b=wfy7ZnrESfvhgbHjM34K2GId/QBAW9ec0OQCFOkU2JVxMFIyiis5xvswqF4gDA16OKgSvIBjN/hTBqNcEBEzRtopbkn+a3CuSP9aW2HfMQPGXiL+U5ykSPwjGbTdOgo57zFdkhjBR+QkFVTYrat4w1GupE+rYGU4NC0oA7wJh04aF0tH8NeaovshSHVreeADpBTMeJNZycTean2ZCSsV28gwJfY6RjgdDsn3CBEUold6MGLrV2JFC+T0w8YfZpHlp2A2zdbx/asPZfcDMUcXGQB3yVN7kYhI/NinrmhyL3IFNi+YlYiqHZnSCswsQqiHqYSd3fl6K0ZXa7CXUCVp/A==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=SXNtNP6zwzzUOSNY0XjBG3hhojmf/qI7QNl/cgimSrg=;
b=ZZFAWDnXY0V7hK7eXca15etpSG+ZOplW8CMGpnEXMHYSUKolE0zLC7brs0eLYTVHSkAJTbeVMhpX8XLBcUy2UGqpRw/kOudNWgjc1TK8h/JUkVEl+dd4LRjVoKwpgmdwy6vGilxuevVqWm6TquxvKC6m+3vTeURiiNGSR7ydBtFfMsqRJ7L/XRcoKbvpIcb/xQOLljOal0l8WeR2GlFH0AW//Uu5ZauAD/ZdU33Ez4JPcans2nTH5DEchupCoHXcldBGiTEiNvrTwvNPCFkU5ee/3JKfF0V3Eagqv6rB2bEAcDJZ48055A21UfnXL5TNLWNkx9gllSSxUM7GHqvT+w==
Received: from AM6P194CA0006.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::19)
by GV2PR10MB7536.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:d4::8) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:42 +0000
Received: from AM3PEPF0000A790.eurprd04.prod.outlook.com
(2603:10a6:209:90:cafe::e9) by AM6P194CA0006.outlook.office365.com
(2603:10a6:209:90::19) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.20 via Frontend Transport; Tue,
26 Nov 2024 14:38:42 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
AM3PEPF0000A790.mail.protection.outlook.com (10.167.16.119) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:39 +0000
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (104.47.11.111)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:40
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 7936421
X-ExclaimerImprintLatency: 3942646
X-ExclaimerImprintAction: 961fbd608ec24c97bd67e3dcb3b11827
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=yKN6Lp/yjN0Z7bV6wv7rSYVNtsMV8rWhRk/gDjsc5p6+fjAbQWNLjQRcNR0wBhp6/O2hoLFTiEMUVfl5ZJO2fJQh57V5n7UoMG7a6T55XZv1SSSwqsQT4bQjmhnOaj6r5EktcU7iDFUO049Ti4gqoVRw3xdbmhHQ+QKzSEkzG1FjTmv3AGPgFxMs/gDS99kaGk+7tNcBFw+H+eWKxdujqwe6/6n2OIn+OwByPJNCfo21cir+YoY4waB9BRvO1nGC7JR2DTGi39xWEJFT0XEcmCkGAYmt14z9310tv5K2mW0j391QJPHsfAkn2KyfP6nzv5rprWl8DXZ7cGOBAB4q3w==
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=SXNtNP6zwzzUOSNY0XjBG3hhojmf/qI7QNl/cgimSrg=;
b=CgEOJgVLMfp2jbPjT0Mp0JsEv2VWy3sHTDHhyqVt9tMhirvxHDA8cYVZ9KV9cFqOTDwssEubZz19acpHxARaiYZ1SFsr7n6hoTyxy2DRI6WabH4dHDSo1bgOTihxNlyDZ0UXpsAM1w1ZApYQCNck6wLb2kaVyVJC48Ex6YnsDQK986ekBWAewBMpGwa1a/oJ5y+1q6Dv/YSY5rxIfSMr+2ruFZBipZUipLqW3OoUL5dej1t0ubFBMxsEObb5u0tpjHiAW3VbIxVWx6G2yQUPrVANDDTN2cZDb72Nl45445BMNugDXtSWYO+OdvnslCyuXDD2yHS/M8mFElVHONfcbA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=SXNtNP6zwzzUOSNY0XjBG3hhojmf/qI7QNl/cgimSrg=;
b=ZZFAWDnXY0V7hK7eXca15etpSG+ZOplW8CMGpnEXMHYSUKolE0zLC7brs0eLYTVHSkAJTbeVMhpX8XLBcUy2UGqpRw/kOudNWgjc1TK8h/JUkVEl+dd4LRjVoKwpgmdwy6vGilxuevVqWm6TquxvKC6m+3vTeURiiNGSR7ydBtFfMsqRJ7L/XRcoKbvpIcb/xQOLljOal0l8WeR2GlFH0AW//Uu5ZauAD/ZdU33Ez4JPcans2nTH5DEchupCoHXcldBGiTEiNvrTwvNPCFkU5ee/3JKfF0V3Eagqv6rB2bEAcDJZ48055A21UfnXL5TNLWNkx9gllSSxUM7GHqvT+w==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:31 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:31 +0000
Date: Tue, 26 Nov 2024 15:38:29 +0100
To: dev@openvswitch.org
Message-ID:
<496124a894dd6651830dfbfc19326f691fcbc33f.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0118.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::13) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|AM3PEPF0000A790:EE_|GV2PR10MB7536:EE_
X-MS-Office365-Filtering-Correlation-Id: 877b3a78-c004-4a1c-8427-08dd0e2804ea
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
PP7RzviR4Nu3BT+XGJ1+Jvamvn2a3tWh9db8NFHXQ6ZKW7SDFdFrybgUkeJ/OhmONKOOPbWfkHhYloTBehE7fQkbl7V6UIpHSx1b65QcXiAD8JBJwadPlAOz9g+AllR5gVJcQpDmkeAfzeqknt3Wrgm6iKvg3eaXLB6TbxR/9cCpOJIQkbnijZR5AsYqNWE2II7DsgVMyeH9P/FvWjjWOwYExy5N6vQQcC6C5xelyZ6h9Jr6vACGLJJ9G0WIEInWkfWi3NrRhYcwmolHLJzRBJ1rtHeWngCdebhoCQOlbNUZQ0bgh/2ws8k+mbJf2xJzfa+fZcQ1H02LHCu4oPcqBzB2wLlIDku3piCCMGayN6Jg4fWKPlgxXOEMZIHLwKFTmy5bfT+1WtwtKDw1sGeEHggMcGIjoUTSZy7Q4Fe9zE1z+7iiiWBeFai9KtzepLol8+7huhFnWIM12Q8HWE4plNs3FPlqzvRvWAPZtzwYHS7TzzQXHxps2FG7nQ5kFsgbWrynbi5yX1Lp7fgNno5c874iO/o5wpG8TTaYTOAqWk/3b9kWUDk8+ud1tevE+Tv36MTIhxMPZG/7VW2aricewx0+6/8IpmE2FWjNy+jsMV0Nkrs2RT9uR4O1AHuC5yYczWFU5z09/9+EWUzdlScKZItxmLCtBpJPv67OWxTj65SqoFRpAXqxsMgwFAqJXGwFGfk4DnXDGLLDhL805S/XIxNjMmY8Bxn4ix/3LGRnZ2KtBA7juqn9cEmi6hs7x3bHueJjJywDJ6+CQmn3upFrytfuThI1W2ceE+skH+LHuK9nsdNLrde0gCIOknFfAnJAaTh+Vu+lZy5pRqMO4qZ9V4Hul3JZgsbrvdPb2rZfirzXWY9BnOtOZUKk2yV0uPC16mgyWWlRUlt0suet1CXf+TQY67VLq8w2RLZAQkRZKPZmo0SQnp52/ghVa8aC9VF2N9ZXgKIjur93hYkVoism4RjbcutIPwuLig2TauWweq0IrpexbGHu1/IoROVL6OJ6+2FiOOQ84eiQZgw0V0uYe/UXt6preXzZ6oZ2Z0yxxB8SdPdYPr+YsaoMquDvwINc5PtUxsvC3UR0hP0WaplYhEo+jWiwCfWCCz0bNKMbgMkpEljzGHlvrO90Re5xFdFY4iXF1TQImLDr4SJvQ9Xuzm8NghEB1u79fbM/0dZO+tFbcc+8zgX5IZUORVVAHl53Qp3LmeAn7vUmlidtmxInwE1vjb4V3kWNB0M/FNksemKj4rJSooZARFkFB/XtC0qc/mzJgvoev2X3yqoRQHjh/DX9/luODjI0fNdcJJTweOJlV7bH9yUQtJ7FteBpgXBrCvj1mUz+mnRRshZcWmILDQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM3PEPF0000A790.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
ad295c6f-f727-440e-5f1c-08dd0e27ffb4
X-Microsoft-Antispam: BCL:0;
ARA:13230040|376014|82310400026|35042699022|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
PWxt9ZTW6aWF4a+G7P0Es1WxBB4FIs8mvwtYOxlHNOxOQCozjxh51iUuPcs7WR3oU2ADSvjTgBHkGs1jGDHaaqcihCxCM1WcLkUi3dUjX4ENQJCxKOzDBHklMOBnxKKVa7B7E+vvHMfzT/dbfrt0UKl+5z+2vJ3CI8r9Nx8TRMXCj7lVfwEmU4crX1JqkECcLk8jMp26QYLjm+WhinBnOOGLXKghhiUcp7WMsBjO7bvN5op+hK1BF5IHmB/5rH6S+RAGpL5LlmS8KTOzJV8risSPyQ5/LK/9OnMILU13i1r7+x1QxnbhAB4QHzoiw4MYzneg2CvkXdqZa5HKbvOouh8FtLTIBGLAy/Ou15mQfdgc9ogpBb7Ku3M1Gm7hXQIaBRTzLR0ivyaQOUWtp2k2Uwi0sE9RdqNonpZhLRoPkKSw7xo/bhoBRhDMqQ10iiELiqaWS99fpMUBPkScF7P+z1Ju9OnManr1qTbE3k1krGc85aUoaoODTU5yI/V/GjJJ7dC2oqn7heENKWKH37smBnngdC4znyurz3fLSKRFAevFvNC4ggv4f8nENjVWhqIgRpl/AJdo6HMKLEizN+KFWKEKyWTSNmfGgrt31dVQtj5WZWViBWwK0uPUVKnAxnTp1WAyqIe3nBONxSs7PPa/IWEBSo8TJM8T+8WfyYxPzecMw47zD8Z13HmE8L3lWPGgZM3Mv+EJo5grIBWoamJB+Ct62bxTMtF2Ncv4HBPz+fTVTT7KyMJbodD0hjJX5XzGAbeGa4APqyWsLCGsxrYMgd8cfQallPFGO9eerAxibG/6qeTf7cBHGX5ioa9L23JzAHj9dEECdF0KaU9pSbxbtAl/WxLnyE+T+8feqcoCPnBXEaPx/Z+5tFw640wgamoW/Dmt1uCe8F9Ar8wmzfgT5PbM2WPvFOcKjSWkppuWgOJQsHEsJPfZlgcbJkpPpnZrEJ3FapnW1YuY4nNIshcbpbv7V+/IIXqRlF23XMXzmHyFk3FF78gfgBZ1SKfjxRwLjg/2vTbWkETc3ElKJMGujdK0WrGRyLpO6UfFbhsLRnDG682SWjMs4hiFYNWw+evVVdlRUIIkZs+bsUz1ULkVRqZLj9vmdy47hunBlrIPgokBRCQtLqXLivaiArH/L/PgchCMDAze4Z0FFYwOCyfCu9CYnr3jVrd4gU8LaI/R92L8RtPsfg+Spwz2X7QI0n5UfovBJ7vGEyiqP2EB0CuuF/QDUmc0ZX+gVJjOQwomnMu3zrZv3n8KYJzruWraiOy2lJqQH9SxGswKArOKSB+Qt5SwbJlPq7PonpwunteuPt1UJrvu7N2TL99nE0eJ7rHiEbHdxRWrFQjV0k5/gg9blni4eKTQrTj9K0v7Rfs5SIQWgFLS/dnSUk3qWRJXBaivfRKuxf8uXfawSrHhROHNfUejERFhNTnTR8KzC5DJmRFhBNQy63sammioNt2uI1kK
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(376014)(82310400026)(35042699022)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:39.5124 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
877b3a78-c004-4a1c-8427-08dd0e2804ea
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
AM3PEPF0000A790.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR10MB7536
Subject: [ovs-dev] [PATCH ovn v3 24/33] controller: Support receiving routes
per iface.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
Previously we just assumed that if a LR had multiple LRPs bound to the
local chassis that all routes where valid for all of these LRPs.
This commit handles a previous option in ovn-nb that allowes the user to
specify the interface name that a route needs to use to be acceptable
for a given LRP.
The users can then have a 1:1 relationship between LRPs and interfaces
to allow ovn-controller to determine which route belongs to which LRP.
Signed-off-by: Felix Huettner
---
v3: newly introduced
controller/route-exchange-netlink.c | 1 +
controller/route-exchange-netlink.h | 2 ++
controller/route-exchange.c | 23 ++++++++++++++++-------
controller/route.c | 12 +++++++++---
controller/route.h | 6 ++++--
tests/system-ovn.at | 11 +++++++++++
6 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/controller/route-exchange-netlink.c b/controller/route-exchange-netlink.c
index eb2adb6d6..a30ecaeba 100644
--- a/controller/route-exchange-netlink.c
+++ b/controller/route-exchange-netlink.c
@@ -221,6 +221,7 @@ handle_route_msg_delete_routes(const struct route_table_msg *msg, void *data)
rr->addr = rd->rta_dst;
rr->plen = rd->plen;
rr->nexthop = rd->nexthops[i].rta_gw;
+ memcpy(rr->ifname, rd->nexthops[i].ifname, IFNAMSIZ);
}
return;
}
diff --git a/controller/route-exchange-netlink.h b/controller/route-exchange-netlink.h
index 566b38fde..fca2429e6 100644
--- a/controller/route-exchange-netlink.h
+++ b/controller/route-exchange-netlink.h
@@ -18,6 +18,7 @@
#include
#include "openvswitch/hmap.h"
#include
+#include
/* This value is arbitrary but currently unused.
* See https://github.com/iproute2/iproute2/blob/main/etc/iproute2/rt_protos */
@@ -31,6 +32,7 @@ struct re_nl_received_route_node {
struct in6_addr addr;
unsigned int plen;
struct in6_addr nexthop;
+ char ifname[IFNAMSIZ];
};
int re_nl_create_vrf(const char *ifname, uint32_t table_id);
diff --git a/controller/route-exchange.c b/controller/route-exchange.c
index 4929cccb1..cc4a1af03 100644
--- a/controller/route-exchange.c
+++ b/controller/route-exchange.c
@@ -27,6 +27,7 @@
#include "route.h"
#include "route-exchange.h"
#include "route-exchange-netlink.h"
+#include "simap.h"
VLOG_DEFINE_THIS_MODULE(route_exchange);
@@ -102,7 +103,7 @@ route_erase_entry(struct route_entry *route_e)
static void
sb_sync_learned_routes(const struct sbrec_datapath_binding *datapath,
const struct hmap *learned_routes,
- const struct sset *bound_ports,
+ const struct smap *bound_ports,
struct ovsdb_idl_txn *ovnsb_idl_txn,
struct ovsdb_idl_index *sbrec_route_by_datapath)
{
@@ -118,8 +119,9 @@ sb_sync_learned_routes(const struct sbrec_datapath_binding *datapath,
continue;
}
/* If the port is not local we don't care about it.
- * Some other ovn-controller will handle it. */
- if (!sset_contains(bound_ports, sb_route->logical_port)) {
+ * Some other ovn-controller will handle it.
+ * We may not use smap_get since the value might be validly NULL. */
+ if (!smap_get_node(bound_ports, sb_route->logical_port)) {
continue;
}
route_e = route_alloc_entry(&sync_routes,
@@ -138,16 +140,23 @@ sb_sync_learned_routes(const struct sbrec_datapath_binding *datapath,
learned_route->plen);
char *nexthop = normalize_v46(&learned_route->nexthop);
- const char *logical_port;
- SSET_FOR_EACH (logical_port, bound_ports) {
+ struct smap_node *port_node;
+ SMAP_FOR_EACH (port_node, bound_ports) {
+ /* The user specified an ifname, but we learned it on a different
+ * port. */
+ if (port_node->value && strcmp(port_node->value,
+ learned_route->ifname)) {
+ continue;
+ }
route_e = route_lookup_or_add(&sync_routes,
datapath,
- logical_port, ip_prefix, nexthop);
+ port_node->key, ip_prefix, nexthop);
route_e->stale = false;
if (!route_e->sb_route) {
sb_route = sbrec_route_insert(ovnsb_idl_txn);
sbrec_route_set_datapath(sb_route, datapath);
- sbrec_route_set_logical_port(sb_route, logical_port);
+ sbrec_route_set_logical_port(sb_route,
+ port_node->key);
sbrec_route_set_ip_prefix(sb_route, ip_prefix);
sbrec_route_set_nexthop(sb_route, nexthop);
sbrec_route_set_type(sb_route, "receive");
diff --git a/controller/route.c b/controller/route.c
index 98618e46a..ad4e49eb1 100644
--- a/controller/route.c
+++ b/controller/route.c
@@ -75,7 +75,7 @@ advertise_datapath_cleanup(struct advertise_datapath_entry *ad)
free(ar);
}
hmap_destroy(&ad->routes);
- sset_destroy(&ad->bound_ports);
+ smap_destroy(&ad->bound_ports);
free(ad);
}
@@ -83,6 +83,8 @@ void
route_run(struct route_ctx_in *r_ctx_in,
struct route_ctx_out *r_ctx_out)
{
+ tracked_datapaths_destroy(r_ctx_out->tracked_re_datapaths);
+
const struct local_datapath *ld;
HMAP_FOR_EACH (ld, hmap_node, r_ctx_in->local_datapaths) {
if (!ld->n_peer_ports || ld->is_switch) {
@@ -94,7 +96,7 @@ route_run(struct route_ctx_in *r_ctx_in,
ad->key = ld->datapath->tunnel_key;
ad->db = ld->datapath;
hmap_init(&ad->routes);
- sset_init(&ad->bound_ports);
+ smap_init(&ad->bound_ports);
/* This is a LR datapath, find LRPs with route exchange options
* that are bound locally. */
@@ -114,8 +116,12 @@ route_run(struct route_ctx_in *r_ctx_in,
"maintain-vrf", false);
ad->use_netns |= smap_get_bool(&sb_crp->options,
"use-netns", false);
+ char *ifname = nullable_xstrdup(
+ smap_get(&sb_crp->options,
+ "dynamic-routing-ifname"));
relevant_datapath = true;
- sset_add(&ad->bound_ports, local_peer->logical_port);
+ smap_add_nocopy(&ad->bound_ports,
+ xstrdup(local_peer->logical_port), ifname);
}
if (!relevant_datapath) {
diff --git a/controller/route.h b/controller/route.h
index ca309c7be..74dd55543 100644
--- a/controller/route.h
+++ b/controller/route.h
@@ -19,6 +19,7 @@
#include
#include "openvswitch/hmap.h"
#include "sset.h"
+#include "smap.h"
struct hmap;
struct ovsdb_idl_index;
@@ -51,8 +52,9 @@ struct advertise_datapath_entry {
bool use_netns;
struct hmap routes;
/* the name of the port bindings locally bound for this datapath and
- * running route exchange logic. */
- struct sset bound_ports;
+ * running route exchange logic.
+ * The key is the port name and the value is the ifname if set. */
+ struct smap bound_ports;
};
struct advertise_route_entry {
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 1ad4248ce..9656e412b 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -14351,6 +14351,17 @@ AT_CHECK([ovn-sbctl --columns ip_prefix,nexthop,logical_port --bare find Route t
internet-phys
])
+# by setting a learning interface filter we will now forget about this route
+check ovn-nbctl --wait=hv set Logical_Router_Port internet-phys \
+ options:dynamic-routing-ifname=thisdoesnotexist
+check_row_count Route 0 type=receive
+
+# chaning it to "lo" will allow us to learn the route again
+check ovn-nbctl --wait=hv set Logical_Router_Port internet-phys \
+ options:dynamic-routing-ifname=lo
+check_row_count Route 1 type=receive
+
+
OVS_APP_EXIT_AND_WAIT([ovn-controller])
as ovn-sb
From patchwork Tue Nov 26 14:38:31 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015489
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=IZd7IenS;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=IZd7IenS;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
(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 4XyQHF4WHPz1yCv
for ; Wed, 27 Nov 2024 01:40:57 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 08C2F85558;
Tue, 26 Nov 2024 14:40:56 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id YbJWRBHWkAeK; Tue, 26 Nov 2024 14:40:53 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56;
helo=lists.linuxfoundation.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B8BC885433
Authentication-Results: smtp1.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=IZd7IenS;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=IZd7IenS
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp1.osuosl.org (Postfix) with ESMTPS id B8BC885433;
Tue, 26 Nov 2024 14:40:23 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 808E6C08BA;
Tue, 26 Nov 2024 14:40:23 +0000 (UTC)
X-Original-To: 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 09020C08BC
for ; Tue, 26 Nov 2024 14:40:08 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id ACBDC6F730
for ; Tue, 26 Nov 2024 14:38:47 +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 tCbDS-g0GL-U for ;
Tue, 26 Nov 2024 14:38:45 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2608::630;
helo=eur02-db5-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 0771D6F707
Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0771D6F707
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=IZd7IenS;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=IZd7IenS
Received: from EUR02-DB5-obe.outbound.protection.outlook.com
(mail-db5eur02on20630.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2608::630])
by smtp3.osuosl.org (Postfix) with ESMTPS id 0771D6F707
for ; Tue, 26 Nov 2024 14:38:44 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=n01tN6ckZ0YIeBtctC8wc+xX2f44qTJgGjcxM8H+pwKiUwk7ZiKkozKF48oTKRceEoLdnBjESbEQmOYMlkzA0Cnq57s1YFBJx0I/4o1ajlWh6c8qF6Xw/UGSV4QdUcyZgN8D98yzoAZGdzn/8dALFddiFNzlEC71nIUXgucBKRSXt0P4zcO3Zjxt4GB0WJpj/vNa4QeU8k7qp1iEEtiG8dGnEzD+ur1IjZrU5SyNUUwadw1QiUsBOUYhXtBq8LHF7YktlAW57CSwoR0EIAox7baJ8/AMlQWO5nD1QorNZs9yfogSQM5jtCq5ZtsynZVt8FBC9+jJt0FnActnbZ7Amw==
ARC-Message-Signature: i=2; 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=GZAp9RnwSa3ZhPxEyNw7litxhDSBq1pAUMdmgR2qqYo=;
b=r1vBzQVRPdF1JqjdYnVZ3StBZxhBy5mOltRj0+WAPz4IY68oGQpDco7q/hnCaQ+T2y9mb9AQQeBa/avZYKtmsCFtHMu+HIYJjC+VGSdBTaZaeQdvRty+rqlwze+C9+CBz5Ah+syiN1sO7PXP7vgDvQ/NI1IIO6hMkb/N2d4fuk30SIZFZLjQtK4TJx7SceM9h+Ks9DytVBoXbCji7C8C+3ixIHjVo6a7K873oeHiI9ziNvyXSJrvU1SbnUkhYQYFJ01UjN4g+5ViaMP0TnLuxs1pr/lbIqhO9/95oXq41aHX1pJRveTpiyp0ePjLTdp+UdkbbNYvd9XbPL5L1f64WA==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=GZAp9RnwSa3ZhPxEyNw7litxhDSBq1pAUMdmgR2qqYo=;
b=IZd7IenSnVzoh7U3q3RKHqZ2A49yZonU4w03hd1kBzM81bJkKTd0m+G+KbC45CkFrLxAyl9wy9N8/CNv9l9pF0uVi8xlOB/Sp0C7RFeILWidCvLDORqSEypVTX5Z73LlITM0SWYTMgVpCUA/gWQmdpQ6/9sHbrIT088aZdgbvN8JbrvCCWDy+sTyNnWqJjDg9P3tH1jOsFXHZR3yxnYsdiT97xh3UknIStMzGMXpYeIoxC0nXgx/JIClfj01zmTNkIh2nGVz5hQuqwWwkr02jSHZ0TJtNM97Kfpda6LaB8NGLOcRpuIqAglPy9lj2SCAtipXKgj4A5oO5I8CtIHDfA==
Received: from DU2PR04CA0228.eurprd04.prod.outlook.com (2603:10a6:10:2b1::23)
by PAWPR10MB7820.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:360::22)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:39 +0000
Received: from DU6PEPF0000A7E4.eurprd02.prod.outlook.com
(2603:10a6:10:2b1:cafe::92) by DU2PR04CA0228.outlook.office365.com
(2603:10a6:10:2b1::23) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:38 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
DU6PEPF0000A7E4.mail.protection.outlook.com (10.167.8.43) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:36 +0000
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (104.47.11.111)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:37
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 13337643
X-ExclaimerImprintLatency: 5230245
X-ExclaimerImprintAction: b2e20520cc584c00afe3b9c763e6b8d6
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=igy28a1XQSrTMS0cVXaRVtG2G5EajcdEom/vS31VfdgaCrylQLBG6oZj8Lt5T2YsD/szH5CSjjM2HL4okAXBOLuK4gdqPso6PZITT3B7ZI3cXfVHSaI62BjY53d+Z8acD2V4P/WnU9u2WGfEYLt1rE1V1fx8/R0YzzOdDQ7NHn+VQ7baIi38wm5cUdX5ihS8E3clt0eoxUAs1fshwqTswFnmgW0ZxVDuz7ovFQdjKtmxf7rpTVgHScHBIMyvF7dqklHyoHGsnHI+3zIAFfzRFTym5QLVgAtO7g+1KsjNd+fHfM1EfHjE4vZ+O/kiF0PdlyLp4nR+3uW9yao0xkZkEg==
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=GZAp9RnwSa3ZhPxEyNw7litxhDSBq1pAUMdmgR2qqYo=;
b=nNsCp518rLugjlkJ58o2lhjNDj6Y7yHR+gLnu5F06XQqM2t8z3hpjHKk95atPSUozpHu6sSy1vEoE1WnljijMtSuSPht4brqpHkot7TjUw0ZaXuluTbbsHRD+RDWEgWWQesXQGz+yacgbzNR6jujslD3vCS3zgrXmY6c/0k2NnoXv0zN6hQZa7KpOgMONJVYuVYK8nIrGg0OsaoO6BQ6nU657aTAlVnnPMb0iEsVnAs2LcYm19XDPTCeikQ/ehngUJIfKXoJupPCZ9wGy2yj0c+mFt3r9abu+T2mt2WAq63EAnMYB8ubBMK7LJwCxPDYHcZAyOMJNF+JPRd52L02SQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=GZAp9RnwSa3ZhPxEyNw7litxhDSBq1pAUMdmgR2qqYo=;
b=IZd7IenSnVzoh7U3q3RKHqZ2A49yZonU4w03hd1kBzM81bJkKTd0m+G+KbC45CkFrLxAyl9wy9N8/CNv9l9pF0uVi8xlOB/Sp0C7RFeILWidCvLDORqSEypVTX5Z73LlITM0SWYTMgVpCUA/gWQmdpQ6/9sHbrIT088aZdgbvN8JbrvCCWDy+sTyNnWqJjDg9P3tH1jOsFXHZR3yxnYsdiT97xh3UknIStMzGMXpYeIoxC0nXgx/JIClfj01zmTNkIh2nGVz5hQuqwWwkr02jSHZ0TJtNM97Kfpda6LaB8NGLOcRpuIqAglPy9lj2SCAtipXKgj4A5oO5I8CtIHDfA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:33 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:33 +0000
Date: Tue, 26 Nov 2024 15:38:31 +0100
To: dev@openvswitch.org
Message-ID:
<036c5101d9bcccb59371d017caf180f45110b869.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0116.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::20) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|DU6PEPF0000A7E4:EE_|PAWPR10MB7820:EE_
X-MS-Office365-Filtering-Correlation-Id: d3426ffa-9b6c-4fde-d3cb-08dd0e280333
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
F6iKTLuNziprSnCGLHAnvAZ6qEq2DR1ZJR41Y/4ClKwLiI2a1j2D+vNOCX73ZKl6w4Xmvaj4GAgkMLZNdCnLgMhMCwLJyZPQD68aiUhr1Ejedru+LUlkGs5oKTzBRqS6p8Z++R8VWeSfot2cUu9HqBsCF6Q1KL4jIVD0AJf6kLO+KOexhLLn+Hoa1GWMVOxovrRF2vuK9mNKXIEq1/3UASh8gBzd11sledpWsECUfUsQcd54VCg0N1qNrTZYzIKA4RrmglXmEsauNzarWGFKGB9/CZWUCIqNf8ZpfBxfm22TG4Ey8Fi1l+Q3ahF/v9GrYR/q6wt3AzICNVXCnMYIrAfMREFTmpDhevyeT96LU9sjjw0ExPodMrV5gT0Ob75mM9kDcV1HCsBxQ1iU90pp2mawF9T7DHED8zdW/fZdGa83k1PcuXsl0lbmfNXoHpzMMg7p44Pj2L/cMgP684xqHIdiYtRjq3MT9utJJgqSB2OYzxCZJGLDl2CSURx6oC2PDHQwBetdOh6GRVRxNE/io11f9yWDBey+8jtOFUJrBALqF4/UnEoEp8+mp+0dManUAaJC820Q0TVaefOzv3a69tC1PssnZc1ZsTXJojuCm+ZW2xyv6+rkvlMXdIkDU7V/e3ejjo2lOECiQ3PXIdG0iT2EUfmwttlAhAeyg7JqTsllYIZI8JjbNRY6mJvtPP4SU0kNJWPGDEK8+M+iJv27MRl+uAlspK5nGIR8L939YtAQNo3/RA7sBqkzBilro0QWC0ceX/35nW33jHsLEaIcgczrdUzbEdgUbesBYw16H4P5y/v0yE5zhN0oKu1yA24yeH/e6FekVGQIYF4Bq+Qa+z+HvmGEa8p0XMxY+WRZcNtVFvRkWnGd+zGREC9yzQniCaK1QGmzaylcpaJ8oZ4DlNOelcQ6KmMRUN4tDy+quZpFCoDzj7s+L6WpAj3wpuW1BlCX6J8GYhdO/sY21gDMrHPjDKIwJ52SCQ2+c0WpbauKjVK4j1XCk14OcrUhD7jzqLZEebRBsInkH+IeybXShU02e1b8YdE9C0iexVb//xsmKwmrtkL5WXFBPQlSKAsMs+Ss9qSB+eygZPNxOM8Nnmj2X8vBazIamFzNg5qfqASDFvCAgq5ruiDGQ8oVqqNrUlGzsLAiCYzArnGRwg1eEqSBtRpwiga9J+XMiS3dAtcjPmRp2QOUbNCMJvLyBgNS3snKkE8WJNGKhpv8/35Wh8xh/VREcdtLbnOgJ3vmMookkiphvyxWYOx2152oMRMYFVnQGHM8E5I5Qu1yA5viY6Os7wZjBAEe1aOIhp843TrwuXCdKnfVw90ydB+/gOgqzphvyqZ8YrR7x7Ab8wZf/w==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU6PEPF0000A7E4.eurprd02.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
0ddd63bb-dbef-46b5-0d7a-08dd0e2800e7
X-Microsoft-Antispam: BCL:0;
ARA:13230040|35042699022|376014|82310400026|1800799024|14060799003|36860700013;
X-Microsoft-Antispam-Message-Info:
Bn632JbOKxxX8rr9CN2D6OFPNFVPvDR/YyD/UxfZWFh1X7pZTJXUtq1D/YbKQLJi2B9rcYC4WcsbED+fTMmvHI0Y+kte45BRnuXlaPHq+mFm+wc1F481nstgbQvzhwswWiHNJzK8f3NaMntdr/QiIpcMLUebXNVX7xU9acAyL94SDm/8wxENQkjN2zMOtNTKtQPFy6btLltAUo4tLU/V/i7n5patNoK/G6R7O6o27QvczPq/d7MyWlq0lxCGYyB6ZGvQenfVfVl62i/i8IchWqvVniTN4hmgCBru6+i7r97xUdM2NRTuOUHPlPC1VUnzhgojCNmbGF6R+RakA58wAk6Q7uq41wqLTzccTkyzLK2DgAtucMcmC/DUDMMYqTJt55noScjQXy19WpwUzCupzPWnV8o62pKrOjyUp+KPa1qJ7K0lv7h6zDfWDbVUA3jWtXLADdByiwislBDwUwTjpwKE79PXhdkUpTkCfByO1W3Fe4LQxZHJI0ez2m0+2zNwVrfZPoFbTh1vGUC5rUB+shDlxE1NxbIBpRmOgTJPmZn0Lgdp+GtDxwBSERLIgVRvEH4/vWJQqKv8rW0YvojIclWBNIbUw0snoN83B42YoxbbHkA0J2RVlwp3SRvLaZKT2zFnastLEhQa66LpMxfvBtaKXOw88GjxPS1t4SbRyWZuLTnWBCRwWohy1KQbmht1+2nZDFqu8mgRfj1k4K2ys7Mj7WSdGfOxCphxGN83QYjsE9NeZEONn1wd+qwWJRUWCj0k1G2ccorpEu5h2l/klziM1GsnDmb2stNntFnLCPZrOYASDLCnxNuSl3TDITPcyyqPgQshoQkmcUje4XxGuaHnqjD3qRXel5aXH8cAglPyi9hZItiUBuEOhxprtj4vIDb51Slu6ttwcsrniL+4LMf7jNq9KX4j54SI9KdOPT2i8zQXF0vLHNu7D5yLVVYG2ThLMoNfUi0K1w0RpvtfxF1/TLDgRqdTWs4yEvOPKIhTlzCySDAd8jxZvVWNhQdEJhdPMC0UtbqyagwhZXTKv7hnHjgyygThww8f6ryfMd9pxplWrALPONNe4VNnU9lG6P8ue1kIov00P96vp8N+ajlKTITjpk9Tz1x7mgtng9/mMXChJyH4FUO12Q0t7HMNo9XhCzQtNWi/mMPNZadPqQoAfgRPlavqLcvoyWGBPJYcuJbvCTqtZwbumeNAl0wRdPhO+bT7CERmS1Vs+XDcOCKlvBDGiV0JG+ZndN+YQX/G12diUfVrIDyiaLQDRBCvqTgn8mtwX/7Q8nKPPDtugJVz/wi980/+i0/8rQ05pdbeceFrISAOL7Xa7XqwphD1L9o6VyR95AmAVu1OgVqq7crz8GDPRfhyEWcru2/ZT7xMeYs1Iiw6qxPPO6jdg8IqKeUasXqDgGP7jsYgI2vi7uSTEYx3Z8m/4eO920o2PJw46gxbrWASLgMTdem3R3Z1
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(35042699022)(376014)(82310400026)(1800799024)(14060799003)(36860700013);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:36.5124 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
d3426ffa-9b6c-4fde-d3cb-08dd0e280333
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU6PEPF0000A7E4.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR10MB7820
Subject: [ovs-dev] [PATCH ovn v3 25/33] controller: Prioritize host routes.
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: ,
X-Patchwork-Original-From: Felix Huettner via dev
From: Felix Huettner
Reply-To: Felix Huettner
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
northd allows us to announce host routes instead of connected routes of
LRs.
For the host routes we also know the LSP that host the address.
We can then check if this LSP is pointing to a LRP that is also local to
the current chassis, so if a LR is chained behind an LR and both use
chassisredirect ports.
In this case we can announce the route with a more preferable priority
than otherwise.
This helps in the following case:
* the backend router is bound on only a single chassis
* the frontend router is bound to multiple chassis (with multiple LRPs)
* one of the chassis of the frontend router matches the backend router
In this case it would be preferable if the network fabric sends the
traffic to the chassis that hosts both the frontend and backend router.
Other chassis would work as well, but then OVN would redirect the
traffic from one chassis to the other.
So this allows us to skip tunneling traffic in one case.
Signed-off-by: Felix Huettner
---
controller/ovn-controller.c | 51 +++++++++++++++++++++++++++++
controller/route-exchange-netlink.c | 20 ++++++-----
controller/route-exchange-netlink.h | 4 +--
controller/route.c | 38 ++++++++++++++++++++-
controller/route.h | 13 ++++++++
tests/system-ovn.at | 38 +++++++++++++++++----
6 files changed, 146 insertions(+), 18 deletions(-)
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index f8de23945..47b09b7ae 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -4800,6 +4800,13 @@ struct ed_type_route {
/* Contains struct tracked_datapath entries for local datapaths subject to
* route exchange. */
struct hmap tracked_route_datapaths;
+
+ /* Contains the tracked_ports that in the last run where bound locally */
+ struct sset tracked_ports_local;
+
+ /* Contains the tracked_ports that in the last run where bound not local */
+ struct sset tracked_ports_remote;
+
/* Contains struct advertise_datapath_entry */
struct hmap announce_routes;
};
@@ -4846,6 +4853,8 @@ en_route_run(struct engine_node *node, void *data)
struct route_ctx_out r_ctx_out = {
.tracked_re_datapaths = &re_data->tracked_route_datapaths,
+ .tracked_ports_local = &re_data->tracked_ports_local,
+ .tracked_ports_remote = &re_data->tracked_ports_remote,
.announce_routes = &re_data->announce_routes,
};
@@ -4862,6 +4871,8 @@ en_route_init(struct engine_node *node OVS_UNUSED,
struct ed_type_route *data = xzalloc(sizeof *data);
hmap_init(&data->tracked_route_datapaths);
+ sset_init(&data->tracked_ports_local);
+ sset_init(&data->tracked_ports_remote);
hmap_init(&data->announce_routes);
return data;
@@ -4873,6 +4884,8 @@ en_route_cleanup(void *data)
struct ed_type_route *re_data = data;
tracked_datapaths_destroy(&re_data->tracked_route_datapaths);
+ sset_destroy(&re_data->tracked_ports_local);
+ sset_destroy(&re_data->tracked_ports_remote);
route_cleanup(&re_data->announce_routes);
hmap_destroy(&re_data->announce_routes);
}
@@ -4920,6 +4933,26 @@ route_sb_port_binding_data_handler(struct engine_node *node, void *data)
const struct sbrec_port_binding_table *pb_table =
EN_OVSDB_GET(engine_get_input("SB_port_binding", node));
+ const struct ovsrec_open_vswitch_table *ovs_table =
+ EN_OVSDB_GET(engine_get_input("OVS_open_vswitch", node));
+ const char *chassis_id = get_ovs_chassis_id(ovs_table);
+ ovs_assert(chassis_id);
+
+ struct ovsdb_idl_index *sbrec_chassis_by_name =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_chassis", node),
+ "name");
+ const struct sbrec_chassis *chassis
+ = chassis_lookup_by_name(sbrec_chassis_by_name, chassis_id);
+ ovs_assert(chassis);
+
+ struct ovsdb_idl_index *sbrec_port_binding_by_name =
+ engine_ovsdb_node_get_index(
+ engine_get_input("SB_port_binding", node),
+ "name");
+ struct ed_type_runtime_data *rt_data =
+ engine_get_input_data("runtime_data", node);
+
const struct sbrec_port_binding *sbrec_pb;
SBREC_PORT_BINDING_TABLE_FOR_EACH_TRACKED (sbrec_pb, pb_table) {
struct tracked_datapath *re_t_dp =
@@ -4937,6 +4970,24 @@ route_sb_port_binding_data_handler(struct engine_node *node, void *data)
return false;
}
+ if (sset_contains(&re_data->tracked_ports_local,
+ sbrec_pb->logical_port)) {
+ if (!find_local_crp(sbrec_port_binding_by_name, chassis,
+ &rt_data->active_tunnels, sbrec_pb)) {
+ /* The port was previously local but now it no longer is. */
+ return false;
+ }
+ }
+
+ if (sset_contains(&re_data->tracked_ports_remote,
+ sbrec_pb->logical_port)) {
+ if (find_local_crp(sbrec_port_binding_by_name, chassis,
+ &rt_data->active_tunnels, sbrec_pb)) {
+ /* The port was previously remote but now we bound it. */
+ return false;
+ }
+ }
+
}
return true;
}
diff --git a/controller/route-exchange-netlink.c b/controller/route-exchange-netlink.c
index a30ecaeba..229fed595 100644
--- a/controller/route-exchange-netlink.c
+++ b/controller/route-exchange-netlink.c
@@ -102,7 +102,8 @@ re_nl_delete_vrf(const char *ifname)
static int
modify_route(uint32_t type, uint32_t flags_arg, uint32_t table_id,
- const struct in6_addr *dst, unsigned int plen)
+ const struct in6_addr *dst, unsigned int plen,
+ unsigned int priority)
{
uint32_t flags = NLM_F_REQUEST | NLM_F_ACK;
bool is_ipv4 = IN6_IS_ADDR_V4MAPPED(dst);
@@ -128,6 +129,7 @@ modify_route(uint32_t type, uint32_t flags_arg, uint32_t table_id,
rt->rtm_dst_len = plen;
nl_msg_put_u32(&request, RTA_TABLE, table_id);
+ nl_msg_put_u32(&request, RTA_PRIORITY, priority);
if (is_ipv4) {
nl_msg_put_be32(&request, RTA_DST, in6_addr_get_mapped_ipv4(dst));
@@ -143,7 +145,7 @@ modify_route(uint32_t type, uint32_t flags_arg, uint32_t table_id,
int
re_nl_add_route(uint32_t table_id, const struct in6_addr *dst,
- unsigned int plen)
+ unsigned int plen, unsigned int priority)
{
uint32_t flags = NLM_F_CREATE | NLM_F_EXCL;
uint32_t type = RTM_NEWROUTE;
@@ -155,12 +157,12 @@ re_nl_add_route(uint32_t table_id, const struct in6_addr *dst,
return EINVAL;
}
- return modify_route(type, flags, table_id, dst, plen);
+ return modify_route(type, flags, table_id, dst, plen, priority);
}
int
re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
- unsigned int plen)
+ unsigned int plen, unsigned int priority)
{
if (!TABLE_ID_VALID(table_id)) {
VLOG_WARN_RL(&rl,
@@ -169,7 +171,7 @@ re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
return EINVAL;
}
- return modify_route(RTM_DELROUTE, 0, table_id, dst, plen);
+ return modify_route(RTM_DELROUTE, 0, table_id, dst, plen, priority);
}
static uint32_t
@@ -229,13 +231,14 @@ handle_route_msg_delete_routes(const struct route_table_msg *msg, void *data)
uint32_t arhash = advertise_route_hash(&rd->rta_dst, rd->plen);
HMAP_FOR_EACH_WITH_HASH (ar, node, arhash, routes) {
if (ipv6_addr_equals(&ar->addr, &rd->rta_dst)
- && ar->plen == rd->plen) {
+ && ar->plen == rd->plen && ar->priority == rd->rta_priority) {
ar->installed = true;
return;
}
}
+
err = re_nl_delete_route(rd->rta_table_id, &rd->rta_dst,
- rd->plen);
+ rd->plen, rd->rta_priority);
if (err) {
char addr_s[INET6_ADDRSTRLEN + 1];
VLOG_WARN_RL(&rl, "Delete route table_id=%"PRIu32" dst=%s plen=%d: %s",
@@ -272,7 +275,8 @@ re_nl_sync_routes(uint32_t table_id,
if (ar->installed) {
continue;
}
- int err = re_nl_add_route(table_id, &ar->addr, ar->plen);
+ int err = re_nl_add_route(table_id, &ar->addr, ar->plen,
+ ar->priority);
if (err) {
char addr_s[INET6_ADDRSTRLEN + 1];
VLOG_WARN_RL(&rl, "Add route table_id=%"PRIu32" dst=%s "
diff --git a/controller/route-exchange-netlink.h b/controller/route-exchange-netlink.h
index fca2429e6..13346e944 100644
--- a/controller/route-exchange-netlink.h
+++ b/controller/route-exchange-netlink.h
@@ -39,9 +39,9 @@ int re_nl_create_vrf(const char *ifname, uint32_t table_id);
int re_nl_delete_vrf(const char *ifname);
int re_nl_add_route(uint32_t table_id, const struct in6_addr *dst,
- unsigned int plen);
+ unsigned int plen, unsigned int priority);
int re_nl_delete_route(uint32_t table_id, const struct in6_addr *dst,
- unsigned int plen);
+ unsigned int plen, unsigned int priority);
void re_nl_dump(uint32_t table_id);
diff --git a/controller/route.c b/controller/route.c
index ad4e49eb1..005f8553d 100644
--- a/controller/route.c
+++ b/controller/route.c
@@ -33,6 +33,9 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
* in the corresponding VRF interface name. */
#define MAX_TABLE_ID 1000000000
+#define PRIORITY_DEFAULT 1000
+#define PRIORITY_LOCAL_BOUND 100
+
bool
route_exchange_relevant_port(const struct sbrec_port_binding *pb)
{
@@ -46,7 +49,7 @@ advertise_route_hash(const struct in6_addr *dst, unsigned int plen)
return hash_int(plen, hash);
}
-static const struct sbrec_port_binding*
+const struct sbrec_port_binding*
find_local_crp(struct ovsdb_idl_index *sbrec_port_binding_by_name,
const struct sbrec_chassis *chassis,
const struct sset *active_tunnels,
@@ -66,6 +69,19 @@ find_local_crp(struct ovsdb_idl_index *sbrec_port_binding_by_name,
return lport_lookup_by_name(sbrec_port_binding_by_name, crp);
}
+static const struct sbrec_port_binding*
+find_local_crp_by_name(struct ovsdb_idl_index *sbrec_port_binding_by_name,
+ const struct sbrec_chassis *chassis,
+ const struct sset *active_tunnels,
+ const char *port_name)
+{
+ const struct sbrec_port_binding *pb = lport_lookup_by_name(
+ sbrec_port_binding_by_name, port_name);
+
+ return find_local_crp(sbrec_port_binding_by_name, chassis, active_tunnels,
+ pb);
+}
+
static void
advertise_datapath_cleanup(struct advertise_datapath_entry *ad)
{
@@ -84,6 +100,8 @@ route_run(struct route_ctx_in *r_ctx_in,
struct route_ctx_out *r_ctx_out)
{
tracked_datapaths_destroy(r_ctx_out->tracked_re_datapaths);
+ sset_clear(r_ctx_out->tracked_ports_local);
+ sset_clear(r_ctx_out->tracked_ports_remote);
const struct local_datapath *ld;
HMAP_FOR_EACH (ld, hmap_node, r_ctx_in->local_datapaths) {
@@ -170,11 +188,29 @@ route_run(struct route_ctx_in *r_ctx_in,
continue;
}
+ unsigned int priority = PRIORITY_DEFAULT;
+
+ if (route->tracked_port) {
+ if (find_local_crp_by_name(
+ r_ctx_in->sbrec_port_binding_by_name,
+ r_ctx_in->chassis,
+ r_ctx_in->active_tunnels,
+ route->tracked_port)) {
+ priority = PRIORITY_LOCAL_BOUND;
+ sset_add(r_ctx_out->tracked_ports_local,
+ route->tracked_port);
+ } else {
+ sset_add(r_ctx_out->tracked_ports_remote,
+ route->tracked_port);
+ }
+ }
+
struct advertise_route_entry *ar = xzalloc(sizeof(*ar));
hmap_insert(&ad->routes, &ar->node,
advertise_route_hash(&prefix, plen));
ar->addr = prefix;
ar->plen = plen;
+ ar->priority = priority;
}
sbrec_route_index_destroy_row(route_filter);
diff --git a/controller/route.h b/controller/route.h
index 74dd55543..876c22716 100644
--- a/controller/route.h
+++ b/controller/route.h
@@ -39,6 +39,13 @@ struct route_ctx_in {
struct route_ctx_out {
struct hmap *tracked_re_datapaths;
+
+ /* Contains the tracked_ports that in the last run where bound locally */
+ struct sset *tracked_ports_local;
+
+ /* Contains the tracked_ports that in the last run where bound not local */
+ struct sset *tracked_ports_remote;
+
/* Contains struct advertise_datapath_entry */
struct hmap *announce_routes;
};
@@ -61,11 +68,17 @@ struct advertise_route_entry {
struct hmap_node node;
struct in6_addr addr;
unsigned int plen;
+ unsigned int priority;
/* used by the route-exchange module to determine if the route is
* already installed */
bool installed;
};
+const struct sbrec_port_binding *find_local_crp(
+ struct ovsdb_idl_index *sbrec_port_binding_by_name,
+ const struct sbrec_chassis *chassis,
+ const struct sset *active_tunnels,
+ const struct sbrec_port_binding *pb);
bool route_exchange_relevant_port(const struct sbrec_port_binding *pb);
uint32_t advertise_route_hash(const struct in6_addr *dst, unsigned int plen);
void route_run(struct route_ctx_in *,
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 9656e412b..e9ffaad93 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -14319,8 +14319,8 @@ ovnvrf1337 1337
# ip route list output has a trailing space on each line
# the awk magic removes all trailing spaces.
OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
-blackhole 192.0.2.0/24 proto 84
-blackhole 198.51.100.0/24 proto 84])
+blackhole 192.0.2.0/24 proto 84 metric 1000
+blackhole 198.51.100.0/24 proto 84 metric 1000])
# we now switch to announcing host routes and expect 192.0.2.0/24 to be gone
# and the following to be added:
@@ -14328,15 +14328,39 @@ blackhole 198.51.100.0/24 proto 84])
# * 192.0.2.2/32
# * 192.0.2.3/32
# * 192.0.2.10/32
+# the last 3 of them are local to the current chassis so we expect a better
+# prio.
check ovn-nbctl --wait=hv set Logical_Router_Port internet-public \
options:dynamic-routing-connected-as-host-routes=true
OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
-blackhole 192.0.2.1 proto 84
-blackhole 192.0.2.2 proto 84
-blackhole 192.0.2.3 proto 84
-blackhole 192.0.2.10 proto 84
-blackhole 198.51.100.0/24 proto 84])
+blackhole 192.0.2.1 proto 84 metric 1000
+blackhole 192.0.2.2 proto 84 metric 100
+blackhole 192.0.2.3 proto 84 metric 100
+blackhole 192.0.2.10 proto 84 metric 100
+blackhole 198.51.100.0/24 proto 84 metric 1000])
+
+# if the pr1-public lrp is now removed from this hypervisor the route metric
+# will go back to the default.
+# For this we just schedule it on a non existing chassis
+check ovn-nbctl lrp-del-gateway-chassis pr1-public hv1
+check ovn-nbctl --wait=hv lrp-set-gateway-chassis pr1-public hv123
+OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
+blackhole 192.0.2.1 proto 84 metric 1000
+blackhole 192.0.2.2 proto 84 metric 1000
+blackhole 192.0.2.3 proto 84 metric 100
+blackhole 192.0.2.10 proto 84 metric 1000
+blackhole 198.51.100.0/24 proto 84 metric 1000])
+
+# moving pr1-public back will also change the route metrics again
+check ovn-nbctl lrp-del-gateway-chassis pr1-public hv123
+check ovn-nbctl --wait=hv lrp-set-gateway-chassis pr1-public hv1
+OVS_WAIT_UNTIL_EQUAL([ip route list vrf ovnvrf1337 | awk '{$1=$1};1'], [dnl
+blackhole 192.0.2.1 proto 84 metric 1000
+blackhole 192.0.2.2 proto 84 metric 100
+blackhole 192.0.2.3 proto 84 metric 100
+blackhole 192.0.2.10 proto 84 metric 100
+blackhole 198.51.100.0/24 proto 84 metric 1000])
# now we test route learning
check_row_count Route 0 type=receive
From patchwork Tue Nov 26 14:38:33 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Felix Huettner
X-Patchwork-Id: 2015504
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=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=FGkfI3+O;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=FGkfI3+O;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(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 4XyQJw5WC8z1yCv
for ; Wed, 27 Nov 2024 01:42:24 +1100 (AEDT)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 2E93B6FB3D;
Tue, 26 Nov 2024 14:42:22 +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 Ak2Cn7Qn0PKp; Tue, 26 Nov 2024 14:42:16 +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 smtp3.osuosl.org 9A1546FBFD
Authentication-Results: smtp3.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=FGkfI3+O;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=stackit.cloud header.i=@stackit.cloud header.a=rsa-sha256
header.s=selector1 header.b=FGkfI3+O
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org
[IPv6:2605:bc80:3010:104::8cd3:938])
by smtp3.osuosl.org (Postfix) with ESMTPS id 9A1546FBFD;
Tue, 26 Nov 2024 14:40:48 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id E0E26C08C2;
Tue, 26 Nov 2024 14:40:45 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 365C6C08C8
for ; Tue, 26 Nov 2024 14:40:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 2F2F94EBDD
for ; Tue, 26 Nov 2024 14:38:53 +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 PlaT_yPZeHi2 for ;
Tue, 26 Nov 2024 14:38:51 +0000 (UTC)
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a01:111:f403:2614::60f;
helo=eur05-db8-obe.outbound.protection.outlook.com;
envelope-from=felix.huettner@stackit.cloud; receiver=
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 1BBCD4CB02
Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none)
header.from=stackit.cloud
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1BBCD4CB02
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=stackit.cloud
header.i=@stackit.cloud header.a=rsa-sha256 header.s=selector1
header.b=FGkfI3+O;
dkim=pass (2048-bit key) header.d=stackit.cloud header.i=@stackit.cloud
header.a=rsa-sha256 header.s=selector1 header.b=FGkfI3+O
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
(mail-db8eur05on2060f.outbound.protection.outlook.com
[IPv6:2a01:111:f403:2614::60f])
by smtp4.osuosl.org (Postfix) with ESMTPS id 1BBCD4CB02
for ; Tue, 26 Nov 2024 14:38:50 +0000 (UTC)
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=HAItnaQKqJCRFCwgX6QVxw+6kCb/fZHeMJOOrF9fyRY3zJvW96UmJakmSGt/jwf2uujQ6tkswEGDna+Sf0aWwsxQaZsyhVGN22sJ8F1MjpMtSYTYqfyuZuDJg3h7gX/9XhRBNBWGNX1eYtlhm+W4knklTmkG1qNorZ0FceV4ZY3HI5ErXpUc4n0zO25ODBW/dmQJGLxQjIJvWJeFT7UccW3lbW3sYbdCvODbH5bbesce3zhEosesbzmQdu4Faqj5B9PjF4wGs9V6z0UVtY6aVFMHaRekPbc8JY6X3/V2S4X3Ehzb7tedw9XasZrcoLOwaKFsPm7Ja+mQQNCnxC7Rrg==
ARC-Message-Signature: i=2; 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=yYaJRuRh0tAstR/MBqOXT53rrzdUGaGAb8l+fRN8Xsw=;
b=HrIlrzIDCz/KSUlYvtanHEkJp81lsic5EXznabv5JeQeE31uGAX6F3t+vUbfUIap35hwZ87rxb95/0X3vzUDk/gVA8i6g/Dh1zOBXFDnxhVt8bvu+YZlo2UMcInvLSh+TCHSVqJwKgFcM/gayKCdMuA2fyXtDnmEpQcbPXEu821O5QuWRg9SJUqCMPmjVQjKGZLeF/LyNc81M7zskNbUbIF13br5Yo/yDis64Hwm/NLsf+6i2pB8SaayKDWcCva9I4ow/EzqmttlIkEJkwtosJ9/EsyJrwkHlwLitaWPWxOCA17qfzCqiEGQn8fJ1pYGd2XNcWv+AwrAJs0mqS/4+A==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=fail (sender ip is
104.40.229.156) smtp.rcpttodomain=openvswitch.org
smtp.mailfrom=stackit.cloud; dmarc=pass (p=reject sp=none pct=100)
action=none header.from=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=stackit.cloud] dkim=[1,1,header.d=stackit.cloud]
dmarc=[1,1,header.from=stackit.cloud])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=yYaJRuRh0tAstR/MBqOXT53rrzdUGaGAb8l+fRN8Xsw=;
b=FGkfI3+Okt+O9JukjWMRhIY2RPH3W1gxWGf90nBJTX0yr9YD0luZJgcbMmsSQN+tWnSYck2z1wLKGBUkvANKnDnQufoOhamUfzdUWZuQTQ9/gz60bo9/hd1+s1FoOo8+LMt94QMX5T3BHAp33qIivRMTjidFuWWGA+51wxR/SMT4e3pUBU8RGhzbx2ZgsnGibVwnOVEzLnp+s0WvOWsot+MuXgSQBSTn1Yz0KjH4VLdnsYrNRnMtWi77p6ce3kAZEHKlklvjg1kemqvd6XcVLg8HlWr/oUoXl4hQAOJLOD/fYkJNq9p3QqVcdkg6dAUBrSDAXgcKcBDGrnzb9orTIA==
Received: from DB7PR05CA0037.eurprd05.prod.outlook.com (2603:10a6:10:2e::14)
by DU0PR10MB7335.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:445::7) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov
2024 14:38:44 +0000
Received: from DU2PEPF00028D01.eurprd03.prod.outlook.com
(2603:10a6:10:2e:cafe::1d) by DB7PR05CA0037.outlook.office365.com
(2603:10a6:10:2e::14) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8182.21 via Frontend Transport; Tue,
26 Nov 2024 14:38:44 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 104.40.229.156)
smtp.mailfrom=stackit.cloud; dkim=pass (signature was verified)
header.d=stackit.cloud;dmarc=pass action=none header.from=stackit.cloud;
Received-SPF: Fail (protection.outlook.com: domain of stackit.cloud does not
designate 104.40.229.156 as permitted sender)
receiver=protection.outlook.com; client-ip=104.40.229.156;
helo=eu1.smtp.exclaimer.net;
Received: from eu1.smtp.exclaimer.net (104.40.229.156) by
DU2PEPF00028D01.mail.protection.outlook.com (10.167.242.185) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8207.12 via Frontend Transport; Tue, 26 Nov 2024 14:38:44 +0000
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (104.47.11.111)
by eu1.smtp.exclaimer.net (104.40.229.156) with Exclaimer Signature Manager
ESMTP Proxy eu1.smtp.exclaimer.net (tlsversion=TLS12,
tlscipher=TLS_DIFFIEHELLMAN_WITH_AES256_NONE); Tue, 26 Nov 2024 14:38:44
+0000
X-ExclaimerHostedSignatures-MessageProcessed: true
X-ExclaimerProxyLatency: 9934146
X-ExclaimerImprintLatency: 5625572
X-ExclaimerImprintAction: 8e67ed90b2eb441b943425f380b494cf
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=GMrqkLhHJDdMON0pG03ASFr4N9sk53ehhHZV6Cp5YWuH131aZ4q0czljN6KUJZ2zewnfZFpd3JHOPr27C2GlVzbf3rHPhnkjmEJtpO4Tgf7/2ua7XgwEvBPwYzJzZIc/+R0Au0UDqryvJ+/P5aVUtvFKLDLC5KmI4tnAMYDSlrqK3v9hn0wojUfcHrH7i/lM6tJIcni8Wp7GZ7MaiCoxTuXNF34alqNbPWyjOqePxS5S0QHr22lsWXGT6l7swjRLQ2hPBq6LWLZHwyflT/fZnqNt7FzU1k+3YYFzkPPTBOCcB0X/DpwTUyXrIHSL1WbSExBA+NUAqZJVGCL+D83FLw==
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=yYaJRuRh0tAstR/MBqOXT53rrzdUGaGAb8l+fRN8Xsw=;
b=C5n9uLtdJ5XPkdlBykiXdRhCxo+emUCjmb/BdB/dzeLDZ8YkueiXRJcNZ0DPsTKG1tv8bzbLygF/dKD7lIhFt/pgJDFnZIlVU+03SK8H45Wk/0eK6J7zv9/H7u5gziz6bFP1K5imMspV8iw3GDjVdhURPnUWwc2LevJ5ZkUKFCMP8zoR7PUZBhujO4rDCoeRdNczZXJeXFFEv8a+dkRyyZo2CeBAQXOxsMYcCVMHNzepx9d671pjfsBinAGYZ21R5tLWMVvexrjM/wBWuRZrPrBoX24jgyKw/OdlC2FhGrSsFmZGkYI503N7YDSc0fFw16MJFOQzd5+6anLo1zyYzQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=stackit.cloud; dmarc=pass action=none
header.from=stackit.cloud; dkim=pass header.d=stackit.cloud; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackit.cloud;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=yYaJRuRh0tAstR/MBqOXT53rrzdUGaGAb8l+fRN8Xsw=;
b=FGkfI3+Okt+O9JukjWMRhIY2RPH3W1gxWGf90nBJTX0yr9YD0luZJgcbMmsSQN+tWnSYck2z1wLKGBUkvANKnDnQufoOhamUfzdUWZuQTQ9/gz60bo9/hd1+s1FoOo8+LMt94QMX5T3BHAp33qIivRMTjidFuWWGA+51wxR/SMT4e3pUBU8RGhzbx2ZgsnGibVwnOVEzLnp+s0WvOWsot+MuXgSQBSTn1Yz0KjH4VLdnsYrNRnMtWi77p6ce3kAZEHKlklvjg1kemqvd6XcVLg8HlWr/oUoXl4hQAOJLOD/fYkJNq9p3QqVcdkg6dAUBrSDAXgcKcBDGrnzb9orTIA==
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=stackit.cloud;
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:30d::9)
by GV1PR10MB6265.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:93::16)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.10; Tue, 26 Nov
2024 14:38:35 +0000
Received: from PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8]) by PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
([fe80::f00d:feeb:e45e:54f8%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024
14:38:35 +0000
Date: Tue, 26 Nov 2024 15:38:33 +0100
To: dev@openvswitch.org
Message-ID:
<9b502ff3e16c25d341a0bc308dee61e350af869e.1732630355.git.felix.huettner@stackit.cloud>
Mail-Followup-To: dev@openvswitch.org
References:
Content-Disposition: inline
In-Reply-To:
X-please-dont-add-a-signature: thanks
X-ClientProxiedBy: FR3P281CA0113.DEUP281.PROD.OUTLOOK.COM
(2603:10a6:d10:a3::12) To PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM
(2603:10a6:102:30d::9)
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
PAVPR10MB6914:EE_|GV1PR10MB6265:EE_|DU2PEPF00028D01:EE_|DU0PR10MB7335:EE_
X-MS-Office365-Filtering-Correlation-Id: 6fb74209-0a60-4981-2c06-08dd0e2807ad
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info-Original:
rlYQm4xEllx6hK+8cBVYTOvM/Hg0NBhZo4gkUmrqyA9Pke3RguP1fV1QA1lwBy67P1vzFhLgoaK4NV7aLoS3GQ2+xOJqr9gsFLb5UtBsesIIn9GGozRwWv+Z2jIxjoMT8b8gi+PIcDbk9bGwREYRvWYgprhd+7j48wxwhI1qeN26596CmQfKFCmX2cgBqE5jd+xFhcPUiGxjnOzQCbAvKJMkM4LC8OucfEvhT9mrBeYjn4jcS9BujKlNsr+75X2I65Vzw4b1jF2m+oHWvJZ3KodBYlAQK2t2ubtk+yAXJqynH3gVl2n9sNYNfijUpC94Ow7v9YELtZJ0zUhAlmYrR0NR7yK8+q/YTI1jfo3MSWsY+DIqH9xuyt63CzzwZp3WU89i3FaWqiLyBGWdZbz9ufTMqoqwmxqO6QP6UP6q4LMqb84425uG9PL3zFJuJSMFthWCdc2QusKrLC066lgigvY1WGgL8DLbuwI+CPzJm0gq4wbQV165mLUXwF4vipNUIEigxdDeaHprZsRgIGHbNRDfbjgZmQYFvraFqfUQVirqnXLF5ULxzwkLUpyILEpJksj9ffwqK54r4GFyrglAdJas8IijX7qF0vehYajMPlYIGCm/Png5SBEt6rckkKZaA8O86xwjSDONX/hY+mlQsmmfarnabtKGVLCNeFnMJJSmEQz7SBjL2QJbBy9Sm/Mfudog547fKVLiVDl2rj+8BEn0G4QjsSrJUPTtUDqY2VPPcVsrnVoC/D/OECW+mxaS0aGlUWV+a+ARD85e23lCj69zmP14VLPBBfm/BIf1eCIrPsT+q8x/eNf3BTDJaOYxVRuElCmOgMRHdhNOkefvBKHmo/7mY8bVaDadaXDclhYdymLkDsFk5MYdzVvQuW4kCSKNK+pmnl6m934FVXwPS9zwDan4dEsaT95gWdAY2Wnlt0Xy0zoIN/73/GGlWM68xT8YxWujIntTgTsCB9LDKcwM/ifaISXfFiTVz+JmvDXMfYhXGRZYfu+2W49bhaZ5YnfnwMFmTww2QHJDzk8g+oZmdjysyZ78WEy+bnoW/78qvQjfuAMmnW5tlu4cLf5/vp5GRZpzSEig4lCnmcj0ZgGk7Wu/jysspoFR4eLrBekFmc9qftAfP3E7hptBZ/zf3VVuxSOGlQoGkP7c07ZJoq/M2fA79mNx1V3/uIw8hG1PDj1gJ2yp64jJBI/qeDzAXvDiQwyW8oidnxK3Ib1GBTlN6I/Qasnvs6fz3hR/4NaK4saROgvVtbeeCriWEBFEGY3rH63eJczarBOUe8t6mcSzH17g1vvM1wHSgzqea6Y7awQgEia3KsRI5bZbZlbMCN8n4DKCIo5KXQdlrjsdOQ==
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en;
SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR10MB6914.EURPRD10.PROD.OUTLOOK.COM;
PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT;
SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR10MB6265
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU2PEPF00028D01.eurprd03.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
475c4608-94af-4f23-19f2-08dd0e2801f8
X-Microsoft-Antispam: BCL:0;
ARA:13230040|35042699022|376014|36860700013|82310400026|1800799024|14060799003;
X-Microsoft-Antispam-Message-Info:
9Q5h6dkgJlOYhKesY4QFCH55Zg0fj7NG3BAViEgANJkKxuAkVCClrZfIMAkBNKcZohaZJ4BeveioBIQAb1ZJNbDVIuz1sbdL65pMGnw5xQ33jB7NmoJ8FuUvTFwd//5q7EP28DFnt3Fu66MW6qSHMfFBPlXdtWv6yYRMs2eGLGU17Vs/Ts/j1GquvGtpWRTfwZ9r+YdLxIh5wd7DjR+MSJg8rRqDwLxFSCoAxC40AUKBfJrZGcbPZj+vanybIH1eP7DBLoZCHJYWMprDJFoBc3pezYGmR+9yTNyJ6k+exqE8/JDF8gzr74F3pzG8d9z8Ja/+KfQCZBFLJftGkgnkfXNUP/Y/ZTaNwQtTDbxYeyFswAqpnhf1BeTfnQ5p3KiuGGShPCuYEh9eOUAXvdMu7VKItQxHa5Y3silMETzPcp77i966pF2qCuIAe3OE6j1Ff955YFrSVMbZUTY3U238qL+lL+coIE7BtPqi1q/hupwwQ48KlKsHNzK/zXAWe6HIYRi75B5esA+5va/b9UqtH79vz7uvkOhpcG1XmSLXqn0g3jf5o3zih+lnHSkICJhb6Gem0g9nPqK1cv2pzd50hnt7d7fDe7BtidWEXyinpSf6IE/MXFgsIdhO8HqepEPUbvLxq1nzzkYvGQJWZFaPJhroaJNUZXi4+K+Q/7xeQKVL2sDfdYa2vdWwFC6lBD/+yu6wqef6WLQHPYI5DmguwbnoPgdQMMtrXaUWFfd6R6WEMXCvHrDBZxzJWjhYr/mYl72wfP4560ekOU8MDaMYT7gm01cpQjD2cYMkYUrl245Q/zBfgaf7YJ3KhI3AUJ5Rix045KRxL/8RccU7Xk4MlHkukMSb7VIO6Hrrq0ThgQrES6tAZnB52bo/igmI6JAdo286vBQKHE2CUyVIdBYASiE0HnA3DmJLXU56AWsftw1sKfqNpRALdmiUI0C5qQLsaUgrt9noUat0zhzi0Cmbqo1PW5Q1fCKigEd2Eh5CE30KhkL5lbP6fAsQSBcx2IOTa6Hl+I4aVDWjRIBzWM6mEwHMtQuVh4LDe5aTXa1eySozgpHzMo9PA1w33Y6xQ2r0Mtqlf6oqwS2cdsud280chGIstWDtuHeszac+Yt48LNONknEGgogbtqrd0FPaXbTq7idfLld6DT7asBL9hj4eN4BMeCZkMxBxQJ0+3pYSlEjzIYvqIwEwPVwW/FUOI2ZVvzsii8oMYywzLtE/ejbu1iUFY6VkrO1H2BR1wCJxxG+2PO4gu5cSBvLdrG/qke+Iv7ymCuaY9X8HlmoeX+Se09gU0Paxze8K3/7QOBTsIOfojI8Ty3kVJyf3GV0xUvKUgFzW0GzMd5wWbn5XatMk5HXDsyoMdBRQbgSEUOtx0ZGNuGG3JCZAZ4YWg2f0FNG4KKYiOCVLUMvEi3ppQDmC8vnWEecxl3LRmqwILQ8cHa+UEou804YxgDKyxQXBLSwM
X-Forefront-Antispam-Report: CIP:104.40.229.156; CTRY:NL; LANG:en; SCL:1;
SRV:;
IPV:CAL; SFV:NSPM; H:eu1.smtp.exclaimer.net; PTR:eu1.smtp.exclaimer.net;
CAT:NONE;
SFS:(13230040)(35042699022)(376014)(36860700013)(82310400026)(1800799024)(14060799003);
DIR:OUT; SFP:1101;
X-OriginatorOrg: stackit.cloud
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 14:38:44.0029 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id:
6fb74209-0a60-4981-2c06-08dd0e2807ad
X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:
TenantId=d04f4717-5a6e-4b98-b3f9-6918e0385f4c; Ip=[104.40.229.156];
Helo=[eu1.smtp.exclaimer.net]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF00028D01.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR10MB7335
Subject: [ovs-dev] [PATCH ovn v3 26/33] controller: Allow network namespaces
for routes.
X-BeenThere: ovs-dev@openvswitch.org
X-Mailman-Version: 2.1.30
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive: