Lines Matching refs:vf
23 int enic_is_valid_pp_vf(struct enic *enic, int vf, int *err) in enic_is_valid_pp_vf() argument
25 if (vf != PORT_SELF_VF) { in enic_is_valid_pp_vf()
28 if (vf < 0 || vf >= enic->num_vfs) { in enic_is_valid_pp_vf()
42 if (vf == PORT_SELF_VF && !enic_is_dynamic(enic)) { in enic_is_valid_pp_vf()
54 static int enic_set_port_profile(struct enic *enic, int vf) in enic_set_port_profile() argument
66 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_set_port_profile()
84 } else if (vf == PORT_SELF_VF) { in enic_set_port_profile()
88 "for VF %d\n", vf); in enic_set_port_profile()
120 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_init_prov2, (u8 *)vp, in enic_set_port_profile()
130 static int enic_unset_port_profile(struct enic *enic, int vf) in enic_unset_port_profile() argument
134 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_deinit); in enic_unset_port_profile()
138 if (vf == PORT_SELF_VF) in enic_unset_port_profile()
153 static int enic_pp_preassociate(struct enic *enic, int vf,
155 static int enic_pp_disassociate(struct enic *enic, int vf,
157 static int enic_pp_preassociate_rr(struct enic *enic, int vf,
159 static int enic_pp_associate(struct enic *enic, int vf,
162 static int (*enic_pp_handlers[])(struct enic *enic, int vf,
174 static int enic_pp_preassociate(struct enic *enic, int vf, in enic_pp_preassociate() argument
180 static int enic_pp_disassociate(struct enic *enic, int vf, in enic_pp_disassociate() argument
187 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_pp_disassociate()
193 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_del_addr, in enic_pp_disassociate()
195 else if (vf == PORT_SELF_VF && !is_zero_ether_addr(netdev->dev_addr)) in enic_pp_disassociate()
196 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_del_addr, in enic_pp_disassociate()
199 return enic_unset_port_profile(enic, vf); in enic_pp_disassociate()
202 static int enic_pp_preassociate_rr(struct enic *enic, int vf, in enic_pp_preassociate_rr() argument
209 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_pp_preassociate_rr()
216 err = enic_pp_handlers[PORT_REQUEST_DISASSOCIATE](enic, vf, in enic_pp_preassociate_rr()
226 err = enic_set_port_profile(enic, vf); in enic_pp_preassociate_rr()
233 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_enable2, in enic_pp_preassociate_rr()
241 static int enic_pp_associate(struct enic *enic, int vf, in enic_pp_associate() argument
249 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_pp_associate()
258 enic, vf, prev_pp, restore_pp); in enic_pp_associate()
266 enic, vf, prev_pp, restore_pp); in enic_pp_associate()
273 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_enable2, active); in enic_pp_associate()
280 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_add_addr, in enic_pp_associate()
282 else if (vf == PORT_SELF_VF && !is_zero_ether_addr(netdev->dev_addr)) in enic_pp_associate()
283 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_add_addr, in enic_pp_associate()
289 int enic_process_set_pp_request(struct enic *enic, int vf, in enic_process_set_pp_request() argument
295 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_process_set_pp_request()
303 return enic_pp_handlers[pp->request](enic, vf, prev_pp, restore_pp); in enic_process_set_pp_request()
306 int enic_process_get_pp_request(struct enic *enic, int vf, in enic_process_get_pp_request() argument
315 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, in enic_process_get_pp_request()
320 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, in enic_process_get_pp_request()