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

* RE: [PATCH] net/e1000: fix saving of stripped VLAN TCI
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Wu, Wenjun1 @ 2023-03-13  1:38 UTC (permalink / raw)
  To: Visa Hankala, dev; +Cc: Su, Simei

Hi,

> -----Original Message-----
> From: Visa Hankala <visa@hankala.org>
> Sent: Sunday, March 12, 2023 9:45 PM
> To: dev@dpdk.org
> Cc: Su, Simei <simei.su@intel.com>; Wu, Wenjun1 <wenjun1.wu@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@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

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

* RE: [PATCH] net/e1000: fix saving of stripped VLAN TCI
  2023-03-13  1:38 ` Wu, Wenjun1
@ 2023-03-13  7:42   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2023-03-13  7:42 UTC (permalink / raw)
  To: Wu, Wenjun1, Visa Hankala, dev; +Cc: Su, Simei



> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Monday, March 13, 2023 9:39 AM
> To: Visa Hankala <visa@hankala.org>; dev@dpdk.org
> Cc: Su, Simei <simei.su@intel.com>
> Subject: RE: [PATCH] net/e1000: fix saving of stripped VLAN TCI
> 
> Hi,
> 
> > -----Original Message-----
> > From: Visa Hankala <visa@hankala.org>
> > Sent: Sunday, March 12, 2023 9:45 PM
> > To: dev@dpdk.org
> > Cc: Su, Simei <simei.su@intel.com>; Wu, Wenjun1 <wenjun1.wu@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.

Added 

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org
> 
> >
> > Signed-off-by: Visa Hankala <visa@hankala.org>

Offline confirmed with Wenjun, Wu, agreed to add
Acked-y: Wenjun Wu <wenjun1.wu@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


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