]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
dccp: Remove manual influence on NDP Count feature
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Mon, 8 Dec 2008 09:18:37 +0000 (01:18 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Dec 2008 09:18:37 +0000 (01:18 -0800)
Updating the NDP count feature is handled automatically now:
 * for CCID-2 it is disabled, since the code does not use NDP counts;
 * for CCID-3 it is enabled, as NDP counts are used to determine loss lengths.

Allowing the user to change NDP values leads to unpredictable and failing
behaviour, since it is then possible to disable NDP counts even when they
are needed (e.g. in CCID-3).

This means that only those user settings are sensible that agree with the
values for Send NDP Count implied by the choice of CCID. But those settings
are already activated by the feature negotiation (CCID dependency tracking),
hence this form of support is redundant.

At startup the initialisation of the NDP count feature uses the default
value of 0, which is done implicitly by the zeroing-out of the socket when
it is allocated. If the choice of CCID or feature negotiation enables NDP
count, this will then be updated via the NDP activation handler.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/dccp.txt
include/linux/dccp.h
net/dccp/dccp.h
net/dccp/feat.c
net/dccp/minisocks.c
net/dccp/options.c
net/dccp/sysctl.c

index a203d132dbef473b841d13ccd86c10578606dadf..1403745ab406bce7a9c8e56d89c40761f39803ba 100644 (file)
@@ -133,9 +133,6 @@ retries2
        importance for retransmitted acknowledgments and feature negotiation,
        data packets are never retransmitted. Analogue of tcp_retries2.
 
-send_ndp = 1
-       Whether or not to send NDP count options (sec. 7.7.2).
-
 send_ackvec = 1
        Whether or not to send Ack Vector options (sec. 11.5).
 
index 46daea312d92544ca5946998794da0acad6080cd..60e94438eadd4d3c82b7463750381b95c9ce2281 100644 (file)
@@ -371,14 +371,12 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
   *
   * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
   * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
-  * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
   * @dccpms_pending - List of features being negotiated
   * @dccpms_conf -
   */
 struct dccp_minisock {
        __u64                   dccpms_sequence_window;
        __u8                    dccpms_send_ack_vector;
-       __u8                    dccpms_send_ndp_count;
        struct list_head        dccpms_pending;
        struct list_head        dccpms_conf;
 };
@@ -490,6 +488,7 @@ struct dccp_ackvec;
  * @dccps_r_ack_ratio - feature-remote Ack Ratio
  * @dccps_pcslen - sender   partial checksum coverage (via sockopt)
  * @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
+ * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2)
  * @dccps_ndp_count - number of Non Data Packets since last data packet
  * @dccps_mss_cache - current value of MSS (path MTU minus header sizes)
  * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4)
@@ -529,6 +528,7 @@ struct dccp_sock {
        __u16                           dccps_r_ack_ratio;
        __u8                            dccps_pcslen:4;
        __u8                            dccps_pcrlen:4;
+       __u8                            dccps_send_ndp_count:1;
        __u64                           dccps_ndp_count:48;
        unsigned long                   dccps_rate_last;
        struct dccp_minisock            dccps_minisock;
index 94f6785f81ec78f428de80bd833d24eab254bae6..e0759d098b9a6716033ec850168ad7f7f1d0257d 100644 (file)
@@ -99,7 +99,6 @@ extern int  sysctl_dccp_feat_sequence_window;
 extern int  sysctl_dccp_feat_rx_ccid;
 extern int  sysctl_dccp_feat_tx_ccid;
 extern int  sysctl_dccp_feat_send_ack_vector;
-extern int  sysctl_dccp_feat_send_ndp_count;
 extern int  sysctl_dccp_tx_qlen;
 extern int  sysctl_dccp_sync_ratelimit;
 
index a0d5891a37bf9cf17b39ab3e3303b76b08e28318..30f9fb76b921f3ffe19690d9732239b869c6f6fe 100644 (file)
@@ -85,7 +85,7 @@ static int dccp_hdlr_ackvec(struct sock *sk, u64 enable, bool rx)
 static int dccp_hdlr_ndp(struct sock *sk, u64 enable, bool rx)
 {
        if (!rx)
-               dccp_msk(sk)->dccpms_send_ndp_count = (enable > 0);
+               dccp_sk(sk)->dccps_send_ndp_count = (enable > 0);
        return 0;
 }
 
index 210c346899baf59fcb7792db537658580f160544..02b14812464a236bb4e6dab4824254defe82e506 100644 (file)
@@ -46,7 +46,6 @@ void dccp_minisock_init(struct dccp_minisock *dmsk)
 {
        dmsk->dccpms_sequence_window = sysctl_dccp_feat_sequence_window;
        dmsk->dccpms_send_ack_vector = sysctl_dccp_feat_send_ack_vector;
-       dmsk->dccpms_send_ndp_count  = sysctl_dccp_feat_send_ndp_count;
 }
 
 void dccp_time_wait(struct sock *sk, int state, int timeo)
index debb1008c7adfb24b8162fd4d679e417e3c41d67..e9d674874b4e823a28c5c5a2579978d3cfddf16e 100644 (file)
@@ -27,7 +27,6 @@ int sysctl_dccp_feat_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW;
 int sysctl_dccp_feat_rx_ccid         = DCCPF_INITIAL_CCID;
 int sysctl_dccp_feat_tx_ccid         = DCCPF_INITIAL_CCID;
 int sysctl_dccp_feat_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR;
-int sysctl_dccp_feat_send_ndp_count  = DCCPF_INITIAL_SEND_NDP_COUNT;
 
 u64 dccp_decode_value_var(const u8 *bf, const u8 len)
 {
@@ -531,8 +530,7 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
 
        DCCP_SKB_CB(skb)->dccpd_opt_len = 0;
 
-       if (dmsk->dccpms_send_ndp_count &&
-           dccp_insert_option_ndp(sk, skb))
+       if (dp->dccps_send_ndp_count && dccp_insert_option_ndp(sk, skb))
                return -1;
 
        if (DCCP_SKB_CB(skb)->dccpd_type != DCCP_PKT_DATA) {
index f6e54f433e29993a13c610cbba3b3902bb4005a0..587c12f915c1344d7a539703fb2485ec72ce0212 100644 (file)
@@ -47,13 +47,6 @@ static struct ctl_table dccp_default_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_dointvec,
        },
-       {
-               .procname       = "send_ndp",
-               .data           = &sysctl_dccp_feat_send_ndp_count,
-               .maxlen         = sizeof(sysctl_dccp_feat_send_ndp_count),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
        {
                .procname       = "request_retries",
                .data           = &sysctl_dccp_request_retries,