numam-dpdk/drivers/net/enic/base
Hyong Youb Kim 0e7312b9d2 net/enic: extend VNIC dev API for VF representors
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>
2020-09-21 18:05:38 +02:00
..
cq_desc.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
cq_enet_desc.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
rq_enet_desc.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_cq.c net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_cq.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_dev.c net/enic: extend VNIC dev API for VF representors 2020-09-21 18:05:38 +02:00
vnic_dev.h net/enic: extend VNIC dev API for VF representors 2020-09-21 18:05:38 +02:00
vnic_devcmd.h replace packed attributes 2020-04-16 18:16:46 +02:00
vnic_enet.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_flowman.h net/enic: update flow manager API 2020-04-21 13:57:08 +02:00
vnic_intr.c net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_intr.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_nic.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_resource.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_rq.c net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_rq.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_rss.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_stats.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_wq.c net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
vnic_wq.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00
wq_enet_desc.h net/enic: consolidate and remove some defines 2020-01-17 19:46:26 +01:00