root/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. mlx5e_xsk_update_tx_wakeup

   1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
   2 /* Copyright (c) 2019 Mellanox Technologies. */
   3 
   4 #ifndef __MLX5_EN_XSK_TX_H__
   5 #define __MLX5_EN_XSK_TX_H__
   6 
   7 #include "en.h"
   8 #include <net/xdp_sock.h>
   9 
  10 /* TX data path */
  11 
  12 int mlx5e_xsk_wakeup(struct net_device *dev, u32 qid, u32 flags);
  13 
  14 bool mlx5e_xsk_tx(struct mlx5e_xdpsq *sq, unsigned int budget);
  15 
  16 static inline void mlx5e_xsk_update_tx_wakeup(struct mlx5e_xdpsq *sq)
  17 {
  18         if (!xsk_umem_uses_need_wakeup(sq->umem))
  19                 return;
  20 
  21         if (sq->pc != sq->cc)
  22                 xsk_clear_tx_need_wakeup(sq->umem);
  23         else
  24                 xsk_set_tx_need_wakeup(sq->umem);
  25 }
  26 
  27 #endif /* __MLX5_EN_XSK_TX_H__ */

/* [<][>][^][v][top][bottom][index][help] */