[dpdk-dev] [PATCH] app/testpmd: do not enable Rx offloads by default
Lu, Wenzhuo
wenzhuo.lu at intel.com
Thu Jan 25 02:11:47 CET 2018
Hi Moti,
> -----Original Message-----
> From: Moti Haimovsky [mailto:motih at mellanox.com]
> Sent: Tuesday, January 23, 2018 4:11 PM
> To: Lu, Wenzhuo <wenzhuo.lu at intel.com>; thomas at monjalon.net
> Cc: dev at dpdk.org; Moti Haimovsky <motih at mellanox.com>
> Subject: [PATCH] app/testpmd: do not enable Rx offloads by default
>
> Removed the hardcoded preconfigured Rx offload configuration from
> testpmd.
> Testers who wish to use these offloads will now have to explicitly write them
> in the command-line when running testpmd.
>
> Motivation:
> Some PMDs such at the mlx4 may not implement all the offloads.
> After the offload API rework assuming no offload is enabled by default,
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") trying to
> enable a not supported offload is clearly an error which will cause
> configuration failing.
>
> Considering that testpmd is an application to test the PMD, it should not fail
> on a configuration which was not explicitly requested.
> The behavior of this test application is then turned to an opt-in model.
>
> Signed-off-by: Moti Haimovsky <motih at mellanox.com>
> ---
> app/test-pmd/testpmd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> 5dc8cca..a082352 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -305,9 +305,7 @@ struct fwd_engine * fwd_engines[] = {
> */
> struct rte_eth_rxmode rx_mode = {
> .max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame
> length. */
> - .offloads = (DEV_RX_OFFLOAD_VLAN_FILTER |
> - DEV_RX_OFFLOAD_VLAN_STRIP |
> - DEV_RX_OFFLOAD_CRC_STRIP),
> + .offloads = 0,
Change the default behavior may trigger other problems. I think TX offload could be a good reference. Get the capability and check what's supported first, then ignore the not supported functions with printing a warning but not block anything...
> .ignore_offload_bitfield = 1,
> };
>
> --
> 1.8.3.1
More information about the dev
mailing list