Skip to content

Commit

Permalink
net/e1000: fix saving of stripped VLAN TCI
Browse files Browse the repository at this point in the history
[ upstream commit 8d57c9fcfcda3122aa38fba08a029ec248eeb52d ]

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

Fixes: 8058034 ("e1000: support EM devices (also known as e1000/e1000e)")

Signed-off-by: Visa Hankala <visa@hankala.org>
Acked-by: Wenjun Wu <wenjun1.wu@intel.com>
  • Loading branch information
vhankala authored and bluca committed Mar 21, 2023
1 parent 2f9b094 commit 3ab75a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/e1000/em_rxtx.c
Expand Up @@ -1031,6 +1031,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;
Expand All @@ -1040,7 +1041,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 PKT_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 +
Expand Down

0 comments on commit 3ab75a1

Please sign in to comment.