From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A7DCEA0096 for ; Mon, 8 Apr 2019 12:27:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F51F2C54; Mon, 8 Apr 2019 12:27:52 +0200 (CEST) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 9DB592C54 for ; Mon, 8 Apr 2019 12:27:51 +0200 (CEST) Received: by mail-lf1-f65.google.com with SMTP id u21so9105591lfu.2 for ; Mon, 08 Apr 2019 03:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=PZjdmZlvAyAe4PVzTPYRRwWbbcMEUUeeHFYIm25TUoA=; b=fkQg/8vPmsKA2tAFOuqae+8cvNv2wKdmHYzpzIu1OlM3hVZ6rHC9ApmP+FHK/dpxnV P2g7f3G9IfstyD7UhuB6CKNC6uy1k50uGUxTzLBXZnbSLsWOO+veDyZVPt6wN7DqZ26+ owJ0rst6eFMwMEIXMhoLt0IZYsIyKLGSRwxJchiH+fSmNh7lZTJLJTBZNiAX8N/ziJd/ GYWf+2eDHP6FFTzHtKRjW5zMUJavPdCzgByE8ZlgivcMQ5kggMfoADJIT6kNMejhNkRn 2Z1WJOPEDlHpipqW5wx/pJXxxAt9Z4BM+INYT3El2s2nBcD34XqFK9rJqbwnXRAySC5k +bug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PZjdmZlvAyAe4PVzTPYRRwWbbcMEUUeeHFYIm25TUoA=; b=rbdN0pJOvaI9azXmvCgpB++beynODDYpV1PkCQcubtDQC6qpg+vpgjcQjLS5jhxdNT jRdRyqM8CkCNnAK8GKRpNNHYOf6k2B0pFKwGSPTJNGB3TiEZFfWp7nhfT0dCs4R8++JS kiJUqZQye64npcZuYfXNweKAwphxBpd6f3uyMqvLHC8mRo0XMI/f+idAOWSfKOc9hOd0 86rJsgWaOHATGdRYtc6FmQv5p/Rysf+Tt6tweWJ3fgY+68TZRbyesIgRWAnYTC4Sxabw HfH2erahw14nWAD0qJCh+TfGH982MuKGNZFqWmluB8Xqxer9fTHq5YWoi74RuYTlvDLb Sgaw== X-Gm-Message-State: APjAAAVm4DSOogGFVuj6UeQFJi8Xmh6MFkA68l6jOZPlUm6zE+8KgHLV awxMysPGoPplpdaa22htIkhSOQ== X-Google-Smtp-Source: APXvYqzCIRRwuxC53C/0GmyY0gqiTvu5IqQ3nlPjXYjTIVRFBEZd5eC+hw4R2S4bR/BivR4f6IiW5A== X-Received: by 2002:a19:7d84:: with SMTP id y126mr15437714lfc.124.1554719271050; Mon, 08 Apr 2019 03:27:51 -0700 (PDT) Received: from mkPC.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id j6sm5020473ljc.0.2019.04.08.03.27.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 03:27:50 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.org Cc: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com, Michal Krawczyk , stable@dpdk.org Date: Mon, 8 Apr 2019 12:27:44 +0200 Message-Id: <20190408102744.2942-1-mk@semihalf.com> X-Mailer: git-send-email 2.14.1 Subject: [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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. It was detected by the coverity scan, with CID 336831. Fixes: 117ba4a60488 ("net/ena: get device info statically") Cc: stable@dpdk.org Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index a55b4a719..3eb38165c 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; -- 2.14.1