DPDK patches and discussions
 help / color / mirror / Atom feed
From: Visa Hankala <visa@hankala.org>
To: dev@dpdk.org
Cc: Simei Su <simei.su@intel.com>, Wenjun Wu <wenjun1.wu@intel.com>
Subject: [PATCH] net/e1000: fix saving of stripped VLAN TCI
Date: Sun, 12 Mar 2023 13:44:42 +0000	[thread overview]
Message-ID: <zrTH06r4LSoE18ww@hankala.org> (raw)

When receiving a scattered packet, save the stripped VLAN TCI
in the first mbuf segment where users expect to find it.

Signed-off-by: Visa Hankala <visa@hankala.org>

diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index d48fd52404..cb5ce2307b 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1030,6 +1030,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 *    - RX port identifier,
 		 *    - hardware offload data, if any:
 		 *      - IP checksum flag,
+		 *      - VLAN TCI, if any,
 		 *      - error flags.
 		 */
 		first_seg->port = rxq->port_id;
@@ -1039,7 +1040,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 					rx_desc_error_to_pkt_flags(rxd.errors);
 
 		/* Only valid if RTE_MBUF_F_RX_VLAN set in pkt_flags */
-		rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
+		first_seg->vlan_tci = rte_le_to_cpu_16(rxd.special);
 
 		/* Prefetch data of first segment, if configured to do so. */
 		rte_packet_prefetch((char *)first_seg->buf_addr +

             reply	other threads:[~2023-03-12 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12 13:44 Visa Hankala [this message]
2023-03-13  1:38 ` Wu, Wenjun1
2023-03-13  7:42   ` Zhang, Qi Z

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=zrTH06r4LSoE18ww@hankala.org \
    --to=visa@hankala.org \
    --cc=dev@dpdk.org \
    --cc=simei.su@intel.com \
    --cc=wenjun1.wu@intel.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).