From: Stephen Hemminger <stephen@networkplumber.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
Aman Singh <aman.deep.singh@intel.com>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: Re: [PATCH 5/6] net: add smaller IPv4 cksum function for simple cases
Date: Thu, 17 Oct 2024 09:24:37 -0700 [thread overview]
Message-ID: <20241017092431.75cf1b45@hermes.local> (raw)
In-Reply-To: <20241017142214.1669370-6-bruce.richardson@intel.com>
On Thu, 17 Oct 2024 15:22:12 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:
> There are multiple instances in the DPDK app folder where we set up an
> IP header and then compute the checksum field by direct addition of
> nine uint16_t values in the header (20 bytes less the cksum field).
> The existing rte_ip.h checksum function is more general than necessary
> here and requires that the checksum field is already set to zero -
> rather than having it skipped.
>
> Fix the code duplication present in the apps by creating a new
> rte_ipv4_cksum_simple function - taking the code from the existing
> testpmd icmpecho.c file - and using that in app/test, testpmd and
> testeventdev.
>
> Within that new function, we can adjust slightly how the typecasting to
> uint16_t is done, and thereby ensure that the app can all be compiled
> without -Wno-address-of-packed-member compiler flag.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
DPDK should use the same optimization as FreeBSD and Linux
and use 32 bit add's here.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
next prev parent reply other threads:[~2024-10-17 16:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 14:22 [PATCH 0/6] Reduce scope address-of-packed-member warning Bruce Richardson
2024-10-17 14:22 ` [PATCH 1/6] ip_frag: remove use of unaligned variable Bruce Richardson
2024-10-17 16:26 ` Stephen Hemminger
2024-10-17 16:42 ` Konstantin Ananyev
2024-10-17 14:22 ` [PATCH 2/6] efd: remove unnecessary packed attributes Bruce Richardson
2024-10-17 16:22 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 3/6] bus/ifpga: remove packed attribute Bruce Richardson
2024-10-17 14:52 ` Xu, Rosen
2024-10-17 16:25 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 4/6] pipeline: " Bruce Richardson
2024-10-17 14:24 ` Bruce Richardson
2024-10-17 16:25 ` Stephen Hemminger
2024-10-17 14:22 ` [PATCH 5/6] net: add smaller IPv4 cksum function for simple cases Bruce Richardson
2024-10-17 16:24 ` Stephen Hemminger [this message]
2024-10-17 17:01 ` Bruce Richardson
2024-10-17 17:15 ` Morten Brørup
2024-10-17 19:03 ` Bruce Richardson
2024-10-17 19:34 ` Stephen Hemminger
2024-10-18 0:32 ` Morten Brørup
2024-10-17 14:22 ` [PATCH 6/6] build: limit scope of packed member warning disabling Bruce Richardson
2024-10-17 16:21 ` [PATCH 0/6] Reduce scope address-of-packed-member warning Stephen Hemminger
2024-10-17 17:02 ` Bruce Richardson
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=20241017092431.75cf1b45@hermes.local \
--to=stephen@networkplumber.org \
--cc=aman.deep.singh@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=konstantin.v.ananyev@yandex.ru \
/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).