[dpdk-dev] [PATCH 14/39] examples/ip_reassembly: convert to new ethdev offloads API

Shahaf Shuler shahafs at mellanox.com
Tue Dec 12 07:30:43 CET 2017


Monday, December 11, 2017 5:04 PM, Ananyev, Konstantin:
> > +		if ((dev_info.tx_offload_capa & port_conf.txmode.offloads)
> !=
> > +		    port_conf.txmode.offloads) {
> > +			printf("Some Tx offloads are not supported "
> > +			       "by port %d: requested 0x%lx supported
> 0x%lx\n",
> > +			       portid, port_conf.txmode.offloads,
> > +			       dev_info.tx_offload_capa);
> > +			port_conf.txmode.offloads &=
> dev_info.tx_offload_capa;
> > +		}
> 
> Sort of generic question regarding most examples - wouldn't it be better to
> do rte_exit() if device doesn't support the offloads we expect instead of
> masking off unsupported offloads and continue?
> Konstantin

We already started to discuss this question, see [1].

I agree that it is wrong approach to mask the not supported offloads and continue the application. 
So now I we have 2 options:
1. report the warning and let the PMD to fail the device configuration.
2. like you suggested, report the error and exit the application.

While it is wrong for application to set offloads which are not reported by the device capabilities, the input I got from Radu is that there are a lot of PMDs that will break with option 2, see [1]. 
One example is ixgbe which expects to have CRC offload enabled with IPSEC but don't report it on its caps. 

So my current direction is to make the examples less strict, and give the option for the PMD to fail those if not supported.
Any objection? 

[1] http://dpdk.org/ml/archives/dev/2017-December/083441.html




More information about the dev mailing list