[PATCH] net/e1000: fix saving of stripped VLAN TCI

Wu, Wenjun1 wenjun1.wu at intel.com
Mon Mar 13 02:38:52 CET 2023


Hi,

> -----Original Message-----
> From: Visa Hankala <visa at hankala.org>
> Sent: Sunday, March 12, 2023 9:45 PM
> To: dev at dpdk.org
> Cc: Su, Simei <simei.su at intel.com>; Wu, Wenjun1 <wenjun1.wu at intel.com>
> Subject: [PATCH] net/e1000: fix saving of stripped VLAN TCI
> 
> When receiving a scattered packet, save the stripped VLAN TCI in the first
> mbuf segment where users expect to find it.

Missing fix tag here.

> 
> Signed-off-by: Visa Hankala <visa at 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 +

Regards,
Wenjun


More information about the dev mailing list