ice.h (b9c92fb4aabb8d93b657d028f7c530d6c42cb630) | ice.h (295819b562fa13e48d0de72eebae7e75dc7c2cc4) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright (c) 2018, Intel Corporation. */ 3 4#ifndef _ICE_H_ 5#define _ICE_H_ 6 7#include <linux/types.h> 8#include <linux/errno.h> --- 744 unchanged lines hidden (view full) --- 753 /* if pf->ctrl_vsi_idx is ICE_NO_VSI, control VSI was not set up */ 754 if (!pf->vsi || pf->ctrl_vsi_idx == ICE_NO_VSI) 755 return NULL; 756 757 return pf->vsi[pf->ctrl_vsi_idx]; 758} 759 760/** | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* Copyright (c) 2018, Intel Corporation. */ 3 4#ifndef _ICE_H_ 5#define _ICE_H_ 6 7#include <linux/types.h> 8#include <linux/errno.h> --- 744 unchanged lines hidden (view full) --- 753 /* if pf->ctrl_vsi_idx is ICE_NO_VSI, control VSI was not set up */ 754 if (!pf->vsi || pf->ctrl_vsi_idx == ICE_NO_VSI) 755 return NULL; 756 757 return pf->vsi[pf->ctrl_vsi_idx]; 758} 759 760/** |
761 * ice_find_vsi - Find the VSI from VSI ID 762 * @pf: The PF pointer to search in 763 * @vsi_num: The VSI ID to search for 764 */ 765static inline struct ice_vsi *ice_find_vsi(struct ice_pf *pf, u16 vsi_num) 766{ 767 int i; 768 769 ice_for_each_vsi(pf, i) 770 if (pf->vsi[i] && pf->vsi[i]->vsi_num == vsi_num) 771 return pf->vsi[i]; 772 return NULL; 773} 774 775/** |
|
761 * ice_is_switchdev_running - check if switchdev is configured 762 * @pf: pointer to PF structure 763 * 764 * Returns true if eswitch mode is set to DEVLINK_ESWITCH_MODE_SWITCHDEV 765 * and switchdev is configured, false otherwise. 766 */ 767static inline bool ice_is_switchdev_running(struct ice_pf *pf) 768{ --- 146 unchanged lines hidden --- | 776 * ice_is_switchdev_running - check if switchdev is configured 777 * @pf: pointer to PF structure 778 * 779 * Returns true if eswitch mode is set to DEVLINK_ESWITCH_MODE_SWITCHDEV 780 * and switchdev is configured, false otherwise. 781 */ 782static inline bool ice_is_switchdev_running(struct ice_pf *pf) 783{ --- 146 unchanged lines hidden --- |