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 72A14A00E6 for ; Thu, 16 May 2019 13:22:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 319785F0F; Thu, 16 May 2019 13:22:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 257FB5F0D for ; Thu, 16 May 2019 13:22:07 +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 x4GBKkhw019730 for ; Thu, 16 May 2019 04:22:06 -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=HcJM+fb+sWqUIYhVWBl7VgrQdVqG/qwguWXS8zBmisE=; b=CphLj837toqRvDztLx0Os4z13Tqud2Ly+VTbYqX8LkSqZwj9ozxJhVzH9B5PHMYynmAU IWmxK39ubqb2qGQctGiMCOK2drT79Gh2j2cvuzHYu8Wdh45pwjRGDBovvbcnaqIRfM5G my9TSYgnpKRYrV30hoOt1ZcYn5HTPIVvNZNMca2cIHOLZwIthfWtyxzzuCnsf45eF+g0 wFeugRRTfE3+dvKPARjSAMs2dePYDZkzkXNkG+EkWglttiSj+nzsoQ9splRlYTCMs5Zn gdNQPpsSU+XS4orYbH/yCeySQciLSvxqiBqjASf3G5Sk7K3s12qhqVPNKtEy/0VoF7e7 uA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2sh2rh12cx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 16 May 2019 04:22:06 -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: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; Thu, 16 May 2019 04:22:05 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id DA6A53F703F; Thu, 16 May 2019 04:22:04 -0700 (PDT) From: Sunil Kumar Kori To: CC: Date: Thu, 16 May 2019 16:51:54 +0530 Message-ID: <1558005716-30083-2-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 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-16_09:, , signatures=0 Subject: [dpdk-dev] [PATCH 1/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags 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" Currently PKT_TX_IP_CKSUM is being set into mbuf->ol_flags during fragmentation and reassemble operation implicitly. Because of this, application is forced to use checksum offload whether it is supported by platform or not. Also documentation does not provide any expected value of ol_flags in returned mbuf (reassembled or fragmented) so application will never come to know that which offloads are enabled. So transmission may be failed for the platforms which does not support checksum offload. Also, IPv6 does not contain any checksum field in header so setting mbuf->ol_flags with PKT_TX_IP_CKSUM is itself invalid. So removing mentioned flag from the library. Change-Id: I151272e75b8bfb776278f00455b34e399e4c38bc Signed-off-by: Sunil Kumar Kori --- lib/librte_ip_frag/rte_ipv4_fragmentation.c | 1 - lib/librte_ip_frag/rte_ipv4_reassembly.c | 3 --- lib/librte_ip_frag/rte_ipv6_reassembly.c | 3 --- 3 files changed, 7 deletions(-) diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c index a96fb03..13e60fb 100644 --- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c +++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c @@ -173,7 +173,6 @@ static inline void __free_fragments(struct rte_mbuf *mb[], uint32_t num) fragment_offset = (uint16_t)(fragment_offset + out_pkt->pkt_len - sizeof(struct ipv4_hdr)); - out_pkt->ol_flags |= PKT_TX_IP_CKSUM; out_pkt->l3_len = sizeof(struct ipv4_hdr); /* Write the fragment to the output list */ diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c index 1029b7a..4e20431 100644 --- a/lib/librte_ip_frag/rte_ipv4_reassembly.c +++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c @@ -66,9 +66,6 @@ struct rte_mbuf * m = fp->frags[IP_FIRST_FRAG_IDX].mb; fp->frags[IP_FIRST_FRAG_IDX].mb = NULL; - /* update mbuf fields for reassembled packet. */ - m->ol_flags |= PKT_TX_IP_CKSUM; - /* update ipv4 header for the reassembled packet */ ip_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, m->l2_len); diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c index 855e3f7..eb8b849 100644 --- a/lib/librte_ip_frag/rte_ipv6_reassembly.c +++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c @@ -89,9 +89,6 @@ struct rte_mbuf * m = fp->frags[IP_FIRST_FRAG_IDX].mb; fp->frags[IP_FIRST_FRAG_IDX].mb = NULL; - /* update mbuf fields for reassembled packet. */ - m->ol_flags |= PKT_TX_IP_CKSUM; - /* update ipv6 header for the reassembled datagram */ ip_hdr = rte_pktmbuf_mtod_offset(m, struct ipv6_hdr *, m->l2_len); -- 1.8.3.1