From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 13:56:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3931CB; Sat, 10 Jan 2015 13:56:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95981907; Sat, 10 Jan 2015 13:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ADuRIV057539; Sat, 10 Jan 2015 13:56:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ADuQXk057536; Sat, 10 Jan 2015 13:56:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501101356.t0ADuQXk057536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 10 Jan 2015 13:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276911 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2015 13:56:27 -0000 Author: tuexen Date: Sat Jan 10 13:56:26 2015 New Revision: 276911 URL: https://svnweb.freebsd.org/changeset/base/276911 Log: Retire SCTP_BUF_EXTEND_SIZE. This patch was suggested by Robert Watson. Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 13:56:26 2015 (r276911) @@ -381,17 +381,7 @@ sctp_get_mbuf_for_msg(unsigned int space return (m); } if (allonebuf) { - int siz; - - if (SCTP_BUF_IS_EXTENDED(m)) { - siz = SCTP_BUF_EXTEND_SIZE(m); - } else { - if (want_header) - siz = MHLEN; - else - siz = MLEN; - } - if (siz < space_needed) { + if (SCTP_BUF_SIZE(m) < space_needed) { m_freem(m); return (NULL); } Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_input.c Sat Jan 10 13:56:26 2015 (r276911) @@ -5967,19 +5967,6 @@ out: return; } -#if 0 -static void -sctp_print_mbuf_chain(struct mbuf *m) -{ - for (; m; m = SCTP_BUF_NEXT(m)) { - SCTP_PRINTF("%p: m_len = %ld\n", (void *)m, SCTP_BUF_LEN(m)); - if (SCTP_BUF_IS_EXTENDED(m)) - SCTP_PRINTF("%p: extend_size = %d\n", (void *)m, SCTP_BUF_EXTEND_SIZE(m)); - } -} - -#endif - #ifdef INET void sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port) Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_os_bsd.h Sat Jan 10 13:56:26 2015 (r276911) @@ -299,7 +299,7 @@ typedef struct callout sctp_os_timer_t; #define SCTP_BUF_RESV_UF(m, size) m->m_data += size #define SCTP_BUF_AT(m, size) m->m_data + size #define SCTP_BUF_IS_EXTENDED(m) (m->m_flags & M_EXT) -#define SCTP_BUF_EXTEND_SIZE(m) (m->m_ext.ext_size) +#define SCTP_BUF_SIZE M_SIZE #define SCTP_BUF_TYPE(m) (m->m_type) #define SCTP_BUF_RECVIF(m) (m->m_pkthdr.rcvif) #define SCTP_BUF_PREPEND M_PREPEND