- Update poll timer callback's to use 64bit integers for delay.
- Avoid creating substrs if unnecessary in Unicode_CompareRange.
- Vmxnet3: Add Receive Data Ring Support.
- Comment cleanup.
VMwareStatus Poll_CB_RTime(PollerFunction f,
void *clientData,
- int delay, // microseconds
+ int64 delay, // microseconds
Bool periodic,
MXUserRecLock *lock);
* versioning is correct.
*/
#if defined(VMX86_VIEWCLIENT)
- #define PRODUCT_VERSION 3,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+ #define PRODUCT_VERSION 4,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
#elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */
#define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */
#elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */
#define OVFTOOL_VERSION "4.1.0"
#define VCSA_INSTALLER_VERSION "1.0.0"
#define OVFTOOL_FILE_VERSION 4,1,0,PRODUCT_BUILD_NUMBER_NUMERIC
-#define VDM_CLIENT_VERSION "3.0.0"
+#define VDM_CLIENT_VERSION "4.0.0"
#define VGAUTH_VERSION "e.x.p"
#define COMMON_AGENT_VERSION "e.x.p"
#define VIEWY_VERSION "e.x.p"
#define RECOVERYLIBS_VERSION "2.0.0"
#define PRECHECK_VERSION "e.x.p"
#define VIEW_FEATUREPACK_VERSION "5.2.0"
-#define VIEW_CLIENT_VERSION_NUMBER "3.5.0"
-#define VIEW_CLIENT_VERSION "3.5.0"
+#define VIEW_CLIENT_VERSION_NUMBER "4.0.0"
+#define VIEW_CLIENT_VERSION "4.0.0"
#define VHSESDK_VERSION "1.0.0"
-#define RDE_RFT_ALL_VERSION "3.5.0"
+#define RDE_RFT_ALL_VERSION "4.0.0"
#define RDESDK_VERSION "2.0.0"
#define RDESDKREL_VERSION "2.0.0"
#define MKSVCHANDEV_VERSION "1.0.0"
VMwareStatus
Poll_CB_RTime(PollerFunction f,
void *clientData,
- int info, //microsecs
+ int64 info, //microsecs
Bool periodic,
MXUserRecLock *lock)
{
ASSERT(info == 0);
/* Fall-through */
case POLL_REALTIME:
+ info = info / 1000;
ASSERT(info == (uint32)info);
ASSERT(info >= 0);
- newEntry->event = info / 1000;
+ newEntry->event = info;
/*
* info is the delay in microseconds, but we need to pass in
* a delay in milliseconds.
*/
- newEntry->gtkInputId = g_timeout_add(info / 1000,
+ newEntry->gtkInputId = g_timeout_add(info,
PollGtkBasicCallback,
newEntry);
g_hash_table_insert(poll->timerTable, (gpointer)(intptr_t)newEntry->gtkInputId,
if (flags & LONGINT) {
/* Argument is wchar_t * */
if ((cp = GETARG(wchar_t *)) == NULL)
+#if defined(__ANDROID__) || TARGET_OS_IPHONE
cp = (wchar_t *)L"(null)";
+#else
+ cp = L"(null)";
+#endif
} else {
char *mbp;
/* Argument is char * */
if (convbuf!= NULL)
free(convbuf);
if ((mbp = GETARG(char *)) == NULL)
+#if defined(__ANDROID__) || TARGET_OS_IPHONE
cp = (wchar_t *)L"(null)";
+#else
+ cp = L"(null)";
+#endif
else {
convbuf = BSDFmt_UTF8ToWChar(mbp, prec);
if (convbuf == NULL) {
int result = -1;
char *substr1 = NULL;
char *substr2 = NULL;
- utf16_t *substr1UTF16 = NULL;
- utf16_t *substr2UTF16 = NULL;
+ utf16_t *str1UTF16 = NULL;
+ utf16_t *str2UTF16 = NULL;
UnicodeIndex i = 0;
UnicodeIndex utf16Index;
utf16_t codeUnit1;
* care, and it's just easier to search UTF-16.)
*/
- substr1 = Unicode_Substr(str1, str1Start, str1Length);
- if (!substr1) {
- goto out;
+ if (str1Start != 0 || str1Length != -1) {
+ substr1 = Unicode_Substr(str1, str1Start, str1Length);
+ if (!substr1) {
+ goto out;
+ }
+ str1 = substr1;
}
- substr2 = Unicode_Substr(str2, str2Start, str2Length);
- if (!substr2) {
- goto out;
+ if (str2Start != 0 || str2Length != -1) {
+ substr2 = Unicode_Substr(str2, str2Start, str2Length);
+ if (!substr2) {
+ goto out;
+ }
+ str2 = substr2;
}
/*
* XXX TODO: Need to normalize the incoming strings to NFC or NFD.
*/
- substr1UTF16 = Unicode_GetAllocUTF16(substr1);
- if (!substr1UTF16) {
+ str1UTF16 = Unicode_GetAllocUTF16(str1);
+ if (!str1UTF16) {
goto out;
}
- substr2UTF16 = Unicode_GetAllocUTF16(substr2);
- if (!substr2UTF16) {
+ str2UTF16 = Unicode_GetAllocUTF16(str2);
+ if (!str2UTF16) {
goto out;
}
*/
while (TRUE) {
- codeUnit1 = *(substr1UTF16 + i);
- codeUnit2 = *(substr2UTF16 + i);
+ codeUnit1 = *(str1UTF16 + i);
+ codeUnit2 = *(str2UTF16 + i);
/*
* TODO: Simple case folding doesn't handle the situation where more
*/
if (U16_IS_SURROGATE(codeUnit1)) {
- ssize_t substrUTF16Len = Unicode_UTF16Strlen(substr1UTF16);
+ ssize_t strUTF16Len = Unicode_UTF16Strlen(str1UTF16);
// U16_NEXT modifies the index, so let it work on a copy.
utf16Index = i;
// Decode the surrogate if needed.
- U16_NEXT(substr1UTF16, utf16Index, substrUTF16Len, codePoint1);
+ U16_NEXT(str1UTF16, utf16Index, strUTF16Len, codePoint1);
} else {
// Not a surrogate? Then the code point value is the code unit.
codePoint1 = codeUnit1;
}
if (U16_IS_SURROGATE(codeUnit2)) {
- ssize_t substrUTF16Len = Unicode_UTF16Strlen(substr2UTF16);
+ ssize_t strUTF16Len = Unicode_UTF16Strlen(str2UTF16);
utf16Index = i;
- U16_NEXT(substr2UTF16, utf16Index, substrUTF16Len, codePoint2);
+ U16_NEXT(str2UTF16, utf16Index, strUTF16Len, codePoint2);
} else {
codePoint2 = codeUnit2;
}
NOT_REACHED();
}
- out:
- free(substr1UTF16);
- free(substr2UTF16);
+out:
+ free(str1UTF16);
+ free(str2UTF16);
free(substr1);
free(substr2);
index = strStart;
goto bail;
}
-
+
/*
* Attempt to find the first occurence of the search string in the string
* to be searched.
index = strStart;
goto bail;
}
-
+
/*
* Attempt to find the last occurence of the search string in the string
* to be searched.
* Allocates and returns a new string containing the 'first' followed by
* all the unicode strings specified as optional arguments. Appending
* ceases when a NULL pointer is detected.
- *
+ *
* Results:
* The newly-allocated string. Caller must free with free.
*
*/
char *
-Unicode_Format(const char *fmt, // IN: the format
- ...) // IN: the arguments
+Unicode_Format(const char *fmt, // IN: the format
+ ...) // IN: the arguments
{
va_list args;
char *p;
-
+
va_start(args, fmt);
p = Str_Vasprintf(NULL, fmt, args);
va_end(args);
#include "vmware_pack_end.h"
Vmxnet3_TxDataDesc;
+typedef uint8 Vmxnet3_RxDataDesc;
+
#define VMXNET3_TCD_GEN_SHIFT 31
#define VMXNET3_TCD_GEN_SIZE 1
#define VMXNET3_TCD_TXIDX_SHIFT 0
#define VMXNET3_RING_SIZE_ALIGN 32
#define VMXNET3_RING_SIZE_MASK (VMXNET3_RING_SIZE_ALIGN - 1)
+/* Rx Data Ring buffer size must be a multiple of 64 bytes */
+#define VMXNET3_RXDATA_DESC_SIZE_ALIGN 64
+#define VMXNET3_RXDATA_DESC_SIZE_MASK (VMXNET3_RXDATA_DESC_SIZE_ALIGN - 1)
+
/* Max ring size */
#define VMXNET3_TX_RING_MAX_SIZE 4096
#define VMXNET3_TC_RING_MAX_SIZE 4096
#define VMXNET3_RX_RING2_MAX_SIZE 2048
#define VMXNET3_RC_RING_MAX_SIZE 8192
+/* Large enough to accommodate typical payload + encap + extension header */
+#define VMXNET3_RXDATA_DESC_MAX_SIZE 2048
+
/* a list of reasons for queue stop */
#define VMXNET3_ERR_NOEOP 0x80000000 /* cannot find the EOP desc of a pkt */
__le64 rxRingBasePA[2];
__le64 compRingBasePA;
__le64 ddPA; /* driver data */
- __le64 reserved;
+ __le64 rxDataRingBasePA;
__le32 rxRingSize[2]; /* # of rx desc */
__le32 compRingSize; /* # of rx comp desc */
__le32 ddLen; /* size of driver data */
uint8 intrIdx;
- uint8 _pad[7];
+ uint8 _pad1[1];
+ __le16 rxDataRingDescSize; /* size of rx data ring buffer */
+ uint8 _pad2[4];
}
#include "vmware_pack_end.h"
Vmxnet3_RxQueueConf;
string
string::substr(size_type start, // IN
- size_type len) // IN
+ size_type len) // IN: The substring length in code points.
const
{
return string(mUstr.substr(start, len));