[v4,1/3] lib/librte_ip_frag: remove IP checkum offload flag
Checks
Commit Message
From: Sunil Kumar Kori <skori@marvell.com>
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 <skori@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
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(-)
Comments
08/07/2019 06:32, jerinj@marvell.com:
> From: Sunil Kumar Kori <skori@marvell.com>
>
> 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 <skori@marvell.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied, thanks
PS: I move the release notes from ABI to API changes
as it is an API behaviour change.
@@ -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
-----------------------
@@ -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);
@@ -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);