0e7312b9d2
VF representors need to proxy devcmd through the PF vnic_dev instance. Extend vnic_dev to accommodate them as follows. 1. Add vnic_vf_rep_register() A VF representor creates its own vnic_dev instance via this function and saves VF ID. When performing devcmd, vnic_dev uses the saved VF ID to proxy devcmd through the PF vnic_dev instance. 2. Add vnic_register_lock() As PF and VF representors appear as independent ports to the application, its threads may invoke APIs on them simultaneously, leading to race conditions on the PF vnic_dev. For example, thread A can query stats on PF port, while thread B queries stats on a VF representor. The PF port invokes this function to provide a lock to vnic_dev. This lock is used to serialize devcmd calls from PF and VF representors. 3. Add utility functions to assist VF representor settings vnic_dev_mtu() and vnic_dev_uif() retrieve vnic MTU and UIF number (uplink index), respectively. Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com> |
||
---|---|---|
.. | ||
cq_desc.h | ||
cq_enet_desc.h | ||
rq_enet_desc.h | ||
vnic_cq.c | ||
vnic_cq.h | ||
vnic_dev.c | ||
vnic_dev.h | ||
vnic_devcmd.h | ||
vnic_enet.h | ||
vnic_flowman.h | ||
vnic_intr.c | ||
vnic_intr.h | ||
vnic_nic.h | ||
vnic_resource.h | ||
vnic_rq.c | ||
vnic_rq.h | ||
vnic_rss.h | ||
vnic_stats.h | ||
vnic_wq.c | ||
vnic_wq.h | ||
wq_enet_desc.h |