This source file includes following definitions.
- efx_siena_sriov_enabled
 
- efx_siena_sriov_enabled
 
   1 
   2 
   3 
   4 
   5 
   6 
   7 #ifndef SIENA_SRIOV_H
   8 #define SIENA_SRIOV_H
   9 
  10 #include "net_driver.h"
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 #define EFX_VI_SCALE_MAX 6
  28 
  29 
  30 
  31 #define EFX_VI_BASE 128U
  32 
  33 #define EFX_VF_COUNT_MAX 127
  34 
  35 #define EFX_MAX_VF_EVQ_SIZE 8192UL
  36 
  37 #define EFX_VF_BUFTBL_PER_VI                                    \
  38         ((EFX_MAX_VF_EVQ_SIZE + 2 * EFX_MAX_DMAQ_SIZE) *        \
  39          sizeof(efx_qword_t) / EFX_BUF_SIZE)
  40 
  41 int efx_siena_sriov_configure(struct efx_nic *efx, int num_vfs);
  42 int efx_siena_sriov_init(struct efx_nic *efx);
  43 void efx_siena_sriov_fini(struct efx_nic *efx);
  44 int efx_siena_sriov_mac_address_changed(struct efx_nic *efx);
  45 bool efx_siena_sriov_wanted(struct efx_nic *efx);
  46 void efx_siena_sriov_reset(struct efx_nic *efx);
  47 void efx_siena_sriov_flr(struct efx_nic *efx, unsigned flr);
  48 
  49 int efx_siena_sriov_set_vf_mac(struct efx_nic *efx, int vf, u8 *mac);
  50 int efx_siena_sriov_set_vf_vlan(struct efx_nic *efx, int vf,
  51                                 u16 vlan, u8 qos);
  52 int efx_siena_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf,
  53                                     bool spoofchk);
  54 int efx_siena_sriov_get_vf_config(struct efx_nic *efx, int vf,
  55                                   struct ifla_vf_info *ivf);
  56 
  57 #ifdef CONFIG_SFC_SRIOV
  58 
  59 static inline bool efx_siena_sriov_enabled(struct efx_nic *efx)
  60 {
  61         return efx->vf_init_count != 0;
  62 }
  63 #else 
  64 static inline bool efx_siena_sriov_enabled(struct efx_nic *efx)
  65 {
  66         return false;
  67 }
  68 #endif 
  69 
  70 void efx_siena_sriov_probe(struct efx_nic *efx);
  71 void efx_siena_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event);
  72 void efx_siena_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event);
  73 void efx_siena_sriov_event(struct efx_channel *channel, efx_qword_t *event);
  74 void efx_siena_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq);
  75 
  76 #endif