DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michal Krawczyk <mk@semihalf.com>
To: dev@dpdk.org
Cc: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com,
	Michal Krawczyk <mk@semihalf.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ena: fix assigning Rx csum support to Tx flag
Date: Mon,  8 Apr 2019 12:27:44 +0200	[thread overview]
Message-ID: <20190408102744.2942-1-mk@semihalf.com> (raw)

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 <mk@semihalf.com>
---
 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

             reply	other threads:[~2019-04-08 10:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 10:27 Michal Krawczyk [this message]
2019-04-08 10:27 ` Michal Krawczyk
2019-04-08 13:49 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-08 13:49   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190408102744.2942-1-mk@semihalf.com \
    --to=mk@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=gtzalik@amazon.com \
    --cc=matua@amazon.com \
    --cc=mw@semihalf.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).