01 Aug, 2011

1 commit

  • 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
     

07 Oct, 2010

1 commit


22 Jan, 2009

3 commits

  • Since all feature-negotiation processing now takes place in feat.c,
    functions for producing verbose debugging output are concentrated
    there.

    New functions to print out values, entry records, and options are
    provided, and also a macro is defined to not always have the function
    name in the output line.

    Thanks a lot to Wei Yongjun and Giuseppe Galeota for help and
    discussion with an earlier revision of this patch.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This patch takes care of initialising and type-checking sysctls
    related to feature negotiation. Type checking is important since some
    of the sysctls now directly impact the feature-negotiation process.

    The sysctls are initialised with the known default values for each
    feature. For the type-checking the value constraints from RFC 4340
    are used:

    * Sequence Window uses the specified Wmin=32, the maximum is ulong (4 bytes),
    tested and confirmed that it works up to 4294967295 - for Gbps speed;
    * Ack Ratio is between 0 .. 0xffff (2-byte unsigned integer);
    * CCIDs are between 0 .. 255;
    * request_retries, retries1, retries2 also between 0..255 for good measure;
    * tx_qlen is checked to be non-negative;
    * sync_ratelimit remains as before.

    Notes:
    ------
    1. Die s@sysctl_dccp_feat@sysctl_dccp@g since the sysctls are now in feat.c.
    2. As pointed out by Arnaldo, the pattern of type-checking repeats itself in
    other places, sometimes with exactly the same kind of definitions (e.g.
    "static int zero;"). It may be a good idea (kernel janitors?) to consolidate
    type checking. For the sake of keeping the changeset small and in order not
    to affect other subsystems, I have not strived to generalise here.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This initialises feature negotiation from two tables, which are in
    turn are initialised from sysctls.

    As a novel feature, specifics of the implementation (e.g. that short
    seqnos and ECN are not yet available) are advertised for robustness.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     

08 Dec, 2008

1 commit


02 Dec, 2008

2 commits

  • Analogous to the previous patch, this adds code to interpret incoming Confirm
    feature-negotiation options. Both functions operate on the feature-negotiation
    list of either the request_sock (server) or the dccp_sock (client).

    Thanks to Wei Yongjun for pointing out that it is overly restrictive to check
    the entire list of confirmed SP values.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This adds/replaces code for processing incoming ChangeL/R options.
    The main difference is that:
    * mandatory FN options are now interpreted inside the function
    (there are too many individual cases to do this externally);
    * the function returns an appropriate Reset code or 0,
    which is then used to fill in the data for the Reset packet.

    Old code, which is no longer used or referenced, has been removed.

    Signed-off-by: Gerrit Renker
    Signed-off-by: David S. Miller

    Gerrit Renker
     

24 Nov, 2008

4 commits

  • The patch extends existing code:
    * Confirm options divide into the confirmed value plus an optional preference
    list for SP values. Previously only the preference list was echoed for SP
    values, now the confirmed value is added as per RFC 4340, 6.1;
    * length and sanity checks are added to avoid illegal memory (or NULL) access.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • Support for Mandatory options is provided by this patch, which will
    be used by subsequent feature-negotiation patches.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This extends the scope of two available functions,
    encode|decode_value_var, to work up to 6 (8) bytes, to match maximum
    requirements in the RFC.

    These functions are going to be used both by general option processing
    and feature negotiation code, hence declarations have been put into
    feat.h.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • With this patch, TX/RX CCIDs can now be changed on a per-connection
    basis, which overrides the defaults set by the global sysctl variables
    for TX/RX CCIDs.

    To make full use of this facility, the remaining patches of this patch
    set are needed, which track dependencies and activate negotiated
    feature values.

    Signed-off-by: Gerrit Renker
    Signed-off-by: David S. Miller

    Gerrit Renker
     

17 Nov, 2008

1 commit

  • The previous setsockopt interface, which passed socket options via struct
    dccp_so_feat, is complicated/difficult to use. Continuing to support it leads to
    ugly code since the old approach did not distinguish between NN and SP values.

    This patch removes the old setsockopt interface and replaces it with two new
    functions to register NN/SP values for feature negotiation.
    These are essentially wrappers around the internal __feat_register functions,
    with checking added to avoid

    * wrong usage (type);
    * changing values while the connection is in progress.

    Signed-off-by: Gerrit Renker
    Signed-off-by: David S. Miller

    Gerrit Renker
     

12 Nov, 2008

