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

Packets in udp_encap_node with offload flags set lead to assertion if udp encap format is not the same of payload format

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • IP
    • None

      Buffers (ipv6 packets) are set with the following flags:

      vnet_buffer_offload_flags_set (b, VNET_BUFFER_OFFLOAD_F_TCP_CKSUM);
      vnet_buffer_offload_flags_set (b, is_v4 * VNET_BUFFER_OFFLOAD_F_IP_CKSUM);

       
      Then are passed to udp_encap_node (6 over 4), that tries to calculate the checksum of the inner packet, assuming is v4, as the encapsulation format:
       

      always_inline void
       ip_udp_encap_one (vlib_main_t * vm, vlib_buffer_t * b0, u8 * ec0, word ec_len,
        u8 is_ip4)
       {
       vnet_calc_checksums_inline (vm, b0, is_ip4, !is_ip4);

       
      This leads to the following assertion:
       

      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00007f0871020859 in __GI_abort () at abort.c:79
      #2  0x00000000004076f3 in os_panic () at /hproxy-build/vpp/src/vpp/vnet/main.c:413
      #3  0x00007f08713712a9 in debugger () at /hproxy-build/vpp/src/vppinfra/error.c:84
      #4  0x00007f0871371027 in _clib_error (how_to_die=2, function_name=0x0, line_number=0, fmt=0x7f08723161a7 "%s:%d (%s) assertion `%s' fails")
          at /hproxy-build/vpp/src/vppinfra/error.c:143
      #5  0x00007f0871881191 in ip_calculate_l4_checksum (vm=0x7f0830ef8680, p0=0x1054bf4a80, sum0=3026482931687883008, payload_length=0, 
          iph=0x1054bf4b8e "`", ip_header_size=0, l4h=0x0) at /hproxy-build/vpp/src/vnet/ip/ip.h:205
      #6  0x00007f0871880f90 in ip4_tcp_udp_compute_checksum (vm=0x7f0830ef8680, p0=0x1054bf4a80, ip0=0x1054bf4b8e)
          at /hproxy-build/vpp/src/vnet/ip/ip4_forward.c:1367
      #7  0x00007f0871acfd7a in vnet_calc_ip4_checksums (vm=0x7f0830ef8680, b=0x1054bf4a80, ip4=0x1054bf4b8e, th=0x1054bf4bb6, uh=0x1054bf4bb6, 
          oflags=VNET_BUFFER_OFFLOAD_F_TCP_CKSUM) at /hproxy-build/vpp/src/vnet/interface_output.h:55
      #8  0x00007f0871acf962 in vnet_calc_checksums_inline (vm=0x7f0830ef8680, b=0x1054bf4a80, is_ip4=1, is_ip6=0)
          at /hproxy-build/vpp/src/vnet/interface_output.h:105
      #9  0x00007f0871acee6f in ip_udp_encap_two (vm=0x7f0830ef8680, b0=0x1054bf4a80, b1=0x1054bf53c0, ec0=0x7f0831c38780 "E", ec1=0x7f0831c38780 "E", 
          ec_len=28, is_v4=1 '\001') at /hproxy-build/vpp/src/vnet/udp/udp_inlines.h:138
      #10 0x00007f0871acdcb1 in udp_encap_inline (vm=0x7f0830ef8680, node=0x7f08317d9bc0, frame=0x7f0839a33a00, is_encap_v6=0)
          at /hproxy-build/vpp/src/vnet/udp/udp_encap_node.c:150
      #11 0x00007f0871acd8b7 in udp4_encap_node_fn (vm=0x7f0830ef8680, node=0x7f08317d9bc0, frame=0x7f0839a33a00)
          at /hproxy-build/vpp/src/vnet/udp/udp_encap_node.c:255
      #12 0x00007f08714ef0b8 in dispatch_node (vm=0x7f0830ef8680, node=0x7f08317d9bc0, type=VLIB_NODE_TYPE_INTERNAL, 
          dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x7f0839a33a00, last_time_stamp=1697806808876296) at /hproxy-build/vpp/src/vlib/main.c:975
      #13 0x00007f08714efaf6 in dispatch_pending_node (vm=0x7f0830ef8680, pending_frame_index=6, last_time_stamp=1697806808876296)
          at /hproxy-build/vpp/src/vlib/main.c:1134
      #14 0x00007f08714ea4c0 in vlib_main_or_worker_loop (vm=0x7f0830ef8680, is_main=1) at /hproxy-build/vpp/src/vlib/main.c:1600
      #15 0x00007f08714ec50a in vlib_main_loop (vm=0x7f0830ef8680) at /hproxy-build/vpp/src/vlib/main.c:1728
      #16 0x00007f08714ec2f2 in vlib_main (vm=0x7f0830ef8680, input=0x7f082de1dfa8) at /hproxy-build/vpp/src/vlib/main.c:2017
      #17 0x00007f087154e42e in thread0 (arg=139673157469824) at /hproxy-build/vpp/src/vlib/unix/main.c:671
      #18 0x00007f087138dc38 in clib_calljmp () at /hproxy-build/vpp/src/vppinfra/longjmp.S:123
      #19 0x00007ffc2160d3f0 in ?? ()
      #20 0x00007f087154df5e in vlib_unix_main (argc=80, argv=0x16612d0) at /hproxy-build/vpp/src/vlib/unix/main.c:751
      #21 0x0000000000406b23 in main (argc=80, argv=0x16612d0) at /hproxy-build/vpp/src/vpp/vnet/main.c:342
      

            mauro91 Mauro Sardara
            mauro91 Mauro Sardara
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: