Timothy Redaelli notes that, for example, when building with DPDK - EVERY
binary object is linked to DPDK libraries - which includes things like
ovs-appctl, ovs-vsctl, etc.
This is a first cut at improving things. Create a separate libovscommon
library that for example, the ovsdb-* suite, and some ovs-* utilities can
use rather than linking to the large libopenvswitch library. This improves
the situation somewhat:
pre-series binary file usage: 279.37 MB
post-series binary file usage: 185.47 MB
There is additional work we can do, but I spent enough time ripping apart
dependencies to save almost 100M on disk (on my fedora 43 x86_64 system).
There are additional areas that could be refactored, for instance the
vconn and ofpbuf code could be extracted to shrink ovs-ofctl/ovs-vsctl
to see additional savings.
The patch is split up so that all the beginning work is mostly about moving
code around, and the final patch introduces what I'm calling the
libovscommon library. I've updated the NEWS file since this is API/ABI
breaking changes.
Aaron Conole (5):
lib/net-proto: Create a new net-proto module for handling generic
network protocols.
lib/ct-state: Move ct-state macros to their own header.
lib/packets: Remove flow_tnl_equal.
lib/dp-packet: Fold the 'packets' module into dp-packets.
libs: Introduce libovscommon to isolate common routines.
NEWS | 7 +-
configure.ac | 2 +
debian/rules | 4 +-
lib/.gitignore | 1 +
lib/automake.mk | 586 +++----
lib/bfd.c | 2 +-
lib/bfd.h | 2 +-
lib/cfm.c | 2 +-
lib/cfm.h | 1 -
lib/classifier.c | 2 +-
lib/conntrack-private.h | 1 -
lib/conntrack.c | 12 +-
lib/conntrack.h | 2 +-
lib/ct-dpif.c | 1 +
lib/ct-dpif.h | 3 +-
lib/ct-state.h | 50 +
lib/dhcp.h | 1 -
lib/dp-packet.c | 1408 +++++++++++++++++
lib/dp-packet.h | 107 +-
lib/dpctl.c | 1 -
lib/dpif-netdev-extract-avx512.c | 1 -
lib/dpif-netdev-lookup-generic.c | 2 +-
lib/dpif-netdev-lookup.c | 1 +
lib/dpif-netdev-private-extract.c | 1 +
lib/dpif-netdev-private-flow.h | 1 +
lib/dpif-netdev.c | 1 -
lib/dpif-netdev.h | 1 -
lib/dpif-netlink-rtnl.c | 1 +
lib/dpif-netlink.c | 1 -
lib/dpif-offload-dpdk-netdev.c | 3 +-
lib/dpif-offload-dpdk.c | 3 +
lib/dpif.c | 3 +-
lib/dpif.h | 1 -
lib/flow.c | 10 +-
lib/flow.h | 159 +-
lib/ipf.c | 2 +-
lib/lacp.c | 1 -
lib/lacp.h | 6 +-
lib/libovscommon.pc.in | 11 +
lib/libovscommon.sym.in | 4 +
lib/lldp/lldp.c | 1 -
lib/lldp/lldpd-structs.h | 1 -
lib/lldp/lldpd.c | 1 -
lib/lldp/lldpd.h | 1 -
lib/mac-learning.c | 2 +
lib/mac-learning.h | 1 -
lib/match.c | 3 +-
lib/mcast-snooping.h | 1 -
lib/meta-flow.c | 5 +-
lib/multipath.c | 1 -
lib/net-proto.c | 893 +++++++++++
lib/{packets.h => net-proto.h} | 374 +----
lib/netdev-afxdp.c | 1 -
lib/netdev-bsd.c | 1 -
lib/netdev-dpdk.c | 1 -
lib/netdev-dummy.c | 1 -
lib/netdev-linux.c | 9 +-
lib/netdev-native-tnl.c | 10 +-
lib/netdev-native-tnl.h | 1 -
lib/netdev-provider.h | 1 -
lib/netdev-vport.c | 1 -
lib/netdev-windows.c | 1 -
lib/netdev.c | 1 -
lib/netdev.h | 1 -
lib/nx-match.c | 2 +-
lib/odp-execute-avx512.c | 4 +-
lib/odp-execute-private.c | 1 +
lib/odp-execute.c | 1 -
lib/odp-util.c | 8 +-
lib/odp-util.h | 1 +
lib/ofp-ct.c | 2 +
lib/ofp-ed-props.c | 2 -
lib/ofp-match.c | 2 +
lib/ofp-parse.c | 2 +-
lib/ofp-print.c | 1 -
lib/ofp-util.c | 1 -
lib/ovs-lldp.c | 1 -
lib/ovs-lldp.h | 1 -
lib/ovs-router.c | 1 -
lib/packets.c | 2277 ----------------------------
lib/pcap-file.c | 1 -
lib/route-table-bsd.c | 2 +-
lib/route-table.c | 1 -
lib/rstp-common.h | 1 -
lib/rstp-state-machines.c | 1 -
lib/rstp.c | 1 -
lib/rtnetlink.c | 2 +-
lib/smap.c | 2 +-
lib/socket-util.c | 2 +-
lib/stp.c | 1 -
lib/stream-ssl.c | 2 +-
lib/stream-tcp.c | 1 -
lib/stream-unix.c | 1 -
lib/stream.c | 1 -
lib/tc.c | 1 -
lib/tnl-neigh-cache.c | 1 -
lib/tnl-neigh-cache.h | 1 -
lib/tnl-ports.h | 1 -
lib/tun-metadata.c | 1 -
lib/vconn.c | 1 -
ofproto/bond.c | 1 -
ofproto/bond.h | 1 -
ofproto/in-band.c | 1 -
ofproto/netflow.c | 1 -
ofproto/ofproto-dpif-ipfix.c | 1 -
ofproto/ofproto-dpif-monitor.h | 1 -
ofproto/ofproto-dpif-sflow.c | 1 -
ofproto/ofproto-dpif-upcall.c | 1 -
ofproto/ofproto-dpif-xlate-cache.c | 1 -
ofproto/ofproto-dpif-xlate.c | 3 +-
ofproto/ofproto.c | 1 -
ofproto/tunnel.c | 1 -
ovsdb/automake.mk | 6 +-
tests/automake.mk | 8 +-
tests/test-classifier.c | 2 +-
tests/test-conntrack.c | 1 +
tests/test-csum.c | 6 +-
tests/test-lib-route-table.c | 3 +-
tests/test-netflow.c | 4 +-
tests/test-netlink-conntrack.c | 2 +
tests/test-packets.c | 2 +-
tests/test-rstp.c | 1 -
tests/test-sflow.c | 2 +-
tests/test-stp.c | 1 -
utilities/automake.mk | 15 +-
utilities/ovs-dpctl.c | 1 -
utilities/ovs-ofctl.c | 2 +-
vswitchd/automake.mk | 3 +-
vswitchd/bridge.c | 1 -
vtep/automake.mk | 2 +-
130 files changed, 3113 insertions(+), 3016 deletions(-)
create mode 100644 lib/ct-state.h
create mode 100644 lib/libovscommon.pc.in
create mode 100644 lib/libovscommon.sym.in
create mode 100644 lib/net-proto.c
rename lib/{packets.h => net-proto.h} (77%)
delete mode 100644 lib/packets.c
--
2.51.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev