26 Oct, 2005

1 commit


23 Oct, 2005

1 commit

  • On architectures where the char type defaults to unsigned some of the
    arithmetic in the AX.25 stack to fail, resulting in some packets being dropped
    on receive.

    Credits for tracking this down and the original patch to
    Bob Brose N0QBJ .

    Signed-off-by: Ralf Baechle DL5RB
    Signed-off-by: Arnaldo Carvalho de Melo

    Ralf Baechle
     

11 Oct, 2005

1 commit


09 Oct, 2005

1 commit

  • - added typedef unsigned int __nocast gfp_t;

    - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
    the same warnings as far as sparse is concerned, doesn't change
    generated code (from gcc point of view we replaced unsigned int with
    typedef) and documents what's going on far better.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

07 Oct, 2005

2 commits


06 Oct, 2005

1 commit


05 Oct, 2005

4 commits

  • Fix implicit nocast warnings in xfrm code:
    net/xfrm/xfrm_policy.c:232:47: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • From: Randy Dunlap

    Fix implicit nocast warnings in ip_vs code:
    net/ipv4/ipvs/ip_vs_app.c:631:54: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix implicit nocast warnings in decnet code:
    net/decnet/af_decnet.c:458:40: warning: implicit cast to nocast type
    net/decnet/dn_nsp_out.c:125:35: warning: implicit cast to nocast type
    net/decnet/dn_nsp_out.c:219:29: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • No need to align struct inet_ehash_bucket on a 8 bytes boundary.

    On 32 bits Uniprocessor, that's a waste of 4 bytes per struct (50 %)

    On other platforms, the attribute is useless, natual alignement is already 8.

    platform | Size before | Size after patch
    -------------+-------------+------------------
    32 bits, UP | 8 | 4
    32 bits, SMP | 8 | 8
    64 bits, UP | 8 | 8
    64 bits, SMP | 16 | 16

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

    Eric Dumazet
     

04 Oct, 2005

1 commit

  • Arnaldo and I agreed it could be applied now, because I have other
    pending patches depending on this one (Thank you Arnaldo)

    (The other important patch moves skc_refcnt in a separate cache line,
    so that the SMP/NUMA performance doesnt suffer from cache line ping pongs)

    1) First some performance data :
    --------------------------------

    tcp_v4_rcv() wastes a *lot* of time in __inet_lookup_established()

    The most time critical code is :

    sk_for_each(sk, node, &head->chain) {
    if (INET_MATCH(sk, acookie, saddr, daddr, ports, dif))
    goto hit; /* You sunk my battleship! */
    }

    The sk_for_each() does use prefetch() hints but only the begining of
    "struct sock" is prefetched.

    As INET_MATCH first comparison uses inet_sk(__sk)->daddr, wich is far
    away from the begining of "struct sock", it has to bring into CPU
    cache cold cache line. Each iteration has to use at least 2 cache
    lines.

    This can be problematic if some chains are very long.

    2) The goal
    -----------

    The idea I had is to change things so that INET_MATCH() may return
    FALSE in 99% of cases only using the data already in the CPU cache,
    using one cache line per iteration.

    3) Description of the patch
    ---------------------------

    Adds a new 'unsigned int skc_hash' field in 'struct sock_common',
    filling a 32 bits hole on 64 bits platform.

    struct sock_common {
    unsigned short skc_family;
    volatile unsigned char skc_state;
    unsigned char skc_reuse;
    int skc_bound_dev_if;
    struct hlist_node skc_node;
    struct hlist_node skc_bind_node;
    atomic_t skc_refcnt;
    + unsigned int skc_hash;
    struct proto *skc_prot;
    };

    Store in this 32 bits field the full hash, not masked by (ehash_size -
    1) Using this full hash as the first comparison done in INET_MATCH
    permits us immediatly skip the element without touching a second cache
    line in case of a miss.

    Suppress the sk_hashent/tw_hashent fields since skc_hash (aliased to
    sk_hash and tw_hash) already contains the slot number if we mask with
    (ehash_size - 1)

    File include/net/inet_hashtables.h

    64 bits platforms :
    #define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
    (((__sk)->sk_hash == (__hash))
    ((*((__u64 *)&(inet_sk(__sk)->daddr)))== (__cookie)) && \
    ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \
    (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))

    32bits platforms:
    #define TCP_IPV4_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
    (((__sk)->sk_hash == (__hash)) && \
    (inet_sk(__sk)->daddr == (__saddr)) && \
    (inet_sk(__sk)->rcv_saddr == (__daddr)) && \
    (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))

    - Adds a prefetch(head->chain.first) in
    __inet_lookup_established()/__tcp_v4_check_established() and
    __inet6_lookup_established()/__tcp_v6_check_established() and
    __dccp_v4_check_established() to bring into cache the first element of the
    list, before the {read|write}_lock(&head->lock);

    Signed-off-by: Eric Dumazet
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Eric Dumazet
     

