1. 01 8月, 2011 1 次提交
    • G
      dccp: support for the exchange of NN options in established state 1/2 · d6916f87
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.uk>
      d6916f87
  2. 07 10月, 2010 1 次提交
  3. 22 1月, 2009 3 次提交
    • G
      dccp: Debugging functions for feature negotiation · f3f3abb6
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3f3abb6
    • G
      dccp: Initialisation and type-checking of feature sysctls · 883ca833
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      883ca833
    • G
      dccp: Initialisation framework for feature negotiation · f90f92ee
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f90f92ee
  4. 08 12月, 2008 1 次提交
  5. 02 12月, 2008 2 次提交
  6. 24 11月, 2008 4 次提交
  7. 17 11月, 2008 1 次提交
    • G
      dccp: Deprecate old setsockopt framework · 49aebc66
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49aebc66
  8. 12 11月, 2008 1 次提交
  9. 05 11月, 2008 2 次提交
    • G
      dccp: Per-socket initialisation of feature negotiation · ac75773c
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac75773c
    • G
      dccp: Basic data structure for feature negotiation · bd012f2e
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd012f2e
  10. 09 9月, 2008 1 次提交
  11. 04 9月, 2008 14 次提交
    • G
      dccp: Debugging functions for feature negotiation · 76f738a7
      Gerrit Renker 提交于
      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 with errors in an
      earlier revision of this patch.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      76f738a7
    • G
      dccp: Initialisation and type-checking of feature sysctls · 0a482267
      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 act on 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.
      
      Further changes:
      ----------------
      Performed s@sysctl_dccp_feat@sysctl_dccp@g since the sysctls are now in feat.c.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      0a482267
    • G
      dccp: Initialisation framework for feature negotiation · 5d3dac26
      Gerrit Renker 提交于
      This initialises feature negotiation from two tables, which are initialised
      from sysctls. 
      
      As a novel feature, specifics of the implementation (e.g. currently short
      seqnos and ECN are not supported) are advertised for robustness.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      5d3dac26
    • G
      dccp: Clean up old feature-negotiation infrastructure · 23479cbf
      Gerrit Renker 提交于
      The code removed by this patch is no longer referenced or used, the added
      lines update documentation and copyrights.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      23479cbf
    • G
      dccp: Processing Confirm options · d2150b7b
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      d2150b7b
    • G
      dccp: Process incoming Change feature-negotiation options · 5a146b97
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      5a146b97
    • G
      dccp: Header option insertion routine for feature-negotiation · cf9ddf73
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      cf9ddf73
    • G
      dccp: Support for Mandatory options · d0440ee6
      Gerrit Renker 提交于
      Support for Mandatory options is provided by this patch, which will
      be used by subsequent feature-negotiation patches.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d0440ee6
    • G
      dccp: Increase the scope of variable-length htonl/ntohl functions · b9aaac1c
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b9aaac1c
    • G
      dccp: Set per-connection CCIDs via socket options · fade756f
      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.
      
      Note on the maximum number of CCIDs that can be registered:
      -----------------------------------------------------------
      The maximum number of CCIDs that can be registered on the socket is constrained
      by the space in a Confirm/Change feature negotiation option. 
      
      The space in these in turn depends on the size of header options as defined
      in RFC 4340, 5.8. Since this is a recurring constant, it has been moved from
      ackvec.h into linux/dccp.h, clarifying its purpose.
      
      Relative to this size, the maximum number of CCID identifiers that can be 
      present in a Confirm option (which always consumes 1 byte more than a Change
      option, cf. 6.1) is 2 bytes less than the maximum TLV size: one for the
      CCID-feature-type and one for the selected value.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      fade756f
    • G
      dccp: Deprecate old setsockopt framework · 668144f7
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      668144f7
    • G
      dccp: Registration routines for changing feature values · 86349c8d
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      86349c8d
    • G
      dccp: Per-socket initialisation of feature negotiation · 828755ce
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      828755ce
    • G
      dccp: Basic data structure for feature negotiation · 5c7c9451
      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).
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Acked-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
      5c7c9451
  12. 29 1月, 2008 1 次提交
  13. 11 2月, 2007 1 次提交
  14. 03 12月, 2006 2 次提交
    • G
      [DCCP]: Make feature negotiation more readable · c02fdc0e
      Gerrit Renker 提交于
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      c02fdc0e
    • G
      [DCCP]: Add sysctls to control retransmission behaviour · 2e2e9e92
      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: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      2e2e9e92
  15. 23 9月, 2006 1 次提交
  16. 25 7月, 2006 1 次提交
    • I
      [DCCP]: Fix default sequence window size · 4b79f0af
      Ian McDonald 提交于
      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) <= P.seqno(6279674749) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206548), sending SYNC...
      Jun 22 14:24:09 localhost kernel: [ 1492.115147] DCCP: Step 6 failed for
      DATA packet, (LSWL(6279674225) <= P.seqno(6279674750) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206549), sending SYNC...
      
      I went to alter the default sysctl and it didn't take for new sockets.
      Below patch fixes this.
      
      I think the default is too low but it is what the DCCP spec specifies.
      
      As a side effect of this my rx speed using iperf goes from about 2.8 Mbits/sec
      to 3.5. This is still far too slow but it is a step in the right direction.
      
      Compile tested only for IPv6 but not particularly complex change.
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b79f0af
  17. 21 3月, 2006 2 次提交