net/enic: add minimal VF representor
authorHyong Youb Kim <hyonkim@cisco.com>
Wed, 9 Sep 2020 13:56:53 +0000 (06:56 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 21 Sep 2020 16:05:38 +0000 (18:05 +0200)
commit39cf83f1771bd6b2050b7f3572a278bc2e58a1eb
tree7f9e8aa3e1a535368d6a1ce28aa3cea34a5fc321
parent0e7312b9d22dc9a7750246e3386c4faf2cd3c1ea
net/enic: add minimal VF representor

Enable the minimal VF representor without Tx/Rx and flow API support.

1. Enable the standard devarg 'representor'
When the devarg is specified, create VF representor ports.

2. Initialize flowman early during PF probe
Representors require the flowman API from the firmware. Initialize it
before creating VF representors, so probe can detect the flowman
support and fail if not available.

3. Add enic_fm_allocate_switch_domain() to allocate switch domain ID
PFs and VFs on the same VIC adapter can forward packets to each other,
so the switch domain is the physical adapter.

4. Create a vnic_dev lock to serialize concurrent devcmd calls
PF and VF representor ports may invoke devcmd (e.g. dump stats)
simultaneously. As they all share a single PF devcmd instance in the
firmware, use a lock to serialize devcmd calls.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic.h
drivers/net/enic/enic_ethdev.c
drivers/net/enic/enic_fm_flow.c
drivers/net/enic/enic_main.c
drivers/net/enic/enic_vf_representor.c [new file with mode: 0644]
drivers/net/enic/meson.build