24 Feb, 2011

12 commits

  • Use discrete setting ops for not updated drivers. This will not make
    them conform to full G/SFEATURES semantics, though.

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Implement getting rx checksum state for not updated drivers.

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Avoid "Features changed" message and ndo_set_features call on device
    registration caused by automatic enabling of GSO and GRO. Driver should
    have enabled hardware offloads it set in features, so the ndo_set_features()
    is not needed at registration time.

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Fix netdev_update_features() messages on register time by moving
    the call further in register_netdevice(). When
    netdev->reg_state != NETREG_REGISTERED, netdev_name() returns
    "(unregistered netdevice)" even if the dev's name is already filled.

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • The original code does not work well when the number of mulitcast
    address to handle is greater than MCAST_MAX. It only enable promiscous
    mode instead of multicast hash table mode, so the hash table function
    will not be activated and all multicast frames will be recieved in this
    condition.

    This patch fixes the following issues with the r6040 NIC operating in
    multicast:

    1) When the IFF_ALLMULTI flag is set, we should write 0xffff to the NIC
    hash table registers to make it process multicast traffic.

    2) When the number of multicast address to handle is smaller than
    MCAST_MAX, we should use the NIC multicast registers MID1_{L,M,H}.

    3) The hashing of the address was not correct, due to an invalid
    substraction (15 - (crc & 0x0f)) instead of (crc & 0x0f) and an
    incorrect crc algorithm (ether_crc_le) instead of (ether_crc).

    4) If necessary, we should set HASH_EN flag in MCR0 to enable multicast
    hash table function.

    Reported-by: Marc Leclerc
    Tested-by: Marc Leclerc
    Signed-off-by: Shawn Lin
    Signed-off-by: Albert Chen
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Shawn Lin
     
  • gfp_t needs to be cast to integer.

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

    stephen hemminger
     
  • * make qdisc_ops local
    * add sparse annotation about expected unlock/unlock in dump_class_stats
    * fix indentation

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

    stephen hemminger
     
  • Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • The dmaw_block is an enum and max_pay_load is u32. Therefore
    sparse gives warning about comparison of unsigned and signed value.
    Resolve by using min_t to force cast.

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

    stephen hemminger
     
  • Use __force to quiet sparse warnings for cases where the code
    is simulating user space pointers.

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

    stephen hemminger
     
  • This is the Stochastic Fair Blue scheduler, based on work from :

    W. Feng, D. Kandlur, D. Saha, K. Shin. Blue: A New Class of Active Queue
    Management Algorithms. U. Michigan CSE-TR-387-99, April 1999.

    http://www.thefengs.com/wuchang/blue/CSE-TR-387-99.pdf

    This implementation is based on work done by Juliusz Chroboczek

    General SFB algorithm can be found in figure 14, page 15:

    B[l][n] : L x N array of bins (L levels, N bins per level)
    enqueue()
    Calculate hash function values h{0}, h{1}, .. h{L-1}
    Update bins at each level
    for i = 0 to L - 1
    if (B[i][h{i}].qlen > bin_size)
    B[i][h{i}].p_mark += p_increment;
    else if (B[i][h{i}].qlen == 0)
    B[i][h{i}].p_mark -= p_decrement;
    p_min = min(B[0][h{0}].p_mark ... B[L-1][h{L-1}].p_mark);
    if (p_min == 1.0)
    ratelimit();
    else
    mark/drop with probabilty p_min;

    I did the adaptation of Juliusz code to meet current kernel standards,
    and various changes to address previous comments :

    http://thread.gmane.org/gmane.linux.network/90225
    http://thread.gmane.org/gmane.linux.network/90375

    Default flow classifier is the rxhash introduced by RPS in 2.6.35, but
    we can use an external flow classifier if wanted.

    tc qdisc add dev $DEV parent 1:11 handle 11: \
    est 0.5sec 2sec sfb limit 128

    tc filter add dev $DEV protocol ip parent 11: handle 3 \
    flow hash keys dst divisor 1024

    Notes:

    1) SFB default child qdisc is pfifo_fast. It can be changed by another
    qdisc but a child qdisc MUST not drop a packet previously queued. This
    is because SFB needs to handle a dequeued packet in order to maintain
    its virtual queue states. pfifo_head_drop or CHOKe should not be used.

    2) ECN is enabled by default, unlike RED/CHOKe/GRED

    With help from Patrick McHardy & Andi Kleen

    Signed-off-by: Eric Dumazet
    CC: Juliusz Chroboczek
    CC: Stephen Hemminger
    CC: Patrick McHardy
    CC: Andi Kleen
    CC: John W. Linville
    Signed-off-by: David S. Miller

    Eric Dumazet
     

23 Feb, 2011

28 commits