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 4340FA0096 for ; Mon, 8 Apr 2019 12:00:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 363C34F94; Mon, 8 Apr 2019 12:00:03 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id EBEE94F93 for ; Mon, 8 Apr 2019 12:00:01 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id t4so10661206ljc.2 for ; Mon, 08 Apr 2019 03:00:01 -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=hntSh1zhZVUuVzQ1Hni+ikfi7vCGkgubtTTtJvve/amCRvFNS9ri/3DTYFXqXy7Tmy wAkdfRpUs9dpS7l+hs0O6rmzvn6DeSgjDebB7rpFqnzuj6safEiKNIvr+zkwEtMh2kpu 7nhrYVfEMtPn7UcVsb8cFYucjwI2NOnLQxlhmV7rRvbCL2KxTbtT49EugWDFhZu/iW4W pZzY3oxxKvXbFJKLwdco0QXSgUDcVMVFYYlamOTqF/TbuxhCrddGIKA62vcwdJarq1lX hjQk7/JSwd6WyCsyxD1ARYTamg/zsHh3P4B2A3ZCvKLOnsl/gZbURiKsD67ooXGIia9r wukQ== 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=Cj+E2KwbQfOSinMSXY0L77nNIvil7nIU14b3jpPUQgAnPCgbEyYtOjFPHH+KtfbC3Z X2txWOkeef9qjXXFBclscFZRbdTY06qhsJAJd9vHVkeMlzKXKTCzhkFBREYWWgHYtkqz iJ6QOasHP4zp+Rz3ed+o6CiPFnKiaF7uJGjgcxfqHSUjUc0th1VDJXsmJ8yQ4ESW/DBV 58BmNlaNdEG+64dffLFDGvhDSTKsRYgVAYgE95spCnd1V0bInTnisgy7u//IAYbWVMuu uO5ezNWcPrsYdTVO4daJceMNnO812qIMBneQmD0DPAKVJswqqcb9UOWsMjL+yEmIdo2s zziA== X-Gm-Message-State: APjAAAVHLrpjnAE1dtd5ljAIJXn8+BuKyWJHHa8fPKnP/awUHH1XzCq9 +bYMT44FiqI9V+jKpzlM1akyGw== X-Google-Smtp-Source: APXvYqxYvN/7LTCmxcqulAzWHk3LFeLXt8/hij68tYA9mW9STdMPTGJeY2rQY9vAU+A2f3cCnJM4Tw== X-Received: by 2002:a2e:8794:: with SMTP id n20mr15220792lji.76.1554717601536; Mon, 08 Apr 2019 03:00:01 -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 l16sm6227533ljb.24.2019.04.08.03.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 03:00:00 -0700 (PDT) From: Michal Krawczyk To: dev@dpdk.com Cc: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com, Michal Krawczyk , stable@dpdk.org Date: Mon, 8 Apr 2019 11:59:31 +0200 Message-Id: <20190408095931.2054-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