PERFORCE change 126439 for review

Kip Macy kmacy at FreeBSD.org
Sat Sep 15 12:51:05 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=126439

Change 126439 by kmacy at kmacy_home:ethng on 2007/09/15 19:50:28

	make the jumbo phys contig sysctl read only
	skip call to uma_find_refcnt if the result is not going to be used

Affected files ...

.. //depot/projects/ethng/src/sys/kern/kern_mbuf.c#5 edit

Differences ...

==== //depot/projects/ethng/src/sys/kern/kern_mbuf.c#5 (text+ko) ====

@@ -142,7 +142,7 @@
     "Maximum number of mbuf 16k jumbo clusters allowed");
 SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat,
     "Mbuf general information and statistics");
-SYSCTL_INT(_kern_ipc, OID_AUTO, jumbo_phys_contig, CTLFLAG_RW, &jumbo_phys_contig, 1,
+SYSCTL_INT(_kern_ipc, OID_AUTO, jumbo_phys_contig, CTLFLAG_RD, &jumbo_phys_contig, 1,
     "jumbo frames are physically contiguous");
 /*
  * Zones from which we allocate.
@@ -435,10 +435,11 @@
 		break;
 	}
 
-	m = (struct mbuf *)arg;
-	refcnt = uma_find_refcnt(zone, mem);
-	*refcnt = 1;			
-	if (m != NULL) {
+
+	if (arg != NULL) {
+		refcnt = uma_find_refcnt(zone, mem);
+		*refcnt = 1;			
+		m = (struct mbuf *)arg;
 		m->m_ext.ext_buf = (caddr_t)mem;
 		m->m_data = m->m_ext.ext_buf;
 		m->m_flags |= M_EXT;


More information about the p4-projects mailing list