Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-3277

Upstream: Isolate DPDK linking to ovs-vswitchd only.

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • openvswitch3.7
    • None
    • 8
    • False
    • False
    • None
    • rhel-net-ovs-dpdk
    • ssg_networking

      When OVS is built with --with-dpdk, every binary (ovs-ofctl, ovs-vsctl, ovsdb-server, etc.) gets linked with all DPDK libraries. Only ovs-vswitchd actually uses DPDK. This causes inflated binary sizes for static builds (~14-16 MB instead of ~2-3 MB) and unnecessary shared library dependencies for shared builds.

      Fix implemented in:
      https://github.com/drizzt/ovs/tree/isolate-dpdk-linking-main

      A 3.6.0-friendly version, for backports, is also implemented in:
      https://github.com/drizzt/ovs/tree/isolate-dpdk-linking

      Changes:

      • acinclude.m4: Save/restore LIBS around DPDK dependency detection to prevent DPDK libraries from polluting global LIBS.
      • lib/automake.mk: Move DPDK sources into a separate libopenvswitchdpdk.la.
      • lib/dpdk-stub.c: Always compile into libopenvswitch (not conditionally).
      • lib/dpdk-link-stubs.c: New file with weak stubs for free_dpdk_buf and rte_get_tsc_hz, in a separate translation unit to avoid multiple definition conflicts when linking ovs-vswitchd.
      • vswitchd/automake.mk: Link only ovs-vswitchd against libopenvswitchdpdk.la and DPDK_LIBS.

      Result (static DPDK, stripped sizes):

      • ovs-vswitchd: ~25 MB (unchanged, has full DPDK)
      • ovs-ofctl, ovsdb-server, etc.: ~2-3 MB (down from ~14-16 MB)

              tredaell@redhat.com Timothy Mario Redaelli
              tredaell@redhat.com Timothy Mario Redaelli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: