Date: Sun, 25 Nov 2007 23:58:23 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 129527 for review Message-ID: <200711252358.lAPNwNi7052194@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129527 Change 129527 by kmacy@kmacy:storage:toestack on 2007/11/25 23:57:34 reduce debugging noise somewhate add malloc type for cxgb Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#19 edit .. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.h#6 edit Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#19 (text+ko) ==== @@ -66,11 +66,8 @@ #include <net/if_vlan_var.h> #include <net/route.h> -/* - * XXX - */ #define VALIDATE_TID 0 - +MALLOC_DEFINE(M_CXGB, "cxgb", "Chelsio 10 Gigabit Ethernet and services"); TAILQ_HEAD(, cxgb_client) client_list; TAILQ_HEAD(, t3cdev) ofld_dev_list; @@ -734,7 +731,7 @@ unsigned int hwtid; struct toe_tid_entry *toe_tid; - printf("do_hwtid_rpl opcode=0x%x\n", p->opcode); + DPRINTF("do_hwtid_rpl opcode=0x%x\n", p->opcode); hwtid = G_TID(ntohl(p->opcode_tid)); toe_tid = lookup_tid(&(T3C_DATA (dev))->tid_maps, hwtid); @@ -972,7 +969,7 @@ unsigned int opcode = G_OPCODE(ntohl(m0->m_pkthdr.csum_data)); int ret; - printf("processing op=0x%x m=%p data=%p\n", opcode, m0, m0->m_data); + DPRINTF("processing op=0x%x m=%p data=%p\n", opcode, m0, m0->m_data); ret = cpl_handlers[opcode] (dev, m0); @@ -1133,7 +1130,7 @@ cxgb_alloc_mem(unsigned long size) { - return malloc(size, M_DEVBUF, M_ZERO|M_NOWAIT); + return malloc(size, M_CXGB, M_ZERO|M_NOWAIT); } /* @@ -1142,7 +1139,7 @@ void cxgb_free_mem(void *addr) { - free(addr, M_DEVBUF); + free(addr, M_CXGB); } @@ -1228,7 +1225,7 @@ struct mtutab mtutab; unsigned int l2t_capacity; - t = malloc(sizeof(*t), M_DEVBUF, M_WAITOK|M_ZERO); + t = malloc(sizeof(*t), M_CXGB, M_WAITOK|M_ZERO); if (!t) return (ENOMEM); @@ -1292,7 +1289,7 @@ t3_free_l2t(L2DATA(dev)); L2DATA(dev) = NULL; out_free: - free(t, M_DEVBUF); + free(t, M_CXGB); return (err); } @@ -1314,7 +1311,7 @@ T3C_DATA(tdev) = NULL; t3_free_l2t(L2DATA(tdev)); L2DATA(tdev) = NULL; - free(t, M_DEVBUF); + free(t, M_CXGB); } ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.h#6 (text+ko) ==== @@ -47,6 +47,8 @@ #include <dev/cxgb/t3cdev.h> #endif +MALLOC_DECLARE(M_CXGB); + struct adapter; struct cxgb_client;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711252358.lAPNwNi7052194>