From: Sunil Kumar Kori Date: Mon, 8 Jul 2019 04:32:58 +0000 (+0530) Subject: ip_frag: remove IP checkum offload flag X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e29fc44370c23e3018af3eaae476568410cd6fd0;p=dpdk.git ip_frag: remove IP checkum offload flag 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 --- diff --git a/doc/guides/rel_notes/release_19_08.rst b/doc/guides/rel_notes/release_19_08.rst index defbc5e27c..ccdcb7d259 100644 --- a/doc/guides/rel_notes/release_19_08.rst +++ b/doc/guides/rel_notes/release_19_08.rst @@ -240,6 +240,21 @@ API Changes announced at least one release before the ABI change is made. There are no ABI breaking changes planned. +* ip_frag: 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_frag: 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. + ABI Changes ----------- diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c index b7b92ed285..1dda8aca02 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 169b01a5dc..ad01055184 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);