Skip to content

Commit 1b974aa

Browse files
Ganesh Goudardavem330
authored andcommitted
cxgb4: number of VFs supported is not always 16
Total number of VFs supported by PF is used to determine the last byte of VF's mac address. Number of VFs supported is not always 16, use the variable nvfs to get the number of VFs supported rather than hard coding it to 16. Signed-off-by: Casey Leedom <[email protected]> Signed-off-by: Ganesh Goudar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 93029d7 commit 1b974aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2646,7 +2646,7 @@ static void cxgb4_mgmt_fill_vf_station_mac_addr(struct adapter *adap)
26462646

26472647
for (vf = 0, nvfs = pci_sriov_get_totalvfs(adap->pdev);
26482648
vf < nvfs; vf++) {
2649-
macaddr[5] = adap->pf * 16 + vf;
2649+
macaddr[5] = adap->pf * nvfs + vf;
26502650
ether_addr_copy(adap->vfinfo[vf].vf_mac_addr, macaddr);
26512651
}
26522652
}

0 commit comments

Comments
 (0)