Skip to content
Open
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
7 changes: 7 additions & 0 deletions Cmds/identifyDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,13 @@ typedef enum OACSBits {
OACS_SUP_NSMANAGEMENT_CMD = 0x0008
} OACSBits;

///Bit definitions for IDCTRLRCAP_MIO
typedef enum MICBits{
MIC_SUP_PCI_PORTS = 0x0001,
MIC_SUP_CONTROLLERS = 0x0002,
MIC_SUP_SRIOV = 0x0004
}MICBits;

typedef enum FRMWBits {
FRMW_SLOT1_RO = 0x01,
FRMW_NUM_SLOTS = 0x0e,
Expand Down
14 changes: 12 additions & 2 deletions GrpReservationsHostA/registerReservation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ RegisterReservation::RunCoreTest()
retStat = IO::SendAndReapCmd(mGrpName, mTestName, CALC_TIMEOUT_ms(1), iosq, iocq, reservationRegisterCmd, "Register Key 0xAE HostA", true, CESTAT_SUCCESS);


//LOG_NRM("Try to register (not replace) a new key. Should always fail even with IEKEY=1 and same key as before... Expecting Rsvr Conflict.");
LOG_NRM("Try to register (not replace) the same key. expecting pass");

// Same command as before...
/*
reservationRegisterCmd->SetNSID(1);
Expand All @@ -201,8 +202,17 @@ RegisterReservation::RunCoreTest()
writeRegKey->InitAlignment(16, true, 0xAE); // 0xAF's as arbitrary new key
reservationRegisterCmd->SetPrpBuffer(prpBitmask, writeRegKey);
*/
//retStat = IO::SendAndReapCmd(mGrpName, mTestName, CALC_TIMEOUT_ms(1), iosq, iocq, reservationRegisterCmd, "Register Key 0xAE HostA", true, CESTAT_RSRV_CONFLICT);
retStat = IO::SendAndReapCmd(mGrpName, mTestName, CALC_TIMEOUT_ms(1), iosq, iocq, reservationRegisterCmd, "Register Key 0xAE HostA", true, CESTAT_SUCCESS);

LOG_NRM("Try to register (not replace) a new key. Should always fail even with IEKEY=1 ... Expecting Rsvr Conflict.");
reservationRegisterCmd->SetNSID(1);
reservationRegisterCmd->SetCPTPL(0); // No PTPL change
reservationRegisterCmd->SetIEKEY(1);
reservationRegisterCmd->SetRREGA(0); // Register Key
writeRegKey->Init(16, true, 0xAA);
reservationRegisterCmd->SetPrpBuffer(prpBitmask, writeRegKey);

retStat = IO::SendAndReapCmd(mGrpName, mTestName, CALC_TIMEOUT_ms(1), iosq, iocq, reservationRegisterCmd, "Register Key 0xAE HostA", true, CESTAT_RSRV_CONFLICT);
LOG_NRM("Completed RegisterReservation::RunCoreTest")
}

Expand Down
14 changes: 12 additions & 2 deletions GrpReservationsHostB/createResources_r11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,21 @@ CreateResources_r11::RunnableCoreTest(bool preserve)

ConstSharedIdentifyPtr idCtrlrCap = gInformative->GetIdentifyCmdCtrlr();
uint64_t oncs = idCtrlrCap->GetValue(IDCTRLRCAP_ONCS);
if ((oncs & ONCS_SUP_RSRV) == 0) {
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
uint64_t mic = idCtrlrCap->GetValue(IDCTRLRCAP_MIC);
if((mic & MIC_SUP_PCI_PORTS) == 0)
{
LOG_NRM("Reporting only one PCI port is supported (mic)%ld", mic);
return RUN_FALSE;
}
else
{
if ((oncs & ONCS_SUP_RSRV) == 0)
{
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
return RUN_FALSE;
}

}
preserve = preserve; // Suppress compiler error/warning
return RUN_TRUE; // This test is never destructive
}
Expand Down
14 changes: 12 additions & 2 deletions GrpReservationsHostB/readWriteToUnacquiredReservation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,20 @@ ReadWriteToUnacquiredReservation::RunnableCoreTest(bool preserve)

ConstSharedIdentifyPtr idCtrlrCap = gInformative->GetIdentifyCmdCtrlr();
uint64_t oncs = idCtrlrCap->GetValue(IDCTRLRCAP_ONCS);
if ((oncs & ONCS_SUP_RSRV) == 0) {
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
uint64_t mic = idCtrlrCap->GetValue(IDCTRLRCAP_MIC);
if((mic & MIC_SUP_PCI_PORTS) == 0)
{
LOG_NRM("Reporting only one PCI port is supported (mic)%ld", mic);
return RUN_FALSE;
}
else
{
if ((oncs & ONCS_SUP_RSRV) == 0)
{
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
return RUN_FALSE;
}
}
preserve = preserve; // Suppress compiler error/warning
return RUN_TRUE; // This test is never destructive
}
Expand Down
14 changes: 12 additions & 2 deletions GrpReservationsHostB/registerReservation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,20 @@ RegisterReservation::RunnableCoreTest(bool preserve)

ConstSharedIdentifyPtr idCtrlrCap = gInformative->GetIdentifyCmdCtrlr();
uint64_t oncs = idCtrlrCap->GetValue(IDCTRLRCAP_ONCS);
if ((oncs & ONCS_SUP_RSRV) == 0) {
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
uint64_t mic = idCtrlrCap->GetValue(IDCTRLRCAP_MIC);
if((mic & MIC_SUP_PCI_PORTS) == 0)
{
LOG_NRM("Reporting only one PCI port is supported (mic)%ld", mic);
return RUN_FALSE;
}
else
{
if ((oncs & ONCS_SUP_RSRV) == 0)
{
LOG_NRM("Reporting Reservations not supported (oncs)%ld", oncs);
return RUN_FALSE;
}
}
preserve = preserve; // Suppress compiler error/warning
return RUN_TRUE; // This test is never destructive
}
Expand Down