From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF154A00E6 for ; Mon, 8 Jul 2019 06:32:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4E64F1B952; Mon, 8 Jul 2019 06:32:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 11E145905 for ; Mon, 8 Jul 2019 06:32:52 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x684UdnR003216; Sun, 7 Jul 2019 21:32:51 -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-transfer-encoding : content-type; s=pfpt0818; bh=KWhbDc0zepXr35Tm/0gpz1MrGGda1ICYWVUPnwxMWNk=; b=mPBscd5Wp8oaN9lSFHuTXhQNNuz+uwhdjkXF8jtK258/wBYpmr/6Azyp+FQ9AhYnDSNA 2YcXvSFlE4ascg5dGmix0Ss+eKmIavsAtFC3HSnkS3wRUHJofS8FlfSVN3w1pvSmn01K pzyTg2EpP+ge9PSnWH9taeDgMy8FNVrN3nXsI5qhXQsc0TSk/OJo8BfGybugL2tcZ2A1 RfsR2WU7bWMZ/1jlZvDAZjvupxgWhTWtfDhLmO0avj7sVBA3OMyK/8U8CbGMbBr4NXA6 e6QbCTJKSe5XywGTUGnUVzjw5+fUtypn7qWgz5m/E8FxLYq+epsvEa/oItRrzDUPnFDm mA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2tju5j5j6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 07 Jul 2019 21:32:50 -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; Sun, 7 Jul 2019 21:32:49 -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; Sun, 7 Jul 2019 21:32:48 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id B294C3F703F; Sun, 7 Jul 2019 21:32:47 -0700 (PDT) From: To: , Konstantin Ananyev CC: , Sunil Kumar Kori Date: Mon, 8 Jul 2019 10:02:59 +0530 Message-ID: <20190708043300.44295-2-jerinj@marvell.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708043300.44295-1-jerinj@marvell.com> References: <1558349992-12237-1-git-send-email-skori@marvell.com> <20190708043300.44295-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-08_01:, , signatures=0 Subject: [dpdk-dev] [PATCH v4 2/3] examples/ip_fragmentation: enable IP checksum offload 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" From: Sunil Kumar Kori 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 Acked-by: Konstantin Ananyev --- v4: - Rebased to top of tree - Fix check-gitlog.sh issues --- examples/ip_fragmentation/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 85c0100f7..ccaf23ff0 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -357,12 +357,14 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, /* src addr */ rte_ether_addr_copy(&ports_eth_addr[port_out], ð_hdr->s_addr); - if (ipv6) + if (ipv6) { eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV6); - else + } else { eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4); + m->ol_flags |= (PKT_TX_IPV4 | PKT_TX_IP_CKSUM); + } } len += len2; -- 2.22.0