1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
Index: linux-2.6.17/include/linux/vs_socket.h
===================================================================
--- linux-2.6.17.orig/include/linux/vs_socket.h
+++ linux-2.6.17/include/linux/vs_socket.h
@@ -10,12 +10,14 @@
static inline int vx_sock_type(int family)
{
- int type = 4;
+ int type = 5;
- if (family > 0 && family < 3)
+ if (family >= 0 && family < 3)
type = family;
else if (family == PF_INET6)
type = 3;
+ else if (family == PF_PACKET)
+ type = 4;
return type;
}
Index: linux-2.6.17/include/linux/vserver/cvirt_def.h
===================================================================
--- linux-2.6.17.orig/include/linux/vserver/cvirt_def.h
+++ linux-2.6.17/include/linux/vserver/cvirt_def.h
@@ -90,7 +90,7 @@ struct _vx_sock_acc {
/* context sub struct */
struct _vx_cacct {
- struct _vx_sock_acc sock[5][3];
+ struct _vx_sock_acc sock[6][3];
atomic_t slab[8];
atomic_t page[6][8];
};
@@ -102,7 +102,7 @@ static inline void __dump_vx_cacct(struc
int i,j;
printk("\t_vx_cacct:");
- for (i=0; i<5; i++) {
+ for (i=0; i<6; i++) {
struct _vx_sock_acc *ptr = cacct->sock[i];
printk("\t [%d] =", i);
Index: linux-2.6.17/kernel/vserver/cvirt_init.h
===================================================================
--- linux-2.6.17.orig/kernel/vserver/cvirt_init.h
+++ linux-2.6.17/kernel/vserver/cvirt_init.h
@@ -79,7 +79,7 @@ static inline void vx_info_init_cacct(st
int i,j;
- for (i=0; i<5; i++) {
+ for (i=0; i<6; i++) {
for (j=0; j<3; j++) {
atomic_set(&cacct->sock[i][j].count, 0);
atomic_set(&cacct->sock[i][j].total, 0);
Index: linux-2.6.17/kernel/vserver/cvirt_proc.h
===================================================================
--- linux-2.6.17.orig/kernel/vserver/cvirt_proc.h
+++ linux-2.6.17/kernel/vserver/cvirt_proc.h
@@ -82,10 +82,11 @@ static inline long vx_sock_total(struct
static inline int vx_info_proc_cacct(struct _vx_cacct *cacct, char *buffer)
{
int i,j, length = 0;
- static char *type[] = { "UNSPEC", "UNIX", "INET", "INET6", "OTHER" };
+ static char *type[] = {
+ "UNSPEC", "UNIX", "INET", "INET6", "PACKET", "OTHER" };
length += sprintf(buffer + length, VX_SOCKA_TOP);
- for (i=0; i<5; i++) {
+ for (i=0; i<6; i++) {
length += sprintf(buffer + length,
"%s:", type[i]);
for (j=0; j<3; j++) {
|