[3/3] examples/ip_reassembly: Enabling IP checksum offload in mbuf

Message ID 1558005716-30083-4-git-send-email-skori@marvell.com (mailing list archive)
State Superseded, archived
Headers
Series Removing PKT_TX_IP_CKSUM from fragmentation/reassembly lib |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

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

Patch

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 */