Changeset 13875 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Nov 5, 2008 3:07:37 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38873
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r13840 r13875 113 113 static int VBoxNetFltSolarisModReadPut(queue_t *pQueue, mblk_t *pMsg); 114 114 static int VBoxNetFltSolarisModWritePut(queue_t *pQueue, mblk_t *pMsg); 115 static int VBoxNetFltSolarisModWriteService(queue_t *pQueue);116 115 117 116 /** … … 165 164 { 166 165 VBoxNetFltSolarisModWritePut, 167 VBoxNetFltSolarisModWriteService,166 NULL, /* service */ 168 167 NULL, /* open */ 169 168 NULL, /* close */ … … 855 854 /** 856 855 * Read side put procedure for processing messages in the read queue. 856 * All streams, bound and unbound share this read procedure. 857 857 * 858 858 * @param pQueue Pointer to the queue. … … 905 905 { 906 906 vboxNetFltSolarisRecv(pThis, pStream, pQueue, pMsg); 907 pMsg = NULL; 907 908 fSendUpstream = false; 908 909 } … … 925 926 LogRel((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: Invalid notification size; expected>=%d got=%d\n", 926 927 DL_NOTIFY_IND_SIZE, MBLKL(pMsg))); 928 927 929 fSendUpstream = false; 928 930 break; … … 987 989 */ 988 990 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_BIND_ACK. Bound to requested SAP!\n")); 989 freemsg(pMsg);990 991 fSendUpstream = false; 991 992 break; … … 998 999 */ 999 1000 vboxNetFltSolarisCachePhysAddr(pThis, pMsg); 1000 freemsg(pMsg);1001 1001 fSendUpstream = false; 1002 1002 break; … … 1020 1020 } 1021 1021 1022 freemsg(pMsg);1023 1022 fSendUpstream = false; 1024 1023 break; … … 1040 1039 pPromiscStream->fRawMode ? "ON" : "OFF")); 1041 1040 1042 freemsg(pMsg);1043 1041 fSendUpstream = false; 1044 1042 } … … 1067 1065 { 1068 1066 /* 1069 * Pass foward messages when adjacent module can receive, otherwise queue them. 1067 * Don't queue up things here, can cause bad things to happen when the system 1068 * is under heavy loads and we need to jam across high priority messages which 1069 * if it's not done properly will end up in an infinite loop. 1070 1070 */ 1071 if (canputnext(pQueue)) 1072 putnext(pQueue, pMsg); 1073 else 1074 putbq(pQueue, pMsg); 1071 putnext(pQueue, pMsg); 1072 } 1073 else if (pMsg) 1074 { 1075 /* 1076 * We need to free up the message if we don't pass it through. 1077 */ 1078 freemsg(pMsg); 1075 1079 } 1076 1080 … … 1081 1085 /** 1082 1086 * Write side put procedure for processing messages in the write queue. 1087 * All streams, bound and unbound share this write procedure. 1083 1088 * 1084 1089 * @param pQueue Pointer to the queue. … … 1091 1096 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWritePut pQueue=%p pMsg=%p\n", pQueue, pMsg)); 1092 1097 1093 if (pMsg) 1094 { 1095 /* 1096 * Pass foward messages when adjacent module can receive, otherwise queue them. 1097 */ 1098 if (canputnext(pQueue)) 1099 putnext(pQueue, pMsg); 1100 else 1101 putbq(pQueue, pMsg); 1102 } 1103 1104 return 0; 1105 } 1106 1107 1108 /** 1109 * Write side service procedure for deferred message processing on the write queue. 1110 * 1111 * @param pQueue Pointer to the queue. 1112 * 1113 * @returns corresponding solaris error code. 1114 */ 1115 static int VBoxNetFltSolarisModWriteService(queue_t *pQueue) 1116 { 1117 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWriteService pQueue=%p\n", pQueue)); 1118 1119 /* 1120 * Implement just the flow controlled service draining of the queue. 1121 * Nothing else to do here, we handle all the important stuff in the Put procedure. 1122 */ 1123 mblk_t *pMsg; 1124 while (pMsg = getq(pQueue)) 1125 { 1126 if (canputnext(pQueue)) 1127 putnext(pQueue, pMsg); 1128 else 1129 { 1130 putbq(pQueue, pMsg); 1131 break; 1132 } 1133 } 1134 1098 putnext(pQueue, pMsg); 1135 1099 return 0; 1136 1100 }
Note:
See TracChangeset
for help on using the changeset viewer.