All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: <dev@dpdk.org>
Cc: <skori@marvell.com>
Subject: [dpdk-dev] [PATCH 3/3] examples/ip_reassembly: Enabling IP checksum offload in mbuf
Date: Thu, 16 May 2019 16:51:56 +0530	[thread overview]
Message-ID: <1558005716-30083-4-git-send-email-skori@marvell.com> (raw)
In-Reply-To: <1558005716-30083-1-git-send-email-skori@marvell.com>

Change-Id: Idce2db6b3e9437bcbe1ff42281fde42f36902c24
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 examples/ip_reassembly/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 17b55d4..686e364 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -353,6 +353,9 @@ struct rte_lpm6_config lpm6_config = {
 					struct ether_hdr *);
 				ip_hdr = (struct ipv4_hdr *)(eth_hdr + 1);
 			}
+
+			/* update offloading flags */
+			m->ol_flags |= (PKT_TX_IPV4 | PKT_TX_IP_CKSUM);
 		}
 		ip_dst = rte_be_to_cpu_32(ip_hdr->dst_addr);
 
@@ -391,6 +394,9 @@ struct rte_lpm6_config lpm6_config = {
 				eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
 				ip_hdr = (struct ipv6_hdr *)(eth_hdr + 1);
 			}
+
+			/* update offloading flags */
+			m->ol_flags |= PKT_TX_IPV6;
 		}
 
 		/* Find destination port */
-- 
1.8.3.1


  parent reply	other threads:[~2019-05-16 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 11:21 [dpdk-dev] [PATCH 0/3] Removing PKT_TX_IP_CKSUM from fragmentation/reassembly lib Sunil Kumar Kori
2019-05-16 11:21 ` [dpdk-dev] [PATCH 1/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags Sunil Kumar Kori
2019-05-16 11:21 ` [dpdk-dev] [PATCH 2/3] examples/ip_fragmentation: Enabling IP checksum offload in mbuf Sunil Kumar Kori
2019-05-16 11:21 ` Sunil Kumar Kori [this message]
2019-05-16 11:24 [dpdk-dev] [PATCH 0/3] Removing PKT_TX_IP_CKSUM from fragmentation/reassembly lib Sunil Kumar Kori
2019-05-16 11:24 ` [dpdk-dev] [PATCH 3/3] examples/ip_reassembly: Enabling IP checksum offload in mbuf Sunil Kumar Kori

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=1558005716-30083-4-git-send-email-skori@marvell.com \
    --to=skori@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.