DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ori Kam <orika@nvidia.com>,
	viacheslavo@nvidia.com, ferruh.yigit@intel.com,
	thomas@monjalon.net
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC] ethdev: add sanity packet checks
Date: Tue, 9 Mar 2021 12:01:45 +0300	[thread overview]
Message-ID: <9e1388ac-27f7-aa1b-19e8-6acb6dfc3498@oktetlabs.ru> (raw)
In-Reply-To: <1614541699-99345-1-git-send-email-orika@nvidia.com>

On 2/28/21 10:48 PM, Ori Kam wrote:
> Currently, DPDK application can offload the checksum check,
> and report it in the mbuf.
>
> However, this approach doesn't work if the traffic
> is offloaded and should not arrive to the application.
>
> This commit introduces rte flow item that enables
> matching on the checksum of the L3 and L4 layers,
> in addition to other checks that can determine if
> the packet is valid.
> some of those tests can be packet len, data len,
> unsupported flags, and so on.
>
> The full check is HW dependent.
>
> Signed-off-by: Ori Kam <orika@nvidia.com>

In general, I strongly dislike the approach. If such checks are required,
it must be done per item basis. I.e. we should add non-header boolean
flags to IPv4, TCP, UDP etc items. E.g.

struct rte_flow_item_ipv4 {
        struct rte_ipv4_hdr hdr; /**< IPv4 header definition. */
        bool hdr_checksum_valid;
};

Also it will allow to filter by packets with invalid checksum as well and
redirect to dedicated Rx path or drop and/or count etc.


  parent reply	other threads:[~2021-03-09  9:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28 19:48 Ori Kam
2021-02-28 20:14 ` Thomas Monjalon
2021-03-04 10:00   ` Ori Kam
2021-03-04 10:46     ` Thomas Monjalon
2021-03-07 18:46       ` Ori Kam
2021-03-08 23:05         ` Ajit Khaparde
2021-03-09 19:21           ` Ori Kam
2021-03-09  9:01 ` Andrew Rybchenko [this message]
2021-03-09  9:11   ` Thomas Monjalon
2021-03-09 15:08     ` Ori Kam
2021-03-09 15:27       ` Andrew Rybchenko
2021-03-09 19:46         ` Ori Kam

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=9e1388ac-27f7-aa1b-19e8-6acb6dfc3498@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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).