DPDK usage discussions
 help / color / mirror / Atom feed
From: Julien Castets <castets.j@gmail.com>
To: users@dpdk.org
Subject: Re: [dpdk-users] .hw_strip_crc weird behavior with small UDP packets
Date: Tue, 2 Feb 2016 13:50:15 +0100	[thread overview]
Message-ID: <CADF714a6s2c15thkBRH=5PC+ttPmuvCqy=OdC33cvy=eyCKEWw@mail.gmail.com> (raw)
In-Reply-To: <CADF714YNjbpOXjW8Ezx0scuc1ihi_Lkh=D909WL4D1nik2TE1Q@mail.gmail.com>

It turns out the problem comes from a Cisco bug, not from DPDK.


First, I did some miscalculations, making me think the issue came from
DPDK — and it wasn't.

> * in case 1, why data_len = 60 and not 56, since hw_strip_crc=1? And
> why the CRC is present at the end? (C6 63 C2 CF)

data_len is 60 because the minimal Ethernet frame size is 64 bytes and
not 60, so after stripping the CRC by the hardware, the size is
reduced by 4. Which is normal. The last four bytes don't correspond to
the CRC though and should be 0 (explained below).

> * case 2 seems totally normal: the CRC is not present

Yes, that's normal

> * for case 3, from what I understand, if hw_strip_crc is set to 0 the
> ixgbe ddriver should remove the CRC
> (http://dpdk.org/browse/dpdk/tree/drivers/net/ixgbe/ixgbe_rxtx.c#n1399).
> Why pkt len is 60 here? And why is the CRC present at the end (F5 8D
> CB 7C)?

Exactly the same case than case 1. data_len is normal (but here the
CRC is stripped by the driver and not by the hardware), and as in case
1, the last four bytes should be 0 but aren't.

> * case 4 seems ok, the CRC is absent, as it has been removed by the driver

Yes, that's normal.


The problem is my network topology: my NAT software receives traffic
from a Cisco Nexus 9000 which is buggy. When the Nexus untags a packet
of 64 bytes (the minimal Ethernet size), it adds an extra four bytes
padding before the CRC — which is expected. However, those bytes
should always be zeros, but here they are random, hence my checksum
issue.


Sorry for the noise,
-- 
Julien Castets

      reply	other threads:[~2016-02-02 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 16:51 Julien Castets
2016-02-02 12:50 ` Julien Castets [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADF714a6s2c15thkBRH=5PC+ttPmuvCqy=OdC33cvy=eyCKEWw@mail.gmail.com' \
    --to=castets.j@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).