12 Jan, 2012

1 commit


20 Dec, 2011

2 commits

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    (Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).

    Cc: "David S. Miller"
    Cc: netdev@vger.kernel.org
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • DaveM said:
    Please, this kind of stuff rots forever and not using bool properly
    drives me crazy.

    Joe Perches gave me the spatch script:

    @@
    bool b;
    @@
    -b = 0
    +b = false
    @@
    bool b;
    @@
    -b = 1
    +b = true

    I merely installed coccinelle, read the documentation and took credit.

    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     

17 Dec, 2011

1 commit

  • I've made a mistake when fixing the sock_/inet_diag aliases :(

    1. The sock_diag layer should request the family-based alias,
    not just the IPPROTO_IP one;
    2. The inet_diag layer should request for AF_INET+protocol alias,
    not just the protocol one.

    Thus fix this.

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

    Pavel Emelyanov
     

12 Dec, 2011

1 commit


10 Dec, 2011

2 commits


07 Dec, 2011

2 commits

  • Sorry, but the vger didn't let this message go to the list. Re-sending it with
    less spam-filter-prone subject.

    When dumping the AF_INET/AF_INET6 sockets user will also specify the protocol,
    so prepare the protocol diag handlers to work with IPPROTO_ constants.

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

    Pavel Emelyanov
     
  • The ultimate goal is to get the sock_diag module, that works in
    family+protocol terms. Currently this is suitable to do on the
    inet_diag basis, so rename parts of the code. It will be moved
    to sock_diag.c later.

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

    Pavel Emelyanov
     

02 Dec, 2011

2 commits

  • Commit 1386be55e32a3c5d8ef4a2b243c530a7b664c02c ("dccp: fix
    auto-loading of dccp(_probe)") fixed a bug but created a new
    compiler warning:

    net/dccp/probe.c: In function ‘dccpprobe_init’:
    net/dccp/probe.c:166:2: warning: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Wparentheses]

    try_then_request_module() is built for situations where the
    "existence" test is some lookup function that returns a non-NULL
    object on success, and with a reference count of some kind held.

    Here we're looking for a success return of zero from the jprobe
    registry.

    Instead of fighting the way try_then_request_module() works, simply
    open code what we want to happen in a local helper function.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This also works around a bogus gcc warning generated by an
    upcoming patch from Eric Dumazet that rearranges the layout
    of struct flowi4.

    Signed-off-by: David S. Miller

    David S. Miller
     

27 Nov, 2011

1 commit


23 Nov, 2011

1 commit


22 Nov, 2011

1 commit


09 Nov, 2011

1 commit


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

04 Nov, 2011

