[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/18] hw/pvrdma: Make device state depend on Ethern
From: |
Yuval Shaia |
Subject: |
[Qemu-devel] [PATCH 15/18] hw/pvrdma: Make device state depend on Ethernet function state |
Date: |
Mon, 5 Nov 2018 14:45:56 +0200 |
User should be able to control the device by changing Ethernet function
state so if user runs 'ifconfig ens3 down' the PVRDMA function should be
down as well.
Signed-off-by: Yuval Shaia <address@hidden>
---
hw/rdma/vmw/pvrdma_cmd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
index 7efe224944..a88d922932 100644
--- a/hw/rdma/vmw/pvrdma_cmd.c
+++ b/hw/rdma/vmw/pvrdma_cmd.c
@@ -139,7 +139,8 @@ static int query_port(PVRDMADev *dev, union pvrdma_cmd_req
*req,
resp->hdr.ack = PVRDMA_CMD_QUERY_PORT_RESP;
resp->hdr.err = 0;
- resp->attrs.state = attrs.state;
+ resp->attrs.state = dev->func0->device_active ? attrs.state :
+ PVRDMA_PORT_DOWN;
resp->attrs.max_mtu = attrs.max_mtu;
resp->attrs.active_mtu = attrs.active_mtu;
resp->attrs.phys_state = attrs.phys_state;
--
2.17.2
- [Qemu-devel] [PATCH 13/18] hw/pvrdma: Make sure PCI function 0 is vmxnet3, (continued)
- [Qemu-devel] [PATCH 13/18] hw/pvrdma: Make sure PCI function 0 is vmxnet3, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 06/18] hw/pvrdma: Make function reset_device return void, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 05/18] hw/rdma: Add support for MAD packets, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 10/18] json: Define new QMP message for pvrdma, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 14/18] hw/rdma: Initialize node_guid from vmxnet3 mac address, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 08/18] hw/pvrdma: Set the correct opcode for recv completion, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 12/18] vmxnet3: Move some definitions to header file, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 15/18] hw/pvrdma: Make device state depend on Ethernet function state,
Yuval Shaia <=
- [Qemu-devel] [PATCH 11/18] hw/pvrdma: Add support to allow guest to configure GID table, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 16/18] hw/pvrdma: Fill all CQE fields, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 17/18] hw/pvrdma: Fill error code in command's response, Yuval Shaia, 2018/11/05
- [Qemu-devel] [PATCH 18/18] hw/rdma: Remove unneeded code that handles more that one port, Yuval Shaia, 2018/11/05
- Re: [Qemu-devel] [PATCH 00/18] Add support for RDMA MAD, no-reply, 2018/11/05