lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 May 2022 08:17:15 +0100
From:   Martin Habets <habetsm.xilinx@...il.com>
To:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com
Cc:     netdev@...r.kernel.org, ecree.xilinx@...il.com,
        dan.carpenter@...cle.com
Subject: [PATCH net-next] sfc/siena: Remove duplicate check on segments

Siena only supports software TSO. This means more code can be deleted,
as pointed out by the Smatch static checker warning:
	drivers/net/ethernet/sfc/siena/tx.c:184 __efx_siena_enqueue_skb()
	warn: duplicate check 'segments' (previous on line 158)

Fixes: 956f2d86cb37 ("sfc/siena: Remove build references to missing functionality")
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Link: https://lore.kernel.org/kernel-janitors/YoH5tJMnwuGTrn1Z@kili/
Signed-off-by: Martin Habets <habetsm.xilinx@...il.com>
---
 drivers/net/ethernet/sfc/siena/tx.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/sfc/siena/tx.c b/drivers/net/ethernet/sfc/siena/tx.c
index b84b9e348c13..e166dcb9b99c 100644
--- a/drivers/net/ethernet/sfc/siena/tx.c
+++ b/drivers/net/ethernet/sfc/siena/tx.c
@@ -181,14 +181,7 @@ netdev_tx_t __efx_siena_enqueue_skb(struct efx_tx_queue *tx_queue,
 	if (__netdev_tx_sent_queue(tx_queue->core_txq, skb_len, xmit_more))
 		efx_tx_send_pending(tx_queue->channel);
 
-	if (segments) {
-		tx_queue->tso_bursts++;
-		tx_queue->tso_packets += segments;
-		tx_queue->tx_packets  += segments;
-	} else {
-		tx_queue->tx_packets++;
-	}
-
+	tx_queue->tx_packets++;
 	return NETDEV_TX_OK;
 
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