[dpdk-dev] [PATCH 1/2] app/testpmd: fix scatter offload configuration

Matan Azrad matan at mellanox.com
Tue Jul 30 11:00:35 CEST 2019


Hi all

Any review?

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Matan Azrad
> Sent: Monday, July 29, 2019 3:37 PM
> To: Wenzhuo Lu <wenzhuo.lu at intel.com>; Jingjing Wu
> <jingjing.wu at intel.com>
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: [dpdk-dev] [PATCH 1/2] app/testpmd: fix scatter offload
> configuration
> 
> When the mbuf data size cannot contain the maximum Rx packet length with
> the mbuf headroom, a packet should be scattered in more than one mbuf.
> 
> The application did not configure scatter offload in the above case.
> 
> Enable the Rx scatter offload in the above case.
> 
> Fixes: 33f9630fc23d ("app/testpmd: create mbuf based on max supported
> segments")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Matan Azrad <matan at mellanox.com>
> ---
>  app/test-pmd/testpmd.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> 518865a..4ae70ef 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -1191,6 +1191,17 @@ struct extmem_param {
>  				warning = 1;
>  			}
>  		}
> +		if (rx_mode.max_rx_pkt_len + RTE_PKTMBUF_HEADROOM
> >
> +		    mbuf_data_size) {
> +			if (port->dev_info.rx_queue_offload_capa &
> +			    DEV_RX_OFFLOAD_SCATTER)
> +				port->dev_conf.rxmode.offloads |=
> +						DEV_RX_OFFLOAD_SCATTER;
> +			else
> +				TESTPMD_LOG(WARNING, "Configure
> scatter is"
> +					    " needed and cannot be
> configured"
> +					    " in the port %u\n", pid);
> +		}
>  	}
> 
>  	if (warning)
> --
> 1.8.3.1



More information about the dev mailing list