patch-2.3.39 linux/include/net/sock.h
Next file: linux/include/net/tcp.h
Previous file: linux/include/net/snmp.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Mon Jan 10 18:30:37 2000
- Orig file:
v2.3.38/linux/include/net/sock.h
- Orig date:
Tue Dec 7 09:32:51 1999
diff -u --recursive --new-file v2.3.38/linux/include/net/sock.h linux/include/net/sock.h
@@ -635,9 +635,23 @@
unsigned short max_header;
unsigned long retransmits;
char name[32];
- int inuse, highestinuse;
+
+ struct {
+ int inuse;
+ u8 __pad[SMP_CACHE_BYTES - sizeof(int)];
+ } stats[NR_CPUS];
};
+/* Called with local bh disabled */
+static void __inline__ sock_prot_inc_use(struct proto *prot)
+{
+ prot->stats[smp_processor_id()].inuse++;
+}
+
+static void __inline__ sock_prot_dec_use(struct proto *prot)
+{
+ prot->stats[smp_processor_id()].inuse--;
+}
/* About 10 seconds */
#define SOCK_DESTROY_TIME (10*HZ)
@@ -731,6 +745,7 @@
extern void *sock_kmalloc(struct sock *sk, int size, int priority);
extern void sock_kfree_s(struct sock *sk, void *mem, int size);
+extern int copy_and_csum_toiovec(struct iovec *iov, struct sk_buff *skb, int hlen);
/*
* Functions to fill in entries in struct proto_ops when a protocol
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)