summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-04 17:02:19 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-04 17:02:19 -0800
commit4460985fac06f8e0e5bd4b86dcef49ada451583c (patch)
tree47a857e32bf3c0601853068d6eaea9194166b3f3 /drivers/net/ethernet/intel/ice/ice.h
parent3c85efb8f15ffa5bd165881b9fd1f9e5dd1d705f (diff)
parent5d9e618cbb54f5cbaef7f6f44ceb919978f0e5bc (diff)
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-01-03 This series contains updates to the ice driver only. Brett adds support for UDP segmentation offload (USO) based on the work Alex Duyck did for other Intel drivers. Refactored how the VF sets spoof checking to resolve a couple of issues found in ice_set_vf_spoofchk(). Adds the ability to track of the dflt_vsI (default VSI), since we cannot have more than one default VSI. Add a macro for commonly used "for loop" used repeatedly in the code. Cleaned up and made the VF link flows all similar. Refactor the flows of adding and deleting MAC addresses in order to simplify the logic for error conditions and setting/clearing the VF's default MAC address field. Michal moves the setting of the default ITR value from ice_cfg_itr() to the function we allocate queue vectors. Adds support for saving and restoring the ITR value for each queue. Adds a check for all invalid or unused parameters to log the information and return an error. Vignesh cleans up the driver where we were trying to write to read-only registers for the receive flex descriptors. Tony changes a netdev_info() to netdev_dbg() when the MTU value is changed. Bruce suppresses a coverity reported error that was not really an error by adding a code comment. Mitch adds a check for a NULL receive descriptor to resolve a coverity reported issue. Krzysztof prevents a potential general protection fault by adding a boundary check to see if the queue id is greater than the size of a UMEM array. Adds additional code comments to assist coverity in its scans to prevent false positives. Jake adds support for E822 devices to the driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index f972dce8aebb..cb10abb14e11 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -174,6 +174,8 @@ struct ice_sw {
struct ice_pf *pf;
u16 sw_id; /* switch ID for this switch */
u16 bridge_mode; /* VEB/VEPA/Port Virtualizer */
+ struct ice_vsi *dflt_vsi; /* default VSI for this switch */
+ u8 dflt_vsi_ena:1; /* true if above dflt_vsi is enabled */
};
enum ice_state {
@@ -275,6 +277,7 @@ struct ice_vsi {
u8 current_isup:1; /* Sync 'link up' logging */
u8 stat_offsets_loaded:1;
u8 vlan_ena:1;
+ u16 num_vlan;
/* queue information */
u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */
@@ -462,12 +465,13 @@ static inline void ice_set_ring_xdp(struct ice_ring *ring)
static inline struct xdp_umem *ice_xsk_umem(struct ice_ring *ring)
{
struct xdp_umem **umems = ring->vsi->xsk_umems;
- int qid = ring->q_index;
+ u16 qid = ring->q_index;
if (ice_ring_is_xdp(ring))
qid -= ring->vsi->num_xdp_txq;
- if (!umems || !umems[qid] || !ice_is_xdp_ena_vsi(ring->vsi))
+ if (qid >= ring->vsi->num_xsk_umems || !umems || !umems[qid] ||
+ !ice_is_xdp_ena_vsi(ring->vsi))
return NULL;
return umems[qid];