PERFORCE change 128759 for review

Kip Macy kmacy at FreeBSD.org
Tue Nov 6 19:42:22 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=128759

Change 128759 by kmacy at kmacy:storage:toestack on 2007/11/07 03:41:39

	add more disconnect related flags 
	add routine for allocating mbufs from cache where failure can't be handled

Affected files ...

.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_defs.h#7 edit
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.h#8 edit

Differences ...

==== //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_defs.h#7 (text+ko) ====

@@ -8,6 +8,8 @@
 #define toeptoso(toep) ((toep)->tp_tp->t_inpcb->inp_socket)
 #define sototoep(so) (sototcpcb((so))->t_toe)
 
+typedef void (*defer_handler_t)(struct toedev *dev, struct mbuf *m);
+
 void t3tom_register_cpl_handler(unsigned int opcode, cxgb_cpl_handler_func h);
 void t3_listen_start(struct toedev *dev, struct socket *so, struct t3cdev *cdev);
 void t3_listen_stop(struct toedev *dev, struct socket *so, struct t3cdev *cdev);
@@ -22,6 +24,7 @@
 
 void t3_disconnect_acceptq(struct socket *listen_so);
 void t3_reset_synq(struct socket *listen_so);
+void t3_defer_reply(struct mbuf *m, struct toedev *dev, defer_handler_t handler);
 
 void toepcb_hold(struct toepcb *);
 void toepcb_release(struct toepcb *);

==== //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.h#8 (text+ko) ====

@@ -79,6 +79,9 @@
         struct mtx ppod_map_lock;
 	
         struct adap_ports *ports;
+
+
+	struct taskqueue *tq;
 };
 
 
@@ -91,11 +94,15 @@
 #define T3C_DEV(sk) ((TOM_DATA(TOE_DEV(sk)))->cdev)
 #define TOM_TUNABLE(dev, param) (TOM_DATA(dev)->conf.param)
 
-#define TP_DATASENT          (1 << 0)
-#define TP_TX_WAIT_IDLE      (1 << 1)
-#define TP_FIN_SENT          (1 << 2)
-#define TP_ABORT_RPL_PENDING (1 << 3)
-#define TP_ABORT_SHUTDOWN    (1 << 4)
+#define TP_DATASENT         	(1 << 0)
+#define TP_TX_WAIT_IDLE      	(1 << 1)
+#define TP_FIN_SENT          	(1 << 2)
+#define TP_ABORT_RPL_PENDING 	(1 << 3)
+#define TP_ABORT_SHUTDOWN    	(1 << 4)
+#define TP_ABORT_RPL_RCVD    	(1 << 5)
+#define TP_ABORT_REQ_RCVD    	(1 << 6)
+#define TP_CLOSE_CON_REQUESTED	(1 << 7)
+
 
 struct toepcb {
 	struct toedev *tp_toedev;
@@ -167,5 +174,20 @@
 
 void t3_init_tunables(struct tom_data *t);
 
+static __inline struct mbuf *
+m_gethdr_nofail(int len)
+{
+	struct mbuf *m;
+	
+	m = m_gethdr(M_NOWAIT, MT_DATA);
+	if (m == NULL) {
+		panic("implement lowmem cache\n");
+	}
+	
+	KASSERT(len < MHLEN, ("requested header size too large for mbuf"));	
+	m->m_pkthdr.len = m->m_len = len;
+	return (m);
+}
+
 
 #endif


More information about the p4-projects mailing list