EPICS_CA_AUTO_MAX_ARRAY_BYTES -> EPICS_CA_AUTO_ARRAY_BYTES
This commit is contained in:
@@ -35,7 +35,7 @@ EPICS_CA_CONN_TMO=30.0
|
||||
EPICS_CA_REPEATER_PORT=5065
|
||||
EPICS_CA_SERVER_PORT=5064
|
||||
EPICS_CA_MAX_ARRAY_BYTES=16384
|
||||
EPICS_CA_AUTO_MAX_ARRAY_BYTES=NO
|
||||
EPICS_CA_AUTO_ARRAY_BYTES=YES
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CA_MAX_SEARCH_PERIOD=300.0
|
||||
EPICS_CA_MCAST_TTL=1
|
||||
|
||||
@@ -29,14 +29,17 @@ CA search or beacon packets sent.</p>
|
||||
<h3>EPICS_CA_MAX_ARRAY_BYTES is optional</h3>
|
||||
|
||||
<p>
|
||||
With this change libca, RSRV, and PCAS no longer need to use EPICS_CA_MAX_ARRAY_BYTES
|
||||
to set a maximum allocation size.
|
||||
The large array free-list is replaced with individual allocations
|
||||
when a send/receiver buffer larger than 16KB is needed.
|
||||
Add new configuration parameter EPICS_CA_AUTO_MAX_ARRAY_BYTES which defaults to NO.
|
||||
libca and RSRV respect EPICS_CA_AUTO_MAX_ARRAY_BYTES=YES.
|
||||
PCAS ignores EPICS_CA_AUTO_MAX_ARRAY_BYTES=YES, and thus now ignores EPICS_CA_MAX_ARRAY_BYTES entirely.
|
||||
</p>
|
||||
A new configuration environment variable EPICS_CA_AUTO_ARRAY_BYTES is used by libca and RSRV
|
||||
(CA clients and IOC CA server).
|
||||
The default EPICS_CA_AUTO_ARRAY_BYTES=YES removes the limitation of EPICS_CA_MAX_ARRAY_BYTES
|
||||
and always attempts to allocate sufficient for a request.
|
||||
The value of EPICS_CA_MAX_ARRAY_BYTES is ignored.</>
|
||||
|
||||
<p>Explicitly setting EPICS_CA_AUTO_ARRAY_BYTES=NO continues to honor EPICS_CA_AUTO_ARRAY_BYTES
|
||||
as in previous releases.</p>
|
||||
|
||||
<p>The PCAS server (used by cagateway) now always acts as if EPICS_CA_AUTO_ARRAY_BYTES=YES were
|
||||
set.</p>
|
||||
|
||||
<h3>Channel Access "modernization"</h3>
|
||||
|
||||
|
||||
@@ -314,6 +314,11 @@ is used.</p>
|
||||
<td>i >= 16384</td>
|
||||
<td>16384</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_AUTO_ARRAY_BYTES</td>
|
||||
<td>i >= YES</td>
|
||||
<td>YES</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_MAX_SEARCH_PERIOD</td>
|
||||
<td>r > 60 seconds</td>
|
||||
@@ -754,6 +759,11 @@ buffers that are used for ordinary communication. If EPICS_CA_MAX_ARRAY_BYTES
|
||||
is larger than 16384 then a second free list of larger data buffers is
|
||||
established and used only after a client send its first large array request.</p>
|
||||
|
||||
<p>Beginning with R3.16.1, EPICS_CA_AUTO_ARRAY_BYTES=YES (the default) will ignore
|
||||
EPICS_CA_MAX_ARRAY_BYTES and attempt to allocate sufficient buffer space
|
||||
as needed. Setting EPICS_CA_AUTO_ARRAY_BYTES=NO will continue to respect
|
||||
EPICS_CA_MAX_ARRAY_BYTES.</p>
|
||||
|
||||
<p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the
|
||||
maximum array that it will send or receive. Likewise, the CA server uses
|
||||
EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or
|
||||
|
||||
@@ -219,11 +219,11 @@ cac::cac (
|
||||
throw std::bad_alloc ();
|
||||
}
|
||||
|
||||
int caLimitArray;
|
||||
if(envGetBoolConfigParam(&EPICS_CA_AUTO_MAX_ARRAY_BYTES, &caLimitArray))
|
||||
caLimitArray = 0;
|
||||
int autoMaxBytes;
|
||||
if(envGetBoolConfigParam(&EPICS_CA_AUTO_ARRAY_BYTES, &autoMaxBytes))
|
||||
autoMaxBytes = 1;
|
||||
|
||||
if(caLimitArray) {
|
||||
if(!autoMaxBytes) {
|
||||
freeListInitPvt ( &this->tcpLargeRecvBufFreeList, this->maxRecvBytesTCP, 1 );
|
||||
if ( ! this->tcpLargeRecvBufFreeList ) {
|
||||
throw std::bad_alloc ();
|
||||
|
||||
@@ -485,7 +485,7 @@ int rsrv_init (void)
|
||||
long maxBytesAsALong;
|
||||
long status;
|
||||
SOCKET *socks;
|
||||
int caLimitArray;
|
||||
int autoMaxBytes;
|
||||
|
||||
clientQlock = epicsMutexMustCreate();
|
||||
|
||||
@@ -545,10 +545,10 @@ int rsrv_init (void)
|
||||
}
|
||||
}
|
||||
|
||||
if(envGetBoolConfigParam(&EPICS_CA_AUTO_MAX_ARRAY_BYTES, &caLimitArray))
|
||||
caLimitArray = 0;
|
||||
if(envGetBoolConfigParam(&EPICS_CA_AUTO_ARRAY_BYTES, &autoMaxBytes))
|
||||
autoMaxBytes = 1;
|
||||
|
||||
if (caLimitArray)
|
||||
if (!autoMaxBytes)
|
||||
freeListInitPvt ( &rsrvLargeBufFreeListTCP, rsrvSizeofLargeBufTCP, 1 );
|
||||
else
|
||||
rsrvLargeBufFreeListTCP = NULL;
|
||||
|
||||
2
src/libCom/env/envDefs.h
vendored
2
src/libCom/env/envDefs.h
vendored
@@ -48,7 +48,7 @@ epicsShareExtern const ENV_PARAM EPICS_CA_AUTO_ADDR_LIST;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_REPEATER_PORT;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_SERVER_PORT;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_MAX_ARRAY_BYTES;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_AUTO_MAX_ARRAY_BYTES;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_AUTO_ARRAY_BYTES;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_MAX_SEARCH_PERIOD;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_NAME_SERVERS;
|
||||
epicsShareExtern const ENV_PARAM EPICS_CA_MCAST_TTL;
|
||||
|
||||
Reference in New Issue
Block a user