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 52296C48BE7 for ; Mon, 8 Jul 2019 04:32:52 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id CCCCA2064B for ; Mon, 8 Jul 2019 04:32:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="srirDt2d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCCCA2064B 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 4CC31397D; Mon, 8 Jul 2019 06:32:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1E8E3325F for ; Mon, 8 Jul 2019 06:32:47 +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 x684U7Cb006130; Sun, 7 Jul 2019 21:32:46 -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=VNOBm1Fh/9eVT3pSDbgjTe+X2FhCJ0Z7R/6suNAXlYw=; b=srirDt2dId3CvYaL+VlV30oe+tpNgXTLQvRhVZ+X0Xx1mxH/tE11B5aSDGxjyJMPuSMz E0cdsxau9xudzVbI/xOhYJzXEcqCYhMEYw/EoCr0y2NbZqbdavyNy3aYqbVWMs1kezoQ mf5m974uN5qEBhKfCEkEi0xvmqGg8Xuqu+Ap7kXTeAfTFRUag7B44qLoCx9e7K/xwxwi pFzSqaISYhgm93fmn/5ONetCMIpj7KZFtgmbavIlKltBOFOhzjLV9PfxHM9iiXHH22pl R4X98qalB4FGYHnxXSE+g/2sL/LyGmaGeKVIrInu5HP1bj+NK8PZzQguyxFEkRAB28pn qA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2tjs0nx4pd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 07 Jul 2019 21:32:46 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 7 Jul 2019 21:32:45 -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:45 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 97BE23F703F; Sun, 7 Jul 2019 21:32:43 -0700 (PDT) From: To: , John McNamara , Marko Kovacevic , Konstantin Ananyev CC: , Sunil Kumar Kori Date: Mon, 8 Jul 2019 10:02:58 +0530 Message-ID: <20190708043300.44295-1-jerinj@marvell.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <1558349992-12237-1-git-send-email-skori@marvell.com> References: <1558349992-12237-1-git-send-email-skori@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 1/3] lib/librte_ip_frag: remove IP checkum offload flag 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 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. Signed-off-by: Sunil Kumar Kori Acked-by: Konstantin Ananyev --- v4: - Update release notes --- doc/guides/rel_notes/release_19_08.rst | 15 +++++++++++++++ lib/librte_ip_frag/rte_ipv4_reassembly.c | 3 --- lib/librte_ip_frag/rte_ipv6_reassembly.c | 3 --- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/guides/rel_notes/release_19_08.rst b/doc/guides/rel_notes/release_19_08.rst index defbc5e27..ad9cbf4a2 100644 --- a/doc/guides/rel_notes/release_19_08.rst +++ b/doc/guides/rel_notes/release_19_08.rst @@ -281,6 +281,21 @@ ABI Changes * bbdev: New operations and parameters added to support new 5GNR operations. The bbdev ABI is still kept experimental. +* ip_fragmentation: IP fragmentation library converts input mbuf into fragments + using input MTU size via ``rte_ipv4_fragment_packet`` interface. + Once fragmentation is done, each ``mbuf->ol_flags`` are set to enable IP + checksum H/W offload irrespective of the platform capability. + Cleared IP checksum H/W offload flag from the library. The application must + set this flag if it is supported by the platform and application wishes to + use it. + +* ip_reassembly: IP reassembly library converts the list of fragments into a + reassembled packet via ``rte_ipv4_frag_reassemble_packet`` interface. + Once reassembly is done, ``mbuf->ol_flags`` are set to enable IP checksum H/W + offload irrespective of the platform capability. Cleared IP checksum H/W + offload flag from the library. The application must set this flag if it is + supported by the platform and application wishes to use it. + Shared Library Versions ----------------------- diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c index b7b92ed28..1dda8aca0 100644 --- a/lib/librte_ip_frag/rte_ipv4_reassembly.c +++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c @@ -66,9 +66,6 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp) 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 rte_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 169b01a5d..ad0105518 100644 --- a/lib/librte_ip_frag/rte_ipv6_reassembly.c +++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c @@ -89,9 +89,6 @@ ipv6_frag_reassemble(struct ip_frag_pkt *fp) 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 rte_ipv6_hdr *, m->l2_len); -- 2.22.0