Skip to content

Commit 0c165e6

Browse files
authored
Merge pull request #279 from sy-c/master
readout v2.24.0
2 parents 8c58f9b + ae902b1 commit 0c165e6

File tree

5 files changed

+46
-1
lines changed

5 files changed

+46
-1
lines changed

doc/configurationParameters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ The parameters related to 3rd-party libraries are described here for convenience
192192
| equipment-rorc-* | dataSource | string | Internal | This parameter selects the data source used by ReadoutCard, c.f. AliceO2::roc::Parameters. It can be for CRU one of Fee, Ddg, Internal and for CRORC one of Fee, SIU, DIU, Internal. |
193193
| equipment-rorc-* | debugStatsEnabled | int | 0 | If set, enable extra statistics about internal buffers status. (printed to stdout when stopping) |
194194
| equipment-rorc-* | firmwareCheckEnabled | int | 1 | If set, RORC driver checks compatibility with detected firmware. Use 0 to bypass this check (eg new fw version not yet recognized by ReadoutCard version). |
195+
| equipment-rorc-* | firmwareVersionsAllowed | string | | Comma-separated list of ROC firmware versions allowed (6-digit hash). If empty, all are allowed. |
196+
| equipment-rorc-* | firmwareVersionsDenied | string | e4a5a46e | Comma-separated list of ROC firmware versions denied (6-digit hash), i.e. which would cause configuration to abort. |
195197
| equipment-zmq-* | address | string | | Address of remote server to connect, eg tcp://remoteHost:12345. |
196198
| equipment-zmq-* | mode | string | stream | Possible values: stream (1 input ZMQ message = 1 output data page), snapshot (last ZMQ message = one output data page per TF). |
197199
| equipment-zmq-* | timeframeClientUrl | string | | The address to be used to retrieve current timeframe. When set, data is published only once for each TF id published by remote server. |

doc/releaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,3 +624,7 @@ This file describes the main feature changes for each readout.exe released versi
624624

625625
## v2.23.3 - 21/05/2024
626626
- Bookkeeping: updates are now disabled after 3 failures (1 before). Log messages changed (logbook -> bookkeeping).
627+
628+
## v2.24.0 - 18/06/2024
629+
- Updated configuration parameters:
630+
- equipment-rorc-*: added parameters firmwareVersionsDenied and firmwareVersionsAllowed, to enforce the check of firmware for specific versions. By default, v3.10.0 (e4a5a46e) is denied and all other allowed: it is the default version in CRU flash and should be updated to a more recent one at boot time.

src/ReadoutEquipmentRORC.cxx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ ReadoutEquipmentRORC::ReadoutEquipmentRORC(ConfigFile& cfg, std::string name) :
112112
theLog.log(LogInfoDevel_(3002), "Bypassing RORC firmware compatibility check");
113113
}
114114

115+
// configuration parameter: | equipment-rorc-* | firmwareVersionsDenied | string | e4a5a46e | Comma-separated list of ROC firmware versions denied (6-digit hash), i.e. which would cause configuration to abort. |
116+
std::string cfgFirmwareVersionsDenied = "e4a5a46e";
117+
std::vector<std::string> cfgFirmwareVersionsDeniedList;
118+
cfg.getOptionalValue<std::string>(name + ".firmwareVersionsDenied", cfgFirmwareVersionsDenied);
119+
if (cfgFirmwareVersionsDenied != "") {
120+
getListFromString(cfgFirmwareVersionsDenied, cfgFirmwareVersionsDeniedList);
121+
}
122+
123+
// configuration parameter: | equipment-rorc-* | firmwareVersionsAllowed | string | | Comma-separated list of ROC firmware versions allowed (6-digit hash). If empty, all are allowed. |
124+
std::string cfgFirmwareVersionsAllowed = "";
125+
std::vector<std::string> cfgFirmwareVersionsAllowedList;
126+
cfg.getOptionalValue<std::string>(name + ".firmwareVersionsAllowed", cfgFirmwareVersionsAllowed);
127+
if (cfgFirmwareVersionsAllowed != "") {
128+
getListFromString(cfgFirmwareVersionsAllowed, cfgFirmwareVersionsAllowedList);
129+
}
130+
115131
// configuration parameter: | equipment-rorc-* | debugStatsEnabled | int | 0 | If set, enable extra statistics about internal buffers status. (printed to stdout when stopping) |
116132
cfg.getOptionalValue<int>(name + ".debugStatsEnabled", cfgDebugStatsEnabled);
117133

@@ -179,6 +195,27 @@ ReadoutEquipmentRORC::ReadoutEquipmentRORC(ConfigFile& cfg, std::string name) :
179195
std::string infoCardId = channel->getCardId().value_or("unknown");
180196
theLog.log(LogInfoDevel_(3010), "Equipment %s : PCI %s @ NUMA node %d, serial number %s, firmware version %s, card id %s", name.c_str(), infoPciAddress.c_str(), infoNumaNode, infoSerialNumber.c_str(), infoFirmwareVersion.c_str(), infoCardId.c_str());
181197

198+
// check firmware version ok
199+
bool isFwOk = true;
200+
for(const auto &fw: cfgFirmwareVersionsDeniedList) {
201+
if (infoFirmwareVersion == fw) {
202+
isFwOk = false;
203+
break;
204+
}
205+
}
206+
if (cfgFirmwareVersionsAllowedList.size() && isFwOk) {
207+
isFwOk = false;
208+
for(const auto &fw: cfgFirmwareVersionsAllowedList) {
209+
if (infoFirmwareVersion == fw) {
210+
isFwOk = true;
211+
break;
212+
}
213+
}
214+
}
215+
if (!isFwOk) {
216+
BOOST_THROW_EXCEPTION(ReadoutEquipmentRORCException() << ErrorInfo::Message("This firmware version is not allowed"));
217+
}
218+
182219
// todo: log parameters ?
183220

184221
if (logRocCallsEnable) {

src/ReadoutVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#define READOUT_VERSION "2.23.3"
12+
#define READOUT_VERSION "2.24.0"
1313

src/readoutConfigEditor.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ set configurationParametersDescriptor {
138138
| equipment-rorc-* | dataSource | string | Internal | This parameter selects the data source used by ReadoutCard, c.f. AliceO2::roc::Parameters. It can be for CRU one of Fee, Ddg, Internal and for CRORC one of Fee, SIU, DIU, Internal. |
139139
| equipment-rorc-* | debugStatsEnabled | int | 0 | If set, enable extra statistics about internal buffers status. (printed to stdout when stopping) |
140140
| equipment-rorc-* | firmwareCheckEnabled | int | 1 | If set, RORC driver checks compatibility with detected firmware. Use 0 to bypass this check (eg new fw version not yet recognized by ReadoutCard version). |
141+
| equipment-rorc-* | firmwareVersionsAllowed | string | | Comma-separated list of ROC firmware versions allowed (6-digit hash). If empty, all are allowed. |
142+
| equipment-rorc-* | firmwareVersionsDenied | string | e4a5a46e | Comma-separated list of ROC firmware versions denied (6-digit hash), i.e. which would cause configuration to abort. |
141143
| equipment-zmq-* | address | string | | Address of remote server to connect, eg tcp://remoteHost:12345. |
142144
| equipment-zmq-* | mode | string | stream | Possible values: stream (1 input ZMQ message = 1 output data page), snapshot (last ZMQ message = one output data page per TF). |
143145
| equipment-zmq-* | timeframeClientUrl | string | | The address to be used to retrieve current timeframe. When set, data is published only once for each TF id published by remote server. |

0 commit comments

Comments
 (0)