Skip to content

Commit eb01766

Browse files
committed
This patch includes:
1. Device State: CLEAN, DIRTY, SCRUB, BUSY 2. DeviceStateUpdate RPC 3. DeviceChanged Event Signed-off-by: Surbhi Kakarya <[email protected]>
1 parent ff26c83 commit eb01766

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

protect/control/v1/common.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,3 +532,14 @@ message OciRegistryAuthentication {
532532
string registry_token = 4;
533533
}
534534
}
535+
536+
message PciDevice {
537+
PciDeviceState state = 1;
538+
}
539+
540+
enum PciDeviceState {
541+
CLEAN = 0;
542+
DIRTY = 1;
543+
SCRUB = 2;
544+
BUSY = 3;
545+
}

protect/control/v1/control.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ service ControlService {
5555
rpc SetHostPowerManagementPolicy(SetHostPowerManagementPolicyRequest) returns (SetHostPowerManagementPolicyReply);
5656

5757
rpc DialNetworkSocket(stream DialNetworkSocketRequest) returns (stream DialNetworkSocketReply);
58+
rpc DeviceStateUpdate(DeviceStateRequest) returns (DeviceStateReply);
5859
}
5960

6061
message GetHostStatusRequest {}
@@ -68,6 +69,13 @@ message GetHostStatusReply {
6869
string host_mac = 6;
6970
}
7071

72+
message DeviceStateRequest {
73+
string name = 1;
74+
protect.common.v1.PciDevice state = 2;
75+
}
76+
77+
message DeviceStateReply {}
78+
7179
message CreateZoneRequest {
7280
ZoneSpec spec = 1;
7381
}
@@ -393,6 +401,7 @@ message WatchEventsReply {
393401
oneof event {
394402
ZoneChangedEvent zone_changed = 1;
395403
WorkloadChangedEvent workload_changed = 2;
404+
DeviceChangedEvent device_changed = 3;
396405
}
397406
}
398407

@@ -404,6 +413,10 @@ message WorkloadChangedEvent {
404413
Workload workload = 1;
405414
}
406415

416+
message DeviceChangedEvent {
417+
protect.common.v1.DeviceReferenceSpec device = 1;
418+
}
419+
407420
message ReadZoneMetricsRequest {
408421
string zone_id = 1;
409422
}

0 commit comments

Comments
 (0)