1 commit

  • Simon Kirby reported lockdep warnings and following messages :

    [104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    [104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    Problem comes from commit 0e734419
    (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)

    If inet_csk_route_child_sock() returns NULL, we should release socket
    lock before freeing it.

    Another lock imbalance exists if __inet_inherit_port() returns an error
    since commit 093d282321da ( tproxy: fix hash locking issue when using
    port redirection in __inet_inherit_port()) a backport is also needed for
    >= 2.6.37 kernels.

    Reported-by: Simon Kirby
    Signed-off-by: Eric Dumazet
    Tested-by: Eric Dumazet
    CC: Balazs Scheidler
    CC: KOVACS Krisztian
    Reviewed-by: Thomas Gleixner
    Tested-by: Simon Kirby
    Signed-off-by: David S. Miller

    Eric Dumazet
     

01 Nov, 2011

2 commits


27 Oct, 2011

1 commit

  • commit 66b13d99d96a (ipv4: tcp: fix TOS value in ACK messages sent from
    TIME_WAIT) fixed IPv4 only.

    This part is for the IPv6 side, adding a tclass param to ip6_xmit()

    We alias tw_tclass and tw_tos, if socket family is INET6.

    [ if sockets is ipv4-mapped, only IP_TOS socket option is used to fill
    TOS field, TCLASS is not taken into account ]

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

    Eric Dumazet
     

08 Aug, 2011

1 commit


07 Aug, 2011

1 commit

  • Computers have become a lot faster since we compromised on the
    partial MD4 hash which we use currently for performance reasons.

    MD5 is a much safer choice, and is inline with both RFC1948 and
    other ISS generators (OpenBSD, Solaris, etc.)

    Furthermore, only having 24-bits of the sequence number be truly
    unpredictable is a very serious limitation. So the periodic
    regeneration and 8-bit counter have been removed. We compute and
    use a full 32-bit sequence number.

    For ipv6, DCCP was found to use a 32-bit truncated initial sequence
    number (it needs 43-bits) and that is fixed here as well.

    Reported-by: Dan Kaminsky
    Tested-by: Willy Tarreau
    Signed-off-by: David S. Miller

    David S. Miller
     

01 Aug, 2011

7 commits

  • This patch causes CCID-2 to check the Ack Ratio after reducing the congestion
    window. If the Ack Ratio is greater than the congestion window, it is
    reduced. This prevents timeouts caused by an Ack Ratio larger than the
    congestion window.

    In this situation, we choose to set the Ack Ratio to half the congestion window
    (or one if that's zero) so that if we loose one ack we don't trigger a timeout.

    Signed-off-by: Samuel Jero
    Acked-by: Gerrit Renker

    Samuel Jero
     
  • This patch fixes an issue where CCID-2 will not increase the congestion
    window for numerous RTTs after an idle period, application-limited period,
    or a loss once the algorithm is in Congestion Avoidance.

    What happens is that, when CCID-2 is in Congestion Avoidance mode, it will
    increase hc->tx_packets_acked by one for every packet and will increment cwnd
    every cwnd packets. However, if there is now an idle period in the connection,
    cwnd will be reduced, possibly below the slow start threshold. This will
    cause the connection to go into Slow Start. However, in Slow Start CCID-2
    performs this test to increment cwnd every second ack:

    ++hc->tx_packets_acked == 2

    Unfortunately, this will be incorrect, if cwnd previous to the idle period
    was larger than 2 and if tx_packets_acked was close to cwnd. For example:
    cwnd=50 and tx_packets_acked=45.

    In this case, the current code, will increment tx_packets_acked until it
    equals two, which will only be once tx_packets_acked (an unsigned 32-bit
    integer) overflows.

    My fix is simply to change that test for tx_packets_acked greater than or
    equal to two in slow start.

    Signed-off-by: Samuel Jero
    Acked-by: Gerrit Renker

    Samuel Jero
     
  • Add a check to prevent CCID-2 from increasing the cwnd greater than the
    Sequence Window.

    When the congestion window becomes bigger than the Sequence Window, CCID-2
    will attempt to keep more data in the network than the DCCP Sequence Window
    code considers possible. This results in the Sequence Window code issuing
    a Sync, thereby inducing needless overhead. Further, if this occurs at the
    sender, CCID-2 will never detect the problem because the Acks it receives
    will indicate no losses. I have seen this cause a drop of 1/3rd in throughput
    for a connection.

    Also add code to adjust the Sequence Window to be about 5 times the number of
    packets in the network (RFC 4340, 7.5.2) and to adjust the Ack Ratio so that
    the remote Sequence Window will hold about 5 times the number of packets in
    the network. This allows the congestion window to increase correctly without
    being limited by the Sequence Window.

    Signed-off-by: Samuel Jero
    Acked-by: Gerrit Renker

    Samuel Jero
     
  • This uses the new feature-negotiation framework to signal Ack Ratio changes,
    as required by RFC 4341, sec. 6.1.2.

    That raises some problems with CCID-2, which at the moment can not cope
    gracefully with Ack Ratios > 1. Since these issues are not directly related
    to feature negotiation, they are marked by a FIXME.

    Signed-off-by: Gerrit Renker
    Signed-off-by: Samuel Jero
    Acked-by: Ian McDonald

    Gerrit Renker
     
  • If a connection is in the OPEN state, remove feature negotiation Confirm
    options from the list of options after sending them once; as such options
    are NOT supposed to be retransmitted and are ONLY supposed to be sent in
    response to a Change option (RFC 4340 6.2).

    Signed-off-by: Samuel Jero
    Acked-by: Gerrit Renker

    Samuel Jero
     
  • This patch adds the receiver side and the (fast-path) activation part for
    dynamic changes of non-negotiable (NN) parameters in (PART)OPEN state.

    Signed-off-by: Gerrit Renker
    Signed-off-by: Samuel Jero
    Acked-by: Ian McDonald

    Gerrit Renker
     
  • In contrast to static feature negotiation at the begin of a connection, this
    patch introduces support for exchange of dynamically changing options.

    Such an update/exchange is necessary in at least two cases:
    * CCID-2's Ack Ratio (RFC 4341, 6.1.2) which changes during the connection;
    * Sequence Window values that, as per RFC 4340, 7.5.2, should be sent "as
    the connection progresses".

    Both are non-negotiable (NN) features, which means that no new capabilities
    are negotiated, but rather that changes in known parameters are brought
    up-to-date at either end.

    Thse characteristics are reflected by the implementation:
    * only NN options can be exchanged after connection setup;
    * an ack is scheduled directly after activation to speed up the update;
    * CCIDs may request changes to an NN feature even if a negotiation for that
    feature is already underway: this is required by CCID-2, where changes in
    cwnd necessitate Ack Ratio changes, such that the previous Ack Ratio (which
    is still being negotiated) would cause irrecoverable RTO timeouts (thanks
    to work by Samuel Jero).

    Signed-off-by: Gerrit Renker
    Signed-off-by: Samuel Jero
    Acked-by: Ian McDonald

    Gerrit Renker
     

05 Jul, 2011

6 commits

  • CCID-2's cwnd increases like TCP during slow-start, which has implications for
    * the local Sequence Window value (should be > cwnd),
    * the Ack Ratio value.
    Hence an exponential growth, if it does not reflect the actual network
    conditions, can quickly lead to instability.

    This patch adds congestion-window validation (RFC2861) to CCID-2:
    * cwnd is constrained if the sender is application limited;
    * cwnd is reduced after a long idle period, as suggested in the '90 paper
    by Van Jacobson, in RFC 2581 (sec. 4.1);
    * cwnd is never reduced below the RFC 3390 initial window.

    As marked in the comments, the code is actually almost a direct copy of the
    TCP congestion-window-validation algorithms. By continuing this work, it may
    in future be possible to use the TCP code (not possible at the moment).

    The mechanism can be turned off using a module parameter. Sampling of the
    currently-used window (moving-maximum) is however done constantly; this is
    used to determine the expected window, which can be exploited to regulate
    DCCP's Sequence Window value.

    This patch also sets slow-start-after-idle (RFC 4341, 5.1), i.e. it behaves like
    TCP when net.ipv4.tcp_slow_start_after_idle = 1.

    Signed-off-by: Gerrit Renker

    Gerrit Renker
     
  • This replaces a switch statement with a test, using the equivalent
    function dccp_data_packet(skb). It also doubles the range of the field
    `rx_num_data_pkts' by changing the type from `int' to `u32', avoiding
    signed/unsigned comparison with the u16 field `dccps_r_ack_ratio'.

    Signed-off-by: Gerrit Renker

    Gerrit Renker
     
  • This moves CCID-2's initial window function into the header file, since several
    parts throughout the CCID-2 code need to call it (CCID-2 still uses RFC 3390).

    Signed-off-by: Gerrit Renker
    Acked-by: Leandro Melo de Sales

    Gerrit Renker
     
  • Change the CCID (de)activation message to start with the
    protocol name, as 'CCID' is already in there.

    Signed-off-by: Gerrit Renker

    Gerrit Renker
     
  • Realising the following call pattern,
    * first dccp_entail() is called to enqueue a new skb and
    * then skb_clone() is called to transmit a clone of that skb,
    this patch integrates both into the same function.

    Signed-off-by: Gerrit Renker

    Gerrit Renker
     
  • This patch rearranges the order of statements of the slow-path input processing
    (i.e. any other state than OPEN), to resolve the following issues.

    1. Dependencies: the order of statements now better matches RFC 4340, 8.5, i.e.
    step 7 is before step 9 (previously 9 was before 7), and parsing options in
    step 8 (which may consume resources) now comes after step 7.
    2. Sequence number checks are omitted if in state LISTEN/REQUEST, due to the
    note underneath the table in RFC 4340, 7.5.3.
    As a result, CCID processing is now indeed confined to OPEN/PARTOPEN states,
    i.e. congestion control is performed only on the flow of data packets. This
    avoids pathological cases of doing congestion control on those messages
    which set up and terminate the connection.
    3. Packets are now passed on to Ack Vector / CCID processing only after
    - step 7 (receive unexpected packets),
    - step 9 (receive Reset),
    - step 13 (receive CloseReq),
    - step 14 (receive Close)
    and only if the state is PARTOPEN. This simplifies CCID processing:
    - in LISTEN/CLOSED the CCIDs are non-existent;
    - in RESPOND/REQUEST the CCIDs have not yet been negotiated;
    - in CLOSEREQ and active-CLOSING the node has already closed this socket;
    - in passive-CLOSING the client is waiting for its Reset.
    In the last case, RFC 4340, 8.3 leaves it open to ignore further incoming
    data, which is the approach taken here.

    Signed-off-by: Gerrit Renker

    Gerrit Renker
     

19 May, 2011

1 commit


12 May, 2011

1 commit


09 May, 2011

3 commits