From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f10.google.com (mail-wm2-f10.google.com [74.125.225.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FAFF381B1D for ; Tue, 4 Aug 2026 18:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785867666; cv=none; b=UEibp4R9wdSo/M4DFSnw98tTCyzKdOIEwpI8ZxT7MUqALG2Sxh7ljSm8780wWhT2fwrU6uPtFhfB7TxD+XZBDV84XAGKhyOb7k8WZdWIxyTj2Kp1ZY7UUG7SBFvUOzdOmfOp/WvunG0sdjpSQ8tnOQJMy84Nh4Ry+AeRQa8nSnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785867666; c=relaxed/simple; bh=WWIR30hIWW19T7qrJDosGEVYAkY+1cLTLiDnzS/wuQ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=olSjJGyfnwDvlOtzb0QDECeK/Q7+gWkbYTTWM8YwU8gTyZb4YhX3wWQFwYoygQfDXuky9zQloRDznRj8+KyE9OYa4vaertd5ar9I17R2a1tNcVjj0q/iSG9gi5IkdWdKrHzyrSurZ9STIxghqDwU2g5SznSMsMMSlmOA+KXb5YI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=74.125.225.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm2-f10.google.com with SMTP id 5b1f17b1804b1-495482c36b8so336665e9.0 for ; Tue, 04 Aug 2026 11:21:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785867663; x=1786472463; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qF/Zz53HizOpq6EgmE0sqdHtrYs1Go4WfBnkRhlxiAo=; b=e1qomhx6dt8HAnwX1GjBOoMPoAVqb3N4783QhKAZC/C1BqYB8gnO/u+C9Vmk9v/ig8 bGHGaTpr13qdoyQGk71g7SoZl0YXwETKXyeharkOaV7cm/JRxTHadUv7GV9f5QuylGPZ RYfkIqoZN7Y+NWCL38c+th+49iSrJOJ6naZ7D4RN+eSyoGXOvw5PdxzCjx7xJ7EEQava dty+lLxPIU6vPISSUOCSxd5JZKngbZhhK3OB3kMgqpJ6C9lqOZkdgJqnPjx+ycpWAqmy eLRgIk/ZY8py135gPlpPV1W7p0GmxWZU3XyU+Mvtd30yj694+OdPCEJrO62SfmajMjEJ o+/A== X-Forwarded-Encrypted: i=1; AHgh+Rp1d0F7uPPvG0TWxh1NBK2P8chvFInxBWhDgRW5DKbQw7GqMZNM42S6rD14MtADFZ+DE+RNtT7Gq4czvQk=@vger.kernel.org X-Gm-Message-State: AOJu0YzztSmAktZ+0iHEjvbtBLygr0P0uj02xXOr0MzmNqTGes7LnIDq GdxTRpcCrZKowpepKaRnhAUj4KVoOu7O+vRmKN9keki9PiF2HvnKqbLQQWkb+7EKSg0= X-Gm-Gg: AR+sD10vud0Dxi8YElG1hMMvnTwF40d5f4fdtoZYmWxCVn87BnR0SLeXpQbGwNAW0nZ ZrNzZ8CdAg9POUwqRf4bYlB7CUFR94Ti8RY8QgAZY8h9/HMn0Y/U8zDKqI4VgS/LbJ6f86asq2V 3Y2qEe94xaziyqSTpZbaokNX/FJQLGBkyMphD64FrIFjKvZ1sVD/V8xZetQCHa4GCJgOLTyQ37A rcq+Ye7lgQZFK2atmV6x4PuYd0PYMlSCZZKt8G+EssIyT9BRO+TaCHMj0DDfJuvlTMU9alumy/p RQ7RQyhI+f9DjS9FfVDxP0ZZKDQoCLc4051OUl9dPF1mQSzElqExwM92jYci+y/4oqZ3KwPq8r+ 452rF1fHL8Gns3oNOrJbQS2fFaAm28sQxSTnbnJ2VVmV7PiKeMzq605urDEUyqDTTSaL0Hmko8V FIZQFx25P/GmnM7CFMsIq+fDX9WZiW29URm1wzQuFhLl7OH4PAzH6rJWSA+x97OgI30AydSDfsI 8fhc1fZmzXBv1jLKRANeU4KyZJUpOCgwFqFqz21 X-Received: by 2002:a05:600c:1d0a:b0:495:78af:78e5 with SMTP id 5b1f17b1804b1-4994e70de03mr3821405e9.1.1785867662779; Tue, 04 Aug 2026 11:21:02 -0700 (PDT) Received: from im-t490s.redhat.com (78-80-108-129.customers.tmcz.cz. [78.80.108.129]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4994e4bf5c1sm4946925e9.2.2026.08.04.11.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 11:21:02 -0700 (PDT) From: Ilya Maximets To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Aaron Conole , Eelco Chaudron , David Ahern , Ido Schimmel , Shuah Khan , Kuniyuki Iwashima , Nikolay Aleksandrov , Fernando Fernandez Mancera , Antoine Tenart , linux-kernel@vger.kernel.org, dev@openvswitch.org, linux-kselftest@vger.kernel.org, Ilya Maximets Subject: [PATCH net-next 0/6] openvswitch: remove support for legacy tunnel ports Date: Tue, 4 Aug 2026 20:20:34 +0200 Message-ID: <20260804182049.2289754-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ovs-vswitchd doesn't use OVS_VPORT_TYPE_GRE/VXLAN/GENEVE with the Linux kernel module since adding support for standard tunnel devices with COLLECT_METADATA back in 2017. The code to use them was only activated as a fallback for old kernels, so not used in practice. And it is now fully removed in the upcoming OVS 4.0 release. Modern way to use tunnels with OVS is to create standard tunnel ports with RTM_NEWLINK + COLLECT_METADATA and add them as OVS_VPORT_TYPE_NETDEV. Device reference management and the netlink options parsing for these legacy port types is complicated and was a CVE magnet in the previous release cycles. Existence of these modules also makes locking analysis for geneve module and other core tunnel devices unnecessarily more complicated, especially in light of migration to per-netns locking: https://lore.kernel.org/r/CAAVpQUDmZEaQNDSySLayqexgTrUbhBaL7XPCt9XNQzh+NGQ=UQ@mail.gmail.com Since there are no actual users for these port types for a very long time, let's just remove the support entirely. There is no practical reason to run OVS from 2017 on a recent kernel. While it's technically a uAPI change in some sense, from the user's perspective this removal looks indistinguishable from the kernel built with CONFIG_OPENVSWITCH_GENEVE/VXLAN/GRE disabled. And it seems like removal of unused drivers/modules is not a rare event these days. There are 3 parts to this set: 1. The first patch does the tunnel port removal, which is the primary goal here. 2. Patches 2 and 3 remove extra infrastructure that is no longer in use by anything inside the openvswitch module. 3. Patches 4-6 remove functions from gre/vxlan/geneve modules that were added for openvswitch in the past to support the tunnel types. openvswitch is the only in-tree consumer of these functions. Version 1: - Rebased. - Removed the tunnel modules from the new OVS selftest config. - Addressed RFC review from Sashiko: * Made ovs_netdev_link() static. * Restored -EOPNOTSUPP if OVS_VPORT_ATTR_OPTIONS was provided. * Removed retry in ovs_vport_cmd_new() as not needed anymore. RFC: - https://lore.kernel.org/r/20260513183559.2141010-1-i.maximets@ovn.org Ilya Maximets (6): openvswitch: remove support for legacy tunnel types openvswitch: vport: remove infrastructure for vport options openvswitch: vport: remove infrastructure for separate modules net: geneve: remove unused geneve_dev_create_fb net: gre: remove unused gretap_fb_dev_create net: vxlan: remove unused vxlan_dev_create drivers/net/geneve.c | 49 ----- drivers/net/vxlan/vxlan_core.c | 42 +---- include/net/geneve.h | 5 - include/net/gre.h | 2 - include/net/vxlan.h | 3 - include/uapi/linux/openvswitch.h | 31 +++- net/ipv4/ip_gre.c | 47 ----- net/openvswitch/Kconfig | 35 ---- net/openvswitch/Makefile | 4 - net/openvswitch/datapath.c | 28 +-- net/openvswitch/vport-geneve.c | 143 --------------- net/openvswitch/vport-gre.c | 106 ----------- net/openvswitch/vport-netdev.c | 29 +-- net/openvswitch/vport-netdev.h | 2 - net/openvswitch/vport-vxlan.c | 172 ------------------ net/openvswitch/vport.c | 79 +------- net/openvswitch/vport.h | 23 +-- tools/testing/selftests/net/config | 3 - .../testing/selftests/net/openvswitch/config | 3 - .../selftests/net/openvswitch/openvswitch.sh | 38 ---- .../selftests/net/openvswitch/ovs-dpctl.py | 93 +++------- 21 files changed, 63 insertions(+), 874 deletions(-) delete mode 100644 net/openvswitch/vport-geneve.c delete mode 100644 net/openvswitch/vport-gre.c delete mode 100644 net/openvswitch/vport-vxlan.c -- 2.55.0