* [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag
@ 2019-04-08 10:27 Michal Krawczyk
2019-04-08 13:49 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Michal Krawczyk @ 2019-04-08 10:27 UTC (permalink / raw)
To: dev; +Cc: gtzalik, mw, matua, Michal Krawczyk, 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 <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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag
2019-04-08 10:27 [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag Michal Krawczyk
@ 2019-04-08 13:49 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-04-08 13:49 UTC (permalink / raw)
To: Michal Krawczyk, dev; +Cc: gtzalik, mw, matua, stable
On 4/8/2019 11:27 AM, Michal Krawczyk wrote:
> 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>
Coverity issue: 336831
Fixes: 117ba4a60488 ("net/ena: get device info statically")
(No "Cc: stable@dpdk.org" required since the issue has been introduced in this
release)
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag
@ 2019-04-08 9:59 Michal Krawczyk
0 siblings, 0 replies; 3+ messages in thread
From: Michal Krawczyk @ 2019-04-08 9:59 UTC (permalink / raw)
To: dev; +Cc: gtzalik, mw, matua, Michal Krawczyk, 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 <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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-08 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 10:27 [dpdk-stable] [PATCH] net/ena: fix assigning Rx csum support to Tx flag Michal Krawczyk
2019-04-08 13:49 ` Ferruh Yigit
-- strict thread matches above, loose matches on Subject: below --
2019-04-08 9:59 Michal Krawczyk
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).