From patchwork Thu May 16 11:21:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kumar Kori X-Patchwork-Id: 53469 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 19CEA5F1C; Thu, 16 May 2019 13:22:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 66BC25B1E for ; Thu, 16 May 2019 13:22:11 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4GBKl4J019733 for ; Thu, 16 May 2019 04:22:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=MheiwcMW4A0qYreXVRo1FdeXN2XCy13d12OT/GkMqUE=; b=VpEpSRePhdD2/oVwinqlgMBteSupzJFS99G5F4DDqI008q/sHb5LSA74v7u8b7NHE4jA 3ZELOIGe4Xz8+sO/O6Ralb7Zs5emyKn6xgCmIdTOnNh6pD0frEyvMdPfYqpIgSBJgyTg RNZbeOiJGoosCd/NQPUVf5TcXFOuIdgBRPPNThDnqakbLUvRJ9Ry6QINoWVMBFq0rv8a ezqH78xh1ZGKyoCrkKLLb6FTeB+Rj0j+hH7QnkVTO7Tc6YMGrbcYYA9MNxD5wDEfBSgC JZH8QKEICHXAi/wYzwiYhb9KyYQ8nFpG5TcmA1MAzv65c3aTtRYfmDlXScGI9xQUWZG5 pA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2sh2rh12d8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 May 2019 04:22:10 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 16 May 2019 04:22:09 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 16 May 2019 04:22:09 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id 48E023F703F; Thu, 16 May 2019 04:22:09 -0700 (PDT) From: Sunil Kumar Kori To: CC: Date: Thu, 16 May 2019 16:51:56 +0530 Message-ID: <1558005716-30083-4-git-send-email-skori@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1558005716-30083-1-git-send-email-skori@marvell.com> References: <1558005716-30083-1-git-send-email-skori@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-16_09:, , signatures=0 Subject: [dpdk-dev] [PATCH 3/3] examples/ip_reassembly: Enabling IP checksum offload in mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Change-Id: Idce2db6b3e9437bcbe1ff42281fde42f36902c24 Signed-off-by: Sunil Kumar Kori --- 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 */