PERFORCE change 125367 for review
Kip Macy
kmacy at FreeBSD.org
Sun Aug 19 15:38:24 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125367
Change 125367 by kmacy at kip-macys-computer:opentoe_mbpro on 2007/08/19 22:37:32
sync changes to vendor linux tom
Affected files ...
.. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_io.c#7 edit
.. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_socket.c#5 edit
.. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_listen.c#4 edit
.. //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_tom.c#5 edit
Differences ...
==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_io.c#7 (text+ko) ====
@@ -360,12 +360,15 @@
}
static inline unsigned int
-calc_opt0l(const struct socket *so)
+calc_opt0l(struct socket *so)
{
struct tcpcb *tp = sototcpcb(so);
-
+ struct tom_data *d = TOM_DATA(TOE_DEV(sk));
+ /* PR 5138 */
+ uint32_t rcv_wnd = min(tp->rcv_wnd, (u32)d->rx_page_size * 34);
+
return V_TOS(SO_TOS(so)) | V_ULP_MODE(ULP_MODE(so)) |
- V_RCV_BUFSIZ(min(tp->rcv_wnd >> 10, (uint32_t)M_RCV_BUFSIZ));
+ V_RCV_BUFSIZ(min(rcv_wnd >> 10, (uint32_t)M_RCV_BUFSIZ));
}
static inline unsigned int
@@ -461,9 +464,6 @@
free_wr_skb(m);
}
-#define wr_queue_walk(tp, skb) \
- for (skb = peek_wr(tp); skb; skb = (struct mbuf *)skb->input_dev)
-
/*
* Returns true if an mbuf carries urgent data.
*/
@@ -502,7 +502,9 @@
(so->so_snd.sb_mb != NULL));
if (GET_TOE_FLAG(so, TX_DATA_SENT) == 0) {
- req->flags |= htonl(F_TX_INIT | V_TX_CPU_IDX(qset(so)));
+ req->flags |= htonl(V_TX_ACK_PAGES(2) | F_TX_INIT |
+ V_TX_CPU_IDX(qset(tp)));
+
req->param |= htonl((so->so_snd.sb_flags & SB_AUTOSIZE) ?
V_TX_SNDBUF(tcp_autosndbuf_max) :
V_TX_SNDBUF(so->so_cred->cr_uidinfo->ui_sbsize));
==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_cpl_socket.c#5 (text+ko) ====
@@ -95,7 +95,7 @@
* Returns true if a connection should send more data to the TOE ASAP.
*/
static inline int
-should_push(const struct socket *so)
+should_push(struct socket *so)
{
struct tcpcb *tp = sototcpcb(so);
struct toedev *dev = TOE_DEV(so);
==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_listen.c#4 (text+ko) ====
@@ -174,7 +174,8 @@
req->peer_netmask = 0;
req->opt0h = htonl(F_DELACK | F_TCAM_BYPASS);
req->opt0l = htonl(V_RCV_BUFSIZ(16));
- req->opt1 = htonl(V_CONN_POLICY(CPL_CONN_POLICY_ASK));
+ req->opt1 = htonl(V_CONN_POLICY(CPL_CONN_POLICY_ASK)|
+ V_OPT1_VLAN(0xfff));
m->m_priority = CPL_PRIORITY_LISTEN;
cxgb_ofld_send(cdev, m);
==== //depot/projects/opentoe/sys/dev/cxgb/ulp/t3_tom/t3_tom.c#5 (text+ko) ====
@@ -342,6 +342,7 @@
struct tom_data *t = TOM_DATA(dev);
struct toedev *cdev = t->cdev;
struct ddp_params ddp;
+ struct ofld_page_info rx_page_info;
int err;
mbufq_init(&t->deferq);
@@ -365,9 +366,14 @@
if (err)
return err;
+ err = cdev->ctl(cdev, GET_RX_PAGE_INFO, &rx_page_info);
+ if (err)
+ return err;
+
t->ddp_llimit = ddp.llimit;
t->ddp_ulimit = ddp.ulimit;
t->pdev = ddp.pdev;
+ t->rx_page_size = rx_page_info.page_size;
/* OK if this fails, we just can't do DDP */
t->nppods = (ddp.ulimit + 1 - ddp.llimit) / PPOD_SIZE;
More information about the p4-projects
mailing list