1 commit

  • Two registration routines, for SP and NN features, are provided by this patch,
    replacing a previous routine which was used for both feature types.

    These are internal-only routines and therefore start with `__feat_register'.

    It further exports the known limits of Sequence Window and Ack Ratio as symbolic
    constants.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     

05 Nov, 2008

2 commits

  • This provides feature-negotiation initialisation for both DCCP sockets
    and DCCP request_sockets, to support feature negotiation during
    connection setup.

    It also resolves a FIXME regarding the congestion control
    initialisation.

    Thanks to Wei Yongjun for help with the IPv6 side of this patch.

    Signed-off-by: Gerrit Renker
    Acked-by: Ian McDonald
    Signed-off-by: David S. Miller

    Gerrit Renker
     
  • This patch prepares for the new and extended feature-negotiation
    routines.

    The following feature-negotiation data structures are provided:
    * a container for the various (SP or NN) values,
    * symbolic state names to track feature states,
    * an entry struct which holds all current information together,
    * elementary functions to fill in and process these structures.

    Entry structs are arranged as FIFO for the following reason: RFC 4340
    specifies that if multiple options of the same type are present, they
    are processed in the order of their appearance in the packet; which
    means that this order needs to be preserved in the local data
    structure (the later insertion code also respects this order).

    The struct list_head has been chosen for the following reasons: the most
    frequent operations are

    * add new entry at tail (when receiving Change or setting socket
    options);
    * delete entry (when Confirm has been received);
    * deep copy of entire list (cloning from listening socket onto
    request socket).

    The NN value has been set to 64 bit, which is a currently sufficient
    upper limit (Sequence Window feature has 48 bit).

    Thanks to Arnaldo, who contributed the streamlined layout of the entry
    struct.

    Signed-off-by: Gerrit Renker
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Gerrit Renker
     

29 Jan, 2008

1 commit

  • This removes two inlines which were both called in a single function only:

    1) dccp_feat_change() is always called with either DCCPO_CHANGE_L or DCCPO_CHANGE_R as argument
    * from dccp_set_socktopt_change() via do_dccp_setsockopt() with DCCP_SOCKOPT_CHANGE_R/L
    * from __dccp_feat_init() via dccp_feat_init() also with DCCP_SOCKOPT_CHANGE_R/L.

    Hence the dccp_feat_is_valid_type() is completely unnecessary and always returns true.

    2) Due to (1), the length test reduces to 'len >= 4', which in turn makes
    dccp_feat_is_valid_length() unnecessary.

    Furthermore, the inline function dccp_feat_is_reserved() was unfolded,
    since only called in a single place.

    Signed-off-by: Gerrit Renker
    Signed-off-by: Ian McDonald
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Gerrit Renker
     

11 Feb, 2007

1 commit


03 Dec, 2006

2 commits

  • This patch replaces cryptic feature negotiation messages of type

    Oct 31 15:42:20 kernel: dccp_feat_change: feat change type=32 feat=1
    Oct 31 15:42:21 kernel: dccp_feat_change: feat change type=34 feat=1
    Oct 31 15:42:21 kernel: dccp_feat_change: feat change type=32 feat=5

    into ones of type:

    Nov 2 13:54:45 kernel: dccp_feat_change: ChangeL(CCID (1), 3)
    Nov 2 13:54:45 kernel: dccp_feat_change: ChangeR(CCID (1), 3)
    Nov 2 13:54:45 kernel: dccp_feat_change: ChangeL(Ack Ratio (5), 2)

    Also,
    * completed the feature number list wrt RFC 4340 sec. 6.4
    * annotating which ones have been implemented so far
    * implemented rudimentary sanity checking in feat.c (FIXMEs)
    * some minor fixes

    Commiter note: uninlined dccp_feat_name and dccp_feat_typename, for
    consistency with dccp_{state,packet}_name, that, BTW,
    should be compiled only if CONFIG_IP_DCCP_DEBUG is
    selected, leaving this to another cset tho. Also
    shortened dccp_feat_negotiation_debug to dccp_feat_debug.

    Signed-off-by: Gerrit Renker
    Signed-off-by: Arnaldo Carvalho de Melo

    Gerrit Renker
     
  • This adds 3 sysctls which govern the retransmission behaviour of DCCP control
    packets (3way handshake, feature negotiation).

    It removes 4 FIXMEs from the code.

    The close resemblance of sysctl variables to their TCP analogues is emphasised
    not only by their name, but also by giving them the same initial values.
    This is useful since there is not much practical experience with DCCP yet.

    Furthermore, with regard to the previous patch, it is now possible to limit
    the number of keepalive-Responses by setting net.dccp.default.request_retries
    (also a bit like in TCP).

    Lastly, added documentation of all existing DCCP sysctls.

    Signed-off-by: Gerrit Renker
    Signed-off-by: Arnaldo Carvalho de Melo

    Gerrit Renker
     

23 Sep, 2006

1 commit


25 Jul, 2006

1 commit

  • When using the default sequence window size (100) I got the following in
    my logs:

    Jun 22 14:24:09 localhost kernel: [ 1492.114775] DCCP: Step 6 failed for
    DATA packet, (LSWL(6279674225)
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Ian McDonald
     

21 Mar, 2006

2 commits