Patch "net/mlx5e: IPSEC RX, enable checksum complete" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5e: IPSEC RX, enable checksum complete

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5e-ipsec-rx-enable-checksum-complete.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 781e3d6942d2dd2cfb1b06d387f76566f8db36a6
Author: Raed Salem <raeds@xxxxxxxxxx>
Date:   Thu Aug 26 17:07:17 2021 +0300

    net/mlx5e: IPSEC RX, enable checksum complete
    
    [ Upstream commit f9a10440f0b1f33faa792af26f4e9823a9b8b6a4 ]
    
    Currently in Rx data path IPsec crypto offloaded packets uses
    csum_none flag, so checksum is handled by the stack, this naturally
    have some performance/cpu utilization impact on such flows. As Nvidia
    NIC starting from ConnectX6DX provides checksum complete value out of
    the box also for such flows there is no sense in taking csum_none path,
    furthermore the stack (xfrm) have the method to handle checksum complete
    corrections for such flows i.e. IPsec trailer removal and consequently
    checksum value adjustment.
    
    Because of the above and in addition the ConnectX6DX is the first HW
    which supports IPsec crypto offload then it is safe to report csum
    complete for IPsec offloaded traffic.
    
    Fixes: b2ac7541e377 ("net/mlx5e: IPsec: Add Connect-X IPsec Rx data path offload")
    Signed-off-by: Raed Salem <raeds@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index f327b78261ec..117a59341453 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -999,14 +999,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
 		goto csum_unnecessary;
 
 	if (likely(is_last_ethertype_ip(skb, &network_depth, &proto))) {
-		u8 ipproto = get_ip_proto(skb, network_depth, proto);
-
-		if (unlikely(ipproto == IPPROTO_SCTP))
+		if (unlikely(get_ip_proto(skb, network_depth, proto) == IPPROTO_SCTP))
 			goto csum_unnecessary;
 
-		if (unlikely(mlx5_ipsec_is_rx_flow(cqe)))
-			goto csum_none;
-
 		stats->csum_complete++;
 		skb->ip_summed = CHECKSUM_COMPLETE;
 		skb->csum = csum_unfold((__force __sum16)cqe->check_sum);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux