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

Test Plan: Improve getifaddrs()

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

      None

      Show
      None
    • False
    • Hide

      ( ) The new test plan is aligned with the epic's acceptance criteria

      ( ) The test plan/test case pass successfully on all non blocking functions of the feature

      Show
      ( ) The new test plan is aligned with the epic's acceptance criteria ( ) The test plan/test case pass successfully on all non blocking functions of the feature
    • rhel-10
    • None

      This task is tracking the test case writing activities to cover 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.

              ovs-qe Openvswtich Quality Engineering Bot
              amorenoz@redhat.com Adrian Moreno
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: