: Deprecate ccid3_hc_tx_insert_options
PATCH v2 4/12 : Deprecate ccid3_hc_tx_insert_options
| > [CCID 3]: In-line ccid3_hc_tx_insert_options
<snip, quoting Ian: >
| A couple of points here: | - the whole ccid3_hc_tx_insert_options could actually be removed with | a little work as there is no ccid2 equivalent and so the whole thing | isn't needed!
Many thanks for this information.
I currently hesitate to remove it from the CCID interface, it may be that we can make use of it later (I am for instance thinking of the yet unresolved issue of communicating MSS values between CCID module and main DCCP module).
But I have taken your comments on board, please find below the revised patch which removes the tx_insert_options within ccid3.c,
uploaded as 16d_deprecate_tx_insert_options.diff
-------------------> Revised Patch v2 <------------------------------------------- [CCID 3]: Deprecate ccid3_hc_tx_insert_options
The function ccid3_hc_tx_insert_options only does a redundant no-op, as the operation
DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count;
is already performed _unconditionally_ in ccid3_hc_tx_send_packet.
Since there is further no current need for this function, it is removed entirely. Many thanks for Ian McDonald for collaboration on this issue.
--- net/dccp/ccids/ccid3.c | 12 ------------ 1 file changed, 12 deletions(-)
net/dccp/ccids/ccid3.c +0 -12
@@ -551,17 +551,6 @@ static void ccid3_hc_tx_packet_recv(stru } } -static int ccid3_hc_tx_insert_options (struct sock *sk,struct sk_buff *skb) -{ -const struct ccid3_hc_tx_sock *hctx =ccid3_hc_tx_sk (sk); - -BUG_ON (hctx =NULL ); - -if (sk->sk_state =DCCP_OPEN || sk->sk_state =DCCP_PARTOPEN ) -DCCP_SKB_CB (skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count; -return 0 ; -} -static int ccid3_hc_tx_parse_options (struct sock *sk,unsigned char option,unsigned char len,u16 idx,unsigned char *value)
@@ -1216,7 +1205,6 @@ static struct ccid_operations ccid3 = { .ccid_hc_tx_send_packet = ccid3_hc_tx_send_packet, .ccid_hc_tx_packet_sent = ccid3_hc_tx_packet_sent, .ccid_hc_tx_packet_recv = ccid3_hc_tx_packet_recv, - .ccid_hc_tx_insert_options = ccid3_hc_tx_insert_options, .ccid_hc_tx_parse_options = ccid3_hc_tx_parse_options, .ccid_hc_rx_obj_size = sizeof(struct ccid3_hc_rx_sock), .ccid_hc_rx_init = ccid3_hc_rx_init,
Quoted 10 lines · Gerrit Renker
| > [CCID 3]: In-line
ccid3_hc_tx_insert_options
<snip, quoting Ian: >| A couple of points here: | - the whole ccid3_hc_tx_insert_options could actually be removed with | a little work as there is no ccid2 equivalent and so the whole thing | isn't needed!Many thanks for this information.
I currently hesitate to remove it from the CCID interface, it may be that we can make use of it later
Then we get it back, the ccid infrastructure was modelled after the existing CCID3 code from Waikato/Lulea, you're now doing a mucho needed review of all this code, so if you think its a good idea to remove things that are not used by CCID2 and CCID3, so lets do it, in the kernel we don't promise stable APIs, so its not like some out of the tree ccid module would break if we remove this and so we should avoid it.
If in the future CCID9 needs a hook for this, we add it in the infrastructure, no need to overengineer right now, agreed?
- Arnaldo
| If in the future CCID9 needs a hook for this, we add it in the | infrastructure, no need to overengineer right now, agreed?
OK, will re-submit v3 in some time from now. Working on the last two ones at the moment, they need overhaul due to the kmem_cache things which have changed in Dave's latest kernel.