From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5C7CAA05D3 for ; Mon, 20 May 2019 13:00:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF1CE56A3; Mon, 20 May 2019 13:00:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 16A584F91 for ; Mon, 20 May 2019 13:00:08 +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 x4KAvCWf000304; Mon, 20 May 2019 04:00:07 -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=r1LOON6pJx20B7VdXxH6oGO6Sv+OgaDPEae0pPg7DOM=; b=yDZdR4o5DKK1EXvKuy5hUlDBX1JIQmJVjU1N/qriPDZfLKBoJx4k6J0kB5z+hSpK+PK5 66Qp1QuE02OvW8R2J/8p0uXoHquCS+5cjRknAElOt8UgALTMPg9ZHHr8iFo9gFahNBSw le4ozXMAkrOggT/RneMbUvD2hb9QrzoJQqL31t2FlaaIgFYgBIVkCf8CKX2oMSuZ4hzN N5+pBdxHxv3HJ09kdgI+3RF/duW6WI9iMVlH6rZTS0zNMXhqv77UL0fxWog8gkbh+DHu cRy21d87kN3NGirQY8FRuC0Cn2eMGfj3ginzPmmfoCWAcf4J6dHMKvSYjKOiRRanWG5m Aw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2sjhjjqsbf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 May 2019 04:00:07 -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; Mon, 20 May 2019 04:00:05 -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; Mon, 20 May 2019 04:00:05 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id DE63F3F7044; Mon, 20 May 2019 04:00:04 -0700 (PDT) From: Sunil Kumar Kori To: Konstantin Ananyev CC: , Sunil Kumar Kori Date: Mon, 20 May 2019 16:29:50 +0530 Message-ID: <1558349992-12237-1-git-send-email-skori@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1558006933-32247-3-git-send-email-skori@marvell.com> References: <1558006933-32247-3-git-send-email-skori@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-20_05:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 1/2] examples/ip_fragmentation: 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" 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 --- 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 e90a61e..719d6f4 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -354,10 +354,12 @@ struct rte_lpm6_config lpm6_config = { /* src addr */ ether_addr_copy(&ports_eth_addr[port_out], ð_hdr->s_addr); - if (ipv6) + if (ipv6) { eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv6); - else + } else { eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4); + m->ol_flags |= (PKT_TX_IPV4 | PKT_TX_IP_CKSUM); + } } len += len2; -- 1.8.3.1