From: Gal Pressman <galp@mellanox.com>
Date: Tue, 9 Jan 2018 14:40:21 +0200
Subject: net/mlx5e: Add likely to the common RX checksum flow
Patch-mainline: v4.16-rc1
Git-commit: 63a612f984a1fae040ab6f1c6a0f1fdcdf1954b8
References: bsc#1103990 FATE#326006
Most of the packets return true for is_last_ethertype_ip, surround it
with likely compiler hint.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -631,7 +631,7 @@ static inline void mlx5e_handle_csum(str
return;
}
- if (is_last_ethertype_ip(skb, &network_depth)) {
+ if (likely(is_last_ethertype_ip(skb, &network_depth))) {
skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = csum_unfold((__force __sum16)cqe->check_sum);
if (network_depth > ETH_HLEN)