[dpdk-dev] [PATCH] examples: fix RSS hash function configuration

Dan Gora dg at adax.com
Wed Jun 20 19:03:40 CEST 2018


Hi Ferruh,

Thanks for this.. I had started working on a patch to do this as well
because I got bit by this error.

Shouldn't all of the example applications also add the code to strip
the unsupported Tx and Rx offload bits as well?  It would help new
users (like me!) to understand that this is a requirement for all
callers of rte_eth_dev_configure().

    rte_eth_dev_info_get(port_id, &dev_info);

    /* Only set the offload bits which are actually supported */
    port_conf.txmode.offloads &= dev_info.tx_offload_capa;
    port_conf.rxmode.offloads &= dev_info.rx_offload_capa;

thanks
dan


On Wed, Jun 20, 2018 at 8:11 AM, Hunt, David <david.hunt at intel.com> wrote:
> Hi Ferruh,
> On 20/6/2018 4:01 PM, Ferruh Yigit wrote:
>>
>> ethdev layer introduced checks for application requested RSS hash
>> functions and returns error for ones unsupported by hardware
>>
>> This check breaks some sample applications which blindly configures
>> RSS hash functions without checking underlying hardware support.
>>
>> Updated examples to mask out unsupported RSS has functions during device
>> configuration.
>> Prints a log if configuration values updated by this check.
>>
>> Fixes: aa1a6d87f15d ("ethdev: force RSS offload rules again")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
>> ---
>> Return error added in this release, so no need to backport the fix to
>> previous versions.
>>
>> Cc: David Hunt <david.hunt at intel.com>
>> Cc: Liang Ma <liang.j.ma at intel.com>
>> Cc: Xueming Li <xuemingl at mellanox.com>


More information about the dev mailing list