22 Sep, 2005

7 commits


15 Sep, 2005

1 commit

  • ip_vs_ftp when loaded can create NAT connections with unknown client
    port for passive FTP. For such expectations we lookup with cport=0 on
    incoming packet but it matches the format of the persistence templates
    causing packets to other persistent virtual servers to be forwarded to
    real server without creating connection. Later the reply packets are
    treated as foreign and not SNAT-ed.

    This patch changes the connection lookup for packets from clients:

    * introduce IP_VS_CONN_F_TEMPLATE connection flag to mark the
    connection as template

    * create new connection lookup function just for templates -
    ip_vs_ct_in_get

    * make sure ip_vs_conn_in_get hits only connections with
    IP_VS_CONN_F_NO_CPORT flag set when s_port is 0. By this way
    we avoid returning template when looking for cport=0 (ftp)

    Signed-off-by: Julian Anastasov
    Signed-off-by: David S. Miller

    Julian Anastasov
     

14 Sep, 2005

1 commit


13 Sep, 2005

6 commits


09 Sep, 2005

3 commits


08 Sep, 2005

4 commits


07 Sep, 2005

2 commits

  • Hi Jeff,

    This is version 19 of the Wireless Extensions. It was supposed
    to be the fallback of the WPA API changes, but people seem quite happy
    about it (especially Jouni), so the patch is rather small.
    The patch has been fully tested with 2.6.13 and various
    wireless drivers, and is in its final version. Would you mind pushing
    that into Linus's kernel so that the driver and the apps can take
    advantage ot it ?

    It includes :
    o iwstat improvement (explicit dBm). This is the result of
    long discussions with Dan Williams, the authors of
    NetworkManager. Thanks to him for all the fruitful feedback.
    o remove pointer from event stream. I was not totally sure if
    this pointer was 32-64 bits clean, so I'd rather remove it and be at
    peace with it.
    o remove linux header from wireless.h. This has long been
    requested by people writting user space apps, now it's done, and it
    was not even painful.
    o final deprecation of spy_offset. You did not like it, it's
    now gone for good.
    o Start deprecating dev->get_wireless_stats -> debloat netdev
    o Add "check" version of event macros for ieee802.11
    stack. Jiri Benc doesn't like the current macros, we aim to please ;-)
    All those changes, except the last one, have been bit-roting on
    my web pages for a while...

    Patches for most kernel drivers will follow. Patches for the
    Orinoco and the HostAP drivers have been sent to their respective
    maintainers.

    Have fun...

    Jean
    Signed-off-by: Jeff Garzik

    Jean Tourrilhes
     
  • Ax2asc was still using a static buffer for all invocations which isn't
    exactly SMP-safe. Change ax2asc to take an additional result buffer as
    the argument. Change all callers to provide such a buffer.

    Signed-off-by: Ralf Baechle DL5RB
    Signed-off-by: David S. Miller

    Ralf Baechle
     

06 Sep, 2005

2 commits


05 Sep, 2005

1 commit


02 Sep, 2005

1 commit