08 Dec, 2008

1 commit

  • This is the last shoot of this series.
    After I removing all directly reference of netdev->priv, I am killing
    "priv" of "struct net_device" and fixing relative comments/docs.

    Anyone will not be allowed to reference netdev->priv directly.
    If you want to reference the memory of private data, use netdev_priv()
    instead.
    If the private data is not allocted when alloc_netdev(), use
    netdev->ml_priv to point that memory after you creating that private
    data.

    Signed-off-by: Wang Chen
    Signed-off-by: David S. Miller

    Wang Chen
     

06 Dec, 2008

1 commit


05 Dec, 2008

1 commit


04 Dec, 2008

1 commit

  • We lack compat ioctl support through most of the ATM code. This patch
    deals with most of it, and I can now at least use BR2684 and PPPoATM
    with 32-bit userspace.

    I haven't added a .compat_ioctl method to struct atm_ioctl, because
    AFAICT none of the current users need any conversion -- so we can just
    call the ->ioctl() method in every case. I looked at br2684, clip, lec,
    mpc, pppoatm and atmtcp.

    In svc_compat_ioctl() the only mangling which is needed is to change
    COMPAT_ATM_ADDPARTY to ATM_ADDPARTY. Although it's defined as
    _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
    it doesn't actually _take_ a struct atm_iobuf as an argument -- it takes
    a struct sockaddr_atmsvc, which _is_ the same between 32-bit and 64-bit
    code, so doesn't need conversion.

    Almost all of vcc_ioctl() would have been identical, so I converted that
    into a core do_vcc_ioctl() function with an 'int compat' argument.

    I've done the same with atm_dev_ioctl(), where there _are_ a few
    differences, but still it's relatively contained and there would
    otherwise have been a lot of duplication.

    I haven't done any of the actual device-specific ioctls, although I've
    added a compat_ioctl method to struct atmdev_ops.

    Signed-off-by: David Woodhouse
    Signed-off-by: David S. Miller

    David Woodhouse
     

13 Nov, 2008

1 commit

  • We have some reasons to kill netdev->priv:
    1. netdev->priv is equal to netdev_priv().
    2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
    netdev_priv() is more flexible than netdev->priv.
    But we cann't kill netdev->priv, because so many drivers reference to it
    directly.

    This patch is a safe convert for netdev->priv to netdev_priv(netdev).
    Since all of the netdev->priv is only for read.
    But it is too big to be sent in one mail.
    I split it to 4 parts and make every part smaller than 100,000 bytes,
    which is max size allowed by vger.

    Signed-off-by: Wang Chen
    Signed-off-by: David S. Miller

    Wang Chen
     

11 Nov, 2008

1 commit


31 Oct, 2008

1 commit


28 Oct, 2008

1 commit

  • This converts pretty much everything to print_mac. There were
    a few things that had conflicts which I have just dropped for
    now, no harm done.

    I've built an allyesconfig with this and looked at the files
    that weren't built very carefully, but it's a huge patch.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

23 Sep, 2008

1 commit


21 Sep, 2008

1 commit


31 Jul, 2008

1 commit


20 Jul, 2008

1 commit


18 Jun, 2008

1 commit


17 Jun, 2008

2 commits


06 May, 2008

1 commit


05 May, 2008

2 commits


02 May, 2008

1 commit


14 Apr, 2008

1 commit


10 Apr, 2008

1 commit


09 Apr, 2008

1 commit

  • If print_mac() is used inside of a pr_debug() the compiler
    can't see that the call is redundant so still performs it
    even of pr_debug() ends up being a nop.

    So don't use print_mac() in such cases in hot code paths,
    use MAC_FMT et al. instead.

    As noted by Joe Perches, pr_debug() could be modified to
    handle this better, but that is a change to an interface
    used by the entire kernel and thus needs to be validated
    carefully. This here is thus the less risky fix for
    2.6.25

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Mar, 2008

2 commits


24 Mar, 2008

2 commits


01 Mar, 2008

1 commit


29 Feb, 2008

2 commits


29 Jan, 2008

11 commits

  • Needed to propagate it down to the ip_route_output_flow.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • CHECK net/atm/br2684.c
    net/atm/br2684.c:665:13: warning: context imbalance in 'br2684_seq_start' - wrong count at exit
    net/atm/br2684.c:676:13: warning: context imbalance in 'br2684_seq_stop' - unexpected unlock
    CHECK net/atm/lec.c
    net/atm/lec.c:196:23: warning: expensive signed divide
    CHECK net/atm/proc.c
    net/atm/proc.c:151:14: warning: context imbalance in 'vcc_seq_start' - wrong count at exit
    net/atm/proc.c:154:13: warning: context imbalance in 'vcc_seq_stop' - unexpected unlock

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • The iterator state->ns.neigh_sub_iter initialization is moved from
    arp_seq_open to clip_seq_start for convinience. This should not be a
    problem as the iterator will be used only after the seq_start
    callback.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • cat /proc/net/atm/arp causes the NULL pointer dereference in the
    get_proc_net+0xc/0x3a. This happens as proc_get_net believes that the
    parent proc dir entry contains struct net.

    Fix this assumption for "net/atm" case.

    The problem is introduced by the commit c0097b07abf5f92ab135d024dd41bd2aada1512f
    from Eric W. Biederman/Daniel Lezcano.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The patch extends the inet_addr_type and inet_dev_addr_type with the
    network namespace pointer. That allows to access the different tables
    relatively to the network namespace.

    The modification of the signature function is reported in all the
    callers of the inet_addr_type using the pointer to the well known
    init_net.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Signed-off-by: Chas Williams
    Signed-off-by: David S. Miller

    Chas Williams
     
  • Signed-off-by: Chas Williams
    Signed-off-by: David S. Miller

    Eric Kinzie
     
  • Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Chas Williams

    Kay Sievers
     
  • Signed-off-by: Chas Williams
    Signed-off-by: David S. Miller

    Robert P. J. Day
     
  • I'm actually surprised at how much was involved. At first glance it
    appears that the neighbour table data structures are already split by
    network device so all that should be needed is to modify the user
    interface commands to filter the set of neighbours by the network
    namespace of their devices.

    However a couple things turned up while I was reading through the
    code. The proxy neighbour table allows entries with no network
    device, and the neighbour parms are per network device (except for the
    defaults) so they now need a per network namespace default.

    So I updated the two structures (which surprised me) with their very
    own network namespace parameter. Updated the relevant lookup and
    destroy routines with a network namespace parameter and modified the
    code that interacts with users to filter out neighbour table entries
    for devices of other namespaces.

    I'm a little concerned that we can modify and display the global table
    configuration and from all network namespaces. But this appears good
    enough for now.

    I keep thinking modifying the neighbour table to have per network
    namespace instances of each table type would should be cleaner. The
    hash table is already dynamically sized so there are it is not a
    limiter. The default parameter would be straight forward to take care
    of. However when I look at the how the network table is built and
    used I still find some assumptions that there is only a single
    neighbour table for each type of table in the kernel. The netlink
    operations, neigh_seq_start, the non-core network users that call
    neigh_lookup. So while it might be doable it would require more
    refactoring than my current approach of just doing a little extra
    filtering in the code.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • The sock_wake_async() performs a bit different actions
    depending on "how" argument. Unfortunately this argument
    ony has numerical magic values.

    I propose to give names to their constants to help people
    reading this function callers understand what's going on
    without looking into this function all the time.

    I suppose this is 2.6.25 material, but if it's not (or the
    naming seems poor/bad/awful), I can rework it against the
    current net-2.6 tree.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Pavel Emelyanov