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

Upstream: Improve getifaddrs()

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • openvswitch3.6
    • None
    • 5
    • False
    • False
    • Hide

      Please mark each item below with ( / ) if completed or ( x ) if incomplete:

      ( ) Integration test case are written and pass successfully


      ( ) The upstream pull request is merged upstream and pass CI

      Show
      Please mark each item below with ( / ) if completed or ( x ) if incomplete: ( ) Integration test case are written and pass successfully ( ) The upstream pull request is merged upstream and pass CI
    • rhel-10
    • None
    • rhel-net-ovs-dpdk
    • OVS/DPDK - Sprint 17 - East
    • 1

      This is tracking the upstream effort needed to deliver the feature request described below.


      In several places we use glibc's getifaddrs.

      In it's standard implementation (glibc's), this function makes 2 really expensive netlink calls:

      • GETLINK. This collects all interfaces (with full statistics, including inet ones because it does not use RTEXT_FILTER_SKIP_STATS)
      • GETADDR: This collects all the Eth/IPv4/IPv6 addresses in the system

      The obvious first thought is to use RTEXT_FILTER_SKIP_STATS in the first call but on second thought, why use GETLINK at all? The answer is the API exposed by libc.

      The struct returned by getifaddrs contains interface name and its addresses. However, GETADDR returns interface id alongside the addresses. So, the only purpose of the other, very expensive netlink command is to map interface ids to interface names.

      OVS already has the interface id <-> interface name mapping in the netdev_linux struct.

      Therefore, the best approach IMHO would be to replace the getifaddrs implementation altogether with one that only sends GETADDR.


              amorenoz@redhat.com Adrian Moreno
              amorenoz@redhat.com Adrian Moreno
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: