>num_vf_en and lmac_cnt are always equal.However in future this may change. Yes these two won't be equal in future and hence a differentiation is needed. lmac_cnt will have to point to no of physical interfaces and num_vf_en to logical interfaces. num_vf_en will default to lmac_cnt but with 'sriov_configure' can be increased.
>The worst consequence of this is failure to deliver link status > messages, causing VFs to go defunct There is no point in delivering link status to all VFs, as irrespective of physical link status, VFs (attached to VMs) should be able to communicate. A differentiation here will also be needed then. - for (vf = 0; vf < nic->lmac_cnt; vf++) { + for (vf = 0; vf < nic->num_vf_en; vf++) { This is incorrect, if in future this refers to logical interfaces which may be greater than physical interface count then below references will fail. /* Get BGX, LMAC indices for the VF */ bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); Thanks, Sunil. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html