All of lore.kernel.org
 help / color / mirror / Atom feed
From: <jerinj@marvell.com>
To: <dev@dpdk.org>, John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: <thomas@monjalon.net>, Sunil Kumar Kori <skori@marvell.com>
Subject: [dpdk-dev] [PATCH v4 1/3] lib/librte_ip_frag: remove IP checkum offload flag
Date: Mon, 8 Jul 2019 10:02:58 +0530	[thread overview]
Message-ID: <20190708043300.44295-1-jerinj@marvell.com> (raw)
In-Reply-To: <1558349992-12237-1-git-send-email-skori@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>
---
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


  parent reply	other threads:[~2019-07-08  4:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 11:24 [dpdk-dev] [PATCH 0/3] Removing PKT_TX_IP_CKSUM from fragmentation/reassembly lib Sunil Kumar Kori
2019-05-16 11:24 ` [dpdk-dev] [PATCH 1/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags Sunil Kumar Kori
2019-05-16 11:24 ` [dpdk-dev] [PATCH 2/3] examples/ip_fragmentation: Enabling IP checksum offload in mbuf Sunil Kumar Kori
2019-05-16 11:24 ` [dpdk-dev] [PATCH 3/3] examples/ip_reassembly: " Sunil Kumar Kori
2019-05-16 11:42 ` [dpdk-dev] [PATCH v2 0/3] Removing PKT_TX_IP_CKSUM from fragmentation/reassembly lib Sunil Kumar Kori
2019-05-16 11:42   ` [dpdk-dev] [PATCH v2 1/3] lib/librte_ip_frag: Remove PKT_TX_IP_CKSUM offload flags Sunil Kumar Kori
2019-05-18 15:18     ` Ananyev, Konstantin
2019-06-26 21:10       ` Thomas Monjalon
2019-07-04 16:52         ` Thomas Monjalon
2019-07-05  8:31           ` Ananyev, Konstantin
2019-05-16 11:42   ` [dpdk-dev] [PATCH v2 2/3] examples/ip_fragmentation: Enabling IP checksum offload in mbuf Sunil Kumar Kori
2019-05-18 15:21     ` Ananyev, Konstantin
2019-05-20  8:09       ` Sunil Kumar Kori
2019-05-20  8:15         ` Ananyev, Konstantin
2019-05-20 10:59     ` [dpdk-dev] [PATCH v3 1/2] " Sunil Kumar Kori
2019-05-20 10:59       ` [dpdk-dev] [PATCH v3 2/2] examples/ip_reassembly: " Sunil Kumar Kori
2019-05-20 11:29         ` Ananyev, Konstantin
2019-05-20 11:28       ` [dpdk-dev] [PATCH v3 1/2] examples/ip_fragmentation: " Ananyev, Konstantin
2019-07-08  4:32       ` jerinj [this message]
2019-07-08  4:32         ` [dpdk-dev] [PATCH v4 2/3] examples/ip_fragmentation: enable IP checksum offload jerinj
2019-07-08  4:33         ` [dpdk-dev] [PATCH v4 3/3] examples/ip_reassembly: " jerinj
2019-07-08  9:07         ` [dpdk-dev] [PATCH v4 1/3] lib/librte_ip_frag: remove IP checkum offload flag Thomas Monjalon
2019-05-16 11:42   ` [dpdk-dev] [PATCH v2 3/3] examples/ip_reassembly: Enabling IP checksum offload in mbuf Sunil Kumar Kori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708043300.44295-1-jerinj@marvell.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=skori@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.