summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/ulp
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-07-21 01:23:19 +0000
committerkmacy <kmacy@FreeBSD.org>2008-07-21 01:23:19 +0000
commita6eb23b528a0042a3dd002387d0648df218935a0 (patch)
treeb645ad8d84aa1e6d26d9aa4745cb80210973e1d4 /sys/dev/cxgb/ulp
parent565bc001a58e180375c810cb3401b67fd051972d (diff)
downloadFreeBSD-src-a6eb23b528a0042a3dd002387d0648df218935a0.zip
FreeBSD-src-a6eb23b528a0042a3dd002387d0648df218935a0.tar.gz
remove cxgb local definitions of socket accessor functions
Diffstat (limited to 'sys/dev/cxgb/ulp')
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c27
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c201
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h40
3 files changed, 18 insertions, 250 deletions
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
index 3ca0a52..5bf63fa 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
@@ -414,13 +414,18 @@ t3_push_frames(struct socket *so, int req_completion)
snd->sb_sndptroff += bytes;
total_bytes += bytes;
toep->tp_write_seq += bytes;
- CTR6(KTR_TOM, "t3_push_frames: wr_avail=%d mbuf_wrs[%d]=%d tail=%p sndptr=%p sndptroff=%d",
- toep->tp_wr_avail, count, mbuf_wrs[count], tail, snd->sb_sndptr, snd->sb_sndptroff);
+ CTR6(KTR_TOM, "t3_push_frames: wr_avail=%d mbuf_wrs[%d]=%d"
+ " tail=%p sndptr=%p sndptroff=%d",
+ toep->tp_wr_avail, count, mbuf_wrs[count],
+ tail, snd->sb_sndptr, snd->sb_sndptroff);
if (tail)
- CTR4(KTR_TOM, "t3_push_frames: total_bytes=%d tp_m_last=%p tailbuf=%p snd_una=0x%08x",
- total_bytes, toep->tp_m_last, tail->m_data, tp->snd_una);
+ CTR4(KTR_TOM, "t3_push_frames: total_bytes=%d"
+ " tp_m_last=%p tailbuf=%p snd_una=0x%08x",
+ total_bytes, toep->tp_m_last, tail->m_data,
+ tp->snd_una);
else
- CTR3(KTR_TOM, "t3_push_frames: total_bytes=%d tp_m_last=%p snd_una=0x%08x",
+ CTR3(KTR_TOM, "t3_push_frames: total_bytes=%d"
+ " tp_m_last=%p snd_una=0x%08x",
total_bytes, toep->tp_m_last, tp->snd_una);
@@ -432,14 +437,18 @@ t3_push_frames(struct socket *so, int req_completion)
while (i < count && m_get_sgllen(m0)) {
if ((count - i) >= 3) {
CTR6(KTR_TOM,
- "t3_push_frames: pa=0x%zx len=%d pa=0x%zx len=%d pa=0x%zx len=%d",
- segs[i].ds_addr, segs[i].ds_len, segs[i + 1].ds_addr, segs[i + 1].ds_len,
+ "t3_push_frames: pa=0x%zx len=%d pa=0x%zx"
+ " len=%d pa=0x%zx len=%d",
+ segs[i].ds_addr, segs[i].ds_len,
+ segs[i + 1].ds_addr, segs[i + 1].ds_len,
segs[i + 2].ds_addr, segs[i + 2].ds_len);
i += 3;
} else if ((count - i) == 2) {
CTR4(KTR_TOM,
- "t3_push_frames: pa=0x%zx len=%d pa=0x%zx len=%d",
- segs[i].ds_addr, segs[i].ds_len, segs[i + 1].ds_addr, segs[i + 1].ds_len);
+ "t3_push_frames: pa=0x%zx len=%d pa=0x%zx"
+ " len=%d",
+ segs[i].ds_addr, segs[i].ds_len,
+ segs[i + 1].ds_addr, segs[i + 1].ds_len);
i += 2;
} else {
CTR2(KTR_TOM, "t3_push_frames: pa=0x%zx len=%d",
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c b/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c
index 1d96842..edc9fea 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c
@@ -118,207 +118,6 @@ tcp_offload_drop(struct tcpcb *tp, int error)
}
void
-inp_apply_all(void (*func)(struct inpcb *, void *), void *arg)
-{
- struct inpcb *inp;
-
- INP_INFO_RLOCK(&tcbinfo);
- LIST_FOREACH(inp, tcbinfo.ipi_listhead, inp_list) {
- INP_WLOCK(inp);
- func(inp, arg);
- INP_WUNLOCK(inp);
- }
- INP_INFO_RUNLOCK(&tcbinfo);
-}
-
-struct socket *
-inp_inpcbtosocket(struct inpcb *inp)
-{
-
- INP_WLOCK_ASSERT(inp);
- return (inp->inp_socket);
-}
-
-struct tcpcb *
-inp_inpcbtotcpcb(struct inpcb *inp)
-{
-
- INP_WLOCK_ASSERT(inp);
- return ((struct tcpcb *)inp->inp_ppcb);
-}
-
-int
-inp_ip_tos_get(const struct inpcb *inp)
-{
-
- return (inp->inp_ip_tos);
-}
-
-void
-inp_ip_tos_set(struct inpcb *inp, int val)
-{
-
- inp->inp_ip_tos = val;
-}
-
-void
-inp_4tuple_get(const struct inpcb *inp, uint32_t *laddr, uint16_t *lp, uint32_t *faddr, uint16_t *fp)
-{
-
- memcpy(laddr, &inp->inp_laddr, 4);
- memcpy(faddr, &inp->inp_faddr, 4);
-
- *lp = inp->inp_lport;
- *fp = inp->inp_fport;
-}
-
-void
-so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg)
-{
-
- TAILQ_FOREACH(so, &so->so_comp, so_list)
- func(so, arg);
-}
-
-struct tcpcb *
-so_sototcpcb(struct socket *so)
-{
-
- return (sototcpcb(so));
-}
-
-struct inpcb *
-so_sotoinpcb(struct socket *so)
-{
-
- return (sotoinpcb(so));
-}
-
-struct sockbuf *
-so_sockbuf_rcv(struct socket *so)
-{
-
- return (&so->so_rcv);
-}
-
-struct sockbuf *
-so_sockbuf_snd(struct socket *so)
-{
-
- return (&so->so_snd);
-}
-
-int
-so_state_get(const struct socket *so)
-{
-
- return (so->so_state);
-}
-
-void
-so_state_set(struct socket *so, int val)
-{
-
- so->so_state = val;
-}
-
-int
-so_options_get(const struct socket *so)
-{
-
- return (so->so_options);
-}
-
-void
-so_options_set(struct socket *so, int val)
-{
-
- so->so_options = val;
-}
-
-int
-so_error_get(const struct socket *so)
-{
-
- return (so->so_error);
-}
-
-void
-so_error_set(struct socket *so, int val)
-{
-
- so->so_error = val;
-}
-
-int
-so_linger_get(const struct socket *so)
-{
-
- return (so->so_linger);
-}
-
-void
-so_linger_set(struct socket *so, int val)
-{
-
- so->so_linger = val;
-}
-
-struct protosw *
-so_protosw_get(const struct socket *so)
-{
-
- return (so->so_proto);
-}
-
-void
-so_protosw_set(struct socket *so, struct protosw *val)
-{
-
- so->so_proto = val;
-}
-
-void
-so_sorwakeup(struct socket *so)
-{
-
- sorwakeup(so);
-}
-
-void
-so_sowwakeup(struct socket *so)
-{
-
- sowwakeup(so);
-}
-
-void
-so_sorwakeup_locked(struct socket *so)
-{
-
- sorwakeup_locked(so);
-}
-
-void
-so_sowwakeup_locked(struct socket *so)
-{
-
- sowwakeup_locked(so);
-}
-
-void
-so_lock(struct socket *so)
-{
- SOCK_LOCK(so);
-}
-
-void
-so_unlock(struct socket *so)
-{
- SOCK_UNLOCK(so);
-}
-
-void
sockbuf_lock(struct sockbuf *sb)
{
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h b/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h
index 66dff93..3e833b0 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h
+++ b/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h
@@ -12,46 +12,6 @@ void tcp_offload_twstart_disconnect(struct tcpcb *tp);
struct tcpcb *tcp_offload_close(struct tcpcb *tp);
struct tcpcb *tcp_offload_drop(struct tcpcb *tp, int error);
-void inp_apply_all(void (*func)(struct inpcb *, void *), void *arg);
-struct socket *inp_inpcbtosocket(struct inpcb *inp);
-struct tcpcb *inp_inpcbtotcpcb(struct inpcb *inp);
-
-int inp_ip_tos_get(const struct inpcb *);
-void inp_ip_tos_set(struct inpcb *, int);
-void inp_4tuple_get(const struct inpcb *inp, uint32_t *, uint16_t *, uint32_t *, uint16_t *);
-
-struct tcpcb *so_sototcpcb(struct socket *so);
-struct inpcb *so_sotoinpcb(struct socket *so);
-struct sockbuf *so_sockbuf_snd(struct socket *);
-struct sockbuf *so_sockbuf_rcv(struct socket *);
-
-int so_state_get(const struct socket *);
-void so_state_set(struct socket *, int);
-
-int so_options_get(const struct socket *);
-void so_options_set(struct socket *, int);
-
-int so_error_get(const struct socket *);
-void so_error_set(struct socket *, int);
-
-int so_linger_get(const struct socket *);
-void so_linger_set(struct socket *, int);
-
-struct protosw *so_protosw_get(const struct socket *);
-void so_protosw_set(struct socket *, struct protosw *);
-
-void so_sorwakeup_locked(struct socket *so);
-void so_sowwakeup_locked(struct socket *so);
-
-void so_sorwakeup(struct socket *so);
-void so_sowwakeup(struct socket *so);
-
-void so_lock(struct socket *so);
-void so_unlock(struct socket *so);
-
-void so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg);
-
-
void sockbuf_lock(struct sockbuf *);
void sockbuf_lock_assert(struct sockbuf *);
void sockbuf_unlock(struct sockbuf *);
OpenPOWER on IntegriCloud