[dpdk-dev] [PATCH v5 2/8]i40e:support VxLAN packet identification in librte_pmd_i40e

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Oct 16 12:19:09 CEST 2014



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Monday, October 13, 2014 5:13 PM
> To: Liu, Jijiang; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v5 2/8]i40e:support VxLAN packet
> identification in librte_pmd_i40e
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jijiang Liu
> > Sent: Saturday, October 11, 2014 6:55 AM
> > To: dev at dpdk.org
> > Subject: [dpdk-dev] [PATCH v5 2/8]i40e:support VxLAN packet
> identification
> > in librte_pmd_i40e
> >
> > Support tunneling UDP port configuration on i40e in librte_pmd_i40e.
> > Currently, only VxLAN is implemented, which include
> >  -  VxLAN UDP port initialization
> >  -  Implement the APIs to configure VxLAN UDP port in librte_pmd_i40e.
> >
> > Signed-off-by: Jijiang Liu <jijiang.liu at intel.com>
> > Acked-by: Helin Zhang <helin.zhang at intel.com>
> > Acked-by: Jingjing Wu <jingjing.wu at intel.com>
> > Acked-by: Jing Chen <jing.d.chen at intel.com>
> >

[...]

> > index 7c5b6a8..369bc3b 100644
> > --- a/lib/librte_pmd_i40e/i40e_rxtx.c
> > +++ b/lib/librte_pmd_i40e/i40e_rxtx.c
> > @@ -638,6 +638,10 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
> >  			pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1);
> >  			pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1);
> >  			mb->ol_flags = pkt_flags;
> > +
> > +			mb->packet_type = (uint16_t)((qword1 &
> > +					I40E_RXD_QW1_PTYPE_MASK) >>
> > +					I40E_RXD_QW1_PTYPE_SHIFT);
> >  			if (pkt_flags & PKT_RX_RSS_HASH)
> >  				mb->hash.rss = rte_le_to_cpu_32(\
> >  					rxdp->wb.qword0.hi_dword.rss);
> > @@ -873,6 +877,8 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf
> > **rx_pkts, uint16_t nb_pkts)
> >  		pkt_flags = i40e_rxd_status_to_pkt_flags(qword1);
> >  		pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1);
> >  		pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1);
> > +		rxm->packet_type = (uint16_t)((qword1 &
> > I40E_RXD_QW1_PTYPE_MASK) >>
> > +				I40E_RXD_QW1_PTYPE_SHIFT);
> >  		rxm->ol_flags = pkt_flags;
> >  		if (pkt_flags & PKT_RX_RSS_HASH)
> >  			rxm->hash.rss =
> > @@ -1027,6 +1033,9 @@ i40e_recv_scattered_pkts(void *rx_queue,
> >  		pkt_flags = i40e_rxd_status_to_pkt_flags(qword1);
> >  		pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1);
> >  		pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1);
> > +		first_seg->packet_type = (uint8_t)((qword1 &
> > +					I40E_RXD_QW1_PTYPE_MASK) >>
> > +					I40E_RXD_QW1_PTYPE_SHIFT);

Another comment is that packet_type is uint16_t, so you should change that uint8_t to uint16_t.

Thanks!
> >  		first_seg->ol_flags = pkt_flags;
> >  		if (pkt_flags & PKT_RX_RSS_HASH)
> >  			rxm->hash.rss =
> > --
> > 1.7.7.6



More information about the dev mailing list