Lines Matching refs:vfidx
153 static int liquidio_set_vf_link_state(struct net_device *netdev, int vfidx,
2814 static int __liquidio_set_vf_mac(struct net_device *netdev, int vfidx, in __liquidio_set_vf_mac() argument
2825 if (vfidx < 0 || vfidx >= oct->sriov_info.max_vfs) in __liquidio_set_vf_mac()
2833 nctrl.ncmd.s.param1 = vfidx + 1; in __liquidio_set_vf_mac()
2846 oct->sriov_info.vf_macaddr[vfidx] = nctrl.udd[0]; in __liquidio_set_vf_mac()
2855 static int liquidio_set_vf_mac(struct net_device *netdev, int vfidx, u8 *mac) in liquidio_set_vf_mac() argument
2861 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) in liquidio_set_vf_mac()
2864 retval = __liquidio_set_vf_mac(netdev, vfidx, mac, true); in liquidio_set_vf_mac()
2866 cn23xx_tell_vf_its_macaddr_changed(oct, vfidx, mac); in liquidio_set_vf_mac()
2871 static int liquidio_set_vf_spoofchk(struct net_device *netdev, int vfidx, in liquidio_set_vf_spoofchk() argument
2885 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) { in liquidio_set_vf_spoofchk()
2886 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_spoofchk()
2891 if (oct->sriov_info.vf_spoofchk[vfidx]) in liquidio_set_vf_spoofchk()
2895 if (!oct->sriov_info.vf_spoofchk[vfidx]) in liquidio_set_vf_spoofchk()
2903 vfidx + 1; /* vfidx is 0 based, in liquidio_set_vf_spoofchk()
2915 "Failed to set VF %d spoofchk %s\n", vfidx, in liquidio_set_vf_spoofchk()
2920 oct->sriov_info.vf_spoofchk[vfidx] = enable; in liquidio_set_vf_spoofchk()
2921 netif_info(lio, drv, lio->netdev, "VF %u spoofchk is %s\n", vfidx, in liquidio_set_vf_spoofchk()
2927 static int liquidio_set_vf_vlan(struct net_device *netdev, int vfidx, in liquidio_set_vf_vlan() argument
2936 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) in liquidio_set_vf_vlan()
2950 if (oct->sriov_info.vf_vlantci[vfidx] == vlantci) in liquidio_set_vf_vlan()
2962 vfidx + 1; /* vfidx is 0 based, but vf_num (param2) is 1 based */ in liquidio_set_vf_vlan()
2974 oct->sriov_info.vf_vlantci[vfidx] = vlantci; in liquidio_set_vf_vlan()
2979 static int liquidio_get_vf_config(struct net_device *netdev, int vfidx, in liquidio_get_vf_config() argument
2986 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) in liquidio_get_vf_config()
2991 ivi->vf = vfidx; in liquidio_get_vf_config()
2992 macaddr = 2 + (u8 *)&oct->sriov_info.vf_macaddr[vfidx]; in liquidio_get_vf_config()
2994 ivi->vlan = oct->sriov_info.vf_vlantci[vfidx] & VLAN_VID_MASK; in liquidio_get_vf_config()
2995 ivi->qos = oct->sriov_info.vf_vlantci[vfidx] >> VLAN_PRIO_SHIFT; in liquidio_get_vf_config()
2997 oct->sriov_info.trusted_vf.id == vfidx) in liquidio_get_vf_config()
3001 ivi->linkstate = oct->sriov_info.vf_linkstate[vfidx]; in liquidio_get_vf_config()
3002 ivi->spoofchk = oct->sriov_info.vf_spoofchk[vfidx]; in liquidio_get_vf_config()
3009 static int liquidio_send_vf_trust_cmd(struct lio *lio, int vfidx, bool trusted) in liquidio_send_vf_trust_cmd() argument
3023 OPCODE_NIC_SET_TRUSTED_VF, 0, vfidx + 1, in liquidio_send_vf_trust_cmd()
3045 static int liquidio_set_vf_trust(struct net_device *netdev, int vfidx, in liquidio_set_vf_trust() argument
3056 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) { in liquidio_set_vf_trust()
3057 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_trust()
3065 oct->sriov_info.trusted_vf.id == vfidx) in liquidio_set_vf_trust()
3079 if (!liquidio_send_vf_trust_cmd(lio, vfidx, setting)) { in liquidio_set_vf_trust()
3081 oct->sriov_info.trusted_vf.id = vfidx; in liquidio_set_vf_trust()
3087 netif_info(lio, drv, lio->netdev, "VF %u is %strusted\n", vfidx, in liquidio_set_vf_trust()
3097 static int liquidio_set_vf_link_state(struct net_device *netdev, int vfidx, in liquidio_set_vf_link_state() argument
3105 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) in liquidio_set_vf_link_state()
3108 if (oct->sriov_info.vf_linkstate[vfidx] == linkstate) in liquidio_set_vf_link_state()
3114 vfidx + 1; /* vfidx is 0 based, but vf_num (param1) is 1 based */ in liquidio_set_vf_link_state()
3123 oct->sriov_info.vf_linkstate[vfidx] = linkstate; in liquidio_set_vf_link_state()
3200 static int liquidio_get_vf_stats(struct net_device *netdev, int vfidx, in liquidio_get_vf_stats() argument
3208 if (vfidx < 0 || vfidx >= oct->sriov_info.num_vfs_alloced) in liquidio_get_vf_stats()
3212 ret = cn23xx_get_vf_stats(oct, vfidx, &stats); in liquidio_get_vf_stats()