On 5/11/26 6:03 PM, Timothy Redaelli via dev wrote:
> When building with DPDK, every binary is linked against DPDK libraries -
> including things like ovs-appctl, ovs-vsctl, and the ovsdb utilities that
> have no business depending on datapath code.
>
> This series addresses that by splitting libopenvswitch into two libraries:
>
> - libopenvswitchutils: container datastructures, threading, I/O, logging,
> and other general utilities that any OVS component needs.
>
> - libopenvswitch: the existing datapath-related code, which now depends
> on libopenvswitchutils.
>
> Utilities like the ovsdb suite and ovs-appctl can link against
> libopenvswitchutils only, avoiding the DPDK dependency entirely. The
> result is a significant reduction in installed binary size:
>
> pre-series: 279.37 MB
> post-series: 185.47 MB (~94 MB saved on Fedora 43 x86_64)
>
> As part of the restructuring, the packets module is split into a net-proto
> module (network protocol handling) and dp-packet (datapath packet
> operations), with a handful of function renames to clarify the separation.
> The public header openvswitch/packets.h is renamed to
> openvswitch/net-proto.h accordingly.
>
> Future work could split things further - vconn, ofpbuf, and netdev are
> candidates - though the ofp* dependency graph makes that harder to
> untangle.
>
> Changes since v3:
> - Rebased on current main (resolved conflict in NEWS).
>
> Changes since v2:
> - Fixed checkpatch warnings and errors (cast spacing, operator spacing,
> line length, for-loop whitespace, commit subject length).
> - Separated the public header rename into its own commit for clarity.
> - Moved dirs.h from libopenvswitch to libopenvswitchutils sources
> to be consistent with dirs.c.
>
> Changes since v1 (Aaron Conole <[email protected]>):
> - Reordered: flow_tnl_equal removal moved to patch 1 as suggested by
> David Marchand (independent cleanup, easier to review first)
> - Fixed: flow_tnl_src()/flow_tnl_dst() moved from lib/dp-packet.c to
> lib/flow.c as requested by David Marchand and Ilya Maximets
> - Fixed: missing packet_set_ipv6_flow_label and packet_set_ipv6_tc
> renames added to NEWS as pointed out by David Marchand
> - Fixed: FreeBSD build - added sys/socket.h before netinet/in.h in
> lib/net-proto.h, lib/dp-packet.c, and include/openvswitch/net-proto.h
> as acknowledged by Aaron Conole
> - Renamed: libovscommon -> libopenvswitchutils as suggested by David
> Marchand (who preferred libopenvswitchutils or -utils)
> - Renamed: include/openvswitch/packets.h ->
> include/openvswitch/net-proto.h as suggested by Ilya Maximets
I think, there was some misunderstanding here. What I meant is that we
should not create a new header. There is no point moving functions out
of packets.h. Everything that's in net-proto.c/h should just stay in
packets.c/h. This will save us a lot of function renaming and moving
around. I'm also not sure if it is necessary to move other things like
pop_mpls into dp-packet, can they not stay in packets.c/h ?
[...]
> create mode 100644 lib/net-proto.c
> rename lib/{packets.h => net-proto.h} (75%)
> delete mode 100644 lib/packets.c
As we can see here, this is mostly just a rename with a lot of seemingly
unnecessary code movement. Or is it actually necessary?
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev