DPDK usage discussions
 help / color / mirror / Atom feed
From: "Pfau, Johannes (ITIV)" <johannes.pfau@kit.edu>
To: "users@dpdk.org" <users@dpdk.org>
Subject: mlx5: Keeping packets with invalid CRC/FCS
Date: Thu, 14 Jul 2022 13:52:14 +0000	[thread overview]
Message-ID: <e0aacbdee7fa427ea2bf22dcb4f24c09@kit.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 2225 bytes --]

Hi all,

We're currently developing a low-cost DAQ system to record high-bandwidth
data from FPGA systems. We're using DPDK with Mellanox Connect-X5 cards, the
drivers and DPDK installed from the standard RHEL 8 repositories. We capture
raw ethernet (no L3) on 1:1 links to the FPGA devices to avoid all possible
overhead. So far this setup works great, we can handle 100 Gbit/s of traffic
even on a single core, but we can also distribute packets to multiple cores
depending on the ether type if required.

To save a few more bits in the transmission, we'd like to avoid encoding
packet counters into the data stream. In that case we have to make sure we
never miss any packets in recording though, even if the FCS is invalid.
There are two aspects involved, leading to two questions:

First, we need to store the CRC as well so that we can detect the invalid
packets later on in offline processing. Using RTE_ETH_RX_OFFLOAD_KEEP_CRC is
working fine, but it first confused me a lot: Both rte_pktmbuf_pkt_len and
rte_pktmbuf_data_len still report the length without CRC. If I just read 4
bytes more than announced in these functions, I can read the correct CRC. Is
it intentional that the 4 CRC bytes are not included in these counts?

Second, and this is a larger issue: We also need to receive packets with
invalid FCS. We don't really have a an idea how to actually inject packets
with invalid FCS for testing, but from the documentation I assume the mlx5
driver in default setup would drop invalid packets? There was an mailing
list discussing this for intel NICS
(https://mails.dpdk.org/archives/users/2021-June/005651.html), but I
couldn't find anything for mlx5. Does anybody know if the mlx5 driver also
offers an option to keep invalid packets?

Best regards,
Johannes

-- 
Karlsruhe Institute of Technology (KIT)
Institut für Technik der Informationsverarbeitung (ITIV)

M.Sc. Johannes Pfau
Research Associate

Engesserstr. 5
Building 30.10, Room 218.1
76131 Karlsruhe, Germany

Phone: +49 721 608-41939
E-mail: johannes.pfau@kit.edu 


Registered office:
Kaiserstraße 12, 76131 Karlsruhe, Germany


KIT – The Research University in the Helmholtz Association


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6301 bytes --]

             reply	other threads:[~2022-07-14 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 13:52 Pfau, Johannes (ITIV) [this message]
2022-07-18 10:14 ` Erez Ferber

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=e0aacbdee7fa427ea2bf22dcb4f24c09@kit.edu \
    --to=johannes.pfau@kit.edu \
    --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).