aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 639d45d1da49..f788cd63237a 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -28,6 +28,7 @@
28#include <linux/ip.h> 28#include <linux/ip.h>
29#include <linux/ipv6.h> 29#include <linux/ipv6.h>
30#include <linux/if_bridge.h> 30#include <linux/if_bridge.h>
31#include <linux/avf/virtchnl.h>
31#include <net/ipv6.h> 32#include <net/ipv6.h>
32#include "ice_devids.h" 33#include "ice_devids.h"
33#include "ice_type.h" 34#include "ice_type.h"
@@ -35,6 +36,7 @@
35#include "ice_switch.h" 36#include "ice_switch.h"
36#include "ice_common.h" 37#include "ice_common.h"
37#include "ice_sched.h" 38#include "ice_sched.h"
39#include "ice_virtchnl_pf.h"
38 40
39extern const char ice_drv_ver[]; 41extern const char ice_drv_ver[];
40#define ICE_BAR0 0 42#define ICE_BAR0 0
@@ -65,6 +67,12 @@ extern const char ice_drv_ver[];
65#define ICE_INVAL_Q_INDEX 0xffff 67#define ICE_INVAL_Q_INDEX 0xffff
66#define ICE_INVAL_VFID 256 68#define ICE_INVAL_VFID 256
67#define ICE_MAX_VF_COUNT 256 69#define ICE_MAX_VF_COUNT 256
70#define ICE_MAX_QS_PER_VF 256
71#define ICE_MIN_QS_PER_VF 1
72#define ICE_DFLT_QS_PER_VF 4
73#define ICE_MAX_INTR_PER_VF 65
74#define ICE_MIN_INTR_PER_VF (ICE_MIN_QS_PER_VF + 1)
75#define ICE_DFLT_INTR_PER_VF (ICE_DFLT_QS_PER_VF + 1)
68 76
69#define ICE_VSIQF_HKEY_ARRAY_SIZE ((VSIQF_HKEY_MAX_INDEX + 1) * 4) 77#define ICE_VSIQF_HKEY_ARRAY_SIZE ((VSIQF_HKEY_MAX_INDEX + 1) * 4)
70 78
@@ -135,10 +143,20 @@ enum ice_state {
135 __ICE_EMPR_RECV, /* set by OICR handler */ 143 __ICE_EMPR_RECV, /* set by OICR handler */
136 __ICE_SUSPENDED, /* set on module remove path */ 144 __ICE_SUSPENDED, /* set on module remove path */
137 __ICE_RESET_FAILED, /* set by reset/rebuild */ 145 __ICE_RESET_FAILED, /* set by reset/rebuild */
146 /* When checking for the PF to be in a nominal operating state, the
147 * bits that are grouped at the beginning of the list need to be
148 * checked. Bits occurring before __ICE_STATE_NOMINAL_CHECK_BITS will
149 * be checked. If you need to add a bit into consideration for nominal
150 * operating state, it must be added before
151 * __ICE_STATE_NOMINAL_CHECK_BITS. Do not move this entry's position
152 * without appropriate consideration.
153 */
154 __ICE_STATE_NOMINAL_CHECK_BITS,
138 __ICE_ADMINQ_EVENT_PENDING, 155 __ICE_ADMINQ_EVENT_PENDING,
139 __ICE_MAILBOXQ_EVENT_PENDING, 156 __ICE_MAILBOXQ_EVENT_PENDING,
140 __ICE_MDD_EVENT_PENDING, 157 __ICE_MDD_EVENT_PENDING,
141 __ICE_FLTR_OVERFLOW_PROMISC, 158 __ICE_FLTR_OVERFLOW_PROMISC,
159 __ICE_VF_DIS,
142 __ICE_CFG_BUSY, 160 __ICE_CFG_BUSY,
143 __ICE_SERVICE_SCHED, 161 __ICE_SERVICE_SCHED,
144 __ICE_SERVICE_DIS, 162 __ICE_SERVICE_DIS,
@@ -243,6 +261,7 @@ enum ice_pf_flags {
243 ICE_FLAG_MSIX_ENA, 261 ICE_FLAG_MSIX_ENA,
244 ICE_FLAG_FLTR_SYNC, 262 ICE_FLAG_FLTR_SYNC,
245 ICE_FLAG_RSS_ENA, 263 ICE_FLAG_RSS_ENA,
264 ICE_FLAG_SRIOV_ENA,
246 ICE_FLAG_SRIOV_CAPABLE, 265 ICE_FLAG_SRIOV_CAPABLE,
247 ICE_PF_FLAGS_NBITS /* must be last */ 266 ICE_PF_FLAGS_NBITS /* must be last */
248}; 267};
@@ -259,7 +278,12 @@ struct ice_pf {
259 278
260 struct ice_vsi **vsi; /* VSIs created by the driver */ 279 struct ice_vsi **vsi; /* VSIs created by the driver */
261 struct ice_sw *first_sw; /* first switch created by firmware */ 280 struct ice_sw *first_sw; /* first switch created by firmware */
281 /* Virtchnl/SR-IOV config info */
282 struct ice_vf *vf;
283 int num_alloc_vfs; /* actual number of VFs allocated */
262 u16 num_vfs_supported; /* num VFs supported for this PF */ 284 u16 num_vfs_supported; /* num VFs supported for this PF */
285 u16 num_vf_qps; /* num queue pairs per VF */
286 u16 num_vf_msix; /* num vectors per VF */
263 DECLARE_BITMAP(state, __ICE_STATE_NBITS); 287 DECLARE_BITMAP(state, __ICE_STATE_NBITS);
264 DECLARE_BITMAP(avail_txqs, ICE_MAX_TXQS); 288 DECLARE_BITMAP(avail_txqs, ICE_MAX_TXQS);
265 DECLARE_BITMAP(avail_rxqs, ICE_MAX_RXQS); 289 DECLARE_BITMAP(avail_rxqs, ICE_MAX_RXQS);