From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E49DC48BE7 for ; Mon, 8 Jul 2019 04:33:00 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id E1C8C2064B for ; Mon, 8 Jul 2019 04:32:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="mPBscd5W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1C8C2064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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