29 Jan, 2008

40 commits

  • I would argue that mac80211 should handle fixed rates outside the rate
    control code, which would also allow them to take effect immediately
    instead of during the rate control callback, but this is pretty close
    to correct.

    Signed-Off-By: Andy Lutomirski
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Andrew Lutomirski
     
  • This patch changes mac80211's Kconfig/Makefile to:
    * select between the PID and the SIMPLE rate control
    algorithm as default
    * always allow tri-state for the rate control algorithms,
    building those that are selected 'y' into the mac80211
    module (if that is a module, otherwise all into the kernel)
    * force the default rate control algorithm to be built into
    mac80211

    It also makes both rate control algorithms proper modules again
    with MODULE_LICENSE etc.

    Only if EMBEDDED is the user allowed to select "NONE" as default
    which will cause no algorithm to be selected, this will work
    only when the driver brings one itself (e.g. iwlwifi drivers).

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This patch opens the flow to DELBA management frames, and handles end
    of A-MPDU session produced by this event.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch adds the ability to handle Block Ack Request

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch handles the reordering of the Rx A-MPDU.
    This issue occurs when the sequence of the internal MPDUs is not in the
    right order. such a case can be encountered for example when some MPDUs from
    previous aggregations were recieved, while others failed, so current A-MPDU
    will contain a mix of re-transmited MPDUs and new ones.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch initialize A-MPDU MLME data for Rx sessions.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch adds the basic needed abilities and functions for A-MPDU Rx session
    changed functions:
    - ieee80211_sta_process_addba_request - Rx A-MPDU initialization enabled
    - ieee80211_stop - stops all A-MPDU Rx in case interface goes down
    added functions:
    - ieee80211_send_delba - used for sending out Del BA in A-MPDU sessions
    - ieee80211_sta_stop_rx_BA_session - stopping Rx A-MPDU session
    - sta_rx_agg_session_timer_expired - stops A-MPDU Rx use if load is too
    low

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch adds the needed structures to describe the Rx aggregation MLME per STA
    new:
    - struct tid_ampdu_rx: TID aggregation information (Rx)
    - struct sta_ampdu_mlme: MLME aggregation information for STA
    changed:
    - struct sta_info: ampdu_mlme added to describe A-MPDU MLME per STA,
    and timer_to_tid added to map timer id into TID

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch adds the API to perform A-MPDU actions between mac80211 and low
    level driver.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • This patch makes a separation between Rx frame pre-handling which stays in
    __ieee80211_rx and Rx frame handlers, moving to __ieee80211_rx_handle_packet.
    Although this separation has no affect in regular mode of operation, this kind
    of mechanism will be used in A-MPDU frames reordering as it allows accumulation
    of frames during pre-handling, dispatching them to later handling when necessary.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ron Rindjunsky
     
  • No need to not be.

    Signed-off-by: Johannes Berg
    Acked-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Fix the rate control interval definition. Thanks to Mattias Nissler for
    spotting this out.

    Cc: Mattias Nissler
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • When this function returns != CONTINUE, it needs to put the
    station struct it has acquired. Hence, having this unused
    variable is not just superfluous but also misleading.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • Add an entry in MAINTAINERS for rc80211-pid.

    Cc: Mattias Nissler
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • Set a better value for percentage target for failed frames. The previous value
    slowed down too much rate increases in case of permanently low activity. While
    at it, increase readability.

    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • Fix a bug which caused uncorrect refcounting of PHYs in mac80211. Thanks to
    Johannes Berg for spotting this out.

    Cc: Johannes Berg
    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • Simplify and fix rate_control_pid_shift_adjust(). A bug prevented correct
    mapping of sorted rates, and readability was seriously flawed.

    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • Add a kerneldoc description for parameters which are tunable through debugfs.

    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • Export the non-shifted target_pf value to debugfs, so that it's human-readable.

    Signed-off-by: Stefano Brivio
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Stefano Brivio
     
  • This patch fixes a problem with rx handling on multiple interfaces. Especially
    when using hardware-scanning and a wireless driver (i.e. iwlwifi) which is
    able to receive data while scanning.

    The rx handlers can modify the skb and the frame control field (see
    ieee80211_rx_h_remove_qos_control) but since every interface gets its own
    copy of the skb each should get its own copy of rx.fc too.

    In my case the wlan0-interface did not remove the qos-control from the frame
    because the corresponding flag in rx.fc was already removed while processing
    the frame on the master interface. Therefore somehow corrupted frames were
    passed to the userspace.

    Signed-off-by: Helmut Schaa
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Helmut Schaa
     
  • xfrm_state_clone() is not used outside of net/xfrm/xfrm_state.c
    There is no need to export it.

    Spoted by sparse checker.
    CHECK net/xfrm/xfrm_state.c
    net/xfrm/xfrm_state.c:1103:19: warning: symbol 'xfrm_state_clone' was not
    declared. Should it be static?

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

    Eric Dumazet
     
  • CHECK net/packet/af_packet.c
    net/packet/af_packet.c:1876:14: warning: context imbalance in 'packet_seq_start' - wrong count at exit
    net/packet/af_packet.c:1888:13: warning: context imbalance in 'packet_seq_stop' - unexpected unlock

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

    Eric Dumazet
     
  • The function sockfd_lookup uses fget on the value that is stored in
    the file field of the returned structure, so fput should ultimately be
    applied to this value. This can be done directly, but it seems better
    to use the specific macro sockfd_put, which does the same thing.

    The problem was fixed using the following semantic patch.
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    expression s;
    @@

    s = sockfd_lookup(...)
    ...
    + sockfd_put(s);
    ?- fput(s->file);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • The info placeholder member of dst_entry seems to be unused in the
    network stack.

    Signed-off-by: Rami Rosen
    Signed-off-by: David S. Miller

    Rami Rosen
     
  • Since __xfrm_policy_destroy is used to destory the resources
    allocated by xfrm_policy_alloc. So using the name
    __xfrm_policy_destroy is not correspond with xfrm_policy_alloc.
    Rename it to xfrm_policy_destroy.

    And along with some instances that call xfrm_policy_alloc
    but not using xfrm_policy_destroy to destroy the resource,
    fix them.

    Signed-off-by: WANG Cong
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    WANG Cong
     
  • o Increment PolError counter when flow_cache_lookup() returns
    errored pointer.

    o Increment NoStates counter at larval-drop.

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     
  • It seems that ip_build_xmit is no longer used in here and
    ip_append_data is used.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Without a number of CONFIG.*DEBUG:

    net/dccp/ccids/ccid3.c:
    ccid3_hc_tx_update_x | -170
    ccid3_hc_tx_packet_sent | -175
    ccid3_hc_tx_packet_recv | -169
    ccid3_hc_tx_no_feedback_timer | -192
    ccid3_hc_tx_send_packet | -144
    5 functions changed, 850 bytes removed, diff: -850

    net/dccp/ccids/ccid3.c:
    ccid3_update_send_interval | +191
    1 function changed, 191 bytes added, diff: +191

    net/dccp/ccids/ccid3.o:
    6 functions changed, 191 bytes added, 850 bytes removed, diff: -659

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • net/xfrm/xfrm_state.c:
    xfrm_audit_state_delete | -589
    xfrm_replay_check | -542
    xfrm_audit_state_icvfail | -520
    xfrm_audit_state_add | -589
    xfrm_audit_state_replay_overflow | -523
    xfrm_audit_state_notfound_simple | -509
    xfrm_audit_state_notfound | -521
    7 functions changed, 3793 bytes removed, diff: -3793

    net/xfrm/xfrm_state.c:
    xfrm_audit_helper_pktinfo | +522
    xfrm_audit_helper_sainfo | +598
    2 functions changed, 1120 bytes added, diff: +1120

    net/xfrm/xfrm_state.o:
    9 functions changed, 1120 bytes added, 3793 bytes removed, diff: -2673

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • net/ipv4/ipvs/ip_vs_xmit.c:
    ip_vs_icmp_xmit | -638
    ip_vs_tunnel_xmit | -674
    ip_vs_nat_xmit | -716
    ip_vs_dr_xmit | -682
    4 functions changed, 2710 bytes removed, diff: -2710

    net/ipv4/ipvs/ip_vs_xmit.c:
    __ip_vs_get_out_rt | +595
    1 function changed, 595 bytes added, diff: +595

    net/ipv4/ipvs/ip_vs_xmit.o:
    5 functions changed, 595 bytes added, 2710 bytes removed, diff: -2115

    Without some CONFIG.*DEBUGs:

    net/ipv4/ipvs/ip_vs_xmit.o:
    5 functions changed, 383 bytes added, 1513 bytes removed, diff: -1130

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • /me awards the bloatiest-of-all-net/-.c-code award to
    nf_conntrack_netlink.c, congratulations to all the authors :-/!

    Hall of (unquestionable) fame (measured per inline, top 10 under
    net/):
    -4496 ctnetlink_parse_tuple netfilter/nf_conntrack_netlink.c
    -2165 ctnetlink_dump_tuples netfilter/nf_conntrack_netlink.c
    -2115 __ip_vs_get_out_rt ipv4/ipvs/ip_vs_xmit.c
    -1924 xfrm_audit_helper_pktinfo xfrm/xfrm_state.c
    -1799 ctnetlink_parse_tuple_proto netfilter/nf_conntrack_netlink.c
    -1268 ctnetlink_parse_tuple_ip netfilter/nf_conntrack_netlink.c
    -1093 ctnetlink_exp_dump_expect netfilter/nf_conntrack_netlink.c
    -1060 void ccid3_update_send_interval dccp/ccids/ccid3.c
    -983 ctnetlink_dump_tuples_proto netfilter/nf_conntrack_netlink.c
    -827 ctnetlink_exp_dump_tuple netfilter/nf_conntrack_netlink.c

    (i386 / gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-13) /
    allyesconfig except CONFIG_FORCED_INLINING)

    ...and I left < 200 byte gains as future work item.

    After iterative inline removal, I finally have this:

    net/netfilter/nf_conntrack_netlink.c:
    ctnetlink_exp_fill_info | -1104
    ctnetlink_new_expect | -1572
    ctnetlink_fill_info | -1303
    ctnetlink_new_conntrack | -2230
    ctnetlink_get_expect | -341
    ctnetlink_del_expect | -352
    ctnetlink_expect_event | -1110
    ctnetlink_conntrack_event | -1548
    ctnetlink_del_conntrack | -729
    ctnetlink_get_conntrack | -728
    10 functions changed, 11017 bytes removed, diff: -11017

    net/netfilter/nf_conntrack_netlink.c:
    ctnetlink_parse_tuple | +419
    dump_nat_seq_adj | +183
    ctnetlink_dump_counters | +166
    ctnetlink_dump_tuples | +261
    ctnetlink_exp_dump_expect | +633
    ctnetlink_change_status | +460
    6 functions changed, 2122 bytes added, diff: +2122

    net/netfilter/nf_conntrack_netlink.o:
    16 functions changed, 2122 bytes added, 11017 bytes removed, diff: -8895

    Without a number of CONFIG.*DEBUGs, I got this:
    net/netfilter/nf_conntrack_netlink.o:
    16 functions changed, 2122 bytes added, 11029 bytes removed, diff: -8907

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Previous NETNS patches broke CONFIG_SYSCTL=n case

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

    Eric Dumazet
     
  • - 'cb' is a fake struct member. In a previous patch struct cn_callback
    was renamed to cn_callback_id, so 'cb' should have been deleted at that
    time.

    - 'nls' isn't used and is redundant, we can retrieve this data through
    cn_callback_entry.pdev->nls.

    - 'seq' and 'group' should be u32, as they are declared to be u32 in
    other places.

    Signed-off-by: Li Zefan
    Signed-off-by: David S. Miller

    Li Zefan
     
  • Struct member netlink_groups is never used, and I don't see how it can
    be useful.

    Signed-off-by: Li Zefan
    Signed-off-by: David S. Miller

    Li Zefan
     
  • - __cn_rx_skb() does nothing but calls cn_call_callback(), it doesn't
    check skb and msg sizes as the comment suggests, but cn_rx_skb() checks
    those sizes.

    - In cn_rx_skb() Local variable 'len' is not used. 'len' is probably
    intended to be passed to skb_pull(), but here skb_pull() is not needed,
    instead skb_free() is called.

    Signed-off-by: Li Zefan
    Signed-off-by: David S. Miller

    Li Zefan
     
  • Each entry in the list has a unique id, so just break out of the
    loop if the matched id is found.

    Signed-off-by: Li Zefan
    Signed-off-by: David S. Miller

    Li Zefan
     
  • CHECK net/ipv4/icmp.c
    net/ipv4/icmp.c:249:13: warning: context imbalance in 'icmp_xmit_unlock' -
    unexpected unlock
    net/ipv4/icmp.c:376:13: warning: context imbalance in 'icmp_reply' - different
    lock contexts for basic block
    net/ipv4/icmp.c:430:6: warning: context imbalance in 'icmp_send' - different
    lock contexts for basic block

    Solution is to declare both icmp_xmit_lock() and icmp_xmit_unlock() as inline

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

    Eric Dumazet
     
  • 1) Cleanups (all functions are prefixed by sock_prot_inuse)

    sock_prot_inc_use(prot) -> sock_prot_inuse_add(prot,-1)
    sock_prot_dec_use(prot) -> sock_prot_inuse_add(prot,-1)
    sock_prot_inuse() -> sock_prot_inuse_get()

    New functions :

    sock_prot_inuse_init() and sock_prot_inuse_free() to abstract pcounter use.

    2) if CONFIG_PROC_FS=n, we can zap 'inuse' member from "struct proto",
    since nobody wants to read the inuse value.

    This saves 1372 bytes on i386/SMP and some cpu cycles.

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

    Eric Dumazet
     
  • Before pushing pcounter to Linus tree, I would like to make some adjustments.

    Goal is to reduce kernel text size, by unlining too big functions.

    When a pcounter is bound to a statically defined per_cpu variable,
    we define two small helpers functions. (No more folding function
    using the fat for_each_possible_cpu(cpu) ... )

    static DEFINE_PER_CPU(int, NAME##_pcounter_values);
    static void NAME##_pcounter_add(struct pcounter *self, int val)
    {
    __get_cpu_var(NAME##_pcounter_values) += val;
    }
    static int NAME##_pcounter_getval(const struct pcounter *self, int cpu)
    {
    return per_cpu(NAME##_pcounter_values, cpu);
    }

    Fast path is therefore unchanged, while folding/alloc/free is now unlined.

    This saves 228 bytes on i386

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

    Eric Dumazet
     
  • We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86)
    changing ((HZ<<< idx)

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

    Eric Dumazet