[v4,3/3] examples/ip_reassembly: enable IP checksum offload

Message ID 20190708043300.44295-3-jerinj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series None |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Jerin Jacob Kollanukkaran July 8, 2019, 4:33 a.m. UTC
  From: Sunil Kumar Kori <skori@marvell.com>

As per the documentation to use any IP offload features, application
must set required offload flags into mbuf->ol_flags.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
v4:
- Rebased to top of tree
- Fix check-gitlog.sh issues
---
 examples/ip_reassembly/main.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index fbd09341f..38b39be6b 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -353,6 +353,9 @@  reassemble(struct rte_mbuf *m, uint16_t portid, uint32_t queue,
 					struct rte_ether_hdr *);
 				ip_hdr = (struct rte_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);