* [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Christoph Paasch @ 2011-01-09 20:55 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, Christoph Paasch
This patch reviews the include-files of net/tcp.h
Several #include where redundant. Some where not directly needed by
net/tcp.h
Files, including net/tcp.h where also including some the *.h-files that
net/tcp.h is already including. Thus, in these files the inclusion of
the *.h file is unnecessary.
Redundant includes in net/tcp.h:
linux/list.h --- included by linux/textsearch.h which is included by
linux/skbuff.h
linux/slab.h --- included by linux/crypto.h
linux/cache.h --- included by linux/skbuff.h
linux/skbuff.h --- included by net/sock.h
linux/kref.h --- included by linux/kobject.h, which is included by
linux/device.h, which is included by
linux/dmaengine.h, which is included by
linux/skbuff.h
net/inet_connection_sock.h --- included by net/inet_hashtables.h
net/checksum.h --- included by net/sock.h
net/request_sock.h --- included by net/inet_connection_sock.h
net/sock.h --- included by net/request_sock.h
net/snmp.h --- included by net/ip.h
net/dst.h --- included by net/sock.h
linux/seq_file.h --- included by net/neighbour.h, which is included by
net/dst.h
Include-files not directly needed by net/tcp.h:
linux/percpu.h
linux/dmaengine.h
net/tcp_states.h
net/inet_ecn.h
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
---
drivers/block/drbd/drbd_int.h | 4 ---
drivers/dma/ioat/dma.h | 1 -
drivers/dma/iovlock.c | 1 -
drivers/infiniband/core/cma.c | 1 -
drivers/infiniband/hw/nes/nes_cm.c | 4 ---
drivers/infiniband/hw/nes/nes_nic.c | 2 -
drivers/net/benet/be.h | 2 -
drivers/net/bna/bnad.h | 1 -
drivers/net/bnx2.c | 5 ----
drivers/net/bnx2x/bnx2x_main.c | 4 ---
drivers/net/cnic.c | 3 --
drivers/net/cxgb3/cxgb3_defs.h | 1 -
drivers/net/cxgb4/sge.c | 1 -
drivers/net/cxgb4vf/sge.c | 1 -
drivers/net/myri10ge/myri10ge.c | 5 ----
drivers/net/pch_gbe/pch_gbe.h | 1 -
drivers/net/s2io.c | 3 --
drivers/net/slhc.c | 5 ----
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 -
drivers/scsi/cxgbi/libcxgbi.c | 3 --
drivers/scsi/iscsi_tcp.c | 2 -
drivers/scsi/libiscsi.c | 1 -
drivers/scsi/libiscsi_tcp.c | 3 --
drivers/scsi/qla4xxx/ql4_def.h | 2 -
drivers/scsi/scsi_transport_iscsi.c | 1 -
fs/dlm/lowcomms.c | 2 -
fs/ocfs2/cluster/tcp.c | 2 -
include/linux/inet_lro.h | 1 -
include/net/netfilter/nf_tproxy_core.h | 3 --
include/net/tcp.h | 40 ++++++++------------------------
net/ceph/messenger.c | 1 -
net/core/netpoll.c | 1 -
net/core/sock.c | 6 ----
net/dccp/dccp.h | 2 -
net/dccp/ipv6.c | 1 +
net/ipv4/af_inet.c | 6 ----
net/ipv4/arp.c | 5 ----
net/ipv4/cipso_ipv4.c | 3 --
net/ipv4/fib_frontend.c | 5 ----
net/ipv4/fib_hash.c | 4 ---
net/ipv4/fib_rules.c | 2 -
net/ipv4/fib_semantics.c | 4 ---
net/ipv4/fib_trie.c | 5 ----
net/ipv4/icmp.c | 6 ----
net/ipv4/inet_diag.c | 5 ----
net/ipv4/inet_lro.c | 2 +
net/ipv4/ip_forward.c | 6 ----
net/ipv4/ip_input.c | 1 -
net/ipv4/netfilter/ipt_LOG.c | 1 -
net/ipv4/netfilter/ipt_REJECT.c | 4 ---
net/ipv4/netfilter/nf_nat_core.c | 3 --
net/ipv4/netfilter/nf_nat_h323.c | 1 -
net/ipv4/netfilter/nf_nat_helper.c | 3 --
net/ipv4/proc.c | 2 -
net/ipv4/route.c | 5 ----
net/ipv4/syncookies.c | 3 --
net/ipv4/sysctl_net_ipv4.c | 3 --
net/ipv4/tcp.c | 6 ----
net/ipv4/tcp_cong.c | 1 -
net/ipv4/tcp_diag.c | 2 -
net/ipv4/tcp_illinois.c | 1 -
net/ipv4/tcp_input.c | 3 +-
net/ipv4/tcp_ipv4.c | 5 ----
net/ipv4/tcp_minisocks.c | 1 -
net/ipv4/tcp_output.c | 1 +
net/ipv4/tcp_probe.c | 2 -
net/ipv4/tcp_vegas.c | 1 -
net/ipv4/tcp_veno.c | 1 -
net/ipv4/tcp_westwood.c | 1 -
net/ipv4/tcp_yeah.c | 1 -
net/ipv6/addrconf.c | 5 ----
net/ipv6/af_inet6.c | 2 -
net/ipv6/ipv6_sockglue.c | 3 --
net/ipv6/netfilter/ip6t_LOG.c | 1 -
net/ipv6/netfilter/ip6t_REJECT.c | 1 -
net/ipv6/proc.c | 3 --
net/ipv6/route.c | 4 ---
net/ipv6/syncookies.c | 2 -
net/ipv6/tcp_ipv6.c | 4 ---
net/netfilter/ipvs/ip_vs_app.c | 3 --
net/netfilter/ipvs/ip_vs_core.c | 3 --
net/netfilter/ipvs/ip_vs_ftp.c | 1 -
net/netfilter/ipvs/ip_vs_proto.c | 1 -
net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 -
net/netfilter/ipvs/ip_vs_xmit.c | 3 --
net/netfilter/nf_conntrack_ftp.c | 2 -
net/netfilter/nf_conntrack_proto_tcp.c | 2 -
net/netfilter/xt_TCPMSS.c | 3 --
net/netfilter/xt_TCPOPTSTRIP.c | 2 -
net/netfilter/xt_osf.c | 5 ----
net/netfilter/xt_socket.c | 2 -
net/netfilter/xt_tcpmss.c | 1 -
net/netfilter/xt_tcpudp.c | 1 -
net/rds/tcp.c | 1 -
net/rds/tcp_recv.c | 1 -
net/sched/act_csum.c | 3 --
net/sched/act_nat.c | 3 --
net/sunrpc/svcsock.c | 6 ----
net/sunrpc/xprtsock.c | 4 ---
security/selinux/hooks.c | 3 --
100 files changed, 15 insertions(+), 284 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 1ea1a34..e947b2d 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -29,13 +29,9 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/version.h>
-#include <linux/list.h>
#include <linux/sched.h>
#include <linux/bitops.h>
-#include <linux/slab.h>
-#include <linux/crypto.h>
#include <linux/ratelimit.h>
-#include <linux/tcp.h>
#include <linux/mutex.h>
#include <linux/major.h>
#include <linux/blkdev.h>
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index 5216c8a..ea07750 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -26,7 +26,6 @@
#include "registers.h"
#include <linux/init.h>
#include <linux/dmapool.h>
-#include <linux/cache.h>
#include <linux/pci_ids.h>
#include <net/tcp.h>
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c
index bb48a57..c0a272c 100644
--- a/drivers/dma/iovlock.c
+++ b/drivers/dma/iovlock.c
@@ -27,7 +27,6 @@
#include <linux/dmaengine.h>
#include <linux/pagemap.h>
-#include <linux/slab.h>
#include <net/tcp.h> /* for memcpy_toiovec */
#include <asm/io.h>
#include <asm/uaccess.h>
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 6884da2..7475b09 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -40,7 +40,6 @@
#include <linux/random.h>
#include <linux/idr.h>
#include <linux/inetdevice.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include <net/ipv6.h>
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 25ad0f9..2518bf2 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -35,9 +35,7 @@
#define TCPOPT_TIMESTAMP 8
#include <asm/atomic.h>
-#include <linux/skbuff.h>
#include <linux/ip.h>
-#include <linux/tcp.h>
#include <linux/init.h>
#include <linux/if_arp.h>
#include <linux/if_vlan.h>
@@ -50,10 +48,8 @@
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/random.h>
-#include <linux/list.h>
#include <linux/threads.h>
#include <linux/highmem.h>
-#include <linux/slab.h>
#include <net/arp.h>
#include <net/neighbour.h>
#include <net/route.h>
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 3892e2c..8d2a43b 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -36,11 +36,9 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ip.h>
-#include <linux/tcp.h>
#include <linux/if_arp.h>
#include <linux/if_vlan.h>
#include <linux/ethtool.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include <net/inet_common.h>
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index d64313b..f0df37c 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -23,13 +23,11 @@
#include <linux/version.h>
#include <linux/delay.h>
#include <net/tcp.h>
-#include <net/ip.h>
#include <net/ipv6.h>
#include <linux/if_vlan.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/firmware.h>
-#include <linux/slab.h>
#include "be_hw.h"
diff --git a/drivers/net/bna/bnad.h b/drivers/net/bna/bnad.h
index ebc3a90..30fdc90 100644
--- a/drivers/net/bna/bnad.h
+++ b/drivers/net/bna/bnad.h
@@ -29,7 +29,6 @@
#include <asm/checksum.h>
#include <net/ip6_checksum.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include "bna.h"
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 062600b..51625b9 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -18,14 +18,12 @@
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
-#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h>
#include <asm/io.h>
@@ -37,13 +35,10 @@
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/if_vlan.h>
-#include <net/ip.h>
#include <net/tcp.h>
-#include <net/checksum.h>
#include <linux/workqueue.h>
#include <linux/crc32.h>
#include <linux/prefetch.h>
-#include <linux/cache.h>
#include <linux/firmware.h>
#include <linux/log2.h>
#include <linux/aer.h>
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 9709b85..5d87318 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -22,13 +22,11 @@
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
-#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h>
#include <linux/irq.h>
@@ -38,9 +36,7 @@
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/if_vlan.h>
-#include <net/ip.h>
#include <net/tcp.h>
-#include <net/checksum.h>
#include <net/ip6_checksum.h>
#include <linux/workqueue.h>
#include <linux/crc32.h>
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 6dff321..3f47a8a 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -16,8 +16,6 @@
#include <linux/kernel.h>
#include <linux/errno.h>
-#include <linux/list.h>
-#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/netdevice.h>
@@ -30,7 +28,6 @@
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define BCM_VLAN 1
#endif
-#include <net/ip.h>
#include <net/tcp.h>
#include <net/route.h>
#include <net/ipv6.h>
diff --git a/drivers/net/cxgb3/cxgb3_defs.h b/drivers/net/cxgb3/cxgb3_defs.h
index 920d918..fd1c520 100644
--- a/drivers/net/cxgb3/cxgb3_defs.h
+++ b/drivers/net/cxgb3/cxgb3_defs.h
@@ -32,7 +32,6 @@
#ifndef _CHELSIO_DEFS_H
#define _CHELSIO_DEFS_H
-#include <linux/skbuff.h>
#include <net/tcp.h>
#include "t3cdev.h"
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index 1702225..ca0f062 100644
--- a/drivers/net/cxgb4/sge.c
+++ b/drivers/net/cxgb4/sge.c
@@ -32,7 +32,6 @@
* SOFTWARE.
*/
-#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index ecf0770..d051a5f 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -33,7 +33,6 @@
* SOFTWARE.
*/
-#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 8524cc4..5677677 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -40,9 +40,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-#include <linux/tcp.h>
#include <linux/netdevice.h>
-#include <linux/skbuff.h>
#include <linux/string.h>
#include <linux/module.h>
#include <linux/pci.h>
@@ -64,9 +62,6 @@
#include <linux/moduleparam.h>
#include <linux/io.h>
#include <linux/log2.h>
-#include <linux/slab.h>
-#include <net/checksum.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <asm/byteorder.h>
#include <asm/io.h>
diff --git a/drivers/net/pch_gbe/pch_gbe.h b/drivers/net/pch_gbe/pch_gbe.h
index a0c26a9..264088a 100644
--- a/drivers/net/pch_gbe/pch_gbe.h
+++ b/drivers/net/pch_gbe/pch_gbe.h
@@ -30,7 +30,6 @@
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/vmalloc.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <net/udp.h>
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index ecc25aa..f0e243f 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -64,7 +64,6 @@
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/mdio.h>
-#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/stddef.h>
@@ -74,10 +73,8 @@
#include <linux/workqueue.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
-#include <linux/tcp.h>
#include <linux/uaccess.h>
#include <linux/io.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include <asm/system.h>
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c
index ab9e3b7..869d0bc 100644
--- a/drivers/net/slhc.c
+++ b/drivers/net/slhc.c
@@ -51,7 +51,6 @@
*/
#include <linux/module.h>
-#include <linux/slab.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/errno.h>
@@ -68,16 +67,12 @@
#include <linux/fcntl.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/icmp.h>
#include <net/tcp.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
#include <linux/timer.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-#include <net/checksum.h>
#include <asm/unaligned.h>
static unsigned char *encode(unsigned char *cp, unsigned short n);
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 8c04fad..8b95399 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -18,7 +18,6 @@
#include <linux/moduleparam.h>
#include <scsi/scsi_host.h>
#include <net/tcp.h>
-#include <net/dst.h>
#include <linux/netdevice.h>
#include "t4_msg.h"
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index be56617..f3ca6b2 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -13,8 +13,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
-#include <linux/skbuff.h>
-#include <linux/crypto.h>
#include <linux/scatterlist.h>
#include <linux/pci.h>
#include <scsi/scsi.h>
@@ -22,7 +20,6 @@
#include <scsi/scsi_host.h>
#include <linux/if_vlan.h>
#include <linux/inet.h>
-#include <net/dst.h>
#include <net/route.h>
#include <linux/inetdevice.h> /* ip_dev_find */
#include <net/tcp.h>
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index fec47de..48a10ac 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -28,10 +28,8 @@
#include <linux/types.h>
#include <linux/inet.h>
-#include <linux/slab.h>
#include <linux/file.h>
#include <linux/blkdev.h>
-#include <linux/crypto.h>
#include <linux/delay.h>
#include <linux/kfifo.h>
#include <linux/scatterlist.h>
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index c15fde8..90bef29 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -25,7 +25,6 @@
#include <linux/kfifo.h>
#include <linux/delay.h>
#include <linux/log2.h>
-#include <linux/slab.h>
#include <asm/unaligned.h>
#include <net/tcp.h>
#include <scsi/scsi_cmnd.h>
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index 8eeb39f..946dff5 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -27,12 +27,9 @@
*/
#include <linux/types.h>
-#include <linux/list.h>
#include <linux/inet.h>
-#include <linux/slab.h>
#include <linux/file.h>
#include <linux/blkdev.h>
-#include <linux/crypto.h>
#include <linux/delay.h>
#include <linux/kfifo.h>
#include <linux/scatterlist.h>
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 0f3bfc3..5b6a212 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -12,11 +12,9 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>
-#include <linux/list.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/sched.h>
-#include <linux/slab.h>
#include <linux/dmapool.h>
#include <linux/mempool.h>
#include <linux/spinlock.h>
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 332387a..b1d1e62 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -22,7 +22,6 @@
*/
#include <linux/module.h>
#include <linux/mutex.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 37a34c2..afb84f5 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -45,13 +45,11 @@
*/
#include <asm/ioctls.h>
-#include <net/sock.h>
#include <net/tcp.h>
#include <linux/pagemap.h>
#include <linux/file.h>
#include <linux/mutex.h>
#include <linux/sctp.h>
-#include <linux/slab.h>
#include <net/sctp/user.h>
#include <net/ipv6.h>
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 9aa426e..be7979b 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -55,9 +55,7 @@
#include <linux/kernel.h>
#include <linux/jiffies.h>
-#include <linux/slab.h>
#include <linux/idr.h>
-#include <linux/kref.h>
#include <linux/net.h>
#include <net/tcp.h>
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h
index c4335fa..62ebac7 100644
--- a/include/linux/inet_lro.h
+++ b/include/linux/inet_lro.h
@@ -28,7 +28,6 @@
#ifndef __INET_LRO_H_
#define __INET_LRO_H_
-#include <net/ip.h>
#include <net/tcp.h>
/*
diff --git a/include/net/netfilter/nf_tproxy_core.h b/include/net/netfilter/nf_tproxy_core.h
index cd85b3b..e8ea472 100644
--- a/include/net/netfilter/nf_tproxy_core.h
+++ b/include/net/netfilter/nf_tproxy_core.h
@@ -3,9 +3,6 @@
#include <linux/types.h>
#include <linux/in.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
-#include <net/inet_hashtables.h>
#include <net/inet6_hashtables.h>
#include <net/tcp.h>
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e36c874..5bd3122 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -21,30 +21,13 @@
#define TCP_DEBUG 1
#define FASTRETRANS_DEBUG 1
-#include <linux/list.h>
#include <linux/tcp.h>
-#include <linux/slab.h>
-#include <linux/cache.h>
-#include <linux/percpu.h>
-#include <linux/skbuff.h>
-#include <linux/dmaengine.h>
#include <linux/crypto.h>
#include <linux/cryptohash.h>
-#include <linux/kref.h>
-#include <net/inet_connection_sock.h>
#include <net/inet_timewait_sock.h>
#include <net/inet_hashtables.h>
-#include <net/checksum.h>
-#include <net/request_sock.h>
-#include <net/sock.h>
-#include <net/snmp.h>
#include <net/ip.h>
-#include <net/tcp_states.h>
-#include <net/inet_ecn.h>
-#include <net/dst.h>
-
-#include <linux/seq_file.h>
extern struct inet_hashinfo tcp_hashinfo;
@@ -258,7 +241,7 @@ extern int tcp_memory_pressure;
static inline int before(__u32 seq1, __u32 seq2)
{
- return (__s32)(seq1-seq2) < 0;
+ return (__s32) (seq1 - seq2) < 0;
}
#define after(seq2, seq1) before(seq1, seq2)
@@ -421,7 +404,7 @@ extern int tcp_disconnect(struct sock *sk, int flags);
/* From syncookies.c */
-extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
+extern __u32 syncookie_secret[2][16 - 4 + SHA_DIGEST_WORDS];
extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
struct ip_options *opt);
extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
@@ -498,7 +481,7 @@ extern void tcp_get_info(struct sock *, struct tcp_info *);
/* Read 'sendfile()'-style from a TCP socket */
typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *,
- unsigned int, size_t);
+ unsigned int, size_t);
extern int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
sk_read_actor_t recv_actor);
@@ -578,9 +561,9 @@ extern u32 __tcp_select_window(struct sock *sk);
* to use only the low 32-bits of jiffies and hide the ugly
* casts with the following macro.
*/
-#define tcp_time_stamp ((__u32)(jiffies))
+#define tcp_time_stamp ((__u32) (jiffies))
-#define tcp_flag_byte(th) (((u_int8_t *)th)[13])
+#define tcp_flag_byte(th) (((u_int8_t *) th)[13])
#define TCPHDR_FIN 0x01
#define TCPHDR_SYN 0x02
@@ -620,7 +603,7 @@ struct tcp_skb_cb {
__u32 ack_seq; /* Sequence number ACK'd */
};
-#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *)&((__skb)->cb[0]))
+#define TCP_SKB_CB(__skb) ((struct tcp_skb_cb *) &((__skb)->cb[0]))
/* Due to TSO, an SKB can be composed of multiple actual
* packets. To keep these tracked properly, we use this.
@@ -962,9 +945,9 @@ extern void tcp_select_initial_window(int __space, __u32 mss,
static inline int tcp_win_from_space(int space)
{
- return sysctl_tcp_adv_win_scale<=0 ?
- (space>>(-sysctl_tcp_adv_win_scale)) :
- space - (space>>sysctl_tcp_adv_win_scale);
+ return sysctl_tcp_adv_win_scale <= 0 ?
+ (space >> (- sysctl_tcp_adv_win_scale)) :
+ space - (space >> sysctl_tcp_adv_win_scale);
}
/* Note: caller must be prepared to deal with negative returns */
@@ -1094,9 +1077,6 @@ static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp)
tp->retransmit_skb_hint = NULL;
}
-/* MD5 Signature */
-struct crypto_hash;
-
/* - key database */
struct tcp_md5sig_key {
u8 *key;
@@ -1529,7 +1509,7 @@ struct tcp_extend_values {
static inline struct tcp_extend_values *tcp_xv(struct request_values *rvp)
{
- return (struct tcp_extend_values *)rvp;
+ return (struct tcp_extend_values *) rvp;
}
extern void tcp_v4_init(void);
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b6ff4a1..480f82e 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -6,7 +6,6 @@
#include <linux/inet.h>
#include <linux/kthread.h>
#include <linux/net.h>
-#include <linux/slab.h>
#include <linux/socket.h>
#include <linux/string.h>
#include <linux/bio.h>
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4e98ffa..30b1d37 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -22,7 +22,6 @@
#include <linux/delay.h>
#include <linux/rcupdate.h>
#include <linux/workqueue.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <asm/unaligned.h>
diff --git a/net/core/sock.c b/net/core/sock.c
index e5af8d5..71634cb 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -97,17 +97,14 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/string.h>
#include <linux/sockios.h>
#include <linux/net.h>
#include <linux/mm.h>
-#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/poll.h>
-#include <linux/tcp.h>
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/user_namespace.h>
@@ -117,10 +114,7 @@
#include <linux/netdevice.h>
#include <net/protocol.h>
-#include <linux/skbuff.h>
#include <net/net_namespace.h>
-#include <net/request_sock.h>
-#include <net/sock.h>
#include <linux/net_tstamp.h>
#include <net/xfrm.h>
#include <linux/ipsec.h>
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index a8ed459..d5f8b9e 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -14,8 +14,6 @@
#include <linux/dccp.h>
#include <linux/ktime.h>
-#include <net/snmp.h>
-#include <net/sock.h>
#include <net/tcp.h>
#include "ackvec.h"
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index dca711d..9930e1a 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -23,6 +23,7 @@
#include <net/inet_sock.h>
#include <net/inet6_connection_sock.h>
#include <net/inet6_hashtables.h>
+#include <net/inet_ecn.h>
#include <net/ip6_route.h>
#include <net/ipv6.h>
#include <net/protocol.h>
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index f581f77..f1cff70 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -86,7 +86,6 @@
#include <linux/poll.h>
#include <linux/netfilter_ipv4.h>
#include <linux/random.h>
-#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -95,18 +94,13 @@
#include <linux/igmp.h>
#include <linux/inetdevice.h>
#include <linux/netdevice.h>
-#include <net/checksum.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/arp.h>
#include <net/route.h>
#include <net/ip_fib.h>
-#include <net/inet_connection_sock.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/udplite.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
#include <net/raw.h>
#include <net/icmp.h>
#include <net/ipip.h>
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index d8e540c..ec29d0a 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -90,26 +90,21 @@
#include <linux/fddidevice.h>
#include <linux/if_arp.h>
#include <linux/trdevice.h>
-#include <linux/skbuff.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/net.h>
#include <linux/rcupdate.h>
#include <linux/jhash.h>
-#include <linux/slab.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
#endif
#include <net/net_namespace.h>
-#include <net/ip.h>
#include <net/icmp.h>
#include <net/route.h>
#include <net/protocol.h>
#include <net/tcp.h>
-#include <net/sock.h>
#include <net/arp.h>
#include <net/ax25.h>
#include <net/netrom.h>
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 094e150..e99b0c2 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -39,13 +39,10 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/rcupdate.h>
-#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/jhash.h>
#include <linux/audit.h>
-#include <linux/slab.h>
-#include <net/ip.h>
#include <net/icmp.h>
#include <net/tcp.h>
#include <net/netlabel.h>
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index c19c1f7..bd5f286 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -31,16 +31,11 @@
#include <linux/netdevice.h>
#include <linux/if_addr.h>
#include <linux/if_arp.h>
-#include <linux/skbuff.h>
#include <linux/init.h>
-#include <linux/list.h>
-#include <linux/slab.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/route.h>
#include <net/tcp.h>
-#include <net/sock.h>
#include <net/arp.h>
#include <net/ip_fib.h>
#include <net/rtnetlink.h>
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index b3acb04..aafa420 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -29,17 +29,13 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/proc_fs.h>
-#include <linux/skbuff.h>
#include <linux/netlink.h>
#include <linux/init.h>
-#include <linux/slab.h>
#include <net/net_namespace.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/route.h>
#include <net/tcp.h>
-#include <net/sock.h>
#include <net/ip_fib.h>
#include "fib_lookup.h"
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 7981a24..1b13f54 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -24,9 +24,7 @@
#include <linux/netlink.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
-#include <linux/list.h>
#include <linux/rcupdate.h>
-#include <net/ip.h>
#include <net/route.h>
#include <net/tcp.h>
#include <net/ip_fib.h>
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 3e0da3e..c7020cb 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -30,16 +30,12 @@
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/proc_fs.h>
-#include <linux/skbuff.h>
#include <linux/init.h>
-#include <linux/slab.h>
#include <net/arp.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/route.h>
#include <net/tcp.h>
-#include <net/sock.h>
#include <net/ip_fib.h>
#include <net/netlink.h>
#include <net/nexthop.h>
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 0f28034..a7860ea 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -67,17 +67,12 @@
#include <linux/if_arp.h>
#include <linux/proc_fs.h>
#include <linux/rcupdate.h>
-#include <linux/skbuff.h>
#include <linux/netlink.h>
#include <linux/init.h>
-#include <linux/list.h>
-#include <linux/slab.h>
#include <net/net_namespace.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/route.h>
#include <net/tcp.h>
-#include <net/sock.h>
#include <net/ip_fib.h>
#include "fib_lookup.h"
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index e5d1a44..255f93a 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -74,23 +74,17 @@
#include <linux/netdevice.h>
#include <linux/string.h>
#include <linux/netfilter_ipv4.h>
-#include <linux/slab.h>
-#include <net/snmp.h>
-#include <net/ip.h>
#include <net/route.h>
#include <net/protocol.h>
#include <net/icmp.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/raw.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
#include <linux/errno.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-#include <net/checksum.h>
#include <net/xfrm.h>
#include <net/inet_common.h>
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 2ada171..eb51603 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -14,8 +14,6 @@
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/random.h>
-#include <linux/slab.h>
-#include <linux/cache.h>
#include <linux/init.h>
#include <linux/time.h>
@@ -23,9 +21,6 @@
#include <net/tcp.h>
#include <net/ipv6.h>
#include <net/inet_common.h>
-#include <net/inet_connection_sock.h>
-#include <net/inet_hashtables.h>
-#include <net/inet_timewait_sock.h>
#include <net/inet6_hashtables.h>
#include <net/netlink.h>
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index 47038cb..c54cb6e 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -30,6 +30,8 @@
#include <linux/if_vlan.h>
#include <linux/inet_lro.h>
+#include <net/inet_ecn.h>
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jan-Bernd Themann <themann@de.ibm.com>");
MODULE_DESCRIPTION("Large Receive Offload (ipv4 / tcp)");
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 99461f0..bda6ce5 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -21,20 +21,14 @@
#include <linux/types.h>
#include <linux/mm.h>
-#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/icmp.h>
#include <linux/netdevice.h>
-#include <linux/slab.h>
-#include <net/sock.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/icmp.h>
-#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/netfilter_ipv4.h>
-#include <net/checksum.h>
#include <linux/route.h>
#include <net/route.h>
#include <net/xfrm.h>
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index d859bcc..58c069e 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -188,7 +188,6 @@ int ip_call_ra_chain(struct sk_buff *skb)
static int ip_local_deliver_finish(struct sk_buff *skb)
{
struct net *net = dev_net(skb->dev);
-
__skb_pull(skb, ip_hdrlen(skb));
/* Point into the IP datagram, just past the header. */
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 72ffc8f..227be20 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -12,7 +12,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/spinlock.h>
-#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ip.h>
#include <net/icmp.h>
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 43eec80..1edbcc2 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -11,16 +11,12 @@
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/skbuff.h>
-#include <linux/slab.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <linux/icmp.h>
#include <net/icmp.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <net/route.h>
-#include <net/dst.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_REJECT.h>
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index c04787c..f542fbb 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -11,11 +11,8 @@
#include <linux/module.h>
#include <linux/types.h>
#include <linux/timer.h>
-#include <linux/skbuff.h>
#include <linux/gfp.h>
-#include <net/checksum.h>
#include <net/icmp.h>
-#include <net/ip.h>
#include <net/tcp.h> /* For tcp_prot in getorigdst */
#include <linux/icmp.h>
#include <linux/udp.h>
diff --git a/net/ipv4/netfilter/nf_nat_h323.c b/net/ipv4/netfilter/nf_nat_h323.c
index 790f316..704a23e 100644
--- a/net/ipv4/netfilter/nf_nat_h323.c
+++ b/net/ipv4/netfilter/nf_nat_h323.c
@@ -10,7 +10,6 @@
*/
#include <linux/module.h>
-#include <linux/tcp.h>
#include <net/tcp.h>
#include <net/netfilter/nf_nat.h>
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c
index 31427fb..7b9b959 100644
--- a/net/ipv4/netfilter/nf_nat_helper.c
+++ b/net/ipv4/netfilter/nf_nat_helper.c
@@ -12,10 +12,7 @@
#include <linux/kmod.h>
#include <linux/types.h>
#include <linux/timer.h>
-#include <linux/skbuff.h>
-#include <linux/tcp.h>
#include <linux/udp.h>
-#include <net/checksum.h>
#include <net/tcp.h>
#include <net/route.h>
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index b14ec7d..1f3058b 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -41,8 +41,6 @@
#include <linux/bottom_half.h>
#include <linux/inetdevice.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <net/sock.h>
#include <net/raw.h>
/*
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 93bfd95..af204f4 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -80,7 +80,6 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/workqueue.h>
-#include <linux/skbuff.h>
#include <linux/inetdevice.h>
#include <linux/igmp.h>
#include <linux/pkt_sched.h>
@@ -90,14 +89,10 @@
#include <linux/jhash.h>
#include <linux/rcupdate.h>
#include <linux/times.h>
-#include <linux/slab.h>
-#include <net/dst.h>
#include <net/net_namespace.h>
#include <net/protocol.h>
-#include <net/ip.h>
#include <net/route.h>
#include <net/inetpeer.h>
-#include <net/sock.h>
#include <net/ip_fib.h>
#include <net/arp.h>
#include <net/tcp.h>
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 650cace..064d764 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -10,10 +10,7 @@
* 2 of the License, or (at your option) any later version.
*/
-#include <linux/tcp.h>
-#include <linux/slab.h>
#include <linux/random.h>
-#include <linux/cryptohash.h>
#include <linux/kernel.h>
#include <net/tcp.h>
#include <net/route.h>
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 1b4ec21..391cf76 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -12,10 +12,7 @@
#include <linux/inetdevice.h>
#include <linux/seqlock.h>
#include <linux/init.h>
-#include <linux/slab.h>
-#include <net/snmp.h>
#include <net/icmp.h>
-#include <net/ip.h>
#include <net/route.h>
#include <net/tcp.h>
#include <net/udp.h>
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index f15c36a..a917b0b 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -252,7 +252,6 @@
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/fs.h>
-#include <linux/skbuff.h>
#include <linux/scatterlist.h>
#include <linux/splice.h>
#include <linux/net.h>
@@ -261,18 +260,13 @@
#include <linux/bootmem.h>
#include <linux/highmem.h>
#include <linux/swap.h>
-#include <linux/cache.h>
#include <linux/err.h>
-#include <linux/crypto.h>
#include <linux/time.h>
-#include <linux/slab.h>
#include <net/icmp.h>
#include <net/tcp.h>
#include <net/xfrm.h>
-#include <net/ip.h>
#include <net/netdma.h>
-#include <net/sock.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 850c737..0462c67 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -9,7 +9,6 @@
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
-#include <linux/list.h>
#include <linux/gfp.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 939edb3..a35bfb6 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -13,8 +13,6 @@
#include <linux/module.h>
#include <linux/inet_diag.h>
-#include <linux/tcp.h>
-
#include <net/tcp.h>
static void tcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index 00ca688..546cc48 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -13,7 +13,6 @@
*/
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <asm/div64.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6d8ab1c..43b27e7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -62,13 +62,12 @@
*/
#include <linux/mm.h>
-#include <linux/slab.h>
#include <linux/module.h>
#include <linux/sysctl.h>
#include <linux/kernel.h>
-#include <net/dst.h>
#include <net/tcp.h>
#include <net/inet_common.h>
+#include <net/inet_ecn.h>
#include <linux/ipsec.h>
#include <asm/unaligned.h>
#include <net/netdma.h>
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index d978bb2..028fc57 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -56,15 +56,12 @@
#include <linux/fcntl.h>
#include <linux/module.h>
#include <linux/random.h>
-#include <linux/cache.h>
#include <linux/jhash.h>
#include <linux/init.h>
#include <linux/times.h>
-#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/icmp.h>
-#include <net/inet_hashtables.h>
#include <net/tcp.h>
#include <net/transp_v6.h>
#include <net/ipv6.h>
@@ -77,9 +74,7 @@
#include <linux/ipv6.h>
#include <linux/stddef.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/crypto.h>
#include <linux/scatterlist.h>
int sysctl_tcp_tw_reuse __read_mostly;
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index a66735f..ccbc61b 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -20,7 +20,6 @@
#include <linux/mm.h>
#include <linux/module.h>
-#include <linux/slab.h>
#include <linux/sysctl.h>
#include <linux/workqueue.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 61c2463..d4da881 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -35,6 +35,7 @@
*/
#include <net/tcp.h>
+#include <net/inet_ecn.h>
#include <linux/compiler.h>
#include <linux/gfp.h>
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index 6211e21..4af3525 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -21,8 +21,6 @@
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include <linux/socket.h>
-#include <linux/tcp.h>
-#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <linux/ktime.h>
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index c6743ee..b4e0cc3 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -33,7 +33,6 @@
#include <linux/mm.h>
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c
index 38bc0b5..9c922a6 100644
--- a/net/ipv4/tcp_veno.c
+++ b/net/ipv4/tcp_veno.c
@@ -11,7 +11,6 @@
#include <linux/mm.h>
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index a534dda..55ce2bd 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -23,7 +23,6 @@
#include <linux/mm.h>
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <net/tcp.h>
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index a0f2403..afa7b9b 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -8,7 +8,6 @@
*/
#include <linux/mm.h>
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/inet_diag.h>
#include <net/tcp.h>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 848b355..de9eed0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -53,7 +53,6 @@
#include <linux/route.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
-#include <linux/slab.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
#endif
@@ -63,8 +62,6 @@
#include <linux/string.h>
#include <net/net_namespace.h>
-#include <net/sock.h>
-#include <net/snmp.h>
#include <net/ipv6.h>
#include <net/protocol.h>
@@ -72,7 +69,6 @@
#include <net/ip6_route.h>
#include <net/addrconf.h>
#include <net/tcp.h>
-#include <net/ip.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <linux/if_tunnel.h>
@@ -86,7 +82,6 @@
#include <asm/unaligned.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
/* Set to 3 to get tracing... */
#define ACONF_DEBUG 2
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 54e8e42..4f88f57 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -36,14 +36,12 @@
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/init.h>
-#include <linux/slab.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
#include <linux/icmpv6.h>
#include <linux/netfilter_ipv6.h>
-#include <net/ip.h>
#include <net/ipv6.h>
#include <net/udp.h>
#include <net/udplite.h>
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index d1770e0..8c57522 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -36,10 +36,7 @@
#include <linux/init.h>
#include <linux/sysctl.h>
#include <linux/netfilter.h>
-#include <linux/slab.h>
-#include <net/sock.h>
-#include <net/snmp.h>
#include <net/ipv6.h>
#include <net/ndisc.h>
#include <net/protocol.h>
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 09c8889..6a15d2c 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -11,7 +11,6 @@
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ip.h>
#include <linux/spinlock.h>
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index 2933396..97f5559 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -18,7 +18,6 @@
#include <linux/gfp.h>
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/icmpv6.h>
#include <linux/netdevice.h>
#include <net/ipv6.h>
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 24b3558..05d0a01 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -19,11 +19,8 @@
#include <linux/net.h>
#include <linux/ipv6.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/stddef.h>
#include <net/net_namespace.h>
-#include <net/ip.h>
-#include <net/sock.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/transp_v6.h>
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7659d6f..4ad5609 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -38,11 +38,8 @@
#include <linux/init.h>
#include <linux/if_arp.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/nsproxy.h>
-#include <linux/slab.h>
#include <net/net_namespace.h>
-#include <net/snmp.h>
#include <net/ipv6.h>
#include <net/ip6_fib.h>
#include <net/ip6_route.h>
@@ -50,7 +47,6 @@
#include <net/addrconf.h>
#include <net/tcp.h>
#include <linux/rtnetlink.h>
-#include <net/dst.h>
#include <net/xfrm.h>
#include <net/netevent.h>
#include <net/netlink.h>
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 09fd34f..edf879a 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -14,9 +14,7 @@
*
*/
-#include <linux/tcp.h>
#include <linux/random.h>
-#include <linux/cryptohash.h>
#include <linux/kernel.h>
#include <net/ipv6.h>
#include <net/tcp.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 7e41e2c..ea31a6c 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -38,7 +38,6 @@
#include <linux/jhash.h>
#include <linux/ipsec.h>
#include <linux/times.h>
-#include <linux/slab.h>
#include <linux/ipv6.h>
#include <linux/icmpv6.h>
@@ -56,7 +55,6 @@
#include <net/inet_ecn.h>
#include <net/protocol.h>
#include <net/xfrm.h>
-#include <net/snmp.h>
#include <net/dsfield.h>
#include <net/timewait_sock.h>
#include <net/netdma.h>
@@ -65,9 +63,7 @@
#include <asm/uaccess.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/crypto.h>
#include <linux/scatterlist.h>
static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb);
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
index a475ede..eff8bc5 100644
--- a/net/netfilter/ipvs/ip_vs_app.c
+++ b/net/netfilter/ipvs/ip_vs_app.c
@@ -23,18 +23,15 @@
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/netfilter.h>
-#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/protocol.h>
#include <net/tcp.h>
#include <asm/system.h>
#include <linux/stat.h>
#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
#include <linux/mutex.h>
#include <net/ip_vs.h>
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index b4e51e9..1320e63 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -30,12 +30,9 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ip.h>
-#include <linux/tcp.h>
#include <linux/sctp.h>
#include <linux/icmp.h>
-#include <linux/slab.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/icmp.h> /* for icmp_send */
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 7545500..d87af27 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -28,7 +28,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
-#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/netfilter.h>
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index c539983..fff800e 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -18,7 +18,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/skbuff.h>
#include <linux/gfp.h>
#include <linux/in.h>
#include <linux/ip.h>
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c
index f6c5200..42d7e8b 100644
--- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
@@ -18,8 +18,6 @@
#include <linux/kernel.h>
#include <linux/ip.h>
-#include <linux/tcp.h> /* for tcphdr */
-#include <net/ip.h>
#include <net/tcp.h> /* for csum_tcpudp_magic */
#include <net/ip6_checksum.h>
#include <linux/netfilter.h>
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index de04ea3..e8df9b7 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -27,9 +27,6 @@
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/tcp.h> /* for tcphdr */
-#include <net/ip.h>
#include <net/tcp.h> /* for csum_tcpudp_magic */
#include <net/udp.h>
#include <net/icmp.h> /* for icmp_send */
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index e17cb7c..8025026 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -13,11 +13,9 @@
#include <linux/moduleparam.h>
#include <linux/netfilter.h>
#include <linux/ip.h>
-#include <linux/slab.h>
#include <linux/ipv6.h>
#include <linux/ctype.h>
#include <linux/inet.h>
-#include <net/checksum.h>
#include <net/tcp.h>
#include <net/netfilter/nf_conntrack.h>
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 3fb2b73..7542a2f 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -10,9 +10,7 @@
#include <linux/timer.h>
#include <linux/module.h>
#include <linux/in.h>
-#include <linux/tcp.h>
#include <linux/spinlock.h>
-#include <linux/skbuff.h>
#include <linux/ipv6.h>
#include <net/ip6_checksum.h>
#include <asm/unaligned.h>
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index eb81c38..bfff091 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -9,12 +9,9 @@
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/gfp.h>
#include <linux/ipv6.h>
-#include <linux/tcp.h>
-#include <net/dst.h>
#include <net/flow.h>
#include <net/ipv6.h>
#include <net/route.h>
diff --git a/net/netfilter/xt_TCPOPTSTRIP.c b/net/netfilter/xt_TCPOPTSTRIP.c
index 9dc9ecf..4b12bad 100644
--- a/net/netfilter/xt_TCPOPTSTRIP.c
+++ b/net/netfilter/xt_TCPOPTSTRIP.c
@@ -10,10 +10,8 @@
*/
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
-#include <linux/tcp.h>
#include <net/ipv6.h>
#include <net/tcp.h>
#include <linux/netfilter/x_tables.h>
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 4327e10..b7b696a 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -23,13 +23,8 @@
#include <linux/if.h>
#include <linux/inetdevice.h>
#include <linux/ip.h>
-#include <linux/list.h>
#include <linux/rculist.h>
-#include <linux/skbuff.h>
-#include <linux/slab.h>
-#include <linux/tcp.h>
-#include <net/ip.h>
#include <net/tcp.h>
#include <linux/netfilter/nfnetlink.h>
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c
index 00d6ae8..3f63ec5 100644
--- a/net/netfilter/xt_socket.c
+++ b/net/netfilter/xt_socket.c
@@ -11,13 +11,11 @@
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/icmp.h>
-#include <net/sock.h>
#include <net/inet_sock.h>
#include <net/netfilter/nf_tproxy_core.h>
#include <net/netfilter/ipv4/nf_defrag_ipv4.h>
diff --git a/net/netfilter/xt_tcpmss.c b/net/netfilter/xt_tcpmss.c
index c53d4d1..19f71a4 100644
--- a/net/netfilter/xt_tcpmss.c
+++ b/net/netfilter/xt_tcpmss.c
@@ -9,7 +9,6 @@
*/
#include <linux/module.h>
-#include <linux/skbuff.h>
#include <net/tcp.h>
#include <linux/netfilter/xt_tcpmss.h>
diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c
index c14d464..ca24142 100644
--- a/net/netfilter/xt_tcpudp.c
+++ b/net/netfilter/xt_tcpudp.c
@@ -1,7 +1,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>
#include <linux/module.h>
-#include <net/ip.h>
#include <linux/ipv6.h>
#include <net/ipv6.h>
#include <net/tcp.h>
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 8e0a320..15814ea 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -31,7 +31,6 @@
*
*/
#include <linux/kernel.h>
-#include <linux/slab.h>
#include <linux/in.h>
#include <net/tcp.h>
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 78205e2..82a2614 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -31,7 +31,6 @@
*
*/
#include <linux/kernel.h>
-#include <linux/slab.h>
#include <net/tcp.h>
#include "rds.h"
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index 67dc7ce..55354e6 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -20,9 +20,6 @@
#include <net/netlink.h>
#include <linux/rtnetlink.h>
-#include <linux/skbuff.h>
-
-#include <net/ip.h>
#include <net/ipv6.h>
#include <net/icmp.h>
#include <linux/icmpv6.h>
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 186eb83..0dda31a 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -15,14 +15,11 @@
#include <linux/module.h>
#include <linux/netfilter.h>
#include <linux/rtnetlink.h>
-#include <linux/skbuff.h>
-#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/tc_act/tc_nat.h>
#include <net/act_api.h>
#include <net/icmp.h>
-#include <net/ip.h>
#include <net/netlink.h>
#include <net/tc_act/tc_nat.h>
#include <net/tcp.h>
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 07919e1..8659740 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -27,16 +27,10 @@
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/udp.h>
-#include <linux/tcp.h>
#include <linux/unistd.h>
-#include <linux/slab.h>
#include <linux/netdevice.h>
-#include <linux/skbuff.h>
#include <linux/file.h>
#include <linux/freezer.h>
-#include <net/sock.h>
-#include <net/checksum.h>
-#include <net/ip.h>
#include <net/ipv6.h>
#include <net/tcp.h>
#include <net/tcp_states.h>
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index dfcab5a..03786a0 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -19,7 +19,6 @@
*/
#include <linux/types.h>
-#include <linux/slab.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/pagemap.h>
@@ -29,7 +28,6 @@
#include <linux/net.h>
#include <linux/mm.h>
#include <linux/udp.h>
-#include <linux/tcp.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/sched.h>
#include <linux/sunrpc/svcsock.h>
@@ -39,8 +37,6 @@
#include <linux/sunrpc/bc_xprt.h>
#endif
-#include <net/sock.h>
-#include <net/checksum.h>
#include <net/udp.h>
#include <net/tcp.h>
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 65fa8bf..5e3cb9a 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -34,7 +34,6 @@
#include <linux/unistd.h>
#include <linux/mm.h>
#include <linux/mman.h>
-#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include <linux/spinlock.h>
@@ -48,7 +47,6 @@
#include <linux/netfilter_ipv6.h>
#include <linux/tty.h>
#include <net/icmp.h>
-#include <net/ip.h> /* for local_port_range[] */
#include <net/tcp.h> /* struct or_callable used in sock_rcv_skb */
#include <net/net_namespace.h>
#include <net/netlabel.h>
@@ -59,7 +57,6 @@
#include <linux/interrupt.h>
#include <linux/netdevice.h> /* for network interface checks */
#include <linux/netlink.h>
-#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/dccp.h>
#include <linux/quota.h>
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Randy Dunlap @ 2011-01-09 21:06 UTC (permalink / raw)
To: Christoph Paasch; +Cc: davem, netdev, linux-kernel
In-Reply-To: <1294606534-28522-1-git-send-email-christoph.paasch@uclouvain.be>
On Sun, 9 Jan 2011 21:55:34 +0100 Christoph Paasch wrote:
> This patch reviews the include-files of net/tcp.h
> Several #include where redundant. Some where not directly needed by
> net/tcp.h
>
> Files, including net/tcp.h where also including some the *.h-files that
> net/tcp.h is already including. Thus, in these files the inclusion of
> the *.h file is unnecessary.
>
> Redundant includes in net/tcp.h:
>
> linux/list.h --- included by linux/textsearch.h which is included by
> linux/skbuff.h
If there is something in net/tcp.h that uses data or functions from <linux/list.h>,
then <linux/list.h> should be #included in net/tcp.h, whether some other file
pulls it in indirectly or not.
etc. etc. etc.
> linux/slab.h --- included by linux/crypto.h
> linux/cache.h --- included by linux/skbuff.h
> linux/skbuff.h --- included by net/sock.h
> linux/kref.h --- included by linux/kobject.h, which is included by
> linux/device.h, which is included by
> linux/dmaengine.h, which is included by
> linux/skbuff.h
> net/inet_connection_sock.h --- included by net/inet_hashtables.h
> net/checksum.h --- included by net/sock.h
> net/request_sock.h --- included by net/inet_connection_sock.h
> net/sock.h --- included by net/request_sock.h
> net/snmp.h --- included by net/ip.h
> net/dst.h --- included by net/sock.h
> linux/seq_file.h --- included by net/neighbour.h, which is included by
> net/dst.h
>
> Include-files not directly needed by net/tcp.h:
>
> linux/percpu.h
> linux/dmaengine.h
> net/tcp_states.h
> net/inet_ecn.h
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH V8 02/13] ntp: add ADJ_SETOFFSET mode bit
From: Kuwahara,T. @ 2011-01-09 21:07 UTC (permalink / raw)
To: Richard Cochran
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
Alan Cox, Arnd Bergmann, Christoph Lameter, David Miller,
John Stultz, Krzysztof Halasa, Peter Zijlstra, Rodolfo Giometti,
Thomas Gleixner
In-Reply-To: <20110108175028.GA22308-7KxsofuKt4IfAd9E5cN8NEzG7cXyKsk/@public.gmane.org>
On Sun, Jan 9, 2011 at 2:50 AM, Richard Cochran
<richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> we want to be able to jump the clock arbitrarily.
Another problem remains: How do you deal with leap seconds? I mean,
given that 1 minute is not always 60 seconds, then what time was it
XXXXX seconds ago? Maybe some kind of lookup table is necessary, but
in such case, isn't it a better choice just to use the
clock_settime/settimeofday syscall?
^ permalink raw reply
* Re: [PATCH v4 net-next-2.6] netfilter: x_tables: dont block BH while reading counters
From: Pablo Neira Ayuso @ 2011-01-09 21:31 UTC (permalink / raw)
To: Eric Dumazet
Cc: Patrick McHardy, David Miller, Jesper Dangaard Brouer,
netfilter-devel, netdev, Stephen Hemminger
In-Reply-To: <1294505112.2709.534.camel@edumazet-laptop>
On 08/01/11 17:45, Eric Dumazet wrote:
> David,
>
> I am resending this patch, sent 3 weeks ago, Patrick gave no answer.
>
> I believe it should be included in linux-2.6.38 and stable kernels.
>
> Some people found they had to change NIC RX ring sizes in order not
> missing frames (from 1024 to 2048), while root cause of the problem was
> this.
>
> Quoting Jesper : "I can now hit the system with a pktgen at 128 bytes,
> and see no drops/overruns while running iptables. (This packet load at
> 128bytes is 822 kpps and 840Mbit/s) (iptables ruleset is the big chains:
> 20929 rules: 81239)."
I have enqueued this patch to me tree.
http://1984.lsi.us.es/git/?p=net-2.6/.git;a=summary
I'll pass it to davem for -stable submission.
^ permalink raw reply
* Re: [PATCH] netfilter: fix race in conntrack between dump_table and destroy
From: Pablo Neira Ayuso @ 2011-01-09 21:32 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Eric Dumazet, Patrick McHardy, Paul E. McKenney, netdev,
netfilter-devel
In-Reply-To: <20101126135101.4e4b97cc@nehalam>
On 26/11/10 22:51, Stephen Hemminger wrote:
> The netlink interface to dump the connection tracking table has a race
> when entries are deleted at the same time. A customer reported a crash
> and the backtrace showed thatctnetlink_dump_table was running while a
> conntrack entry wasbeing destroyed.
> (see https://bugzilla.vyatta.com/show_bug.cgi?id=6402).
>
> According to RCU documentation, when using hlist_nulls the reader
> must handle the case of seeing a deleted entry and not proceed
> further down the linked list. The old code would continue
> which caused the scan to walk into the free list.
>
> This patch uses locking (rather than RCU) for this operation which
> is guaranteed safe, and no longer requires getting reference while
> doing dump operation.
I have put this in my tree:
http://1984.lsi.us.es/git/?p=net-2.6/.git;a=summary
I'll pass it to David for -stable inclusion.
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Christoph Paasch @ 2011-01-09 21:32 UTC (permalink / raw)
To: Randy Dunlap; +Cc: davem, netdev, linux-kernel
In-Reply-To: <20110109130608.5c7bb4b0.rdunlap@xenotime.net>
Hello,
On Sunday, January 09, 2011 wrote Randy Dunlap:
> On Sun, 9 Jan 2011 21:55:34 +0100 Christoph Paasch wrote:
> If there is something in net/tcp.h that uses data or functions from
> <linux/list.h>, then <linux/list.h> should be #included in net/tcp.h,
> whether some other file pulls it in indirectly or not.
>
> etc. etc. etc.
Why?
IMHO I think that it increases compile-time.
Ok, here in that case it only increases it slightly (probably it isn't even
measurable). But, if *all* the files would be more strict in including, I'm
sure that it would make a difference.
The less files you include, the faster the compilation will be.
In net/tcp.h there were even 4 unnecessary included files.
And, then we would also need to include:
net/net_namespace.h (for struct net)
Also, I think that it makes the code more readable and also easier to
maintain. The more files we include, the bigger the chance is that we will end
up with plenty of files unnecessarily included, and thus the compile-time will
explode.
Regards,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* [PATCH v2] Madge Ambassador ATM Adapter driver: Always release_firmware() in ucode_init() and don't leak memory.
From: Jesper Juhl @ 2011-01-09 21:32 UTC (permalink / raw)
To: chas williams - CONTRACTOR; +Cc: linux-atm-general, netdev, linux-kernel
In-Reply-To: <20110107100239.28032e5d@thirdoffive.cmf.nrl.navy.mil>
On Fri, 7 Jan 2011, chas williams - CONTRACTOR wrote:
> instead of duplicating the same section again and again, could you
> write something like:
>
> errmsg = "no start record";
> goto fail;
>
> ...
>
> errmsg = "record to long"
> goto fail;
>
> .... whatever ...
>
> return 0;
>
> fail:
> release_firmware(fw)
> PRINTK(KERN_ERR, "Bad microcode data (%s)\n", errmsg);
> return -EINVAL;
> }
>
Sure, we can do that instead.
Failure to call release_firmware() will result in memory leak in
drivers/atm/ambassador.c::ucode_init().
This patch makes sure we always call release_firmware() when needed,
thus removing the leak(s).
Yes, I know checkpatch complains about this patch, but it was either that
or completely mess up the existing style, so I opted to use the existing
style and live with the checkpatch related flak.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
ambassador.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
compile tested only.
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index ffe9b65..9f47e86 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -1926,8 +1926,9 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
const struct firmware *fw;
unsigned long start_address;
const struct ihex_binrec *rec;
+ const char *errmsg = 0;
int res;
-
+
res = request_ihex_firmware(&fw, "atmsar11.fw", &dev->pci_dev->dev);
if (res) {
PRINTK (KERN_ERR, "Cannot load microcode data");
@@ -1937,8 +1938,8 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
/* First record contains just the start address */
rec = (const struct ihex_binrec *)fw->data;
if (be16_to_cpu(rec->len) != sizeof(__be32) || be32_to_cpu(rec->addr)) {
- PRINTK (KERN_ERR, "Bad microcode data (no start record)");
- return -EINVAL;
+ errmsg = "no start record";
+ goto fail;
}
start_address = be32_to_cpup((__be32 *)rec->data);
@@ -1950,12 +1951,12 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
PRINTD (DBG_LOAD, "starting region (%x, %u)", be32_to_cpu(rec->addr),
be16_to_cpu(rec->len));
if (be16_to_cpu(rec->len) > 4 * MAX_TRANSFER_DATA) {
- PRINTK (KERN_ERR, "Bad microcode data (record too long)");
- return -EINVAL;
+ errmsg = "record too long";
+ goto fail;
}
if (be16_to_cpu(rec->len) & 3) {
- PRINTK (KERN_ERR, "Bad microcode data (odd number of bytes)");
- return -EINVAL;
+ errmsg = "odd number of bytes";
+ goto fail;
}
res = loader_write(lb, dev, rec);
if (res)
@@ -1970,6 +1971,10 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
res = loader_start(lb, dev, start_address);
return res;
+fail:
+ release_firmware(fw);
+ PRINTK(KERN_ERR, "Bad microcode data (%s)", errmsg);
+ return -EINVAL;
}
/********** give adapter parameters **********/
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* [PATCH][RFC] Allow to use adler32 for SCTP
From: Holger Hans Peter Freyther @ 2011-01-09 21:36 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
Hi,
with OpenBSC I have to connect to some equipment that is configured to use
adler32 as the checksum. I wonder if something a long the lines of this patch
is acceptable? It adds a module parameter that globally allows to use adler32
and then there is a sockopt to enable adler32 on a per process basis. For the
receive path I have to decode both checksums.
I could probably just use the code to disable checksums for rx but I will need
to generate them on tx to make the other equipment accept these.
regards
holger
PS: While adding my field to struct sctp_sock I saw that there are quite some
holes (on both ia32,x86_64) in the struct and that one can save 16byte by
re-ordering. I am not sure how to and if to benchmark such a change. Does it
make sense to re-order those?
[-- Attachment #2: 0001-sctp-Allow-to-use-adler32-as-checksum-for-old-equipm.patch --]
[-- Type: text/x-patch, Size: 11572 bytes --]
>From bc332df3e078e4ddac93415a4e11de018604537a Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <zecke@selfish.org>
Date: Sun, 9 Jan 2011 21:18:04 +0100
Subject: [PATCH] sctp: Allow to use adler32 as checksum for old equipment
Make it possible to use adler32 for outgoing packets. For
incoming packets add an option to determine the crc32 and
adler32. Discard the packet if the socket was not using the
adler32 checksum.
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
---
include/net/sctp/checksum.h | 35 ++++++++++++++++++++++++++++++++
include/net/sctp/structs.h | 6 +++++
include/net/sctp/user.h | 1 +
net/sctp/input.c | 46 +++++++++++++++++++++++++++++++++++++++---
net/sctp/output.c | 17 +++++++++++++--
net/sctp/protocol.c | 3 ++
net/sctp/socket.c | 23 +++++++++++++++++++++
7 files changed, 124 insertions(+), 7 deletions(-)
diff --git a/include/net/sctp/checksum.h b/include/net/sctp/checksum.h
index befc8d2..9111f52 100644
--- a/include/net/sctp/checksum.h
+++ b/include/net/sctp/checksum.h
@@ -1,6 +1,7 @@
/* SCTP kernel reference Implementation
* Copyright (c) 1999-2001 Motorola, Inc.
* Copyright (c) 2001-2003 International Business Machines, Corp.
+ * Copyright (c) 2011 Holger Hans Peter Freyther
*
* This file is part of the SCTP kernel reference Implementation
*
@@ -34,6 +35,7 @@
* Dinakaran Joseph
* Jon Grimm <jgrimm@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
+ * Holger Hans Peter Freyther <holger@freyther.de>
*
* Rewritten to use libcrc32c by:
* Vlad Yasevich <vladislav.yasevich@hp.com>
@@ -45,6 +47,7 @@
#include <linux/types.h>
#include <net/sctp/sctp.h>
#include <linux/crc32c.h>
+#include <linux/zutil.h>
static inline __u32 sctp_crc32c(__u32 crc, u8 *buffer, u16 length)
{
@@ -81,3 +84,35 @@ static inline __le32 sctp_end_cksum(__be32 crc32)
{
return cpu_to_le32(~crc32);
}
+
+static inline __u32 sctp_start_cksum_adler(__u8 *buffer, __u16 length)
+{
+ __u32 adler = 1;
+ __u8 zero[sizeof(__u32)] = {0};
+
+ /* Optimize this routine to be SCTP specific, knowing how
+ * to skip the checksum field of the SCTP header.
+ */
+
+ /* Calculate adler32 up to the checksum. */
+ adler = zlib_adler32(adler, buffer,
+ sizeof(struct sctphdr) -sizeof(__u32));
+
+ /* Skip checksum field of the header. */
+ adler = zlib_adler32(adler, zero, sizeof(__u32));
+
+ /* Calculate the rest of the adler32. */
+ adler = zlib_adler32(adler, &buffer[sizeof(struct sctphdr)],
+ length - sizeof(struct sctphdr));
+ return adler;
+}
+
+static inline __u32 sctp_update_cksum_adler(__u8 *buffer, __u16 len, __u32 a32)
+{
+ return zlib_adler32(a32, buffer, len);
+}
+
+static inline __u32 sctp_end_cksum_adler(__u32 a32)
+{
+ return htonl(a32);
+}
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index cc9185c..d44eb7a 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -236,6 +236,9 @@ extern struct sctp_globals {
* bits is an indicator of when to send and window update SACK.
*/
int rwnd_update_shift;
+
+ /* Allow Adler32 as Checksum fallback */
+ int allow_adler32;
} sctp_globals;
#define sctp_rto_initial (sctp_globals.rto_initial)
@@ -271,6 +274,7 @@ extern struct sctp_globals {
#define sctp_auth_enable (sctp_globals.auth_enable)
#define sctp_checksum_disable (sctp_globals.checksum_disable)
#define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift)
+#define sctp_allow_adler32_csum (sctp_globals.allow_adler32)
/* SCTP Socket type: UDP or TCP style. */
typedef enum {
@@ -338,6 +342,8 @@ struct sctp_sock {
__u32 adaptation_ind;
__u32 pd_point;
+ __u8 cksum_adler;
+
atomic_t pd_mode;
/* Receive to here while partial delivery is in effect. */
struct sk_buff_head pd_lobby;
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 2b2769c..427da93 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -103,6 +103,7 @@ typedef __s32 sctp_assoc_t;
#define SCTP_GET_LOCAL_ADDRS 109 /* Get all local addresss. */
#define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
#define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
+#define SCTP_COMPAT_ADLER_CRC 112 /* User ADLER32 for the checksum. */
/*
* 5.2.1 SCTP Initiation Structure (SCTP_INIT)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index ea21924..471e048 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -5,6 +5,7 @@
* Copyright (c) 2001 Intel Corp.
* Copyright (c) 2001 Nokia, Inc.
* Copyright (c) 2001 La Monte H.P. Yarroll
+ * Copyright (c) 2011 Holger Hans Peter Freyther
*
* This file is part of the SCTP kernel implementation
*
@@ -43,6 +44,7 @@
* Daisy Chang <daisyc@us.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
* Ardelle Fan <ardelle.fan@intel.com>
+ * Holger Hans Peter Freyther <holger@freyther.de>
*
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
@@ -80,7 +82,7 @@ static int sctp_add_backlog(struct sock *sk, struct sk_buff *skb);
/* Calculate the SCTP checksum of an SCTP packet. */
-static inline int sctp_rcv_checksum(struct sk_buff *skb)
+static inline int sctp_rcv_checksum_crc32(struct sk_buff *skb)
{
struct sctphdr *sh = sctp_hdr(skb);
__le32 cmp = sh->checksum;
@@ -102,6 +104,24 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
return 0;
}
+static inline int sctp_rcv_checksum_adler32(struct sk_buff *skb)
+{
+ struct sk_buff *list = skb_shinfo(skb)->frag_list;
+ struct sctphdr *sh = sctp_hdr(skb);
+ __u32 cmp = ntohl(sh->checksum);
+ __u32 val = sctp_start_cksum_adler((__u8 *)sh, skb_headlen(skb));
+
+ for (; list; list = list->next)
+ val = sctp_update_cksum_adler((__u8 *)list->data,
+ skb_headlen(list), val);
+
+ val = sctp_end_cksum_adler(val);
+
+ if (val != cmp)
+ return -1;
+ return 0;
+}
+
struct sctp_input_cb {
union {
struct inet_skb_parm h4;
@@ -129,6 +149,8 @@ int sctp_rcv(struct sk_buff *skb)
union sctp_addr dest;
int family;
struct sctp_af *af;
+ int crc32_valid = 0, adler_valid = 0;
+
if (skb->pkt_type!=PACKET_HOST)
goto discard_it;
@@ -144,9 +166,15 @@ int sctp_rcv(struct sk_buff *skb)
__skb_pull(skb, skb_transport_offset(skb));
if (skb->len < sizeof(struct sctphdr))
goto discard_it;
- if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
- sctp_rcv_checksum(skb) < 0)
- goto discard_it;
+
+ /* Check up to two checksums for each packet */
+ if (!sctp_checksum_disable && !skb_csum_unnecessary(skb)) {
+ crc32_valid = sctp_rcv_checksum_crc32(skb) >= 0;
+ if (!crc32_valid && sctp_allow_adler32_csum)
+ adler_valid = sctp_rcv_checksum_adler32(skb) >= 0;
+ if (!crc32_valid && !adler_valid)
+ goto discard_it;
+ }
skb_pull(skb, sizeof(struct sctphdr));
@@ -188,6 +216,16 @@ int sctp_rcv(struct sk_buff *skb)
sk = rcvr->sk;
/*
+ * We have the sctp_sock* now and can see if adler32
+ * fallback is implemented. If not we will have to stop
+ * processing the packet now.
+ */
+ if (!crc32_valid && !sctp_sk(sk)->cksum_adler)
+ goto discard_release;
+ else if (!adler_valid && sctp_sk(sk)->cksum_adler)
+ goto discard_release;
+
+ /*
* If a frame arrives on an interface and the receiving socket is
* bound to another interface, via SO_BINDTODEVICE, treat it as OOTB
*/
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 60600d3..02b2f26 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -2,6 +2,7 @@
* (C) Copyright IBM Corp. 2001, 2004
* Copyright (c) 1999-2000 Cisco, Inc.
* Copyright (c) 1999-2001 Motorola, Inc.
+ * Copyright (c) 2011 Holger Hans Peter Freyther
*
* This file is part of the SCTP kernel implementation
*
@@ -36,6 +37,7 @@
* Karl Knutson <karl@athena.chicago.il.us>
* Jon Grimm <jgrimm@austin.ibm.com>
* Sridhar Samudrala <sri@us.ibm.com>
+ * Holger Freyther <holger@freyther.de>
*
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
@@ -502,12 +504,21 @@ int sctp_packet_transmit(struct sctp_packet *packet)
*/
if (!sctp_checksum_disable &&
!(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) {
- __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
-
/* 3) Put the resultant value into the checksum field in the
* common header, and leave the rest of the bits unchanged.
*/
- sh->checksum = sctp_end_cksum(crc32);
+ __u32 crc32;
+
+ if (sctp_sk(sk)->cksum_adler && sctp_allow_adler32_csum) {
+ crc32 = sctp_start_cksum_adler((__u8 *)sh,
+ cksum_buf_len);
+ crc32 = sctp_end_cksum_adler(crc32);
+ } else {
+ crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
+ crc32 = sctp_end_cksum(crc32);
+ }
+
+ sh->checksum = crc32;
} else {
if (dst->dev->features & NETIF_F_SCTP_CSUM) {
/* no need to seed psuedo checksum for SCTP */
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index e58f947..f078ef6 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1397,4 +1397,7 @@ MODULE_AUTHOR("Linux Kernel SCTP developers <lksctp-developers@lists.sourceforge
MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
+module_param_named(adler_checksums, sctp_allow_adler32_csum, bool, 0644);
+MODULE_PARM_DESC(adler_checksums,
+ "Allow to use adler32 checksums for historic reasons.");
MODULE_LICENSE("GPL");
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a09b0dd..e47e39e 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5,6 +5,7 @@
* Copyright (c) 2001-2003 Intel Corp.
* Copyright (c) 2001-2002 Nokia, Inc.
* Copyright (c) 2001 La Monte H.P. Yarroll
+ * Copyright (c) 2011 Holger Hans Peter Freyther
*
* This file is part of the SCTP kernel implementation
*
@@ -52,6 +53,7 @@
* Ryan Layer <rmlayer@us.ibm.com>
* Anup Pemmaiah <pemmaiah@cc.usu.edu>
* Kevin Gao <kevin.gao@intel.com>
+ * Holger Freyther <holger@freyther.de>
*
* Any bugs reported given to us we will try to fix... any fixes shared will
* be incorporated into the next SCTP release.
@@ -3343,6 +3345,23 @@ static int sctp_setsockopt_del_key(struct sock *sk,
}
+static int sctp_setsockopt_adler_crc(struct sock *sk,
+ char __user *optval,
+ int optlen)
+{
+ int val;
+
+ if (optlen < sizeof(int))
+ return -EINVAL;
+ if (get_user(val, (int __user *)optval))
+ return -EFAULT;
+ if (!sctp_allow_adler32_csum)
+ return -EACCES;
+
+ sctp_sk(sk)->cksum_adler = 1;
+ return 0;
+}
+
/* API 6.2 setsockopt(), getsockopt()
*
@@ -3490,6 +3509,9 @@ SCTP_STATIC int sctp_setsockopt(struct sock *sk, int level, int optname,
case SCTP_AUTH_DELETE_KEY:
retval = sctp_setsockopt_del_key(sk, optval, optlen);
break;
+ case SCTP_COMPAT_ADLER_CRC:
+ retval = sctp_setsockopt_adler_crc(sk, optval, optlen);
+ break;
default:
retval = -ENOPROTOOPT;
break;
@@ -6490,6 +6512,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
pp = sctp_sk(oldsk)->bind_hash;
sk_add_bind_node(newsk, &pp->owner);
sctp_sk(newsk)->bind_hash = pp;
+ sctp_sk(newsk)->cksum_adler = sctp_sk(oldsk)->cksum_adler;
inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num;
sctp_spin_unlock(&head->lock);
sctp_local_bh_enable();
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Ben Hutchings @ 2011-01-09 21:55 UTC (permalink / raw)
To: christoph.paasch; +Cc: Randy Dunlap, davem, netdev, linux-kernel
In-Reply-To: <201101092232.19171.christoph.paasch@uclouvain.be>
On Sun, 2011-01-09 at 22:32 +0100, Christoph Paasch wrote:
> Hello,
>
> On Sunday, January 09, 2011 wrote Randy Dunlap:
> > On Sun, 9 Jan 2011 21:55:34 +0100 Christoph Paasch wrote:
> > If there is something in net/tcp.h that uses data or functions from
> > <linux/list.h>, then <linux/list.h> should be #included in net/tcp.h,
> > whether some other file pulls it in indirectly or not.
> >
> > etc. etc. etc.
> Why?
>
> IMHO I think that it increases compile-time.
> Ok, here in that case it only increases it slightly (probably it isn't even
> measurable).
The cost of repeated inclusion is minimal. GCC's preprocessor
recognises when the entire content of a file is conditional on #ifndef
FOO and will not even open it again if FOO is defined.
> But, if *all* the files would be more strict in including, I'm
> sure that it would make a difference.
> The less files you include, the faster the compilation will be.
>
> In net/tcp.h there were even 4 unnecessary included files.
>
> And, then we would also need to include:
> net/net_namespace.h (for struct net)
>
> Also, I think that it makes the code more readable and also easier to
> maintain. The more files we include, the bigger the chance is that we will end
> up with plenty of files unnecessarily included, and thus the compile-time will
> explode.
If a file directly references definitions that are supposed to be
provided by a certain header, changing it to rely on indirect inclusion
of that header generally does *not* aid maintenance.
(There are some cases where you should rely on indirect inclusion, such
as where <linux/foo.h> includes <asm/foo.h>.)
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Alexey Dobriyan @ 2011-01-09 22:30 UTC (permalink / raw)
To: Christoph Paasch; +Cc: davem, netdev, linux-kernel
In-Reply-To: <1294606534-28522-1-git-send-email-christoph.paasch@uclouvain.be>
On Sun, Jan 09, 2011 at 09:55:34PM +0100, Christoph Paasch wrote:
> This patch reviews the include-files of net/tcp.h
> Several #include where redundant. Some where not directly needed by
> net/tcp.h
>
> Files, including net/tcp.h where also including some the *.h-files that
> net/tcp.h is already including. Thus, in these files the inclusion of
> the *.h file is unnecessary.
>
> Redundant includes in net/tcp.h:
>
> linux/list.h --- included by linux/textsearch.h which is included by
> linux/skbuff.h
> linux/slab.h --- included by linux/crypto.h
> linux/cache.h --- included by linux/skbuff.h
> linux/skbuff.h --- included by net/sock.h
> linux/kref.h --- included by linux/kobject.h, which is included by
> linux/device.h, which is included by
> linux/dmaengine.h, which is included by
> linux/skbuff.h
> net/inet_connection_sock.h --- included by net/inet_hashtables.h
> net/checksum.h --- included by net/sock.h
> net/request_sock.h --- included by net/inet_connection_sock.h
> net/sock.h --- included by net/request_sock.h
> net/snmp.h --- included by net/ip.h
> net/dst.h --- included by net/sock.h
> linux/seq_file.h --- included by net/neighbour.h, which is included by
> net/dst.h
>
> Include-files not directly needed by net/tcp.h:
>
> linux/percpu.h
> linux/dmaengine.h
DMA stuff "dereferenced" in tcp_prequeue_init().
> net/tcp_states.h
> net/inet_ecn.h
NAK
Where is the logic?
include/net/tcp.h _does_ use kref, so it needs kref.h
include/net/tcp.h _does_ use list_head, so it needs list.h
and so on.
^ permalink raw reply
* Re: panic in tg3 driver
From: Stephen Clark @ 2011-01-09 22:30 UTC (permalink / raw)
To: Linux Kernel Network Developers; +Cc: Michael Chan, Matt Carlson
In-Reply-To: <4D2334B5.1060408@earthlink.net>
On 01/04/2011 09:54 AM, Stephen Clark wrote:
> Hello,
>
>
> The hardware is an Acrosser AR-M0898B micro box.
> lspci
> 00:00.0 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro
> Host Bridge
> 00:00.1 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro
> Host Bridge
> 00:00.2 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro
> Host Bridge
> 00:00.3 Host bridge: VIA Technologies, Inc. PT890 Host Bridge
> 00:00.4 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro
> Host Bridge
> 00:00.7 Host bridge: VIA Technologies, Inc. CN700/VN800/P4M800CE/Pro
> Host Bridge
> 00:01.0 PCI bridge: VIA Technologies, Inc. VT8237/VX700 PCI Bridge
> 00:0f.0 IDE interface: VIA Technologies, Inc. VT8251 Serial ATA
> Controller (rev
> 20)
> 00:0f.1 IDE interface: VIA Technologies, Inc.
> VT82C586A/B/VT82C686/A/B/VT823x/A/
> C PIPC Bus Master IDE (rev 07)
> 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller
> (rev 91)
> 00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller
> (rev 91)
> 00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller
> (rev 91)
> 00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
> Controller
> (rev 91)
> 00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 90)
> 00:11.0 ISA bridge: VIA Technologies, Inc. VT8251 PCI to ISA Bridge
> 00:11.7 Host bridge: VIA Technologies, Inc. VT8251 Ultra VLINK Controller
> 00:13.0 Host bridge: VIA Technologies, Inc. VT8251 Host Bridge
> 00:13.1 PCI bridge: VIA Technologies, Inc. VT8251 PCI to PCI Bridge
> 02:08.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T
> (rev 02)
> 02:09.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T
> (rev 02)
> 80:00.0 PCI bridge: VIA Technologies, Inc. VT8251 PCIE Root Port
> 80:00.1 PCI bridge: VIA Technologies, Inc. VT8251 PCIE Root Port
> 81:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M
> Fast Ethernet
> PCI Express (rev 02)
> 82:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M
> Fast Ethernet
> PCI Express (rev 02)
>
> Kernel 2.6.36-2.el5.elrepo on an i686
>
> When I try to ifconfig either of the BCM5906M ports the system panics.
>
> Ideas, fixes ?
>
> [root@Z1010 ~]# modprobe tg3
> [root@Z1010 ~]# ifconfig eth2 2.2.2.2/24
> ------------[ cut here ]------------
> kernel BUG at drivers/net/tg3.c:4365!
> invalid opcode: 0000 [#1] PREEMPT SMP
> last sysfs file: /sys/class/net/eth3/address
> Modules linked in: tg3 xt_tcpudp ipt_LOG xt_limit xt_state
> iptable_mangle af_ke]
>
> Pid: 20303, comm: kworker/0:2 Not tainted 2.6.36-2.el5.elrepo #1
> CN700-8251/
> EIP: 0060:[<e1c62f19>] EFLAGS: 00010202 CPU: 0
> EIP is at tg3_tx_recover+0x1e/0x53 [tg3]
> EAX: deece4c0 EBX: dfa9c000 ECX: deece4c0 EDX: ffffffff
> ESI: deece4c0 EDI: deece500 EBP: c1801f38 ESP: c1801f30
> DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> Process kworker/0:2 (pid: 20303, ti=c1801000 task=df0105d0
> task.ti=dee62000)
> Stack:
> dfa9c000 00000000 c1801f6c e1c630be c1801f6c deece4c0 00000840 00000000
> <0> df251cc0 00000005 00000000 df979800 deece500 deece4c0 00000040
> c1801f94
> <0> e1c661e5 00000000 00000040 c1801f88 e09df1d2 00000000 deece500
> dfab4000
> Call Trace:
> [<e1c630be>] ? tg3_tx+0x157/0x1a2 [tg3]
> [<e1c661e5>] ? tg3_poll_work+0x2b/0x10b [tg3]
> [<e09df1d2>] ? ssb_write32+0x11/0x14 [b44]
> [<e1c662f9>] ? tg3_poll+0x34/0x9a [tg3]
> [<c0674058>] ? net_rx_action+0x7e/0x11c
> [<c04409c9>] ? __do_softirq+0x85/0x10c
> [<c0440944>] ? __do_softirq+0x0/0x10c
> <IRQ>
> [<c04404ef>] ? _local_bh_enable_ip+0x68/0x87
> [<c044051b>] ? local_bh_enable_ip+0xd/0xf
> [<c046593b>] ? __raw_spin_unlock_bh+0x1c/0x1e
> [<c06fa4f2>] ? _raw_spin_unlock_bh+0xd/0xf
> [<e1c6281f>] ? spin_unlock_bh+0xd/0xf [tg3]
> [<e1c62cbe>] ? tg3_full_unlock+0x10/0x12 [tg3]
> [<e1c664c7>] ? tg3_reset_task+0xd7/0xe3 [tg3]
> [<c044ec37>] ? process_one_work+0x10b/0x1bc
> [<e1c663f0>] ? tg3_reset_task+0x0/0xe3 [tg3]
> [<c044fd41>] ? worker_thread+0x77/0xf9
> [<c0453048>] ? kthread+0x60/0x65
> [<c044fcca>] ? worker_thread+0x0/0xf9
> [<c0452fe8>] ? kthread+0x0/0x65
> [<c040337e>] ? kernel_thread_helper+0x6/0x10
> Code: f0 e8 88 ff ff ff 8d 65 f8 5b 5e 5d c3 55 89 e5 56 53 0f 1f 44
> 00 00 f6 8
> EIP: [<e1c62f19>] tg3_tx_recover+0x1e/0x53 [tg3] SS:ESP 0068:c1801f30
> ---[ end trace 82381e9b93e397ad ]---
> Kernel panic - not syncing: Fatal exception in interrupt
> Pid: 20303, comm: kworker/0:2 Tainted: G D
> 2.6.36-2.el5.elrepo #1
> Call Trace:
> [<c043b3cd>] panic+0x62/0x15d
> [<c06fb7d1>] oops_end+0x99/0xa8
> [<e1c62f19>] ? tg3_tx_recover+0x1e/0x53 [tg3]
> [<c0405a62>] die+0x58/0x5e
>
> Thanks,
> Steve
>
Additonal info I compiled the latest kernel 2.6.37-rc8+ and still have the problem.
Also boot with noapic I see this in the dmesg log and interrupts are increasing
like crazy:
tg3.c:v3.115 (October 14, 2010)
tg3 0000:81:00.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, low) -> IRQ 10
tg3 0000:81:00.0: setting latency timer to 64
tg3 0000:81:00.0: PCI: Disallowing DAC for device
tg3 0000:81:00.0: eth2: Tigon3 [partno(BCM95906) rev c002] (PCI Express) MAC add
ress 00:02:b6:36:d1:39
tg3 0000:81:00.0: eth2: attached PHY is 5906 (10/100Base-TX Ethernet) (WireSpeed
[0])
tg3 0000:81:00.0: eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
tg3 0000:81:00.0: eth2: dma_rwctrl[76180000] dma_mask[32-bit]
tg3 0000:82:00.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, low) -> IRQ 10
tg3 0000:82:00.0: setting latency timer to 64
tg3 0000:82:00.0: PCI: Disallowing DAC for device
tg3 0000:82:00.0: eth3: Tigon3 [partno(BCM95906) rev c002] (PCI Express) MAC add
ress 00:02:b6:36:d1:3a
tg3 0000:82:00.0: eth3: attached PHY is 5906 (10/100Base-TX Ethernet) (WireSpeed
[0])
tg3 0000:82:00.0: eth3: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
tg3 0000:82:00.0: eth3: dma_rwctrl[76180000] dma_mask[32-bit]
tg3 0000:81:00.0: irq 40 for MSI/MSI-X
tg3 0000:81:00.0: eth2: No interrupt was generated using MSI. Switching to INTx
mode. Please report this failure to the PCI maintainer and include system chipse
t information
ADDRCONF(NETDEV_UP): eth2: link is not ready
[root@Z1010 ~]# cat /proc/interrupts
CPU0
0: 162 XT-PIC-XT-PIC timer
1: 2 XT-PIC-XT-PIC i8042
2: 0 XT-PIC-XT-PIC cascade
3: 1 XT-PIC-XT-PIC
4: 4863 XT-PIC-XT-PIC serial
6: 2 XT-PIC-XT-PIC floppy
7: 5 XT-PIC-XT-PIC ehci_hcd:usb1, uhci_hcd:usb3
8: 0 XT-PIC-XT-PIC rtc0
9: 0 XT-PIC-XT-PIC acpi
10: 2334234 XT-PIC-XT-PIC uhci_hcd:usb2, eth0, eth2
[root@Z1010 ~]# cat /proc/interrupts |grep eth2
10: 18388914 XT-PIC-XT-PIC uhci_hcd:usb2, eth0, eth2
[root@Z1010 ~]# cat /proc/interrupts |grep eth2
10: 18901627 XT-PIC-XT-PIC uhci_hcd:usb2, eth0, eth2
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Christoph Paasch @ 2011-01-09 22:33 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Randy Dunlap, davem, netdev, linux-kernel
In-Reply-To: <1294610141.2823.31.camel@localhost>
On Sunday, January 09, 2011 wrote Ben Hutchings:
> The cost of repeated inclusion is minimal. GCC's preprocessor
> recognises when the entire content of a file is conditional on #ifndef
> FOO and will not even open it again if FOO is defined.
Thanks, I did not knew about that.
> If a file directly references definitions that are supposed to be
> provided by a certain header, changing it to rely on indirect inclusion
> of that header generally does *not* aid maintenance.
But then, to be coherent, we would need to add the following includes (and I'm
even not 100% sure if it's all we need):
linux/percpu_counter.h (needed for percpu_counter_sum_positive)
linux/mm_types.h (needed for struct page)
linux/aio.h (needed for struct kiocb)
net/inet_sock.h (needed for struct ip_options)
linux/pipe_fs_i.h (needed for struct pipe_inode_info)
linux/poll.h (needed for struct poll_table_struct)
linux/compiler.h (needed for __percpu)
IMO there should be a clear rule for the inclusion of files.
Personally I think it's best to include as few files as possible. Because I
think, that this reduces the risk of including a file, whose structs/functions
aren't even referenced (it's easier to manually check if one include out of 10
is useless, than checking it for 50).
But ok, there may be other stronger reasons for the opposite.
What are the reasons for including these files?
Regards,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Christoph Paasch @ 2011-01-09 22:39 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev, linux-kernel
In-Reply-To: <20110109223033.GA9485@p183.telecom.by>
On Sunday, January 09, 2011 wrote Alexey Dobriyan:
> DMA stuff "dereferenced" in tcp_prequeue_init().
Well, as far as I can see, tcp_prequeue_init only accesses the ucopy-fields of
tcp_sock, which are defined in linux/tcp.h.
BTW: shouldn't linux/tcp.h include linux/dmaengine.h ? It has a reference to
"struct dma_pinned_list"
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* Re: linux-next: manual merge of the security-testing tree with the net tree
From: James Morris @ 2011-01-09 22:48 UTC (permalink / raw)
To: Casey Schaufler
Cc: Stephen Rothwell, linux-next, linux-kernel, David Miller, netdev
In-Reply-To: <4D2666D0.9060802@schaufler-ca.com>
On Thu, 6 Jan 2011, Casey Schaufler wrote:
> On 1/6/2011 4:44 PM, Stephen Rothwell wrote:
> > Hi James,
> >
> > Today's linux-next merge of the security-testing tree got a conflict in
> > security/smack/smack_lsm.c between commit
> > 3610cda53f247e176bcbb7a7cca64bc53b12acdb ("af_unix: Avoid socket->sk NULL
> > OOPS in stream connect security hooks") from the net tree and commit
> > b4e0d5f0791bd6dd12a1c1edea0340969c7c1f90 ("Smack: UDS revision") from the
> > security-testing tree.
> >
> > I fixed it up (I think - see below) and can carry the fix as necessary.
>
> The change looks like it addresses the change in interface. Thank you.
Thanks, applied.
--
James Morris
<jmorris@namei.org>
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Christoph Paasch @ 2011-01-09 23:06 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: davem, netdev, linux-kernel
In-Reply-To: <201101092339.32378.christoph.paasch@uclouvain.be>
On Sunday, January 09, 2011 wrote Christoph Paasch:
> BTW: shouldn't linux/tcp.h include linux/dmaengine.h ? It has a reference
> to "struct dma_pinned_list"
Ups, sorry for that. The include is at line 209.
I just looked at the head of linux/tcp.h ;)
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
From: Ben Hutchings @ 2011-01-09 23:06 UTC (permalink / raw)
To: christoph.paasch; +Cc: Randy Dunlap, davem, netdev, linux-kernel
In-Reply-To: <201101092333.19406.christoph.paasch@uclouvain.be>
On Sun, 2011-01-09 at 23:33 +0100, Christoph Paasch wrote:
> On Sunday, January 09, 2011 wrote Ben Hutchings:
> > The cost of repeated inclusion is minimal. GCC's preprocessor
> > recognises when the entire content of a file is conditional on #ifndef
> > FOO and will not even open it again if FOO is defined.
> Thanks, I did not knew about that.
>
> > If a file directly references definitions that are supposed to be
> > provided by a certain header, changing it to rely on indirect inclusion
> > of that header generally does *not* aid maintenance.
> But then, to be coherent, we would need to add the following includes (and I'm
> even not 100% sure if it's all we need):
>
> linux/percpu_counter.h (needed for percpu_counter_sum_positive)
Yes.
> linux/mm_types.h (needed for struct page)
> linux/aio.h (needed for struct kiocb)
> net/inet_sock.h (needed for struct ip_options)
> linux/pipe_fs_i.h (needed for struct pipe_inode_info)
> linux/poll.h (needed for struct poll_table_struct)
Or declarations of those structs.
> linux/compiler.h (needed for __percpu)
[...]
Yes.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* GIT trees refreshed
From: David Miller @ 2011-01-09 23:39 UTC (permalink / raw)
To: sparclinux; +Cc: netdev, linux-wireless, netfilter-devel
I've synchronized all of my GIT trees to be uptodate with Linus's
tree.
Right now net-2.6 and sparc-2.6 are active for bug fixes.
The "-next" trees will become active once Linus releases 2.6.38-rc1
^ permalink raw reply
* Re: [PATCH v4 00/10] net/fec: add dual fec support for i.MX28
From: David Miller @ 2011-01-09 23:44 UTC (permalink / raw)
To: shawn.guo
Cc: gerg, baruch, eric, bryan.wu, r64343, B32542, u.kleine-koenig, lw,
w.sang, s.hauer, jamie, jamie, netdev, linux-arm-kernel
In-Reply-To: <1294297998-26930-1-git-send-email-shawn.guo@freescale.com>
From: Shawn Guo <shawn.guo@freescale.com>
Date: Thu, 6 Jan 2011 15:13:08 +0800
> This patch series is to add dual fec support for mx28, which is
> a mxs-based soc. Some code changes related to the following commits
> are also made in this patch set for some reasons.
>
> e6b043d512fa8d9a3801bf5d72bfa3b8fc3b3cc8
> netdev/fec.c: add phylib supporting to enable carrier detection (v2)
>
> e3fe8558c7fc182972c3d947d88744482111f304
> net/fec: fix pm to survive to suspend/resume
>
> It's been tested on mx28 evk and mx51 babbage. For mx28, it has
> to work against the tree
>
> git://git.pengutronix.de/git/imx/linux-2.6.git imx-for-2.6.38
>
> plus patch
>
> [PATCH v4] ARM: mxs: Change duart device to use amba-pl011
>
> The 3 patches below preceding with * have changes since v3, and
> the detailed change log can be found in individual patch.
I've applied all of the "net/fec:" patches (#1 to #5) to net-2.6,
please push the ARM changes via the appropriate ARM tree.
Thanks.
^ permalink raw reply
* Re: [PATCH v2] Madge Ambassador ATM Adapter driver: Always release_firmware() in ucode_init() and don't leak memory.
From: David Miller @ 2011-01-09 23:46 UTC (permalink / raw)
To: jj; +Cc: chas, linux-atm-general, netdev, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1101092229160.633@swampdragon.chaosbits.net>
From: Jesper Juhl <jj@chaosbits.net>
Date: Sun, 9 Jan 2011 22:32:38 +0100 (CET)
> Failure to call release_firmware() will result in memory leak in
> drivers/atm/ambassador.c::ucode_init().
> This patch makes sure we always call release_firmware() when needed,
> thus removing the leak(s).
>
> Yes, I know checkpatch complains about this patch, but it was either that
> or completely mess up the existing style, so I opted to use the existing
> style and live with the checkpatch related flak.
>
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Applied.
^ permalink raw reply
* Re: [PATCH] hamradio: Resolve memory leak due to missing firmware release in add_mcs()
From: David Miller @ 2011-01-09 23:46 UTC (permalink / raw)
To: jj; +Cc: linux-kernel, netdev, linux-hams, jpr, frible, sailer
In-Reply-To: <alpine.LNX.2.00.1101062146430.13988@swampdragon.chaosbits.net>
From: Jesper Juhl <jj@chaosbits.net>
Date: Thu, 6 Jan 2011 21:50:29 +0100 (CET)
>
> Failure to release_firmware() in drivers/net/hamradio/yam.c::add_mcs()
> causes memory leak.
> This patch should fix it.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 1/5] bnx2x: Don't prevent RSS configuration in INT#x and MSI interrupt modes.
From: David Miller @ 2011-01-09 23:49 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1294575580.31551.12.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:19:40 +0200
> Don't prevent RSS configuration in INT#x and MSI interrupt modes. Otherwise
> Rx hash key won't be available.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 2/5] bnx2x: registers dump fixes
From: David Miller @ 2011-01-09 23:49 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1294575604.31551.16.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:20:04 +0200
> Fixes in registers dump:
> - Properly calculate dump length for 57712.
> - Prevent HW blocks parity attentions when dumping registers in order to
> prevent false parity errors handling.
> - Update the bnx2x_dump.h file: old one had a few bugs that could cause
> fatal HW error as a result of a registers dump.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 3/5] bnx2x: Move to D0 before clearing MSI/MSI-X configuration.
From: David Miller @ 2011-01-09 23:49 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1294575619.31551.17.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:20:19 +0200
> Move to D0 before clearing MSI/MSI-X configuration. Otherwise MSI/MSI-X
> won't be cleared.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 4/5] bnx2x: Fix the race on bp->stats_pending.
From: David Miller @ 2011-01-09 23:49 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1294575634.31551.18.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:20:34 +0200
> Fix the race on bp->stats_pending between the timer and a LINK_UP event
> handler.
>
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6 5/5] bnx2x: Update version to 1.60.01-1
From: David Miller @ 2011-01-09 23:50 UTC (permalink / raw)
To: vladz; +Cc: netdev, eilong
In-Reply-To: <1294575646.31551.20.camel@lb-tlvb-vladz>
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 9 Jan 2011 14:20:46 +0200
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
You made these patches against net-2.6 which was inactive for nearly
a full week as we were largely into the merge window.
I applied these, but since the version number of the driver is now
1.62.x I skipped this last patch.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox