Deleted Added
full compact
cxgb_toepcb.h (174641) cxgb_toepcb.h (176472)
1
2/*-
3 * Copyright (c) 2007, Chelsio Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

--- 11 unchanged lines hidden (view full) ---

20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 *
1
2/*-
3 * Copyright (c) 2007, Chelsio Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

--- 11 unchanged lines hidden (view full) ---

20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h 174641 2007-12-16 05:27:26Z kmacy $
28 * $FreeBSD: head/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h 176472 2008-02-23 01:06:17Z kmacy $
29 */
30#ifndef CXGB_TOEPCB_H_
31#define CXGB_TOEPCB_H_
32#include <sys/bus.h>
29 */
30#ifndef CXGB_TOEPCB_H_
31#define CXGB_TOEPCB_H_
32#include <sys/bus.h>
33#include <sys/condvar.h>
33#include <dev/cxgb/sys/mbufq.h>
34
35struct toepcb {
34#include <dev/cxgb/sys/mbufq.h>
35
36struct toepcb {
36 struct toedev *tp_toedev;
37 struct l2t_entry *tp_l2t;
38 pr_ctloutput_t *tp_ctloutput;
39 unsigned int tp_tid;
40 int tp_wr_max;
41 int tp_wr_avail;
42 int tp_wr_unacked;
43 int tp_delack_mode;
44 int tp_mtu_idx;
45 int tp_ulp_mode;
46 int tp_qset_idx;
47 int tp_mss_clamp;
48 int tp_qset;
49 int tp_flags;
50 int tp_enqueued_bytes;
51 int tp_page_count;
52 int tp_state;
37 struct toedev *tp_toedev;
38 struct l2t_entry *tp_l2t;
39 pr_ctloutput_t *tp_ctloutput;
40 unsigned int tp_tid;
41 int tp_wr_max;
42 int tp_wr_avail;
43 int tp_wr_unacked;
44 int tp_delack_mode;
45 int tp_mtu_idx;
46 int tp_ulp_mode;
47 int tp_qset_idx;
48 int tp_mss_clamp;
49 int tp_qset;
50 int tp_flags;
51 int tp_enqueued_bytes;
52 int tp_page_count;
53 int tp_state;
53
54
54 tcp_seq tp_iss;
55 tcp_seq tp_delack_seq;
56 tcp_seq tp_rcv_wup;
57 tcp_seq tp_copied_seq;
58 uint64_t tp_write_seq;
55 tcp_seq tp_iss;
56 tcp_seq tp_delack_seq;
57 tcp_seq tp_rcv_wup;
58 tcp_seq tp_copied_seq;
59 uint64_t tp_write_seq;
59
60
60 volatile int tp_refcount;
61 vm_page_t *tp_pages;
61 volatile int tp_refcount;
62 vm_page_t *tp_pages;
62
63
63 struct tcpcb *tp_tp;
64 struct mbuf *tp_m_last;
65 bus_dma_tag_t tp_tx_dmat;
66 bus_dmamap_t tp_dmamap;
64 struct tcpcb *tp_tp;
65 struct mbuf *tp_m_last;
66 bus_dma_tag_t tp_tx_dmat;
67 bus_dma_tag_t tp_rx_dmat;
68 bus_dmamap_t tp_dmamap;
67
69
68 LIST_ENTRY(toepcb) synq_entry;
69 struct mbuf_head wr_list;
70 struct mbuf_head out_of_order_queue;
71 struct ddp_state tp_ddp_state;
70 LIST_ENTRY(toepcb) synq_entry;
71 struct mbuf_head wr_list;
72 struct mbuf_head out_of_order_queue;
73 struct ddp_state tp_ddp_state;
74 struct cv tp_cv;
75
72};
73
74static inline void
75reset_wr_list(struct toepcb *toep)
76{
77
78 mbufq_init(&toep->wr_list);
79}

--- 10 unchanged lines hidden (view full) ---

90static inline void
91enqueue_wr(struct toepcb *toep, struct mbuf *m)
92{
93
94 mbufq_tail(&toep->wr_list, m);
95}
96
97static inline struct mbuf *
76};
77
78static inline void
79reset_wr_list(struct toepcb *toep)
80{
81
82 mbufq_init(&toep->wr_list);
83}

--- 10 unchanged lines hidden (view full) ---

94static inline void
95enqueue_wr(struct toepcb *toep, struct mbuf *m)
96{
97
98 mbufq_tail(&toep->wr_list, m);
99}
100
101static inline struct mbuf *
98peek_wr(struct toepcb *toep)
102peek_wr(const struct toepcb *toep)
99{
100
101 return (mbufq_peek(&toep->wr_list));
102}
103
104static inline struct mbuf *
105dequeue_wr(struct toepcb *toep)
106{
107
108 return (mbufq_dequeue(&toep->wr_list));
109}
110
103{
104
105 return (mbufq_peek(&toep->wr_list));
106}
107
108static inline struct mbuf *
109dequeue_wr(struct toepcb *toep)
110{
111
112 return (mbufq_dequeue(&toep->wr_list));
113}
114
115#define wr_queue_walk(toep, m) \
116 for (m = peek_wr(toep); m; m = m->m_nextpkt)
117
118
119
111#endif
112
120#endif
121