On 22/06/2017 16:11, Dave Barach (dbarach) wrote:

Folks,

I’m having a hard time trying to convince an Intel Fortville (i40e) PMD / NIC to compute and insert TCP correct TCP checksums.

In addition to the typical struct rte_mbuf setup, I add the following:

  if (b->flags & VLIB_BUFFER_TCP_CHECKSUM_OFFLOAD)

    {

      mb->packet_type =

RTE_PTYPE_L2_ETHER | RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L4_TCP;

      mb->ol_flags = PKT_TX_TCP_CKSUM | PKT_TX_IPV4;

      mb->l2_len = 14;

      mb->l3_len = 20;

      mb->outer_l2_len = 0;

      mb->outer_l3_len = 0;

      mb->l4_len = 0;

    }

The inbound tcp->checksum is known to be zero.

The packets involved are the simplest case: 14-byte ethernet headers w/ type 0x800, 20-byte ipv4 headers, TCP (SYN,ACK) packet with some options.

Independent of port numbers / across multiple trials wireshark reports a constant checksum error of 0xe31.

abs(received checksum - computed checksum) = 0xe31.

Does this ring any bells?


Hi Dave,

Assuming that you are not using vector functions but the default xmit function with offload enabled, are you computing the pseudo-header checksum?

Also no need to setup PTYPE for TX.

Regards,
Sergio

Thanks… Dave



_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev


_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to