Date: Thu, 18 Oct 2007 20:02:49 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127713 for review Message-ID: <200710182002.l9IK2nSk099005@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127713 Change 127713 by kmacy@kmacy_home:ethng on 2007/10/18 20:02:49 use syslog definitions from syslog.h change toe_data to t3c_data Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#26 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#6 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#5 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#14 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#33 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#26 (text+ko) ==== @@ -49,6 +49,7 @@ #include <sys/sockio.h> #include <sys/smp.h> #include <sys/sysctl.h> +#include <sys/syslog.h> #include <sys/queue.h> #include <sys/taskqueue.h> #include <sys/proc.h> ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#6 (text+ko) ==== @@ -52,6 +52,7 @@ #include <sys/sockio.h> #include <sys/smp.h> #include <sys/sysctl.h> +#include <sys/syslog.h> #include <sys/queue.h> #include <sys/taskqueue.h> #include <sys/proc.h> @@ -68,8 +69,6 @@ /* * XXX */ -#define LOG_NOTICE 2 -#define BUG_ON(...) #define VALIDATE_TID 0 @@ -490,7 +489,7 @@ void * cxgb_free_atid(struct t3cdev *tdev, int atid) { - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA(tdev))->tid_maps; union active_open_entry *p = atid2entry(t, atid); void *ctx = p->toe_tid.ctx; @@ -509,7 +508,7 @@ void cxgb_free_stid(struct t3cdev *tdev, int stid) { - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA (tdev))->tid_maps; union listen_entry *p = stid2entry(t, stid); mtx_lock(&t->stid_lock); @@ -523,7 +522,7 @@ cxgb_insert_tid(struct t3cdev *tdev, struct cxgb_client *client, void *ctx, unsigned int tid) { - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA (tdev))->tid_maps; t->tid_tab[tid].client = client; t->tid_tab[tid].ctx = ctx; @@ -549,7 +548,7 @@ { struct mbuf *m; struct t3cdev *tdev = data; - struct toe_data *td = TOE_DATA(tdev); + struct t3c_data *td = T3C_DATA (tdev); mtx_lock(&td->tid_release_lock); while (td->tid_release_list) { @@ -570,7 +569,7 @@ void cxgb_queue_tid_release(struct t3cdev *tdev, unsigned int tid) { - struct toe_data *td = TOE_DATA(tdev); + struct t3c_data *td = T3C_DATA (tdev); struct toe_tid_entry *p = &td->tid_maps.tid_tab[tid]; mtx_lock(&td->tid_release_lock); @@ -593,7 +592,7 @@ void cxgb_remove_tid(struct t3cdev *tdev, void *ctx, unsigned int tid) { - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA (tdev))->tid_maps; BUG_ON(tid >= t->ntids); if (tdev->type == T3A) @@ -617,7 +616,7 @@ void *ctx) { int atid = -1; - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA (tdev))->tid_maps; mtx_lock(&t->atid_lock); if (t->afree) { @@ -638,7 +637,7 @@ void *ctx) { int stid = -1; - struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; + struct tid_info *t = &(T3C_DATA (tdev))->tid_maps; mtx_lock(&t->stid_lock); if (t->sfree) { @@ -687,7 +686,7 @@ unsigned int atid = G_TID(ntohl(rpl->atid)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_atid(&(TOE_DATA(dev))->tid_maps, atid); + toe_tid = lookup_atid(&(T3C_DATA (dev))->tid_maps, atid); if (toe_tid->ctx && toe_tid->client && toe_tid->client->handlers && toe_tid->client->handlers[CPL_ACT_OPEN_RPL]) { return toe_tid->client->handlers[CPL_ACT_OPEN_RPL] (dev, m, @@ -706,7 +705,7 @@ unsigned int stid = G_TID(ntohl(p->opcode_tid)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_stid(&(TOE_DATA(dev))->tid_maps, stid); + toe_tid = lookup_stid(&(T3C_DATA (dev))->tid_maps, stid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[p->opcode]) { return toe_tid->client->handlers[p->opcode] (dev, m, toe_tid->ctx); @@ -730,7 +729,7 @@ hwtid = G_TID(ntohl(p->opcode_tid)); - toe_tid = lookup_tid(&(TOE_DATA(dev))->tid_maps, hwtid); + toe_tid = lookup_tid(&(T3C_DATA (dev))->tid_maps, hwtid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[p->opcode]) { return toe_tid->client->handlers[p->opcode] @@ -749,7 +748,7 @@ unsigned int stid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_stid(&(TOE_DATA(dev))->tid_maps, stid); + toe_tid = lookup_stid(&(T3C_DATA (dev))->tid_maps, stid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[CPL_PASS_ACCEPT_REQ]) { return toe_tid->client->handlers[CPL_PASS_ACCEPT_REQ] @@ -768,7 +767,7 @@ unsigned int hwtid = G_TID(ntohl(p->opcode_tid)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_tid(&(TOE_DATA(dev))->tid_maps, hwtid); + toe_tid = lookup_tid(&(T3C_DATA (dev))->tid_maps, hwtid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[p->opcode]) { return toe_tid->client->handlers[p->opcode] @@ -807,7 +806,7 @@ unsigned int atid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_atid(&(TOE_DATA(dev))->tid_maps, atid); + toe_tid = lookup_atid(&(T3C_DATA (dev))->tid_maps, atid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[CPL_ACT_ESTABLISH]) { return toe_tid->client->handlers[CPL_ACT_ESTABLISH] @@ -854,7 +853,7 @@ unsigned int opcode = G_OPCODE(ntohl(m->m_pkthdr.csum_data)); struct toe_tid_entry *toe_tid; - toe_tid = lookup_tid(&(TOE_DATA(dev))->tid_maps, hwtid); + toe_tid = lookup_tid(&(T3C_DATA (dev))->tid_maps, hwtid); if (toe_tid->ctx && toe_tid->client->handlers && toe_tid->client->handlers[opcode]) { return toe_tid->client->handlers[opcode](dev, m, toe_tid->ctx); @@ -1259,7 +1258,7 @@ } /* Walk tid table and notify clients of dst change. */ - ti = &(TOE_DATA(tdev))->tid_maps; + ti = &(T3C_DATA (tdev))->tid_maps; for (tid=0; tid < ti->ntids; tid++) { te = lookup_tid(ti, tid); BUG_ON(!te); @@ -1373,7 +1372,7 @@ { struct t3cdev *dev = &adapter->tdev; int natids, err; - struct toe_data *t; + struct t3c_data *t; struct tid_range stid_range, tid_range; struct mtutab mtutab; unsigned int l2t_capacity; @@ -1409,7 +1408,7 @@ mtx_init(&t->tid_release_lock, "tid release", NULL, MTX_DEF); t->dev = dev; - TOE_DATA(dev) = t; + T3C_DATA (dev) = t; dev->recv = process_rx; dev->neigh_update = t3_l2t_update; #if 0 @@ -1438,7 +1437,7 @@ cxgb_offload_deactivate(struct adapter *adapter) { struct t3cdev *tdev = &adapter->tdev; - struct toe_data *t = TOE_DATA(tdev); + struct t3c_data *t = T3C_DATA(tdev); remove_adapter(adapter); if (TAILQ_EMPTY(&adapter_list)) { @@ -1447,7 +1446,7 @@ #endif } free_tid_maps(&t->tid_maps); - TOE_DATA(tdev) = NULL; + T3C_DATA(tdev) = NULL; t3_free_l2t(L2DATA(tdev)); L2DATA(tdev) = NULL; free(t, M_DEVBUF); @@ -1574,7 +1573,7 @@ offload_info_read_proc(char *buf, char **start, off_t offset, int length, int *eof, void *data) { - struct toe_data *d = data; + struct t3c_data *d = data; struct tid_info *t = &d->tid_maps; int len; @@ -1594,7 +1593,7 @@ static int offload_info_proc_setup(struct proc_dir_entry *dir, - struct toe_data *d) + struct t3c_data *d) { struct proc_dir_entry *p; ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#5 (text+ko) ==== @@ -183,10 +183,7 @@ unsigned int stids_in_use; }; -struct toe_data { -#ifdef notyet - struct list_head list_node; -#endif +struct t3c_data { struct t3cdev *dev; unsigned int tx_max_chunk; /* max payload for TX_DATA */ unsigned int max_wrs; /* max in-flight WRs per connection */ @@ -202,7 +199,7 @@ /* * t3cdev -> toe_data accessor */ -#define TOE_DATA(dev) (*(struct toe_data **)&(dev)->l4opt) +#define T3C_DATA(dev) (*(struct t3c_data **)&(dev)->l4opt) /* * Map an ATID or STID to their entries in the corresponding TID tables. ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#14 (text+ko) ==== @@ -99,8 +99,6 @@ #define CXGB_TX_CLEANUP_THRESHOLD 32 -#define LOG_WARNING 1 -#define LOG_ERR 2 #ifdef DEBUG_PRINT #define DPRINTF printf ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#33 (text+ko) ==== @@ -48,6 +48,7 @@ #include <sys/sched.h> #include <sys/smp.h> #include <sys/systm.h> +#include <sys/syslog.h> #include <netinet/in_systm.h> #include <netinet/in.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710182002.l9IK2nSk099005>