net/mlx5e: Enable reporting checksum unnecessary also for L3 packets
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_rx.c
index 424bc89184c652621be82330ea1557b2c0a13e0d..5a43cbf9103f45d6f25dca03b384bebfd6e3bb7f 100644 (file)
@@ -805,7 +805,8 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
 
 csum_unnecessary:
        if (likely((cqe->hds_ip_ext & CQE_L3_OK) &&
-                  (cqe->hds_ip_ext & CQE_L4_OK))) {
+                  ((cqe->hds_ip_ext & CQE_L4_OK) ||
+                   (get_cqe_l4_hdr_type(cqe) == CQE_L4_HDR_TYPE_NONE)))) {
                skb->ip_summed = CHECKSUM_UNNECESSARY;
                if (cqe_is_tunneled(cqe)) {
                        skb->csum_level = 1;