From patchwork Wed Apr 24 06:45:42 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Shibir Basak
X-Patchwork-Id: 1926946
X-Patchwork-Delegate: nusiddiq@redhat.com
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256
header.s=proofpoint20171006 header.b=Ez0ZYALk;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256
header.s=selector1 header.b=MvS0P+vh;
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 4VPVkc4SPLz1yZy
for ; Wed, 24 Apr 2024 17:20:24 +1000 (AEST)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 89D14407C5;
Wed, 24 Apr 2024 07:20:22 +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 78sFqQRyotze; Wed, 24 Apr 2024 07:20:20 +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 B259D40771
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256
header.s=proofpoint20171006 header.b=Ez0ZYALk;
dkim=fail reason="signature verification failed" (2048-bit key,
unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256
header.s=selector1 header.b=MvS0P+vh
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp4.osuosl.org (Postfix) with ESMTPS id B259D40771;
Wed, 24 Apr 2024 07:20:20 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 7B77CC0077;
Wed, 24 Apr 2024 07:20:20 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
by lists.linuxfoundation.org (Postfix) with ESMTP id 769CEC0037
for ; Wed, 24 Apr 2024 07:20:19 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp2.osuosl.org (Postfix) with ESMTP id 4C85E40363
for ; Wed, 24 Apr 2024 07:20:19 +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 5_61llxi3hXE for ;
Wed, 24 Apr 2024 07:20:18 +0000 (UTC)
X-Greylist: delayed 2057 seconds by postgrey-1.37 at util1.osuosl.org;
Wed, 24 Apr 2024 07:20:17 UTC
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org B531E40160
Authentication-Results: smtp2.osuosl.org;
dmarc=pass (p=none dis=none) header.from=nutanix.com
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B531E40160
Authentication-Results: smtp2.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=nutanix.com
header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006
header.b=Ez0ZYALk; dkim=pass (2048-bit key,
unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256
header.s=selector1 header.b=MvS0P+vh
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=148.163.151.68;
helo=mx0a-002c1b01.pphosted.com; envelope-from=shibir.basak@nutanix.com;
receiver=
Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com
[148.163.151.68])
by smtp2.osuosl.org (Postfix) with ESMTPS id B531E40160
for ; Wed, 24 Apr 2024 07:20:17 +0000 (UTC)
Received: from pps.filterd (m0127839.ppops.net [127.0.0.1])
by mx0a-002c1b01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id
43O0SQZ9023596
for ; Tue, 23 Apr 2024 23:46:00 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=
from:to:cc:subject:date:message-id:content-transfer-encoding
:content-type:mime-version; s=proofpoint20171006; bh=hj+OIrOUcd5
soI/P8EMCvCBRdwiGy+TYhBtbYcXIS9g=; b=Ez0ZYALkuAyALcvQ9knLzZTOs9V
n7Fc5wI5g3bhqa+fy0EJhJKxN8hNQo1T6OaG6RIvhduoh53tMpypGaiolyDRwEt1
HFi1oclhcvEDTIYnkWEaSRNFz8/LkdqTi7Pg57ukkK2W0JH+zL3uZfNh6WM6kezS
5SDS9gUiOLVvTbqY6bSysTMys60d/1IXFONkcVEyxlJBjR45An4pERzjHDWI78kT
ArBy2esWz2lDTngfGutoy7h5jN0GZQx1a9+h3B7v3Dh+DaQyJA4uM3pPxbVfEfyU
QE1SRBAEcoUFx/6SIjzqCnMaT4wUcgQKRGiM7lkjmVQv+bf5Bo2ZTcq1SMw==
Received: from nam12-dm6-obe.outbound.protection.outlook.com
(mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169])
by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3xmcsdfjt4-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
for ; Tue, 23 Apr 2024 23:46:00 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=Nfyb65eO+G2BfJPEv2D/46VZUnc39WoDEbFoAfr2woEgCCEyeKTXKG3q3OSNkL2wraa8VczOmrZ5MsT3oHcOAaH3phYAPFZ9kBQlzZKG7rBN9sfhFNH7Xf0L7+0Hxsk4JDGlxm20Ajjoggq08IG9chl3iSER1HMmcMPUHTeEyhFKVCoOXhg9wIfLMhQJjJdSje3nH4tm8LobRWq2E4usFaiZDNvzut6A4OMBUoYViqY8R81oC0kj0ILMrI9/MmRMsMq1e40EwzGP8S+kLMA4z3H2rgnMgL76jh5ruzFy9jgVyQrE+z56SyCwdIeIcm+cFxN8QqXprIyGelf6Phin/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=hj+OIrOUcd5soI/P8EMCvCBRdwiGy+TYhBtbYcXIS9g=;
b=KaljtGkv8ZHIv1666s9KHq96Jir5IkDS9n/xAKicHCLkXz/hg/mskd9+bLCyHISRqhZGzKwJmxiRNEQazxZa965DvTzXQtF63/nJdCsjaQ02Fs1+v4Dxs/VrmRQ32Srx3t2EMlkuRXdL/WSNL98ixyfddrLI0jDT/+0+iNBn8ITogkn89QGVxZ6MkHiEZvRC046SkB8JB+1JroPw+aORV87hI3l7jw2A2wUAAPjotGojZs21VjweDgp31Cxw4KkoMQ3x8DizuCnIGbdNJ5trj5JPc8kvB3laXmc8bJzDLzVdn8Q/4J0ru8U4R0H2Uh2s/PHcZZPLaZeKcukoeVhODQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com;
dkim=pass header.d=nutanix.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=hj+OIrOUcd5soI/P8EMCvCBRdwiGy+TYhBtbYcXIS9g=;
b=MvS0P+vhZRaH2YTsVuZp+wJmPKk+/IclWP+BNr2EhPKEeGiJgiGp79iOvJyuH/G3BT3yAfGiOQ75HOMvWiz6TJNVnTuLgk5Ei6SLghoWoylQ3ZSYQFzwYoPU/ObLF/QKhM0bfNJKJyns1NJuefizRDF/y6wfkdSsBvKhCc6ABwPIGEVXu3txqC9BfZIdF8QUYGFAh74tzFCH+WD3GdcsZ4n1rFgXHUIG8MbkrIP7gXpG3sf5iMwznATe6sosSStDrjrLGtfldDcO2ELnMPQUQz3uUQkMRRWZojNvaYAIZDC4xSpTe9gnjezmLEha2MXTrf6EjHijG0HbQXot86ZuVg==
Received: from DM6PR02MB5529.namprd02.prod.outlook.com (2603:10b6:5:30::11) by
CH3PR02MB9782.namprd02.prod.outlook.com (2603:10b6:610:17e::15) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Wed, 24 Apr
2024 06:45:58 +0000
Received: from DM6PR02MB5529.namprd02.prod.outlook.com
([fe80::baa7:c095:e8a8:5c0c]) by DM6PR02MB5529.namprd02.prod.outlook.com
([fe80::baa7:c095:e8a8:5c0c%4]) with mapi id 15.20.7519.021; Wed, 24 Apr 2024
06:45:58 +0000
From: shibir-basak
To: dev@openvswitch.org
Date: Wed, 24 Apr 2024 06:45:42 +0000
Message-Id: <20240424064542.184144-1-shibir.basak@nutanix.com>
X-Mailer: git-send-email 2.22.3
X-ClientProxiedBy: BYAPR01CA0062.prod.exchangelabs.com (2603:10b6:a03:94::39)
To DM6PR02MB5529.namprd02.prod.outlook.com
(2603:10b6:5:30::11)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM6PR02MB5529:EE_|CH3PR02MB9782:EE_
X-MS-Office365-Filtering-Correlation-Id: e53f3acb-b9cc-4f1a-0de1-08dc642a32aa
x-proofpoint-crosstenant: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
ARA:13230031|1800799015|376005|366007|52116005|38350700005|43062008;
X-Microsoft-Antispam-Message-Info:
P74f1Mp+rbmS5mvm2T8qzx7nIaqsxjhGQuqvD0z7S1jUwFrsSXwjS46Hp7Ydtkq17pDj/JoBbEykcwnRTP+yFiyOHaqcjIcEeDdlvoOBV24e8nsrniQ4yKKpZWDcCH/sf+pFtVucC/tjj03SqHfo2l5Wus/BrOIk84Vb0bbwwCDOeh4jtp0pF8e0VfX/Kq9eUuEbQmRELPjt3AS7XjfOxw/10drmc2OmeCwg7uHJ0eAeViyMBvyWmTZcgEg01Jbk/KYHRY0u73O98CFWU1sq0KksTgrSO9c7tUlV/d9qCZERyMM+ylmPX0AD8fMeox7N7WpO0/PxHNSrgQVTERbgkpxtbzunm9bYWPPZdFmKK0Rc1l2HLy1SWcsdnYZ39E8IP32OG8hhZQwz/wNKfwvGtPnETLKCFEzZUqc/ZPQ33LaHG2c3QpLjKYatRneOkAcJCZV6jXUe34JxeEKkCMr3U0BtLeUhysH1JkQbNY7te3l4o31smvQWLei/mWStiPdei6ko7wPW/CW8fC4s8SF4zjbW/8FFJhRIy4FPgS4L5Ge2djceOSJ4erdulChr+QoMaC7n1WfzEG4W9prv5vJAMwLYwbmGObLp2Hwng5ooYNVCCxx6rzPksll4GBSryH2fDLMoo+SzymAdXH7No0WpGPlvbWyZ8ApHVMwpERC0/jhNormvpdyBkm3El8y8KY9k87lgA1z0Kp57SlRL1kLpRX9hTk3sdgupueXTVhwoyjTAQK50s+tx8NvLU9aoOAI8aw7s8/dD7kRwtmQC67P/6EwF4TgkzXiEvGQ+SNBMB8n6OKi2ESXEfC3dEpXnKuchC0q7BiSPX2SaFb+5aCbouc6IYx22Db3A3FgKyajZdLp9Gx7FKRH/U6HmcSeJERds5ZIa6RQ+d5fUuc6op2HfL6LVvFUYSbtB2Q8MJ+7Yz+Whh/wCOpPa3Uf1oyYm1drmmU83i/79YXY+SzW/33Cb55EjeGfbURaRpMCdBd8kw4JDsyj6ECzFW/E96dM7f435ZUTMwSNTcSYOzQtcbl1wgbXReliwzOJNhbkjM/xahsRSSS42EcIAVR8Ya7YFubr9xeqWoT9mvRAIrsSakwPUKI01Kp8LUvj5Cgg7/JaTKuZrpa1swpyUodBAZntlrG+UzLgq/CcXyJQ/ODAi5qYuI8m8Ht3a0JzvN3fQxLq9+MTWkRsL45prTdfcuzuuI+JkRVdpc8ZqJMBiGnaChwpfcQUDe6aG4liduqxPrC/c96izsXBrUA150VkyisM3POYUc5hvzi++xS518ZojGKNaX/OXkZ5/nwSd0TxrUzGT0mXwfVh9ag/8xHjS/djKW/kUCtpXD6qQ3JH/xcvP0l3sK5RFGd8VTJUcBbLgZpESkUk=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:DM6PR02MB5529.namprd02.prod.outlook.com; PTR:; CAT:NONE;
SFS:(13230031)(1800799015)(376005)(366007)(52116005)(38350700005)(43062008);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
IiyjDLZ+2YyLg1AV42yehsUz07sRu47YrIPnQppBDbTNkFJkOQRdXhMLoY7d8QLv7oS3xy2oTUseJCUmGQjNXLguz1/3i9oJz3mYLwYLmXs8kr5quCfry8MSKK5Mal8RejLGqU0diw7nBJ3zmIRVwdIHnIeuzRd+pEkiR4Tzyy8kPcsto6aSKU+iYJMBhjNvLuo1FUL0TpFr+GMJ1yeN16eJY0q4xhxJgYt/SL7gg8fTyO/4p2IUL9xRz/iEaiM70ceIPEzR5XpCNTAYh9fhxDxGg9pCAoNE82Boc+dY0+eIUYh1alNZCWWRmxmQ8mDtL+VeuBhgb+QBnp8ehTzgB0U3EgTEpslEshDZvnLwef4RQOd79rxLBnCye1FsS+K+vCrGXSxNLsTCBlPUZGE4C98fHUInGQjmq7QWaO0sASkYtOO/11JsNY3IJ9wygPu7fSBWPPa9Cnw2/6XF547sVw5B1uRr0N32dc6HtIq4jp3FAmd2pjoTYyUWKpsrbs/5WX2O+uEXPD7S4JfiT/+UmVnXhUpE5Uu1FAyK4pexv3/SoDuUa1qFe/TtIhVZQ5ekGOfQTJuxBoBbOyZUMS8StV5QeU2V8XpUCo00L9afcH7eXls0H4eiT0EEF9kMK5841fp0qe5nymgsvmL0byAa5GuHZhOTctYR2vRaMEjUIb1SGTPnEtAJ83Y0tyIbqPO1+oBgpx7ZO8DM2fXp2yZ7sYoJV5xkIcIPTA9N/O0xaVFkLRXgWEnGvzNN4CVW0DE6aEj+sBUCIdySmVYsMBpuqlsEAXrXK2VkizHUsTd3ElzMLf9gXzLvXSRxAne9UdRx2VovvSzKiYdhZJskLLGcp0gJgmCJdPU7uf3j3GeXsCv9wsNnnLmkYw+CsZxnM+f1IF0BoOhYsUyHB9VTTOmyAA+80Gq2GwNZ53z3Nn+qYD1fdx5P+K2siDw5A1fiGSxGu36b9f3HyKo5qyHt3ncZlbNXClDM02vab9w/vP1omYXVPwGAAdK2sbGfMuT1XO6C9WT2IHuDe80uz9AoqqGzDFX2CNN4x4kelH1zzT1YnP+ROzSznxJtLJ3kE7H8tvCEw2sGJkLwwLiSyUbtmK7PgjgpLjfNbX9bTXPdGSN8NKRQYMZQsF+fWiCzFXh8u5WqiQEWdmNjn0A332tBlUcaqg8xV6+jXu5cjnyHAQIzfXxkS/whFACx9lMl6f6bTSnH/Yi7u35r8FS1Uxf10QQhBuN9lSdIt3NTWvGWAMSbuD+LMB1PtW9ilQZzcv6+9VhJ7ftlcWCVRGDtDagTvT/5EQz3ngcCu+13qNuhjiRChD3ICCAUgA05mcZukDMU70psrx2Z6IFt9yOaUoUF+Q+nDTLfIoG55rvfHAJDOc2JOCghuLx2BtnDwiCw3NrLObBxR+ywBbePbWxfn1TaPeHHxRRBSsF1/1BEHX2FS7S9C0aF4FhPLSAEbRWCFzPHSwkAvrm9ocBDw30uMVQSHRrtR0dWITaK30oehXfVKlTHXzLrlaMLhc638qpL6Z/aMxW/r99+Sf7lamLqlGc8XizvAa82r9dX+kuHhgDgWGH4ya6WM9Ao7/YoK8/N0HehSTIQ1QeMNJO+bzBSkkwlXVPitw==
X-OriginatorOrg: nutanix.com
X-MS-Exchange-CrossTenant-Network-Message-Id:
e53f3acb-b9cc-4f1a-0de1-08dc642a32aa
X-MS-Exchange-CrossTenant-AuthSource: DM6PR02MB5529.namprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 06:45:58.2137 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName:
dqyq+OEpx0nAZ9t9DQvM0a7PB0IpI12f91nWp3xryDnt1ejhFbm/1m6+Tu2SwgtLerzxK8+DWOBqUlqHuE3bJLWqRcuV/n3hedbxYnhO5I8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR02MB9782
X-Proofpoint-ORIG-GUID: DTpltxOlQNFAVv8S9nSWXQoCVz7ScZoD
X-Proofpoint-GUID: DTpltxOlQNFAVv8S9nSWXQoCVz7ScZoD
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26
definitions=2024-04-24_04,2024-04-23_02,2023-05-22_02
X-Proofpoint-Spam-Reason: safe
Cc: shibir-basak
Subject: [ovs-dev] [PATCH ovn] northd: Add lsp option force_fdb_lookup.
X-BeenThere: ovs-dev@openvswitch.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
This option is applicable only if the lsp is of default 'type'
i.e. type=empty_string (which is a VM (or VIF) interface) and the
lsp also has 'unknown' addresses configured.
If lsp option 'force_fdb_lookup' is set to true, mac addresses
of the lsp (if configured) are not installed in the l2 lookup
table of the Logical Switch pipeline. However, MAC addresses
are learnt using the FDB Table.
Usecase:
=========
This option is required to reduce packet loss when VM is being
migrated across AZs (via VXLAN tunnel). lsp is configured in both
AZs on different logical switches which are sharing the same IP
subnet. If the port has unknown address set along with MAC, IP
then, any packet destined to VM's MAC on destination AZ will get
forwarded locally, which may lead to packet loss during VM migration.
This option is useful to reduce packet loss during VM migration
by forcing the logical switch to learn MAC using FDB.
The other way to address this issue is to use pkt_clone_type
option but this causes too much of packet duplication when there
are multiple ports with unknown address in the logical switch.
Signed-off-by: shibir-basak
---
northd/northd.c | 16 ++++++++++++++++
ovn-nb.xml | 11 +++++++++++
tests/ovn-northd.at | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git a/northd/northd.c b/northd/northd.c
index 37f443e70..c29396716 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -1380,6 +1380,16 @@ lrport_is_enabled(const struct nbrec_logical_router_port *lrport)
return !lrport->enabled || *lrport->enabled;
}
+static bool
+lsp_force_fdb_lookup(const struct ovn_port *op)
+{
+ /* To enable FDB Table lookup on a logical switch port, it has to be
+ * of 'type' empty_string and "addresses" must have "unknown".
+ */
+ return !op->nbsp->type[0] && op->has_unknown &&
+ smap_get_bool(&op->nbsp->options, "force_fdb_lookup", false);
+}
+
static struct ovn_port *
ovn_port_get_peer(const struct hmap *lr_ports, struct ovn_port *op)
{
@@ -9479,6 +9489,12 @@ build_lswitch_ip_unicast_lookup(struct ovn_port *op,
if (ovs_scan(op->nbsp->addresses[i],
ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))) {
+ /* Skip adding flows related to the MAC address
+ * as force FDB Lookup is enabled on the lsp.
+ */
+ if (lsp_force_fdb_lookup(op)) {
+ continue;
+ }
ds_clear(match);
ds_put_format(match, "eth.dst == "ETH_ADDR_FMT,
ETH_ADDR_ARGS(mac));
diff --git a/ovn-nb.xml b/ovn-nb.xml
index b652046a7..4724d0537 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -1262,6 +1262,17 @@
+
+ This option is supported only if the Logical Switch Port is of
+ default (i.e. type set to empty_string) and also
+ column contains unknown
.
+ If set to true
, MAC addresses (if configured)
+ are not installed in the l2 lookup table but the MAC addresses are
+ learnt and stored in the FDB table.
+ The default value is false
.
+
+
If set to mc_unknown, packets going to this VIF get cloned to all
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index be006fb32..82e7a6574 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -6886,6 +6886,44 @@ AT_CLEANUP
])
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([check options: force_fdb_lookup for LSP])
+ovn_start NORTHD_TYPE
+ovn-nbctl ls-add S1
+ovn-nbctl --wait=sb lsp-add S1 S1-vm1
+ovn-nbctl --wait=sb lsp-add S1 S1-localnet
+ovn-nbctl --wait=sb lsp-set-addresses S1-vm1 "50:54:00:00:00:01 192.168.0.1" unknown
+ovn-nbctl --wait=sb lsp-set-type S1-localnet localnet
+
+#Verify the flows before setting force_fdb_lookup option
+ovn-sbctl dump-flows S1 > S1flows
+AT_CAPTURE_FILE([S1flows])
+
+AT_CHECK([grep -e "ls_in_l2_lkup.*S1-vm1" S1flows | ovn_strip_lflows], [0], [dnl
+ table=??(ls_in_l2_lkup ), priority=50 , match=(eth.dst == 50:54:00:00:00:01), action=(outport = "S1-vm1"; output;)
+])
+
+#Set the force_fdb_lookup option and verify the flows
+ovn-nbctl --wait=sb set logical_switch_port S1-vm1 options:force_fdb_lookup=true
+ovn-nbctl --wait=sb set logical_switch_port S1-localnet options:force_fdb_lookup=true
+
+ovn-sbctl dump-flows S1 > S1flows
+AT_CAPTURE_FILE([S1flows])
+
+#Verify the flows for default port type (VM port)
+AT_CHECK([grep -e "ls_in_l2_lkup.*S1-vm1" S1flows | grep -e "match=(eth.dst == 50:54:00:00:00:01)"], [1], [])
+AT_CHECK([grep -e "ls_in_.*_fdb.*S1-vm1" S1flows | ovn_strip_lflows], [0], [dnl
+ table=??(ls_in_lookup_fdb ), priority=100 , match=(inport == "S1-vm1"), action=(reg0[[11]] = lookup_fdb(inport, eth.src); next;)
+ table=??(ls_in_put_fdb ), priority=100 , match=(inport == "S1-vm1" && reg0[[11]] == 0), action=(put_fdb(inport, eth.src); next;)
+])
+
+#Verify the flows for a non-default port type (localnet port)
+AT_CHECK([grep -e "ls_in_.*_fdb.*S1-localnet" S1flows], [1], [])
+
+AT_CLEANUP
+])
+
+
OVN_FOR_EACH_NORTHD_NO_HV([
AT_SETUP([check options:pkt_clone_type for LSP])
ovn_start NORTHD_TYPE