Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions dataplane/standalone/saiserver/switch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,75 @@ grpc::Status Switch::GetSwitchTunnelAttribute(

return grpc::Status::OK;
}

grpc::Status Switch::SwitchStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::SwitchStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::SwitchStateChangeNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::SwitchShutdownRequestNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::SwitchShutdownRequestNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::SwitchShutdownRequestNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::FdbEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::FdbEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::FdbEventNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::PortStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::PortStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::PortStateChangeNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::PacketEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::PacketEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::PacketEventNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::QueuePfcDeadlockNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::QueuePfcDeadlockNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::QueuePfcDeadlockNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::BfdSessionStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::BfdSessionStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::BfdSessionStateChangeNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::TamEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::TamEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::TamEventNotificationResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}

grpc::Status Switch::IpsecSaStatusChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::IpsecSaStatusChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::IpsecSaStatusNotificationDataResponse>* writer) {
LOG(INFO) << "Func: " << __PRETTY_FUNCTION__;
return grpc::Status(grpc::StatusCode::UNIMPLEMENTED, "Streaming notifications not supported in standalone mode");
}
45 changes: 45 additions & 0 deletions dataplane/standalone/saiserver/switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,51 @@ class Switch final : public lemming::dataplane::sai::Switch::Service {
const lemming::dataplane::sai::GetSwitchTunnelAttributeRequest* req,
lemming::dataplane::sai::GetSwitchTunnelAttributeResponse* resp);

grpc::Status SwitchStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::SwitchStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::SwitchStateChangeNotificationResponse>* writer);

grpc::Status SwitchShutdownRequestNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::SwitchShutdownRequestNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::SwitchShutdownRequestNotificationResponse>* writer);

grpc::Status FdbEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::FdbEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::FdbEventNotificationResponse>* writer);

grpc::Status PortStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::PortStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::PortStateChangeNotificationResponse>* writer);

grpc::Status PacketEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::PacketEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::PacketEventNotificationResponse>* writer);

grpc::Status QueuePfcDeadlockNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::QueuePfcDeadlockNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::QueuePfcDeadlockNotificationResponse>* writer);

grpc::Status BfdSessionStateChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::BfdSessionStateChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::BfdSessionStateChangeNotificationResponse>* writer);

grpc::Status TamEventNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::TamEventNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::TamEventNotificationResponse>* writer);

grpc::Status IpsecSaStatusChangeNotification(
grpc::ServerContext* context,
const lemming::dataplane::sai::IpsecSaStatusChangeNotificationRequest* req,
grpc::ServerWriter<lemming::dataplane::sai::IpsecSaStatusNotificationDataResponse>* writer);

sai_switch_api_t* api;
};

Expand Down
Loading