Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1727

corrupted source address when using GSO with IPv6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Open
    • Icon: Medium Medium
    • None
    • 19.08
    • Devices, SR
    • None

      EDIT: Removed references to segment routing as this can be reproduced without it. Added steps to reproduce.

      reproduced in versions:

      v19.04.2-rc0~20-g4df8ab00d

      v19.08-rc0~711-g198cba8be~b3278

       

      Two machines running VPP, connected by dpdk interface. Setup one tap interface on each VPP, test end-to-end communication. Enabling GSO on the taps causes the source IPv6 addresses of TCP and UDP packets to be randomly modified in-transit.

      -node 1:
      vppctl create tap host-ip6-addr 2001::1:1/120 host-if-name vpp1
      vppctl set int ip address tap0 2001::1:2/120
      vppctl set int state tap0 up
      vppctl set int mtu 1450 tap0

      vppctl set int ip address GigabitEthernet0/9/0 2001::3:1/120
      vppctl set int state GigabitEthernet0/9/0 up
      vppctl ip route add 2001::2:0/120 via 2001::3:2 GigabitEthernet0/9/0

      ip link set dev vpp1 up
      ip route add 2001::2:0/120 via 2001::1:2

      -node 2:
      vppctl create tap host-ip6-addr 2001::2:1/120 host-if-name vpp1
      vppctl set int ip address tap0 2001::2:2/120
      vppctl set int state tap0 up
      vppctl set int mtu 1450 tap0

      vppctl set int ip address GigabitEthernet0/9/0 2001::3:2/120
      vppctl set int state GigabitEthernet0/9/0 up
      vppctl ip route add 2001::1:0/120 via 2001::3:1 GigabitEthernet0/9/0

      ip link set dev vpp1 up
      ip route add 2001::1:0/120 via 2001::2:2

      -ping end-to-end, wait for neighbor discovery
      root@node2: ping 2001::1:1 -I vpp1 -6 -c 20 -W 3

      -test TCP connectivity
      root@node2: nc -6dl 12345
      root@node1: echo "test" | nc -6q 1 2001::2:1 12345

      -repeat test with GSO enabled
      root@node2: vppctl set tap gso tap0 enable
      root@node2: nc -6dl 12345

      root@node1: vppctl set tap gso tap0 enable
      root@node1: echo "test" | nc -6q 1 2001::2:1 12345

      Here the connection fails. Packet trace shows the source IPv6 address of packets received on node2 dpdk-input is not the same as when the packets left node1 dpdk-output. Specifically the second segment, eg. 2001::1:1 becomes 2001:x::1:1 though the actual value of x seems to be different for each packet.
       

        1. vpp1_api_trace.txt
          28 kB
          Samuel Eliáš
        2. vpp1_packet_trace.log
          7 kB
          Samuel Eliáš
        3. vpp1-trace.api
          16 kB
          Samuel Eliáš
        4. vpp2_api_trace.txt
          18 kB
          Samuel Eliáš
        5. vpp2_packet_trace.log
          10 kB
          Samuel Eliáš
        6. vpp2-trace.api
          12 kB
          Samuel Eliáš

            sykazmi Mohsin Kazmi
            selias Samuel Eliáš
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: