Date: Sun, 14 Oct 2007 21:11:29 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127525 for review Message-ID: <200710142111.l9ELBTmg041488@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127525 Change 127525 by kmacy@kmacy_home:ethng on 2007/10/14 21:10:31 convert low-level driver code over to referencing the t3cdev I was misinformed about the naming of t3cdev - leading me to believe it was meant to be the same thing as toedev which is definitely not the case Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#22 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#3 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#3 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#25 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#5 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#4 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#32 edit .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/toecore/toedev.h#2 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#22 (text+ko) ==== @@ -55,10 +55,12 @@ #ifdef CONFIG_DEFINED #include <cxgb_osdep.h> +#include <t3cdev.h> #include <ulp/toecore/toedev.h> #include <sys/mbufq.h> #else #include <dev/cxgb/cxgb_osdep.h> +#include <dev/cxgb/t3cdev.h> #include <dev/cxgb/sys/mbufq.h> #include <dev/cxgb/ulp/toecore/toedev.h> #endif @@ -401,7 +403,7 @@ struct port_info port[MAX_NPORTS]; device_t portdev[MAX_NPORTS]; - struct toedev tdev; + struct t3cdev tdev; char fw_version[64]; uint32_t open_device_map; uint32_t registered_device_map; @@ -527,7 +529,7 @@ void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status, int speed, int duplex, int fc); void t3_sge_err_intr_handler(adapter_t *adapter); -int t3_offload_tx(struct toedev *, struct mbuf *); +int t3_offload_tx(struct t3cdev *, struct mbuf *); void t3_os_ext_intr_handler(adapter_t *adapter); void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]); int t3_mgmt_tx(adapter_t *adap, struct mbuf *m); @@ -587,7 +589,7 @@ } static __inline struct adapter * -tdev2adap(struct toedev *d) +tdev2adap(struct t3cdev *d) { return container_of(d, struct adapter, tdev); } ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#3 (text+ko) ==== @@ -117,7 +117,7 @@ * entry locked. */ static int -setup_l2e_send_pending(struct toedev *dev, struct mbuf *m, +setup_l2e_send_pending(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e) { struct cpl_l2t_write_req *req; @@ -168,7 +168,7 @@ } int -t3_l2t_send_slow(struct toedev *dev, struct mbuf *m, +t3_l2t_send_slow(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e) { struct rtentry *rt; @@ -222,7 +222,7 @@ } void -t3_l2t_send_event(struct toedev *dev, struct l2t_entry *e) +t3_l2t_send_event(struct t3cdev *dev, struct l2t_entry *e) { struct rtentry *rt; struct mbuf *m0; @@ -357,7 +357,7 @@ } struct l2t_entry * -t3_l2t_get(struct toedev *dev, struct rtentry *neigh, +t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, unsigned int smt_idx) { struct l2t_entry *e; @@ -413,7 +413,7 @@ * handler. */ static void -handle_failed_resolution(struct toedev *dev, struct mbuf *arpq) +handle_failed_resolution(struct t3cdev *dev, struct mbuf *arpq) { while (arpq) { @@ -439,7 +439,7 @@ * loaded into the HW L2 table. */ void -t3_l2t_update(struct toedev *dev, struct rtentry *neigh) +t3_l2t_update(struct t3cdev *dev, struct rtentry *neigh) { struct l2t_entry *e; struct mbuf *arpq = NULL; @@ -489,7 +489,7 @@ * Called from a kprobe, interrupts are off. */ void -t3_l2t_update(struct toedev *dev, struct rtentry *neigh) +t3_l2t_update(struct t3cdev *dev, struct rtentry *neigh) { struct l2t_entry *e; struct l2t_data *d = L2DATA(dev); @@ -519,7 +519,7 @@ struct mbuf *arpq = NULL; struct l2t_entry *e = (struct l2t_entry *)data; struct rtentry *neigh = e->neigh; - struct toedev *dev = e->tdev; + struct t3cdev *dev = e->tdev; barrier(); if (!atomic_load_acq_int(&e->refcnt)) ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#3 (text+ko) ==== @@ -79,7 +79,7 @@ #ifndef NETEVENT #ifdef CONFIG_CHELSIO_T3_MODULE struct timer_list update_timer; - struct toedev *tdev; + struct t3cdev *tdev; #endif #endif }; @@ -92,7 +92,7 @@ struct l2t_entry l2tab[0]; }; -typedef void (*arp_failure_handler_func)(struct toedev *dev, +typedef void (*arp_failure_handler_func)(struct t3cdev *dev, struct mbuf *m); /* @@ -123,12 +123,12 @@ #define L2DATA(dev) ((dev)->l2opt) void t3_l2e_free(struct l2t_data *d, struct l2t_entry *e); -void t3_l2t_update(struct toedev *dev, struct rtentry *ifp); -struct l2t_entry *t3_l2t_get(struct toedev *dev, struct rtentry *neigh, +void t3_l2t_update(struct t3cdev *dev, struct rtentry *ifp); +struct l2t_entry *t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, unsigned int smt_idx); -int t3_l2t_send_slow(struct toedev *dev, struct mbuf *m, +int t3_l2t_send_slow(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e); -void t3_l2t_send_event(struct toedev *dev, struct l2t_entry *e); +void t3_l2t_send_event(struct t3cdev *dev, struct l2t_entry *e); struct l2t_data *t3_init_l2t(unsigned int l2t_capacity); void t3_free_l2t(struct l2t_data *d); @@ -140,9 +140,9 @@ #define l2t_proc_free(dir) #endif -int cxgb_ofld_send(struct toedev *dev, struct mbuf *m); +int cxgb_ofld_send(struct t3cdev *dev, struct mbuf *m); -static inline int l2t_send(struct toedev *dev, struct mbuf *m, +static inline int l2t_send(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e) { if (__predict_true(e->state == L2T_STATE_VALID)) ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#25 (text+ko) ==== @@ -121,7 +121,7 @@ static void touch_bars(device_t dev); #ifdef notyet -static int offload_close(struct toedev *tdev); +static int offload_close(struct t3cdev *tdev); #endif static device_method_t cxgb_controller_methods[] = { @@ -1284,7 +1284,7 @@ * after dealing with any active network taps. */ static inline int -offload_tx(struct toedev *tdev, struct mbuf *m) +offload_tx(struct t3cdev *tdev, struct mbuf *m) { int ret; @@ -1605,7 +1605,7 @@ offload_open(struct port_info *pi) { struct adapter *adapter = pi->adapter; - struct toedev *tdev = TOEDEV(pi->ifp); + struct t3cdev *tdev = T3CDEV(pi->ifp); int adap_up = adapter->open_device_map & PORT_MASK; int err = 0; @@ -1648,7 +1648,7 @@ } #ifdef notyet static int -offload_close(struct toedev *tdev) +offload_close(struct t3cdev *tdev) { struct adapter *adapter = tdev2adap(tdev); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#5 (text+ko) ==== @@ -74,7 +74,7 @@ TAILQ_HEAD(, cxgb_client) client_list; -TAILQ_HEAD(, toedev) ofld_dev_list; +TAILQ_HEAD(, t3cdev) ofld_dev_list; TAILQ_HEAD(, adapter) adapter_list; static struct mtx cxgb_db_lock; @@ -86,7 +86,7 @@ static int inited = 0; static inline int -offload_activated(struct toedev *tdev) +offload_activated(struct t3cdev *tdev) { struct adapter *adapter = tdev2adap(tdev); @@ -103,7 +103,7 @@ void cxgb_register_client(struct cxgb_client *client) { - struct toedev *tdev; + struct t3cdev *tdev; mtx_lock(&cxgb_db_lock); TAILQ_INSERT_TAIL(&client_list, client, client_entry); @@ -127,7 +127,7 @@ void cxgb_unregister_client(struct cxgb_client *client) { - struct toedev *tdev; + struct t3cdev *tdev; mtx_lock(&cxgb_db_lock); TAILQ_REMOVE(&client_list, client, client_entry); @@ -148,7 +148,7 @@ * Call backs all registered clients once a offload device is activated */ void -cxgb_add_clients(struct toedev *tdev) +cxgb_add_clients(struct t3cdev *tdev) { struct cxgb_client *client; @@ -167,7 +167,7 @@ * Call backs all registered clients once a offload device is deactivated */ void -cxgb_remove_clients(struct toedev *tdev) +cxgb_remove_clients(struct t3cdev *tdev) { struct cxgb_client *client; @@ -365,7 +365,7 @@ } static int -cxgb_offload_ctl(struct toedev *tdev, unsigned int req, void *data) +cxgb_offload_ctl(struct t3cdev *tdev, unsigned int req, void *data) { struct adapter *adapter = tdev2adap(tdev); struct tid_range *tid; @@ -463,7 +463,7 @@ * normal to get offload packets at this stage. */ static int -rx_offload_blackhole(struct toedev *dev, struct mbuf **m, int n) +rx_offload_blackhole(struct t3cdev *dev, struct mbuf **m, int n) { CH_ERR(tdev2adap(dev), "%d unexpected offload packets, first data 0x%x\n", n, *mtod(m[0], uint32_t *)); @@ -473,12 +473,12 @@ } static void -dummy_neigh_update(struct toedev *dev, struct rtentry *neigh) +dummy_neigh_update(struct t3cdev *dev, struct rtentry *neigh) { } void -cxgb_set_dummy_ops(struct toedev *dev) +cxgb_set_dummy_ops(struct t3cdev *dev) { dev->recv = rx_offload_blackhole; dev->neigh_update = dummy_neigh_update; @@ -488,7 +488,7 @@ * Free an active-open TID. */ void * -cxgb_free_atid(struct toedev *tdev, int atid) +cxgb_free_atid(struct t3cdev *tdev, int atid) { struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; union active_open_entry *p = atid2entry(t, atid); @@ -507,7 +507,7 @@ * Free a server TID and return it to the free pool. */ void -cxgb_free_stid(struct toedev *tdev, int stid) +cxgb_free_stid(struct t3cdev *tdev, int stid) { struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; union listen_entry *p = stid2entry(t, stid); @@ -520,7 +520,7 @@ } void -cxgb_insert_tid(struct toedev *tdev, struct cxgb_client *client, +cxgb_insert_tid(struct t3cdev *tdev, struct cxgb_client *client, void *ctx, unsigned int tid) { struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; @@ -548,7 +548,7 @@ t3_process_tid_release_list(void *data, int pending) { struct mbuf *m; - struct toedev *tdev = data; + struct t3cdev *tdev = data; struct toe_data *td = TOE_DATA(tdev); mtx_lock(&td->tid_release_lock); @@ -568,7 +568,7 @@ /* use ctx as a next pointer in the tid release list */ void -cxgb_queue_tid_release(struct toedev *tdev, unsigned int tid) +cxgb_queue_tid_release(struct t3cdev *tdev, unsigned int tid) { struct toe_data *td = TOE_DATA(tdev); struct toe_tid_entry *p = &td->tid_maps.tid_tab[tid]; @@ -591,7 +591,7 @@ * to the original client context. */ void -cxgb_remove_tid(struct toedev *tdev, void *ctx, unsigned int tid) +cxgb_remove_tid(struct t3cdev *tdev, void *ctx, unsigned int tid) { struct tid_info *t = &(TOE_DATA(tdev))->tid_maps; @@ -613,7 +613,7 @@ } int -cxgb_alloc_atid(struct toedev *tdev, struct cxgb_client *client, +cxgb_alloc_atid(struct t3cdev *tdev, struct cxgb_client *client, void *ctx) { int atid = -1; @@ -634,7 +634,7 @@ } int -cxgb_alloc_stid(struct toedev *tdev, struct cxgb_client *client, +cxgb_alloc_stid(struct t3cdev *tdev, struct cxgb_client *client, void *ctx) { int stid = -1; @@ -655,7 +655,7 @@ } static int -do_smt_write_rpl(struct toedev *dev, struct mbuf *m) +do_smt_write_rpl(struct t3cdev *dev, struct mbuf *m) { struct cpl_smt_write_rpl *rpl = cplhdr(m); @@ -668,7 +668,7 @@ } static int -do_l2t_write_rpl(struct toedev *dev, struct mbuf *m) +do_l2t_write_rpl(struct t3cdev *dev, struct mbuf *m) { struct cpl_l2t_write_rpl *rpl = cplhdr(m); @@ -681,7 +681,7 @@ } static int -do_act_open_rpl(struct toedev *dev, struct mbuf *m) +do_act_open_rpl(struct t3cdev *dev, struct mbuf *m) { struct cpl_act_open_rpl *rpl = cplhdr(m); unsigned int atid = G_TID(ntohl(rpl->atid)); @@ -700,7 +700,7 @@ } static int -do_stid_rpl(struct toedev *dev, struct mbuf *m) +do_stid_rpl(struct t3cdev *dev, struct mbuf *m) { union opcode_tid *p = cplhdr(m); unsigned int stid = G_TID(ntohl(p->opcode_tid)); @@ -718,7 +718,7 @@ } static int -do_hwtid_rpl(struct toedev *dev, struct mbuf *m) +do_hwtid_rpl(struct t3cdev *dev, struct mbuf *m) { union opcode_tid *p = cplhdr(m); unsigned int hwtid; @@ -743,7 +743,7 @@ } static int -do_cr(struct toedev *dev, struct mbuf *m) +do_cr(struct t3cdev *dev, struct mbuf *m) { struct cpl_pass_accept_req *req = cplhdr(m); unsigned int stid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); @@ -762,7 +762,7 @@ } static int -do_abort_req_rss(struct toedev *dev, struct mbuf *m) +do_abort_req_rss(struct t3cdev *dev, struct mbuf *m) { union opcode_tid *p = cplhdr(m); unsigned int hwtid = G_TID(ntohl(p->opcode_tid)); @@ -801,7 +801,7 @@ } static int -do_act_establish(struct toedev *dev, struct mbuf *m) +do_act_establish(struct t3cdev *dev, struct mbuf *m) { struct cpl_act_establish *req = cplhdr(m); unsigned int atid = G_PASS_OPEN_TID(ntohl(req->tos_tid)); @@ -820,7 +820,7 @@ } static int -do_set_tcb_rpl(struct toedev *dev, struct mbuf *m) +do_set_tcb_rpl(struct t3cdev *dev, struct mbuf *m) { struct cpl_set_tcb_rpl *rpl = cplhdr(m); @@ -832,7 +832,7 @@ } static int -do_trace(struct toedev *dev, struct mbuf *m) +do_trace(struct t3cdev *dev, struct mbuf *m) { #if 0 struct cpl_trace_pkt *p = cplhdr(m); @@ -848,7 +848,7 @@ } static int -do_term(struct toedev *dev, struct mbuf *m) +do_term(struct t3cdev *dev, struct mbuf *m) { unsigned int hwtid = ntohl(m_get_priority(m)) >> 8 & 0xfffff; unsigned int opcode = G_OPCODE(ntohl(m->m_pkthdr.csum_data)); @@ -1088,7 +1088,7 @@ * Process a received packet with an unknown/unexpected CPL opcode. */ static int -do_bad_cpl(struct toedev *dev, struct mbuf *m) +do_bad_cpl(struct t3cdev *dev, struct mbuf *m) { log(LOG_ERR, "%s: received bad CPL command 0x%x\n", dev->name, *mtod(m, uint32_t *)); @@ -1115,10 +1115,10 @@ } /* - * TOEDEV's receive method. + * T3CDEV's receive method. */ int -process_rx(struct toedev *dev, struct mbuf **m, int n) +process_rx(struct t3cdev *dev, struct mbuf **m, int n) { while (n--) { struct mbuf *m0 = *m++; @@ -1144,7 +1144,7 @@ * Sends an sk_buff to a T3C driver after dealing with any active network taps. */ int -cxgb_ofld_send(struct toedev *dev, struct mbuf *m) +cxgb_ofld_send(struct t3cdev *dev, struct mbuf *m) { int r; @@ -1167,7 +1167,7 @@ * it the whole array at once except when there are active taps. */ int -cxgb_ofld_recv(struct toedev *dev, struct mbuf **m, int n) +cxgb_ofld_recv(struct t3cdev *dev, struct mbuf **m, int n) { #if defined(CONFIG_CHELSIO_T3) @@ -1191,7 +1191,7 @@ { if (is_offloading(rt->rt_ifp)) { - struct toedev *tdev = TOEDEV(rt->rt_ifp); + struct t3cdev *tdev = T3CDEV(rt->rt_ifp); BUG_ON(!tdev); t3_l2t_update(tdev, rt); @@ -1199,7 +1199,7 @@ } static void -set_l2t_ix(struct toedev *tdev, u32 tid, struct l2t_entry *e) +set_l2t_ix(struct t3cdev *tdev, u32 tid, struct l2t_entry *e) { struct mbuf *m; struct cpl_set_tcb_field *req; @@ -1227,7 +1227,7 @@ { struct ifnet *olddev, *newdev; struct tid_info *ti; - struct toedev *tdev; + struct t3cdev *tdev; u32 tid; int update_tcb; struct l2t_entry *e; @@ -1242,9 +1242,9 @@ "device ignored.\n", __FUNCTION__); return; } - tdev = TOEDEV(olddev); + tdev = T3CDEV(olddev); BUG_ON(!tdev); - if (tdev != TOEDEV(newdev)) { + if (tdev != T3CDEV(newdev)) { log(LOG_WARNING, "%s: Redirect to different " "offload device ignored.\n", __FUNCTION__); return; @@ -1371,7 +1371,7 @@ int cxgb_offload_activate(struct adapter *adapter) { - struct toedev *dev = &adapter->tdev; + struct t3cdev *dev = &adapter->tdev; int natids, err; struct toe_data *t; struct tid_range stid_range, tid_range; @@ -1437,7 +1437,7 @@ void cxgb_offload_deactivate(struct adapter *adapter) { - struct toedev *tdev = &adapter->tdev; + struct t3cdev *tdev = &adapter->tdev; struct toe_data *t = TOE_DATA(tdev); remove_adapter(adapter); @@ -1455,7 +1455,7 @@ static inline void -register_tdev(struct toedev *tdev) +register_tdev(struct t3cdev *tdev) { static int unit; @@ -1466,7 +1466,7 @@ } static inline void -unregister_tdev(struct toedev *tdev) +unregister_tdev(struct t3cdev *tdev) { mtx_lock(&cxgb_db_lock); TAILQ_REMOVE(&ofld_dev_list, tdev, ofld_entry); @@ -1476,7 +1476,7 @@ void cxgb_adapter_ofld(struct adapter *adapter) { - struct toedev *tdev = &adapter->tdev; + struct t3cdev *tdev = &adapter->tdev; cxgb_set_dummy_ops(tdev); tdev->send = t3_offload_tx; @@ -1493,7 +1493,7 @@ void cxgb_adapter_unofld(struct adapter *adapter) { - struct toedev *tdev = &adapter->tdev; + struct t3cdev *tdev = &adapter->tdev; #if 0 offload_proc_dev_cleanup(tdev); offload_proc_dev_exit(tdev); @@ -1615,7 +1615,7 @@ int length, int *eof, void *data) { int len; - struct toedev *dev; + struct t3cdev *dev; struct net_device *ndev; len = sprintf(buf, "Device Interfaces\n"); @@ -1625,7 +1625,7 @@ len += sprintf(buf + len, "%-16s", dev->name); read_lock(&dev_base_lock); for (ndev = dev_base; ndev; ndev = ndev->next) { - if (TOEDEV(ndev) == dev) + if (T3CDEV(ndev) == dev) len += sprintf(buf + len, " %s", ndev->name); } read_unlock(&dev_base_lock); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#4 (text+ko) ==== @@ -38,11 +38,13 @@ #include <cxgb_config.h> #include <cxgb_l2t.h> #include <common/cxgb_tcb.h> +#include <t3cdev.h> #else #include <dev/cxgb/common/cxgb_version.h> #include <dev/cxgb/cxgb_config.h> #include <dev/cxgb/cxgb_l2t.h> #include <dev/cxgb/common/cxgb_tcb.h> +#include <dev/cxgb/t3cdev.h> #endif struct adapter; @@ -55,30 +57,30 @@ void cxgb_adapter_unofld(struct adapter *adapter); int cxgb_offload_activate(struct adapter *adapter); void cxgb_offload_deactivate(struct adapter *adapter); -int cxgb_ofld_recv(struct toedev *dev, struct mbuf **m, int n); +int cxgb_ofld_recv(struct t3cdev *dev, struct mbuf **m, int n); -void cxgb_set_dummy_ops(struct toedev *dev); +void cxgb_set_dummy_ops(struct t3cdev *dev); /* * Client registration. Users of T3 driver must register themselves. * The T3 driver will call the add function of every client for each T3 - * adapter activated, passing up the toedev ptr. Each client fills out an + * adapter activated, passing up the t3cdev ptr. Each client fills out an * array of callback functions to process CPL messages. */ void cxgb_register_client(struct cxgb_client *client); void cxgb_unregister_client(struct cxgb_client *client); -void cxgb_add_clients(struct toedev *tdev); -void cxgb_remove_clients(struct toedev *tdev); +void cxgb_add_clients(struct t3cdev *tdev); +void cxgb_remove_clients(struct t3cdev *tdev); -typedef int (*cxgb_cpl_handler_func)(struct toedev *dev, +typedef int (*cxgb_cpl_handler_func)(struct t3cdev *dev, struct mbuf *m, void *ctx); struct cxgb_client { char *name; - void (*add) (struct toedev *); - void (*remove) (struct toedev *); + void (*add) (struct t3cdev *); + void (*remove) (struct t3cdev *); cxgb_cpl_handler_func *handlers; int (*redirect)(void *ctx, struct rtentry *old, struct rtentry *new, @@ -89,17 +91,17 @@ /* * TID allocation services. */ -int cxgb_alloc_atid(struct toedev *dev, struct cxgb_client *client, +int cxgb_alloc_atid(struct t3cdev *dev, struct cxgb_client *client, void *ctx); -int cxgb_alloc_stid(struct toedev *dev, struct cxgb_client *client, +int cxgb_alloc_stid(struct t3cdev *dev, struct cxgb_client *client, void *ctx); -void *cxgb_free_atid(struct toedev *dev, int atid); -void cxgb_free_stid(struct toedev *dev, int stid); -void cxgb_insert_tid(struct toedev *dev, struct cxgb_client *client, +void *cxgb_free_atid(struct t3cdev *dev, int atid); +void cxgb_free_stid(struct t3cdev *dev, int stid); +void cxgb_insert_tid(struct t3cdev *dev, struct cxgb_client *client, void *ctx, unsigned int tid); -void cxgb_queue_tid_release(struct toedev *dev, unsigned int tid); -void cxgb_remove_tid(struct toedev *dev, void *ctx, unsigned int tid); +void cxgb_queue_tid_release(struct t3cdev *dev, unsigned int tid); +void cxgb_remove_tid(struct t3cdev *dev, void *ctx, unsigned int tid); struct toe_tid_entry { struct cxgb_client *client; @@ -123,7 +125,7 @@ CPL_RET_UNKNOWN_TID = 4 // unexpected unknown TID }; -typedef int (*cpl_handler_func)(struct toedev *dev, struct mbuf *m); +typedef int (*cpl_handler_func)(struct t3cdev *dev, struct mbuf *m); /* * Returns a pointer to the first byte of the CPL header in an sk_buff that @@ -185,7 +187,7 @@ #ifdef notyet struct list_head list_node; #endif - struct toedev *dev; + struct t3cdev *dev; unsigned int tx_max_chunk; /* max payload for TX_DATA */ unsigned int max_wrs; /* max in-flight WRs per connection */ unsigned int nmtus; @@ -198,7 +200,7 @@ }; /* - * toedev -> toe_data accessor + * t3cdev -> toe_data accessor */ #define TOE_DATA(dev) (*(struct toe_data **)&(dev)->l4opt) @@ -253,9 +255,9 @@ void cxgb_free_mem(void *addr); void cxgb_neigh_update(struct rtentry *rt); void cxgb_redirect(struct rtentry *old, struct rtentry *new); -int process_rx(struct toedev *dev, struct mbuf **m, int n); -int attach_toedev(struct toedev *dev); -void detach_toedev(struct toedev *dev); +int process_rx(struct t3cdev *dev, struct mbuf **m, int n); +int attach_t3cdev(struct t3cdev *dev); +void detach_t3cdev(struct t3cdev *dev); #endif ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#32 (text+ko) ==== @@ -2168,7 +2168,7 @@ * should be sent as regular or control, bits 1-3 select the queue set. */ int -t3_offload_tx(struct toedev *tdev, struct mbuf *m) +t3_offload_tx(struct t3cdev *tdev, struct mbuf *m) { adapter_t *adap = tdev2adap(tdev); struct sge_qset *qs = &adap->sge.qs[queue_set(m)]; @@ -2189,7 +2189,7 @@ * Delivers a (partial) bundle of Rx offload packets to an offload device. */ static __inline void -deliver_partial_bundle(struct toedev *tdev, +deliver_partial_bundle(struct t3cdev *tdev, struct sge_rspq *q, struct mbuf *mbufs[], int n) { @@ -2200,7 +2200,7 @@ } static __inline int -rx_offload(struct toedev *tdev, struct sge_rspq *rq, +rx_offload(struct t3cdev *tdev, struct sge_rspq *rq, struct mbuf *m, struct mbuf *rx_gather[], unsigned int gather_idx) { ==== //depot/projects/ethng/src/sys/dev/cxgb/ulp/toecore/toedev.h#2 (text+ko) ==== @@ -79,15 +79,8 @@ struct socket; struct mbuf; -enum toetype { - T3A = 0, - T3B -}; - struct toedev { char name[TOENAMSIZ]; /* TOE device name */ - enum toetype type; - struct adapter *adapter; unsigned int ttid; /* TOE type id */ unsigned long flags; /* device flags */ unsigned int mtu; /* max size of TX offloaded data */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710142111.l9ELBTmg041488>