Lines Matching refs:vf_id
56 static int bnxt_vf_ndo_prep(struct bnxt *bp, int vf_id) in bnxt_vf_ndo_prep() argument
62 if (vf_id >= bp->pf.active_vfs) { in bnxt_vf_ndo_prep()
63 netdev_err(bp->dev, "Invalid VF id %d\n", vf_id); in bnxt_vf_ndo_prep()
69 int bnxt_set_vf_spoofchk(struct net_device *dev, int vf_id, bool setting) in bnxt_set_vf_spoofchk() argument
81 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_set_vf_spoofchk()
85 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_spoofchk()
161 int bnxt_set_vf_trust(struct net_device *dev, int vf_id, bool trusted) in bnxt_set_vf_trust() argument
166 if (bnxt_vf_ndo_prep(bp, vf_id)) in bnxt_set_vf_trust()
169 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_trust()
179 int bnxt_get_vf_config(struct net_device *dev, int vf_id, in bnxt_get_vf_config() argument
186 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_get_vf_config()
190 ivi->vf = vf_id; in bnxt_get_vf_config()
191 vf = &bp->pf.vf[vf_id]; in bnxt_get_vf_config()
216 int bnxt_set_vf_mac(struct net_device *dev, int vf_id, u8 *mac) in bnxt_set_vf_mac() argument
223 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_set_vf_mac()
233 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_mac()
247 int bnxt_set_vf_vlan(struct net_device *dev, int vf_id, u16 vlan_id, u8 qos, in bnxt_set_vf_vlan() argument
262 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_set_vf_vlan()
272 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_vlan()
289 int bnxt_set_vf_bw(struct net_device *dev, int vf_id, int min_tx_rate, in bnxt_set_vf_bw() argument
298 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_set_vf_bw()
302 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_bw()
306 max_tx_rate, vf_id); in bnxt_set_vf_bw()
312 min_tx_rate, vf_id); in bnxt_set_vf_bw()
333 int bnxt_set_vf_link_state(struct net_device *dev, int vf_id, int link) in bnxt_set_vf_link_state() argument
339 rc = bnxt_vf_ndo_prep(bp, vf_id); in bnxt_set_vf_link_state()
343 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_link_state()
391 req->vf_id = cpu_to_le16(i); in bnxt_hwrm_func_vf_resource_free()
488 static int __bnxt_set_vf_params(struct bnxt *bp, int vf_id) in __bnxt_set_vf_params() argument
498 vf = &bp->pf.vf[vf_id]; in __bnxt_set_vf_params()
605 req->vf_id = cpu_to_le16(pf->first_vf_id + i); in bnxt_hwrm_func_vf_resc_cfg()
1140 u32 i = 0, active_vfs = bp->pf.active_vfs, vf_id; in bnxt_hwrm_exec_fwd_req() local
1144 vf_id = find_next_bit(bp->pf.vf_event_bmap, active_vfs, i); in bnxt_hwrm_exec_fwd_req()
1145 if (vf_id >= active_vfs) in bnxt_hwrm_exec_fwd_req()
1148 clear_bit(vf_id, bp->pf.vf_event_bmap); in bnxt_hwrm_exec_fwd_req()
1149 bnxt_vf_req_validate_snd(bp, &bp->pf.vf[vf_id]); in bnxt_hwrm_exec_fwd_req()
1150 i = vf_id + 1; in bnxt_hwrm_exec_fwd_req()