29 Jan, 2008

40 commits

  • ... up to rtentry_to_fib_config

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This patch makes the netlink socket to be per namespace. That allows
    to have each namespace its own socket for routing queries.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The preparatory work has been done. All we need is to substitute
    fib_table_hash with net->ipv4.fib_table_hash. Netns context is
    available when required.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The final trick for rules: place fib4_rules_ops into struct net and
    modify initialization path for this.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • nl_info is used to track the end-user destination of routing change
    notification. This is a natural object to hold a namespace on. Place
    it there and utilize the context in the appropriate places.

    Acked-by: Benjamin Thery
    Acked-by: 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
     
  • This patch extends the fib_get_table and the fib_new_table functions
    with the network namespace pointer. That will allow to access the
    table relatively from the network namespace.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • Replace the direct pointers to local and main tables with
    calls to fib_get_table() with appropriate argument.

    This doesn't introduce additional dereferences, but makes the access to fib
    tables uniform in any (CONFIG_IP_MULTIPLE_TABLES) case.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This patch makes the fib to be initialized as a subsystem for the
    network namespaces. The code does not handle several namespaces yet,
    so in case of a creation of a network namespace, the
    creation/initialization will not occur.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This adds error paths into both versions of fib4_rules_init
    (with/without CONFIG_IP_MULTIPLE_TABLES) and returns error code to the
    caller.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This adds netns parameter to fib_proc_init/exit and replaces __init
    specifier with __net_init. After this, we will not yet have these proc
    files show info from the specific namespace - this will be done when
    these tables become namespaced.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • Move static rules_ops & rules_mod_lock to the struct net, register the
    pernet subsys to init them and enjoy the fact that the core rules
    infrastructure works in the namespace.

    Real IPv4 fib rules virtualization requires fib tables support in the
    namespace and will be done seriously later in the patchset.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • fib_rules_ops contains operations and the list of configured rules. ops will
    become per/namespace soon, so we need them to be known in the default_pref
    callback.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The patch extends the different fib rules API in order to pass the
    network namespace pointer. That will allow to access the different
    tables from a namespace relative object. As usual, the pointer to the
    init_net variable is passed as parameter so we don't break the
    network.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • This patch moves the icmpv6_time sysctl to the network namespace
    structure.

    Because the ipv6 protocol is not yet per namespace, the variable is
    accessed relatively to the initial network namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • All the sysctl concerning the routes are moved to the network
    namespace structure. A helper function is called to initialize the
    variables.

    Because the ipv6 protocol is not yet per namespace, the variables are
    accessed relatively from the network namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • The ip6_frags is moved to the network namespace structure. Because
    there can be multiple instances of the network namespaces, and the
    ip6_frags is no longer a global static variable, a helper function has
    been added to facilitate the initialization of the variables.

    Until the ipv6 protocol is not per namespace, the variables are
    accessed relatively from the initial network namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • This patch moves the bindv6only sysctl to the network namespace
    structure. Until the ipv6 protocol is not per namespace, the sysctl
    variable is always from the initial network namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • Each network namespace wants its own set of sysctl value, eg. we
    should not be able from a namespace to set a sysctl value for another
    namespace , especially for the initial network namespace.

    This patch duplicates the sysctl table when we register a new network
    namespace for ipv6. The duplicated table are postfixed with the
    "template" word to notify the developper the table is cloned.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • Like the ipv4 part, this patch adds an ipv6 structure in the net
    structure to aggregate the different resources to make ipv6 per
    namespace.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • This patch makes the function ipv6_sysctl_register to return a
    value. The af_inet6 init function is now able to handle an error and
    catch it from the initialization of the sysctl.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • The conntracks subsystem has a similar infrastructure
    to maintain ctl_paths, but since we already have it
    on the generic level, I think it's OK to switch to
    using it.

    So, basically, this patch just replaces the ctl_table-s
    with ctl_path-s, nf_register_sysctl_table with
    register_sysctl_paths() and removes no longer needed code.

    After this the net/netfilter/nf_sysctl.c file contains
    the paths only.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • This includes the most simple cases for netfilter.

    The first part is tne queue modules for ipv4 and ipv6,
    on which the net/ipv4/ and net/ipv6/ paths are reused
    from the appropriate ipv4 and ipv6 code.

    The conntrack module is also patched, but this hunk is
    very small and simple.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • The feature of ipvs ctls is that the net/ipv4/vs path
    is common for core ipvs ctls and for two schedulers,
    so I make it exported and re-use it in modules.

    Two other .c files required linux/sysctl.h to make the
    extern declaration of this path compile well.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Simon Horman
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • We can avoid divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on
    x86) changing vlan_group_get_device()/vlan_group_set_device() id
    parameter from signed to unsigned.

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

    Eric Dumazet
     
  • Some devices have a seperate LED which indicates if the radio is
    enabled or not. This adds a LED trigger to mac80211 where drivers
    can hook into when they are interested in radio status changes.

    v2: Check hw.conf.radio_enabled when calling start().

    Signed-off-by: Ivo van Doorn
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Ivo van Doorn
     
  • 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 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
     
  • 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
     
  • 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
     
  • 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
     
  • …from include/net/ip_vs.h

    In include/net/ip_vs.h:
    - The ip_vs_secure_tcp_set() method is not implemented anywhere.
    - IP_VS_APP_TYPE_FTP is an unused definition.

    Signed-off-by: Rami Rosen <ramirose@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Rami Rosen
     
  • These three declarations in include/net/ip.h are not implemented
    anywhere:

    ip_mc_dropsocket(), ip_mc_dropdevice() and ip_net_unreachable().

    Also, correct a comment to be "Functions provided by ip_fragment.c"
    (instead of by ip_fragment.o) in consistency with the other comments
    in this header.

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

    Rami Rosen
     
  • This patch contains the scheduled removal of the shaper driver.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: David S. Miller

    Adrian Bunk
     
  • For five years we had two xfrm_policy_flush prototypes and every time that
    function's signature changed people have been diligently updating both of
    them without noticing :)

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

    Herbert Xu
     
  • The snd_up check should be enough. I suspect this has been
    there to provide a minor optimization in clean_rtx_queue which
    used to have a small if (!->sacked) block which could skip
    snd_up check among the other work.

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

    Ilpo Järvinen