1. 10 4月, 2006 16 次提交
  2. 02 4月, 2006 1 次提交
  3. 01 4月, 2006 8 次提交
  4. 31 3月, 2006 2 次提交
    • A
      [NET]: add SO_RCVBUF comment · c08e4961
      Andrew Morton 提交于
      Put a comment in there explaining why we double the setsockopt()
      caller's SO_RCVBUF.  People keep wondering.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c08e4961
    • J
      [PATCH] Introduce sys_splice() system call · 5274f052
      Jens Axboe 提交于
      This adds support for the sys_splice system call. Using a pipe as a
      transport, it can connect to files or sockets (latter as output only).
      
      From the splice.c comments:
      
         "splice": joining two ropes together by interweaving their strands.
      
         This is the "extended pipe" functionality, where a pipe is used as
         an arbitrary in-memory buffer. Think of a pipe as a small kernel
         buffer that you can use to transfer data from one end to the other.
      
         The traditional unix read/write is extended with a "splice()" operation
         that transfers data buffers to or from a pipe buffer.
      
         Named by Larry McVoy, original implementation from Linus, extended by
         Jens to support splicing to files and fixing the initial implementation
         bugs.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5274f052
  5. 30 3月, 2006 3 次提交
    • D
      [NET]: Deinline some larger functions from netdevice.h · 56079431
      Denis Vlasenko 提交于
      On a allyesconfig'ured kernel:
      
      Size  Uses Wasted Name and definition
      ===== ==== ====== ================================================
         95  162  12075 netif_wake_queue      include/linux/netdevice.h
        129   86   9265 dev_kfree_skb_any     include/linux/netdevice.h
        127   56   5885 netif_device_attach   include/linux/netdevice.h
         73   86   4505 dev_kfree_skb_irq     include/linux/netdevice.h
         46   60   1534 netif_device_detach   include/linux/netdevice.h
        119   16   1485 __netif_rx_schedule   include/linux/netdevice.h
        143    5    492 netif_rx_schedule     include/linux/netdevice.h
         81    7    366 netif_schedule        include/linux/netdevice.h
      
      netif_wake_queue is big because __netif_schedule is a big inline:
      
      static inline void __netif_schedule(struct net_device *dev)
      {
              if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
                      unsigned long flags;
                      struct softnet_data *sd;
      
                      local_irq_save(flags);
                      sd = &__get_cpu_var(softnet_data);
                      dev->next_sched = sd->output_queue;
                      sd->output_queue = dev;
                      raise_softirq_irqoff(NET_TX_SOFTIRQ);
                      local_irq_restore(flags);
              }
      }
      
      static inline void netif_wake_queue(struct net_device *dev)
      {
      #ifdef CONFIG_NETPOLL_TRAP
              if (netpoll_trap())
                      return;
      #endif
              if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
                      __netif_schedule(dev);
      }
      
      By de-inlining __netif_schedule we are saving a lot of text
      at each callsite of netif_wake_queue and netif_schedule.
      __netif_rx_schedule is also big, and it makes more sense to keep
      both of them out of line.
      
      Patch also deinlines dev_kfree_skb_any. We can deinline dev_kfree_skb_irq
      instead... oh well.
      
      netif_device_attach/detach are not hot paths, we can deinline them too.
      Signed-off-by: NDenis Vlasenko <vda@ilport.com.ua>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56079431
    • R
      [DCCP]: Use NULL for pointers, comfort sparse. · 68907dad
      Randy Dunlap 提交于
      From: Randy Dunlap <rdunlap@xenotime.net>
      
      Use NULL instead of 0 for pointers.
      Fix these sparse warnings:
      net/dccp/feat.c:207:20: warning: Using plain integer as NULL pointer
      net/dccp/feat.c:325:21: warning: Using plain integer as NULL pointer
      net/dccp/feat.c:526:20: warning: Using plain integer as NULL pointer
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68907dad
    • P
      [DECNET]: Fix refcount · 6a57b2ee
      Patrick Caulfield 提交于
      From: Patrick Caulfield <patrick@tykepenguin.com>
      
      This patch fixes a bug in the reference counting for the default
      DECnet device.
      
      If the device is changed, then the new device had its refcount
      decremented rather than the old one!
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a57b2ee
  6. 29 3月, 2006 9 次提交
    • A
      [NETFILTER]: Rename init functions. · 65b4b4e8
      Andrew Morton 提交于
      Every netfilter module uses `init' for its module_init() function and
      `fini' or `cleanup' for its module_exit() function.
      
      Problem is, this creates uninformative initcall_debug output and makes
      ctags rather useless.
      
      So go through and rename them all to $(filename)_init and
      $(filename)_fini.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65b4b4e8
    • S
      [TCP]: Fix RFC2465 typo. · c3e5d877
      S P 提交于
      Signed-off-by: NS P <speattle@yahoo.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3e5d877
    • H
      [INET]: Introduce tunnel4/tunnel6 · d2acc347
      Herbert Xu 提交于
      Basically this patch moves the generic tunnel protocol stuff out of
      xfrm4_tunnel/xfrm6_tunnel and moves it into the new files of tunnel4.c
      and tunnel6 respectively.
      
      The reason for this is that the problem that Hugo uncovered is only
      the tip of the iceberg.  The real problem is that when we removed the
      dependency of ipip on xfrm4_tunnel we didn't really consider the module
      case at all.
      
      For instance, as it is it's possible to build both ipip and xfrm4_tunnel
      as modules and if the latter is loaded then ipip simply won't load.
      
      After considering the alternatives I've decided that the best way out of
      this is to restore the dependency of ipip on the non-xfrm-specific part
      of xfrm4_tunnel.  This is acceptable IMHO because the intention of the
      removal was really to be able to use ipip without the xfrm subsystem.
      This is still preserved by this patch.
      
      So now both ipip/xfrm4_tunnel depend on the new tunnel4.c which handles
      the arbitration between the two.  The order of processing is determined
      by a simple integer which ensures that ipip gets processed before
      xfrm4_tunnel.
      
      The situation for ICMP handling is a little bit more complicated since
      we may not have enough information to determine who it's for.  It's not
      a big deal at the moment since the xfrm ICMP handlers are basically
      no-ops.  In future we can deal with this when we look at ICMP caching
      in general.
      
      The user-visible change to this is the removal of the TUNNEL Kconfig
      prompts.  This makes sense because it can only be used through IPCOMP
      as it stands.
      
      The addition of the new modules shouldn't introduce any problems since
      module dependency will cause them to be loaded.
      
      Oh and I also turned some unnecessary pskb's in IPv6 related to this
      patch to skb's.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2acc347
    • D
      [NET]: deinline 200+ byte inlines in sock.h · f0088a50
      Denis Vlasenko 提交于
      Sizes in bytes (allyesconfig, i386) and files where those inlines
      are used:
      
      238 sock_queue_rcv_skb 2.6.16/net/x25/x25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/rose/rose_in.o
      238 sock_queue_rcv_skb 2.6.16/net/packet/af_packet.o
      238 sock_queue_rcv_skb 2.6.16/net/netrom/nr_in.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_sap.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_conn.o
      238 sock_queue_rcv_skb 2.6.16/net/irda/af_irda.o
      238 sock_queue_rcv_skb 2.6.16/net/ipx/af_ipx.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/ipmr.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/econet.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/af_econet.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/sco.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/l2cap.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/hci_sock.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/ax25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/af_ax25.o
      238 sock_queue_rcv_skb 2.6.16/net/appletalk/ddp.o
      238 sock_queue_rcv_skb 2.6.16/drivers/net/pppoe.o
      
      276 sk_receive_skb 2.6.16/net/decnet/dn_nsp_in.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv6.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv4.o
      276 sk_receive_skb 2.6.16/net/dccp/dccp_ipv6.o
      276 sk_receive_skb 2.6.16/drivers/net/pppoe.o
      
      209 sk_dst_check 2.6.16/net/ipv6/ip6_output.o
      209 sk_dst_check 2.6.16/net/ipv4/udp.o
      209 sk_dst_check 2.6.16/net/decnet/dn_nsp_out.o
      
      Large inlines with multiple callers:
      Size  Uses Wasted Name and definition
      ===== ==== ====== ================================================
        238   21   4360 sock_queue_rcv_skb    include/net/sock.h
        109   10    801 sock_recv_timestamp   include/net/sock.h
        276    4    768 sk_receive_skb        include/net/sock.h
         94    8    518 __sk_dst_check        include/net/sock.h
        209    3    378 sk_dst_check  include/net/sock.h
        131    4    333 sk_setup_caps include/net/sock.h
        152    2    132 sk_stream_alloc_pskb  include/net/sock.h
        125    2    105 sk_stream_writequeue_purge    include/net/sock.h
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0088a50
    • D
      [ECONET]: Convert away from SOCKOPS_WRAPPED · 1d181831
      David S. Miller 提交于
      Just use a local econet_mutex instead.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d181831
    • P
      [NET]: Fix ipx/econet/appletalk/irda ioctl crashes · f6c90b71
      Petr Vandrovec 提交于
      Fix kernel oopses whenever somebody issues compatible ioctl on AppleTalk,
      Econet, IPX or IRDA socket.  For AppleTalk/Econet/IRDA it restores state
      in which these sockets were before compat_ioctl was introduced to the socket
      ops, for IPX it implements support for 4 ioctls which were not implemented
      before - as these ioctls use structures which match between 32bit and 64bit
      userspace, no special code is needed, just call 64bit ioctl handler.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6c90b71
    • A
      [PATCH] Typo fixes · 7f927fcc
      Alexey Dobriyan 提交于
      Fix a lot of typos.  Eyeballed by jmc@ in OpenBSD.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7f927fcc
    • A
      [PATCH] Make most file operations structs in fs/ const · 4b6f5d20
      Arjan van de Ven 提交于
      This is a conversion to make the various file_operations structs in fs/
      const.  Basically a regexp job, with a few manual fixups
      
      The goal is both to increase correctness (harder to accidentally write to
      shared datastructures) and reducing the false sharing of cachelines with
      things that get dirty in .data (while .rodata is nicely read only and thus
      cache clean)
      Signed-off-by: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4b6f5d20
    • A
      [PATCH] mark f_ops const in the inode · 99ac48f5
      Arjan van de Ven 提交于
      Mark the f_ops members of inodes as const, as well as fix the
      ripple-through this causes by places that copy this f_ops and then "do
      stuff" with it.
      Signed-off-by: NArjan van de Ven <arjan@infradead.org>
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      99ac48f5
  7. 28 3月, 2006 1 次提交
    • D
      [PATCH] softmac: reduce default rate to 11Mbps. · 2638fed7
      David Woodhouse 提交于
      We don't make much of an attempt to fall back to lower rates, and 54M
      just isn't reliable enough for many people. In fact, it's not clear we
      even set it to 11M if we're trying to associate with an 802.11b AP.
      
      This patch makes us default to 11M, which ought to work for most people.
      When we actually handle dynamic rate adjustment, we can reconsider the
      defaults -- but even then, probably it makes as much sense to start at
      11M and adjust it upwards as it does to start at 54M and reduce it.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2638fed7