merge fix

This commit is contained in:
2021-08-06 16:11:58 +02:00
17 changed files with 126 additions and 122 deletions

View File

@ -1716,10 +1716,10 @@ int configureMAC() {
"\tDest Port : %d\n\n",
src_ip, src_mac, srcport, dst_ip, dst_mac, dstport));
int i3gbe = getVetoStream();
int lll = getVetoStream();
int i10gbe = (getNumberofUDPInterfaces() == 2 ? 1 : 0);
if (i3gbe) {
if (lll) {
LOG(logINFOGREEN, ("\tVeto (3GbE) : enabled\n\n"));
} else {
LOG(logINFORED, ("\tVeto (3GbE) : disabled\n\n"));
@ -2606,9 +2606,9 @@ int getVetoStream() {
return ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ENBL_MSK) ? 1 : 0);
}
enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
enum vetoAlgorithm getVetoAlgorithm(enum streamingInterface interface) {
// 3gbe
if (interface == I3GBE) {
if (interface == LOW_LATENCY_LINK) {
int retval = ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ALG_MSK) >>
CONFIG_VETO_CH_3GB_ALG_OFST);
switch (retval) {
@ -2633,14 +2633,14 @@ enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
}
}
void setVetoAlgorithm(enum ethernetInterface interface,
void setVetoAlgorithm(enum streamingInterface interface,
enum vetoAlgorithm alg) {
uint32_t addr = CONFIG_REG;
uint32_t value = bus_r(addr);
switch (alg) {
// more to follow
case DEFAULT_ALGORITHM:
if (interface == I3GBE) {
if (interface == LOW_LATENCY_LINK) {
LOG(logINFO, ("Setting default veto algorithm for 3Gbe\n"));
value &= (~CONFIG_VETO_CH_3GB_ALG_MSK);
value |= CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL;

View File

@ -532,8 +532,8 @@ void setVeto(int enable);
int getVeto();
void setVetoStream(int value);
int getVetoStream();
enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface);
void setVetoAlgorithm(enum ethernetInterface interface, enum vetoAlgorithm alg);
enum vetoAlgorithm getVetoAlgorithm(enum streamingInterface interface);
void setVetoAlgorithm(enum streamingInterface interface, enum vetoAlgorithm alg);
void setBadChannels(int nch, int *channels);
int *getBadChannels(int *nch);
#endif

View File

@ -8321,7 +8321,7 @@ int set_datastream(int file_des) {
int get_veto_stream(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
enum ethernetInterface retval = NONE;
enum streamingInterface retval = NONE;
LOG(logDEBUG1, ("Getting veto stream\n"));
@ -8338,7 +8338,7 @@ int get_veto_stream(int file_des) {
int set_veto_stream(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
enum ethernetInterface arg = 0;
enum streamingInterface arg = 0;
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
return printSocketReadError();
@ -8370,7 +8370,7 @@ int set_veto_stream(int file_des) {
int get_veto_algorithm(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
enum ethernetInterface arg = NONE;
enum streamingInterface arg = NONE;
enum vetoAlgorithm retval = DEFAULT_ALGORITHM;
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
return printSocketReadError();
@ -8381,7 +8381,7 @@ int get_veto_algorithm(int file_des) {
functionNotImplemented();
#else
// get only
if (arg != I3GBE && arg != I10GBE) {
if (arg != LOW_LATENCY_LINK && arg != ETHERNET_10GB) {
ret = FAIL;
sprintf(mess, "Could not get vetoalgorithm. Invalid interface %d.\n",
arg);
@ -8402,7 +8402,7 @@ int set_veto_algorithm(int file_des) {
return printSocketReadError();
enum vetoAlgorithm alg = args[0];
enum ethernetInterface interface = args[1];
enum streamingInterface interface = args[1];
LOG(logINFO, ("Setting vetoalgorithm (interface: %d): %u\n", (int)interface,
(int)alg));
@ -8411,7 +8411,7 @@ int set_veto_algorithm(int file_des) {
#else
// only set
if (Server_VerifyLock() == OK) {
if (interface != I3GBE && interface != I10GBE) {
if (interface != LOW_LATENCY_LINK && interface != ETHERNET_10GB) {
ret = FAIL;
sprintf(mess,
"Could not set vetoalgorithm. Invalid interface %d.\n",