{"id":2232479,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2232479/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1777902424.git.tredaelli@redhat.com/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/1.1/projects/47/?format=json","name":"Open vSwitch","link_name":"openvswitch","list_id":"ovs-dev.openvswitch.org","list_email":"ovs-dev@openvswitch.org","web_url":"http://openvswitch.org/","scm_url":"git@github.com:openvswitch/ovs.git","webscm_url":"https://github.com/openvswitch/ovs"},"msgid":"<cover.1777902424.git.tredaelli@redhat.com>","date":"2026-05-04T15:23:39","name":"[ovs-dev,v2,0/5] libopenvswitch: Restructure the massive OVS library into two parts","submitter":{"id":70949,"url":"http://patchwork.ozlabs.org/api/1.1/people/70949/?format=json","name":"Timothy Redaelli","email":"tredaelli@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/openvswitch/cover/cover.1777902424.git.tredaelli@redhat.com/mbox/","series":[{"id":502681,"url":"http://patchwork.ozlabs.org/api/1.1/series/502681/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/list/?series=502681","date":"2026-05-04T15:23:39","name":"libopenvswitch: Restructure the massive OVS library into two parts","version":2,"mbox":"http://patchwork.ozlabs.org/series/502681/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2232479/comments/","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ovs-dev@lists.linuxfoundation.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=bHAZMZfN;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)","smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=bHAZMZfN","smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp3.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=bHAZMZfN"],"Received":["from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8QR90tPGz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 01:24:05 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 236FF845FA;\n\tMon,  4 May 2026 15:24:03 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id oe0WrWTSGptz; Mon,  4 May 2026 15:24:01 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id D700C845DD;\n\tMon,  4 May 2026 15:24:01 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id C7758C04EA;\n\tMon,  4 May 2026 15:24:01 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 6CCF1C04E9\n for <dev@openvswitch.org>; Mon,  4 May 2026 15:24:00 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 6234B61503\n for <dev@openvswitch.org>; Mon,  4 May 2026 15:24:00 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id PyF2S6ro5s8y for <dev@openvswitch.org>;\n Mon,  4 May 2026 15:23:59 +0000 (UTC)","from us-smtp-delivery-224.mimecast.com\n (us-smtp-delivery-224.mimecast.com [170.10.133.224])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 48A4E614FF\n for <dev@openvswitch.org>; Mon,  4 May 2026 15:23:59 +0000 (UTC)","from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-J42AR1XeOzqwbde6FxHZmg-1; Mon,\n 04 May 2026 11:23:56 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 1A2181800473\n for <dev@openvswitch.org>; Mon,  4 May 2026 15:23:56 +0000 (UTC)","from aldebaran.netbird.cloud (unknown [10.44.48.44])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 9B01F196B09E; Mon,  4 May 2026 15:23:54 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp1.osuosl.org D700C845DD","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 48A4E614FF"],"Received-SPF":"Pass (sender SPF authorized) identity=helo;\n client-ip=170.10.133.224; helo=us-smtp-delivery-224.mimecast.com;\n envelope-from=<>; receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org 48A4E614FF","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777908238;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=66IXQQ8ycuZeGKoeD2ENHWyqHCFi+GDXtqOo0LX1OKM=;\n b=bHAZMZfNYuCdeVB3p5Iy+69ZAOeUy6SLGn4h729smvNpfMQXjiIWQ3cTWVdaIN3kLBGNTC\n d1eEcBtuoCmkkdY7RRs+1qkTphuD7qhAtl5vAEbA79XlJQK/wwr2QQdd76p/Kcp52A4LLf\n ho3K9TwoC6Qc5b6PE3pg12XFIPjcdio=","X-MC-Unique":"J42AR1XeOzqwbde6FxHZmg-1","X-Mimecast-MFC-AGG-ID":"J42AR1XeOzqwbde6FxHZmg_1777908236","To":"dev@openvswitch.org","Date":"Mon,  4 May 2026 17:23:39 +0200","Message-ID":"<cover.1777902424.git.tredaelli@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"UStZfbItYmRGTe2FSDEdYrW2bH-YGvgnTXqSFEn61nw_1777908236","X-Mimecast-Originator":"<>","Subject":"[ovs-dev] [PATCH v2 0/5] libopenvswitch: Restructure the massive\n OVS library into two parts","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","From":"Timothy Redaelli via dev <ovs-dev@openvswitch.org>","Reply-To":"Timothy Redaelli <tredaelli@redhat.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ovs-dev-bounces@openvswitch.org","Sender":"\"dev\" <ovs-dev-bounces@openvswitch.org>"},"content":"From: Timothy Redaelli <tredaelli@redhat.com>\n\nWhen building with DPDK, every binary is linked against DPDK\nlibraries - including things like ovs-appctl, ovs-vsctl, and the\novsdb utilities that have no business depending on datapath code.\n\nThis series addresses that by splitting libopenvswitch into two\nlibraries:\n\n  - libopenvswitchutils: container datastructures, threading, I/O,\n    logging, and other general utilities that any OVS component needs.\n\n  - libopenvswitch: the existing datapath-related code, which now\n    depends on libopenvswitchutils.\n\nUtilities like the ovsdb suite and ovs-appctl can link against\nlibopenvswitchutils only, avoiding the DPDK dependency entirely.  The\nresult is a significant reduction in installed binary size:\n\n  pre-series:  279.37 MB\n  post-series: 185.47 MB  (~94 MB saved on Fedora 43 x86_64)\n\nAs part of the restructuring, the packets module is split into a\nnet-proto module (network protocol handling) and dp-packet (datapath\npacket operations), with a handful of function renames to clarify the\nseparation.  The public header openvswitch/packets.h is renamed to\nopenvswitch/net-proto.h accordingly.\n\nFuture work could split things further - vconn, ofpbuf, and netdev\nare candidates - though the ofp* dependency graph makes that harder\nto untangle.\n\nChanges since v1 (Aaron Conole <aconole@redhat.com>):\n  - Reordered: flow_tnl_equal removal moved to patch 1 as suggested by\n    David Marchand (independent cleanup, easier to review first)\n  - Fixed: flow_tnl_src()/flow_tnl_dst() moved from lib/dp-packet.c to\n    lib/flow.c as requested by David Marchand and Ilya Maximets\n  - Fixed: missing packet_set_ipv6_flow_label and packet_set_ipv6_tc\n    renames added to NEWS as pointed out by David Marchand\n  - Fixed: FreeBSD build - added sys/socket.h before netinet/in.h in\n    lib/net-proto.h, lib/dp-packet.c, and include/openvswitch/net-proto.h\n    as acknowledged by Aaron Conole\n  - Renamed: libovscommon -> libopenvswitchutils as suggested by\n    David Marchand (who preferred libopenvswitchutils or -utils)\n  - Renamed: include/openvswitch/packets.h -> include/openvswitch/net-proto.h\n    as suggested by Ilya Maximets\n\nTimothy Redaelli (5):\n  lib/packets: Remove flow_tnl_equal.\n  lib/net-proto: Create a new net-proto module for handling generic\n    network protocols.\n  lib/ct-state: Move ct-state macros to their own header.\n  lib/dp-packet: Fold the 'packets' module into dp-packets.\n  libs: Introduce libopenvswitchutils to isolate common routines.\n\n NEWS                                          |   18 +-\n configure.ac                                  |    2 +\n debian/rules                                  |    4 +-\n include/openvswitch/automake.mk               |    2 +-\n include/openvswitch/flow.h                    |    2 +-\n include/openvswitch/match.h                   |    2 +-\n include/openvswitch/meta-flow.h               |    2 +-\n .../openvswitch/{packets.h => net-proto.h}    |    7 +-\n lib/.gitignore                                |    1 +\n lib/automake.mk                               |  586 ++--\n lib/bfd.c                                     |    2 +-\n lib/bfd.h                                     |    2 +-\n lib/cfm.c                                     |    2 +-\n lib/cfm.h                                     |    1 -\n lib/classifier.c                              |    2 +-\n lib/conntrack-private.h                       |    1 -\n lib/conntrack.c                               |   12 +-\n lib/conntrack.h                               |    2 +-\n lib/ct-dpif.c                                 |    1 +\n lib/ct-dpif.h                                 |    3 +-\n lib/ct-state.h                                |   50 +\n lib/dhcp.h                                    |    1 -\n lib/dp-packet.c                               | 1472 +++++++++++\n lib/dp-packet.h                               |  111 +-\n lib/dpctl.c                                   |    1 -\n lib/dpif-netdev-extract-avx512.c              |    1 -\n lib/dpif-netdev-lookup-generic.c              |    2 +-\n lib/dpif-netdev-lookup.c                      |    1 +\n lib/dpif-netdev-private-extract.c             |    1 +\n lib/dpif-netdev-private-flow.h                |    1 +\n lib/dpif-netdev.c                             |    1 -\n lib/dpif-netdev.h                             |    1 -\n lib/dpif-netlink-rtnl.c                       |    1 +\n lib/dpif-netlink.c                            |    1 -\n lib/dpif-offload-dpdk-netdev.c                |    3 +-\n lib/dpif-offload-dpdk.c                       |    3 +\n lib/dpif.c                                    |    3 +-\n lib/dpif.h                                    |    1 -\n lib/flow.c                                    |   22 +-\n lib/flow.h                                    |  159 +-\n lib/ipf.c                                     |    2 +-\n lib/lacp.c                                    |    1 -\n lib/lacp.h                                    |    6 +-\n lib/libopenvswitchutils.pc.in                 |   11 +\n lib/libopenvswitchutils.sym.in                |    4 +\n lib/lldp/lldp.c                               |    1 -\n lib/lldp/lldpd-structs.h                      |    1 -\n lib/lldp/lldpd.c                              |    1 -\n lib/lldp/lldpd.h                              |    1 -\n lib/mac-learning.c                            |    2 +\n lib/mac-learning.h                            |    1 -\n lib/match.c                                   |    3 +-\n lib/mcast-snooping.h                          |    1 -\n lib/meta-flow.c                               |    5 +-\n lib/multipath.c                               |    1 -\n lib/net-proto.c                               |  893 +++++++\n lib/{packets.h => net-proto.h}                |  379 +--\n lib/netdev-afxdp.c                            |    1 -\n lib/netdev-bsd.c                              |    1 -\n lib/netdev-dpdk.c                             |    1 -\n lib/netdev-dummy.c                            |    1 -\n lib/netdev-linux.c                            |    9 +-\n lib/netdev-native-tnl.c                       |   10 +-\n lib/netdev-native-tnl.h                       |    1 -\n lib/netdev-provider.h                         |    1 -\n lib/netdev-vport.c                            |    1 -\n lib/netdev-windows.c                          |    1 -\n lib/netdev.c                                  |    1 -\n lib/netdev.h                                  |    1 -\n lib/nx-match.c                                |    2 +-\n lib/odp-execute-avx512.c                      |    4 +-\n lib/odp-execute-private.c                     |    1 +\n lib/odp-execute.c                             |    1 -\n lib/odp-util.c                                |    8 +-\n lib/odp-util.h                                |    1 +\n lib/ofp-ct.c                                  |    4 +-\n lib/ofp-ed-props.c                            |    2 -\n lib/ofp-match.c                               |    4 +-\n lib/ofp-parse.c                               |    2 +-\n lib/ofp-print.c                               |    1 -\n lib/ofp-util.c                                |    1 -\n lib/ovs-lldp.c                                |    1 -\n lib/ovs-lldp.h                                |    1 -\n lib/ovs-router.c                              |    1 -\n lib/packets.c                                 | 2351 -----------------\n lib/pcap-file.c                               |    1 -\n lib/route-table-bsd.c                         |    2 +-\n lib/route-table.c                             |    1 -\n lib/rstp-common.h                             |    1 -\n lib/rstp-state-machines.c                     |    1 -\n lib/rstp.c                                    |    1 -\n lib/rtnetlink.c                               |    2 +-\n lib/smap.c                                    |    2 +-\n lib/socket-util.c                             |    2 +-\n lib/stp.c                                     |    1 -\n lib/stream-ssl.c                              |    2 +-\n lib/stream-tcp.c                              |    1 -\n lib/stream-unix.c                             |    1 -\n lib/stream.c                                  |    1 -\n lib/tc.c                                      |    1 -\n lib/tnl-neigh-cache.c                         |    1 -\n lib/tnl-neigh-cache.h                         |    1 -\n lib/tnl-ports.h                               |    1 -\n lib/tun-metadata.c                            |    1 -\n lib/vconn.c                                   |    1 -\n ofproto/bond.c                                |    1 -\n ofproto/bond.h                                |    1 -\n ofproto/in-band.c                             |    1 -\n ofproto/netflow.c                             |    1 -\n ofproto/ofproto-dpif-ipfix.c                  |    1 -\n ofproto/ofproto-dpif-monitor.h                |    1 -\n ofproto/ofproto-dpif-sflow.c                  |    1 -\n ofproto/ofproto-dpif-upcall.c                 |    1 -\n ofproto/ofproto-dpif-xlate-cache.c            |    1 -\n ofproto/ofproto-dpif-xlate.c                  |    3 +-\n ofproto/ofproto.c                             |    1 -\n ofproto/tunnel.c                              |    1 -\n ovsdb/automake.mk                             |    6 +-\n tests/automake.mk                             |    8 +-\n tests/test-classifier.c                       |    2 +-\n tests/test-conntrack.c                        |    3 +-\n tests/test-csum.c                             |    6 +-\n tests/test-lib-route-table.c                  |    3 +-\n tests/test-netflow.c                          |    4 +-\n tests/test-netlink-conntrack.c                |    2 +\n tests/test-packets.c                          |    2 +-\n tests/test-rstp.c                             |    1 -\n tests/test-sflow.c                            |    2 +-\n tests/test-stp.c                              |    1 -\n utilities/automake.mk                         |   15 +-\n utilities/ovs-dpctl.c                         |    1 -\n utilities/ovs-ofctl.c                         |    2 +-\n vswitchd/automake.mk                          |    3 +-\n vswitchd/bridge.c                             |    1 -\n vtep/automake.mk                              |    2 +-\n 135 files changed, 3216 insertions(+), 3104 deletions(-)\n rename include/openvswitch/{packets.h => net-proto.h} (95%)\n create mode 100644 lib/ct-state.h\n create mode 100644 lib/libopenvswitchutils.pc.in\n create mode 100644 lib/libopenvswitchutils.sym.in\n create mode 100644 lib/net-proto.c\n rename lib/{packets.h => net-proto.h} (77%)\n delete mode 100644 lib/packets.c"}