| version 1.267, 2008/04/23 06:09:04 |
version 1.268, 2008/04/24 11:38:37 |
|
|
| int s; |
int s; |
| struct mbuf *m; |
struct mbuf *m; |
| |
|
| |
mutex_enter(softnet_lock); |
| |
KERNEL_LOCK(1, NULL); |
| while (!IF_IS_EMPTY(&ipintrq)) { |
while (!IF_IS_EMPTY(&ipintrq)) { |
| s = splnet(); |
s = splnet(); |
| IF_DEQUEUE(&ipintrq, m); |
IF_DEQUEUE(&ipintrq, m); |
| splx(s); |
splx(s); |
| if (m == 0) |
if (m == NULL) |
| return; |
break; |
| ip_input(m); |
ip_input(m); |
| } |
} |
| |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| } |
} |
| |
|
| /* |
/* |
| Line 1389 ip_slowtimo(void) |
|
| Line 1393 ip_slowtimo(void) |
|
| static u_int dropscanidx = 0; |
static u_int dropscanidx = 0; |
| u_int i; |
u_int i; |
| u_int median_ttl; |
u_int median_ttl; |
| int s = splsoftnet(); |
|
| |
mutex_enter(softnet_lock); |
| |
KERNEL_LOCK(1, NULL); |
| |
|
| IPQ_LOCK(); |
IPQ_LOCK(); |
| |
|
| Line 1431 ip_slowtimo(void) |
|
| Line 1437 ip_slowtimo(void) |
|
| dropscanidx = i; |
dropscanidx = i; |
| } |
} |
| IPQ_UNLOCK(); |
IPQ_UNLOCK(); |
| splx(s); |
|
| |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| } |
} |
| |
|
| /* |
/* |
|
|
| ip_drain(void) |
ip_drain(void) |
| { |
{ |
| |
|
| |
mutex_enter(softnet_lock); |
| |
KERNEL_LOCK(1, NULL); |
| |
|
| /* |
/* |
| * We may be called from a device's interrupt context. If |
* We may be called from a device's interrupt context. If |
| * the ipq is already busy, just bail out now. |
* the ipq is already busy, just bail out now. |
| */ |
*/ |
| if (ipq_lock_try() == 0) |
if (ipq_lock_try() != 0) { |
| return; |
/* |
| |
* Drop half the total fragments now. If more mbufs are |
| /* |
* needed, we will be called again soon. |
| * Drop half the total fragments now. If more mbufs are needed, |
*/ |
| * we will be called again soon. |
ip_reass_drophalf(); |
| */ |
IPQ_UNLOCK(); |
| ip_reass_drophalf(); |
} |
| |
|
| IPQ_UNLOCK(); |
KERNEL_UNLOCK_ONE(NULL); |
| |
mutex_exit(softnet_lock); |
| } |
} |
| |
|
| /* |
/* |