18 Jan, 2010

2 commits

  • __net_init/__net_exit are apparently not going away, so use them
    to full extent.

    In some cases __net_init was removed, because it was called from
    __net_exit code.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Currently we don't increment SYN-ACK timeouts & retransmissions
    although we do increment the same stats for SYN. We seem to have lost
    the SYN-ACK accounting with the introduction of tcp_syn_recv_timer
    (commit 2248761e in the netdev-vger-cvs tree).

    This patch fixes this issue. In the process we also rename the v4/v6
    syn/ack retransmit functions for clarity. We also add a new
    request_socket operations (syn_ack_timeout) so we can keep code in
    inet_connection_sock.c protocol agnostic.

    Signed-off-by: Octavian Purdila
    Signed-off-by: David S. Miller

    Octavian Purdila
     

16 Jan, 2010

11 commits


15 Jan, 2010

12 commits

  • Use the resource_size function instead of manually calculating the
    resource size.

    Signed-off-by: Tobias Klauser
    Signed-off-by: David S. Miller

    Tobias Klauser
     
  • Due to an invalid "#ifdef CONFIG_PPC_MPC5200", the real clock setup
    function was not called for the MPC5200.

    Signed-off-by: Wolfgang Grandegger
    Acked-by: Wolfram Sang
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     
  • What it is: vhost net is a character device that can be used to reduce
    the number of system calls involved in virtio networking.
    Existing virtio net code is used in the guest without modification.

    There's similarity with vringfd, with some differences and reduced scope
    - uses eventfd for signalling
    - structures can be moved around in memory at any time (good for
    migration, bug work-arounds in userspace)
    - write logging is supported (good for migration)
    - support memory table and not just an offset (needed for kvm)

    common virtio related code has been put in a separate file vhost.c and
    can be made into a separate module if/when more backends appear. I used
    Rusty's lguest.c as the source for developing this part : this supplied
    me with witty comments I wouldn't be able to write myself.

    What it is not: vhost net is not a bus, and not a generic new system
    call. No assumptions are made on how guest performs hypercalls.
    Userspace hypervisors are supported as well as kvm.

    How it works: Basically, we connect virtio frontend (configured by
    userspace) to a backend. The backend could be a network device, or a tap
    device. Backend is also configured by userspace, including vlan/mac
    etc.

    Status: This works for me, and I haven't see any crashes.
    Compared to userspace, people reported improved latency (as I save up to
    4 system calls per packet), as well as better bandwidth and CPU
    utilization.

    Features that I plan to look at in the future:
    - mergeable buffers
    - zero copy
    - scalability tuning: figure out the best threading model to use

    Note on RCU usage (this is also documented in vhost.h, near
    private_pointer which is the value protected by this variant of RCU):
    what is happening is that the rcu_dereference() is being used in a
    workqueue item. The role of rcu_read_lock() is taken on by the start of
    execution of the workqueue item, of rcu_read_unlock() by the end of
    execution of the workqueue item, and of synchronize_rcu() by
    flush_workqueue()/flush_work(). In the future we might need to apply
    some gcc attribute or sparse annotation to the function passed to
    INIT_WORK(). Paul's ack below is for this RCU usage.

    (Includes fixes by Alan Cox ,
    David L Stevens ,
    Chris Wright )

    Acked-by: Rusty Russell
    Acked-by: Arnd Bergmann
    Acked-by: "Paul E. McKenney"
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • vhost net module wants to do copy to/from user from a kernel thread,
    which needs use_mm. Export it to modules.

    Acked-by: Andrea Arcangeli
    Acked-by: Andrew Morton
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Tun device looks similar to a packet socket
    in that both pass complete frames from/to userspace.

    This patch fills in enough fields in the socket underlying tun driver
    to support sendmsg/recvmsg operations, and message flags
    MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket
    to modules. Regular read/write behaviour is unchanged.

    This way, code using raw sockets to inject packets
    into a physical device, can support injecting
    packets into host network stack almost without modification.

    First user of this interface will be vhost virtualization
    accelerator.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Herbert Xu
    Acked-by: David S. Miller
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • This patch adds error checking of ctrlmode values for CAN devices. As
    an example all availabe bits are implemented in the mcp251x driver.

    Signed-off-by: Christian Pellegrin
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Christian Pellegrin
     
  • Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • GNU General Public License is in file "COPYING".

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • Before sending Interrupt coalesce parameters to device,
    convert them in little endian.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • In netxen_read_mac_addr, mac_addr should be declared
    u64 instead of __le64, used by host only.

    Signed-off-by: Amit Kumar Salecha
    Signed-off-by: David S. Miller

    Amit Kumar Salecha
     
  • As noticed by H Hartley Sweeten, since change_nexthops() uses 'nh'
    as it's iterator variable, it can conflict with other existing
    local vars.

    Use "nexthop_nh" to avoid the conflict and make it easier to figure
    out where this magic variable comes from.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • In sock_getsockopt the symbol 'lv' is declared as an
    unsigned int type, probably due to sizeof returning a
    size_t which is really an unsigned int.

    This produces a sparse warning for SO_PEERNAME due to
    the sock->ops->getname() call:

    warning: incorrect type in argument 3 (different signedness)
    expected int *sockaddr_len
    got unsigned int *

    Quiet the warning by changing the type of 'lv' to an int.

    Signed-off-by: H Hartley Sweeten
    Signed-off-by: David S. Miller

    H Hartley Sweeten
     

14 Jan, 2010

11 commits


12 Jan, 2010

2 commits

  • To prevent the CAN drivers to operate on invalid socketbuffers the skbs are
    now checked and silently dropped at the xmit-function consistently.

    Also the netdev stats are consistently using the CAN data length code (dlc)
    for [rx|tx]_bytes now.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     
  • This patch adds the kernel portions needed to implement
    RFC 5082 Generalized TTL Security Mechanism (GTSM).
    It is a lightweight security measure against forged
    packets causing DoS attacks (for BGP).

    This is already implemented the same way in BSD kernels.
    For the necessary Quagga patch
    http://www.gossamer-threads.com/lists/quagga/dev/17389

    Description from Cisco
    http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gt_btsh.html

    It does add one byte to each socket structure, but I did
    a little rearrangement to reuse a hole (on 64 bit), but it
    does grow the structure on 32 bit

    This should be documented on ip(4) man page and the Glibc in.h
    file also needs update. IPV6_MINHOPLIMIT should also be added
    (although BSD doesn't support that).

    Only TCP is supported, but could also be added to UDP, DCCP, SCTP
    if desired.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

11 Jan, 2010

2 commits