From: Michal Krawczyk Date: Mon, 8 Apr 2019 10:27:44 +0000 (+0200) Subject: net/ena: fix checksum feature flag X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ef538c1a7f565c9b58518375a500aa864445fd11;p=dpdk.git net/ena: fix checksum feature flag The boolean value was assigned to Tx flag twice, so it could cause bug whenever Rx checksum will not be supported and Tx will be. Coverity issue: 336831 Fixes: 117ba4a60488 ("net/ena: get device info statically") Signed-off-by: Michal Krawczyk --- diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index a55b4a719d..3eb38165cc 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1808,7 +1808,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev) ENA_ADMIN_FEATURE_OFFLOAD_DESC_TSO_IPV4_MASK) != 0; adapter->offloads.tx_csum_supported = (get_feat_ctx.offload.tx & ENA_ADMIN_FEATURE_OFFLOAD_DESC_TX_L4_IPV4_CSUM_PART_MASK) != 0; - adapter->offloads.tx_csum_supported = + adapter->offloads.rx_csum_supported = (get_feat_ctx.offload.rx_supported & ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK) != 0;