[dpdk-dev] [PATCH v3 1/2] ethdev: introduce Rx queue offloads API
Andrew Rybchenko
arybchenko at solarflare.com
Wed Sep 13 11:13:28 CEST 2017
On 09/13/2017 11:49 AM, Andrew Rybchenko wrote:
> On 09/13/2017 09:37 AM, Shahaf Shuler wrote:
>> Introduce a new API to configure Rx offloads.
>>
>> In the new API, offloads are divided into per-port and per-queue
>> offloads. The PMD reports capability for each of them.
>> Offloads are enabled using the existing DEV_RX_OFFLOAD_* flags.
>> To enable per-port offload, the offload should be set on both device
>> configuration and queue configuration. To enable per-queue offload, the
>> offloads can be set only on queue configuration.
>>
>> Applications should set the ignore_offload_bitfield bit on rxmode
>> structure in order to move to the new API.
>>
>> The old Rx offloads API is kept for the meanwhile, in order to enable a
>> smooth transition for PMDs and application to the new API.
>>
>> Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
>> ---
>> doc/guides/nics/features.rst | 33 ++++----
>> lib/librte_ether/rte_ethdev.c | 156
>> +++++++++++++++++++++++++++++++++----
>> lib/librte_ether/rte_ethdev.h | 51 +++++++++++-
>> 3 files changed, 210 insertions(+), 30 deletions(-)
[snip]
>> diff --git a/lib/librte_ether/rte_ethdev.c
>> b/lib/librte_ether/rte_ethdev.c
>> index 0597641ee..b3c10701e 100644
[snip]
>> @@ -722,8 +800,20 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t
>> nb_rx_q, uint16_t nb_tx_q,
>> return -EBUSY;
>> }
>> + /*
>> + * Convert between the offloads API to enable PMDs to support
>> + * only one of them.
>> + */
>> + if ((dev_conf->rxmode.ignore_offload_bitfield == 0)) {
>> + rte_eth_convert_rx_offload_bitfield(
>> + &dev_conf->rxmode, &local_conf.rxmode.offloads);
>> + } else {
>> + rte_eth_convert_rx_offloads(dev_conf->rxmode.offloads,
>> + &local_conf.rxmode);
>
> Ignore flag is lost here and it will result in treating txq_flags as
> the primary
> information about offloads. It is important in the case of failsafe PMD.
Sorry, I mean rxmode (not txq_flags).
[snip]
More information about the dev
mailing list