net/mlx5: Add HV VHCA infrastructure
HV VHCA is a layer which provides PF to VF communication channel based on HyperV PCI config channel. It implements Mellanox's Inter VHCA control communication protocol. The protocol contains control block in order to pass messages between the PF and VF drivers, and data blocks in order to pass actual data. The infrastructure is agent based. Each agent will be responsible of contiguous buffer blocks in the VHCA config space. This infrastructure will bind agents to their blocks, and those agents can only access read/write the buffer blocks assigned to them. Each agent will provide three callbacks (control, invalidate, cleanup). Control will be invoked when block-0 is invalidated with a command that concerns this agent. Invalidate callback will be invoked if one of the blocks assigned to this agent was invalidated. Cleanup will be invoked before the agent is being freed in order to clean all of its open resources or deferred works. Block-0 serves as the control block. All execution commands from the PF will be written by the PF over this block. VF will ack on those by writing on block-0 as well. Its format is described by struct mlx5_hv_vhca_control_block layout. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
913d14e866
commit
87175120de
@@ -659,6 +659,7 @@ struct mlx5_clock {
|
||||
struct mlx5_fw_tracer;
|
||||
struct mlx5_vxlan;
|
||||
struct mlx5_geneve;
|
||||
struct mlx5_hv_vhca;
|
||||
|
||||
struct mlx5_core_dev {
|
||||
struct device *device;
|
||||
@@ -706,6 +707,7 @@ struct mlx5_core_dev {
|
||||
struct mlx5_ib_clock_info *clock_info;
|
||||
struct mlx5_fw_tracer *tracer;
|
||||
u32 vsc_addr;
|
||||
struct mlx5_hv_vhca *hv_vhca;
|
||||
};
|
||||
|
||||
struct mlx5_db {
|
||||
|
Reference in New Issue
Block a user