DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicolas PLANEL <nplanel@cisco.com>
To: aman.deep.singh@intel.com
Cc: dev@dpdk.org
Subject: [PATCH] app/test-pmd: enable hw checksum offload for txonly
Date: Wed, 26 Feb 2025 14:41:47 +0100	[thread overview]
Message-ID: <20250226134147.33487-1-nplanel@cisco.com> (raw)

This patch fix txonly forward mode, as it was lacking of MBUF
offload flags for IPv4 and UDP when the hardware support it.

Signed-off-by: Nicolas PLANEL <nplanel@cisco.com>
---
 app/test-pmd/txonly.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 59d821a22d6f..bdcf6ea66008 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -334,6 +334,10 @@ pkt_burst_transmit(struct fwd_stream *fs)
 		ol_flags |= RTE_MBUF_F_TX_QINQ;
 	if (tx_offloads & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT)
 		ol_flags |= RTE_MBUF_F_TX_MACSEC;
+	if (tx_offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)
+		ol_flags |= RTE_MBUF_F_TX_IP_CKSUM;
+	if (tx_offloads & RTE_ETH_TX_OFFLOAD_UDP_CKSUM)
+		ol_flags |= RTE_MBUF_F_TX_UDP_CKSUM;
 
 	/*
 	 * Initialize Ethernet header.
-- 
2.43.0


                 reply	other threads:[~2025-02-26 13:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250226134147.33487-1-nplanel@cisco.com \
    --to=nplanel@cisco.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@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).