DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/e1000: fix saving of stripped VLAN TCI
@ 2023-03-12 13:44 Visa Hankala
  2023-03-13  1:38 ` Wu, Wenjun1
  0 siblings, 1 reply; 3+ messages in thread
From: Visa Hankala @ 2023-03-12 13:44 UTC (permalink / raw)
  To: dev; +Cc: Simei Su, Wenjun Wu

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 +

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-13  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 13:44 [PATCH] net/e1000: fix saving of stripped VLAN TCI Visa Hankala
2023-03-13  1:38 ` Wu, Wenjun1
2023-03-13  7:42   ` Zhang, Qi Z

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).