Skip to content

Commit b820e6f

Browse files
ogerlitzSaeed Mahameed
authored andcommitted
net/mlx5e: Enable reporting checksum unnecessary also for L3 packets
We can report checksum unnecessary also when the L3 checksum flag on the cqe is set and there's no L4 header. Signed-off-by: Or Gerlitz <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent f128f13 commit b820e6f

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,8 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
805805

806806
csum_unnecessary:
807807
if (likely((cqe->hds_ip_ext & CQE_L3_OK) &&
808-
(cqe->hds_ip_ext & CQE_L4_OK))) {
808+
((cqe->hds_ip_ext & CQE_L4_OK) ||
809+
(get_cqe_l4_hdr_type(cqe) == CQE_L4_HDR_TYPE_NONE)))) {
809810
skb->ip_summed = CHECKSUM_UNNECESSARY;
810811
if (cqe_is_tunneled(cqe)) {
811812
skb->csum_level = 1;

0 commit comments

Comments
 (0)