Thanks for finding.
A much better fix would be,
- if (lbk->vf_id > MAX_LMAC)
+ if (lbk->vf_id >= nic->num_vf_en)
return -1;
where 'num_vf_en' reflects the exact number of physical interfaces or
LMACs on the system.
Thanks,
Sunil.