net/mlx5e: Extend SKB room check to include PTP-SQ
[platform/kernel/linux-rpi.git] / drivers / net / ethernet / mellanox / mlx5 / core / en / txrx.h
index 055c3bc..f5c8720 100644 (file)
@@ -74,6 +74,12 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget);
 void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq);
 
 static inline bool
+mlx5e_skb_fifo_has_room(struct mlx5e_skb_fifo *fifo)
+{
+       return (*fifo->pc - *fifo->cc) < fifo->mask;
+}
+
+static inline bool
 mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n)
 {
        return (mlx5_wq_cyc_ctr2ix(wq, cc - pc) >= n) || (cc == pc);