net/mlx5e: XDP, Avoid checksum complete when XDP prog is loaded
[platform/kernel/linux-rpi.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_rx.c
index 8323534..98509e2 100644 (file)
@@ -754,6 +754,10 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
                return;
        }
 
+       /* True when explicitly set via priv flag, or XDP prog is loaded */
+       if (test_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &rq->state))
+               goto csum_unnecessary;
+
        /* CQE csum doesn't cover padding octets in short ethernet
         * frames. And the pad field is appended prior to calculating
         * and appending the FCS field.