aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 01:30:19 -0400
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 01:45:31 -0400
commit78673e24df27c76ec75565f4024d45c2c74ef148 (patch)
treecdcd2a3b9e29f40063a592ebb4dc2de1184401e0
parent23479cbfd30402c7d9fa413cc467983061073557 (diff)
dccp: Remove obsolete parts of the old CCID interface
The TX/RX CCIDs of the minisock are now redundant: similar to the Ack Vector case, their value equals initially that of the sysctl, but at the end of feature negotiation may be something different. The old interface removed by this patch thus has been replaced by the newer interface to dynamically query the currently loaded CCIDs earlier in this patch set. Also removed the constructors for the TX CCID and the RX CCID, since the switch rx/non-rx is done by the handler in minisocks.c (and the handler is the only place in the code where CCIDs are loaded). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
-rw-r--r--Documentation/networking/dccp.txt5
-rw-r--r--include/linux/dccp.h3
-rw-r--r--net/dccp/ccid.c14
-rw-r--r--net/dccp/ccid.h5
-rw-r--r--net/dccp/feat.c12
-rw-r--r--net/dccp/minisocks.c2
6 files changed, 3 insertions, 38 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index 610083ff73f6..a203d132dbef 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -140,10 +140,11 @@ send_ackvec = 1
140 Whether or not to send Ack Vector options (sec. 11.5). 140 Whether or not to send Ack Vector options (sec. 11.5).
141 141
142tx_ccid = 2 142tx_ccid = 2
143 Default CCID for the sender-receiver half-connection. 143 Default CCID for the sender-receiver half-connection. Depending on the
144 choice of CCID, the Send Ack Vector feature is enabled automatically.
144 145
145rx_ccid = 2 146rx_ccid = 2
146 Default CCID for the receiver-sender half-connection. 147 Default CCID for the receiver-sender half-connection; see tx_ccid.
147 148
148seq_window = 100 149seq_window = 100
149 The initial sequence window (sec. 7.5.2). 150 The initial sequence window (sec. 7.5.2).
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 6a72ff52a8a4..46daea312d92 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -370,7 +370,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
370 * Will be used to pass the state from dccp_request_sock to dccp_sock. 370 * Will be used to pass the state from dccp_request_sock to dccp_sock.
371 * 371 *
372 * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) 372 * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
373 * @dccpms_ccid - Congestion Control Id (CCID) (section 10)
374 * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5) 373 * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
375 * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2) 374 * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
376 * @dccpms_pending - List of features being negotiated 375 * @dccpms_pending - List of features being negotiated
@@ -378,8 +377,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
378 */ 377 */
379struct dccp_minisock { 378struct dccp_minisock {
380 __u64 dccpms_sequence_window; 379 __u64 dccpms_sequence_window;
381 __u8 dccpms_rx_ccid;
382 __u8 dccpms_tx_ccid;
383 __u8 dccpms_send_ack_vector; 380 __u8 dccpms_send_ack_vector;
384 __u8 dccpms_send_ndp_count; 381 __u8 dccpms_send_ndp_count;
385 struct list_head dccpms_pending; 382 struct list_head dccpms_pending;
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index f72ca83df552..330372a1a0b6 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -253,20 +253,6 @@ out_module_put:
253 253
254EXPORT_SYMBOL_GPL(ccid_new); 254EXPORT_SYMBOL_GPL(ccid_new);
255 255
256struct ccid *ccid_hc_rx_new(unsigned char id, struct sock *sk, gfp_t gfp)
257{
258 return ccid_new(id, sk, 1, gfp);
259}
260
261EXPORT_SYMBOL_GPL(ccid_hc_rx_new);
262
263struct ccid *ccid_hc_tx_new(unsigned char id,struct sock *sk, gfp_t gfp)
264{
265 return ccid_new(id, sk, 0, gfp);
266}
267
268EXPORT_SYMBOL_GPL(ccid_hc_tx_new);
269
270static void ccid_delete(struct ccid *ccid, struct sock *sk, int rx) 256static void ccid_delete(struct ccid *ccid, struct sock *sk, int rx)
271{ 257{
272 struct ccid_operations *ccid_ops; 258 struct ccid_operations *ccid_ops;
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 803343aed004..18f69423a708 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -111,11 +111,6 @@ extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len,
111extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx, 111extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx,
112 gfp_t gfp); 112 gfp_t gfp);
113 113
114extern struct ccid *ccid_hc_rx_new(unsigned char id, struct sock *sk,
115 gfp_t gfp);
116extern struct ccid *ccid_hc_tx_new(unsigned char id, struct sock *sk,
117 gfp_t gfp);
118
119static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) 114static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp)
120{ 115{
121 struct ccid *ccid = dp->dccps_hc_rx_ccid; 116 struct ccid *ccid = dp->dccps_hc_rx_ccid;
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 6c82dea409d9..cb2ddd2b894b 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -1119,18 +1119,6 @@ int dccp_feat_init(struct sock *sk)
1119 INIT_LIST_HEAD(&dmsk->dccpms_pending); /* XXX no longer used */ 1119 INIT_LIST_HEAD(&dmsk->dccpms_pending); /* XXX no longer used */
1120 INIT_LIST_HEAD(&dmsk->dccpms_conf); /* XXX no longer used */ 1120 INIT_LIST_HEAD(&dmsk->dccpms_conf); /* XXX no longer used */
1121 1121
1122 /* CCID L */
1123 rc = __feat_register_sp(&dp->dccps_featneg, DCCPF_CCID, 1, 0,
1124 &dmsk->dccpms_tx_ccid, 1);
1125 if (rc)
1126 goto out;
1127
1128 /* CCID R */
1129 rc = __feat_register_sp(&dp->dccps_featneg, DCCPF_CCID, 0, 0,
1130 &dmsk->dccpms_rx_ccid, 1);
1131 if (rc)
1132 goto out;
1133
1134 /* Ack ratio */ 1122 /* Ack ratio */
1135 rc = __feat_register_nn(&dp->dccps_featneg, DCCPF_ACK_RATIO, 0, 1123 rc = __feat_register_nn(&dp->dccps_featneg, DCCPF_ACK_RATIO, 0,
1136 dp->dccps_l_ack_ratio); 1124 dp->dccps_l_ack_ratio);
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 258195972bce..486d61df2604 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -45,8 +45,6 @@ EXPORT_SYMBOL_GPL(dccp_death_row);
45void dccp_minisock_init(struct dccp_minisock *dmsk) 45void dccp_minisock_init(struct dccp_minisock *dmsk)
46{ 46{
47 dmsk->dccpms_sequence_window = sysctl_dccp_feat_sequence_window; 47 dmsk->dccpms_sequence_window = sysctl_dccp_feat_sequence_window;
48 dmsk->dccpms_rx_ccid = sysctl_dccp_feat_rx_ccid;
49 dmsk->dccpms_tx_ccid = sysctl_dccp_feat_tx_ccid;
50 dmsk->dccpms_send_ack_vector = sysctl_dccp_feat_send_ack_vector; 48 dmsk->dccpms_send_ack_vector = sysctl_dccp_feat_send_ack_vector;
51 dmsk->dccpms_send_ndp_count = sysctl_dccp_feat_send_ndp_count; 49 dmsk->dccpms_send_ndp_count = sysctl_dccp_feat_send_ndp_count;
52} 50}