]> git.droids-corp.org - dpdk.git/commit
net/ena: fix meta descriptor DF flag setup
authorMichal Krawczyk <mk@semihalf.com>
Wed, 23 Feb 2022 12:19:40 +0000 (13:19 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Feb 2022 18:01:03 +0000 (19:01 +0100)
commit022fb61b62623868db2ec9dbe5b1ee43a4d6cbfb
tree1fd9a0c71704607dda9fc6db8c3b1129e3c48b3e
parentcc0c5d251928fbd4e7c9b58fc8458d5450258081
net/ena: fix meta descriptor DF flag setup

Whenever Tx checksum offload is being used, the meta descriptor content
is taken into consideration. Setting DF field properly in the meta
descriptor may have huge impact on the performance both for the IPv4 and
IPv6 packets.

The requirements for the df field are as below:
* No offload used - value doesn't matter
* IPv4 - 0 or 1, depending on the DF flag in the IPv4 header
* IPv6 - 1

Setting DF to 0 causes the packet to enter the slow-path in the HW and
as a result can noticeable impact the performance.

Moreover, as 'true' may not always be mapped to 1 depending on it's
definition for the given platform/compiler, for safety DF field is being
set explicitly to 1.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
drivers/net/ena/ena_ethdev.c