From owner-p4-projects@FreeBSD.ORG Fri Nov 23 23:28:18 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C437216A46B; Fri, 23 Nov 2007 23:28:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8919416A420 for ; Fri, 23 Nov 2007 23:28:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA2413C442 for ; Fri, 23 Nov 2007 23:28:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lANNSIGZ039759 for ; Fri, 23 Nov 2007 23:28:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lANNSIf8039756 for perforce@freebsd.org; Fri, 23 Nov 2007 23:28:18 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 23 Nov 2007 23:28:18 GMT Message-Id: <200711232328.lANNSIf8039756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 129434 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2007 23:28:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=129434 Change 129434 by kmacy@kmacy:storage:toestack on 2007/11/23 23:27:35 add config values move toepcb to separate header Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h#1 add .. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.h#12 edit Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.h#12 (text+ko) ==== @@ -61,13 +61,12 @@ int ddp_copy_limit; // capacity of kernel DDP buffer int ddp_push_wait; // whether blocking DDP waits for PSH flag int ddp_rcvcoalesce; // whether receive coalescing is enabled -#if defined(CONFIG_T3_ZCOPY_SENDMSG) || defined(CONFIG_T3_ZCOPY_SENDMSG_MODULE) - int zcopy_sendmsg_partial_thres; // < is never zcopied - int zcopy_sendmsg_partial_copy; // bytes copied in partial zcopy - int zcopy_sendmsg_thres;// >= are mostly zcopied - int zcopy_sendmsg_copy; // bytes coped in zcopied - int zcopy_sendmsg_ret_pending_dma;// pot. return while pending DMA -#endif + int zcopy_sosend_enabled; // < is never zcopied + int zcopy_sosend_partial_thres; // < is never zcopied + int zcopy_sosend_partial_copy; // bytes copied in partial zcopy + int zcopy_sosend_thres;// >= are mostly zcopied + int zcopy_sosend_copy; // bytes coped in zcopied + int zcopy_sosend_ret_pending_dma;// pot. return while pending DMA int activated; // TOE engine activation state }; @@ -97,10 +96,8 @@ struct mtx tid_release_lock; struct task tid_release_task; -#if defined(CONFIG_T3_ZCOPY_SENDMSG) || defined(CONFIG_T3_ZCOPY_SENDMSG_MODULE) - atomic_t tx_dma_pending; -#endif - + volatile int tx_dma_pending; + unsigned int ddp_llimit; unsigned int ddp_ulimit; @@ -137,75 +134,6 @@ #define TP_CLOSE_CON_REQUESTED (1 << 7) #define TP_SYN_RCVD (1 << 8) -struct toepcb { - struct toedev *tp_toedev; - struct l2t_entry *tp_l2t; - pr_ctloutput_t *tp_ctloutput; - int tp_tid; - int tp_wr_max; - int tp_wr_avail; - int tp_wr_unacked; - int tp_delack_mode; - int tp_mtu_idx; - int tp_ulp_mode; - int tp_qset_idx; - int tp_mss_clamp; - int tp_qset; - int tp_flags; - int tp_enqueued_bytes; - tcp_seq tp_iss; - tcp_seq tp_delack_seq; - tcp_seq tp_rcv_wup; - tcp_seq tp_copied_seq; - uint64_t tp_write_seq; - - volatile int tp_refcount; - - struct tcpcb *tp_tp; - struct mbuf *tp_m_last; - - struct mbuf_head wr_list; - struct mbuf_head out_of_order_queue; -}; - -static inline void reset_wr_list(struct tcpcb *tp) -{ - struct toepcb *toep = tp->t_toe; - - mbufq_init(&toep->wr_list); -} - -static inline void purge_wr_queue(struct tcpcb *tp) -{ - struct toepcb *toep = tp->t_toe; - struct mbuf *m; - - while ((m = mbufq_dequeue(&toep->wr_list)) != NULL) - m_freem(m); -} - -static inline void enqueue_wr(struct tcpcb *tp, struct mbuf *m) -{ - struct toepcb *toep = tp->t_toe; - - mbufq_tail(&toep->wr_list, m); -} - - -static inline struct mbuf *peek_wr(struct tcpcb *tp) -{ - struct toepcb *toep = tp->t_toe; - - return mbufq_peek(&toep->wr_list); -} - -static inline struct mbuf *dequeue_wr(struct tcpcb *tp) -{ - struct toepcb *toep = tp->t_toe; - - return mbufq_dequeue(&toep->wr_list); -} - void t3_init_tunables(struct tom_data *t); static __inline struct mbuf *