From patchwork Mon Jul 4 19:01:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerrit Renker X-Patchwork-Id: 103159 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5F9CFB6F57 for ; Tue, 5 Jul 2011 05:21:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388Ab1GDTUp (ORCPT ); Mon, 4 Jul 2011 15:20:45 -0400 Received: from dee.erg.abdn.ac.uk ([139.133.204.82]:53735 "EHLO erg.abdn.ac.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750860Ab1GDTUo (ORCPT ); Mon, 4 Jul 2011 15:20:44 -0400 X-Greylist: delayed 1150 seconds by postgrey-1.27 at vger.kernel.org; Mon, 04 Jul 2011 15:20:44 EDT Received: from laptev.erg.abdn.ac.uk (Debian-exim@ra-gerrit.erg.abdn.ac.uk [139.133.204.38]) by erg.abdn.ac.uk (8.13.4/8.13.4) with ESMTP id p64J1RLH011133 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 4 Jul 2011 20:01:29 +0100 (BST) Received: from root by laptev.erg.abdn.ac.uk with local (Exim 4.72) (envelope-from ) id 1QdoOX-0005dC-U3; Mon, 04 Jul 2011 13:01:21 -0600 From: Gerrit Renker To: davem@davemloft.net Cc: dccp@vger.kernel.org, netdev@vger.kernel.org, Gerrit Renker Subject: [PATCH 4/6] dccp ccid-2: move rfc 3390 function into header file Date: Mon, 4 Jul 2011 13:01:17 -0600 Message-Id: <1309806079-21604-5-git-send-email-gerrit@erg.abdn.ac.uk> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: X-ERG-MailScanner: Found to be clean X-ERG-MailScanner-From: root@erg.abdn.ac.uk X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This moves CCID-2's initial window function into the header file, since several parts throughout the CCID-2 code need to call it (CCID-2 still uses RFC 3390). Signed-off-by: Gerrit Renker Acked-by: Leandro Melo de Sales --- net/dccp/ccids/ccid2.c | 9 --------- net/dccp/ccids/ccid2.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -583,15 +583,6 @@ done: dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks); } -/* - * Convert RFC 3390 larger initial window into an equivalent number of packets. - * This is based on the numbers specified in RFC 5681, 3.1. - */ -static inline u32 rfc3390_bytes_to_packets(const u32 smss) -{ - return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3); -} - static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) { struct ccid2_hc_tx_sock *hc = ccid_priv(ccid); --- a/net/dccp/ccids/ccid2.h +++ b/net/dccp/ccids/ccid2.h @@ -88,6 +88,15 @@ static inline bool ccid2_cwnd_network_limited(struct ccid2_hc_tx_sock *hc) return hc->tx_pipe >= hc->tx_cwnd; } +/* + * Convert RFC 3390 larger initial window into an equivalent number of packets. + * This is based on the numbers specified in RFC 5681, 3.1. + */ +static inline u32 rfc3390_bytes_to_packets(const u32 smss) +{ + return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3); +} + struct ccid2_hc_rx_sock { int rx_data; };