DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pankaj Gupta <pagupta@vmware.com>
To: jbehrens@vmware.com
Cc: dev@dpdk.org, pagupta@vmware.com
Subject: [PATCH v5 7/8] net/vmxnet3: set packet type for fragmented packet
Date: Thu, 12 May 2022 13:06:41 -0400	[thread overview]
Message-ID: <20220512170642.28930-8-pagupta@vmware.com> (raw)
In-Reply-To: <20220512170642.28930-1-pagupta@vmware.com>

The packet type is set even if it is a fragmented packet

Tested, using testpmd, for different hardware versions on
ESXi 7.0 Update 2.

Signed-off-by: Pankaj Gupta <pagupta@vmware.com>
Reviewed-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index c94e3762e6..a875ffec07 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -759,6 +759,23 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 		/* Check packet type, checksum errors, etc. */
 		if (rcd->cnc) {
 			ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+
+			if (rcd->v4) {
+				packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
+				if (rcd->tcp)
+					packet_type |= RTE_PTYPE_L4_TCP;
+				else if (rcd->udp)
+					packet_type |= RTE_PTYPE_L4_UDP;
+			} else if (rcd->v6) {
+				packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
+				if (rcd->tcp)
+					packet_type |= RTE_PTYPE_L4_TCP;
+				else if (rcd->udp)
+					packet_type |= RTE_PTYPE_L4_UDP;
+			} else {
+				packet_type |= RTE_PTYPE_UNKNOWN;
+			}
+
 		} else {
 			if (rcd->v4) {
 				packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
-- 
2.17.1


  parent reply	other threads:[~2022-05-12 17:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 17:06 [PATCH v5 0/8] vmxnet3 version V5 and V6 Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 1/8] net/vmxnet3: add V5 support Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 2/8] net/vmxnet3: implement RETA query and RETA update Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 3/8] net/vmxnet3: add Rx queue usage count utility Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 4/8] net/vmxnet3: report HW version on FW version get Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 5/8] net/vmxnet3: version 6 Pankaj Gupta
2022-05-12 17:06 ` [PATCH v5 6/8] net/vmxnet3: advertise RETA size in device info Pankaj Gupta
2022-05-12 17:06 ` Pankaj Gupta [this message]
2022-05-12 17:06 ` [PATCH v5 8/8] Fixes: 046f11619567 ("net/vmxnet3: support MSI-X interrupt") Pankaj Gupta

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=20220512170642.28930-8-pagupta@vmware.com \
    --to=pagupta@vmware.com \
    --cc=dev@dpdk.org \
    --cc=jbehrens@vmware.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).