[dpdk-dev] [PATCH 3/4 v3] add vector PMD scatter RX for FVL

Liang, Cunming cunming.liang at intel.com
Fri Oct 30 14:46:06 CET 2015


Hi,

> -----Original Message-----
> From: Tao, Zhe
> Sent: Friday, October 30, 2015 9:02 PM
> To: dev at dpdk.org
> Cc: Tao, Zhe; Liang, Cunming
> Subject: [dpdk-dev][PATCH 3/4 v3] add vector PMD scatter RX for FVL
> 
> To support the multiple segments in one packets when the received pkts exceed
>  one buffer size.
> 
> Signed-off-by: Zhe Tao <zhe.tao at intel.com>
> ---
>  drivers/net/i40e/i40e_rxtx.c     |   9 ++++
>  drivers/net/i40e/i40e_rxtx.h     |   3 ++
>  drivers/net/i40e/i40e_rxtx_vec.c | 103
> +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 115 insertions(+)
> 
[...]
> +	/* save the partial packet for next time */
> +	rxq->pkt_first_seg = start;
> +	rxq->pkt_last_seg = end;
> +	memcpy(rx_bufs, pkts, pkt_idx * (sizeof(*pkts)));
> +	return pkt_idx;
> +}
> +
> + /* vPMD receive routine that reassembles scattered packets
> + *
> + * Notice:
> + * - now only accept (nb_pkts == RTE_I40E_VPMD_RX_BURST)
> + */
I think the comments here is not correct, have a check.
> +uint16_t
> +i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> +			     uint16_t nb_pkts)
> +{
> +
> +	struct i40e_rx_queue *rxq = rx_queue;
> +	uint8_t split_flags[RTE_I40E_VPMD_RX_BURST] = {0};
> +
> +	/* get some new buffers */
> +	uint16_t nb_bufs = _recv_raw_pkts_vec(rxq, rx_pkts, nb_pkts,
> +			split_flags);
> +	if (nb_bufs == 0)
> +		return 0;
> +



More information about the dev mailing list