Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2007 03:42:34 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 128170 for review
Message-ID:  <200710270342.l9R3gYbu029168@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128170

Change 128170 by kmacy@kmacy:storage:toestack on 2007/10/27 03:42:01

	basic infrastructure for TOE connection setup

Affected files ...

.. //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#4 edit
.. //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.h#4 edit
.. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#7 edit
.. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.h#5 edit
.. //depot/projects/toestack/sys/dev/cxgb/sys/mvec.h#5 edit
.. //depot/projects/toestack/sys/dev/cxgb/t3cdev.h#2 edit
.. //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.c#3 edit
.. //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.h#5 edit
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#1 add
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#1 add
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_listen.c#1 add
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.c#1 add
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.h#1 add
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#1 add
.. //depot/projects/toestack/sys/modules/cxgb/Makefile#8 edit
.. //depot/projects/toestack/sys/modules/cxgb/cxgb/Makefile#4 edit
.. //depot/projects/toestack/sys/modules/cxgb/toecore/Makefile#2 edit
.. //depot/projects/toestack/sys/netinet/tcp_var.h#5 edit
.. //depot/projects/toestack/sys/sys/socket.h#4 edit

Differences ...

==== //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#4 (text+ko) ====


==== //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.h#4 (text+ko) ====

@@ -108,12 +108,10 @@
 #define L2T_MBUF_CB(skb) ((struct l2t_mbuf_cb *)(skb)->cb)
 
 
-static __inline void set_arp_failure_handler(struct mbuf *m,
+static __inline void set_arp_failure_handler(struct toe_mbuf *m,
 					   arp_failure_handler_func hnd)
 {
-#if 0
-	L2T_SKB_CB(skb)->arp_failure_handler = hnd;
-#endif
+	m->m_toe.mt_arp_fail = hnd;
 	panic("implement me");
 }
 
@@ -146,8 +144,8 @@
 			   struct l2t_entry *e)
 {
 	if (__predict_true(e->state == L2T_STATE_VALID))
-		return cxgb_ofld_send(dev, m);
-	return t3_l2t_send_slow(dev, m, e);
+		return cxgb_ofld_send(dev, (struct mbuf *)m);
+	return t3_l2t_send_slow(dev, (struct mbuf *)m, e);
 }
 
 static inline void l2t_release(struct l2t_data *d, struct l2t_entry *e)

==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#7 (text+ko) ====

@@ -1641,3 +1641,4 @@
 
 #endif
 
+MODULE_VERSION(if_cxgb, 1);

==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.h#5 (text+ko) ====

@@ -256,5 +256,5 @@
 int attach_t3cdev(struct t3cdev *dev);
 void detach_t3cdev(struct t3cdev *dev);
 
-
+#define UNIMPLEMENTED() panic("IMPLEMENT: %s:%s:%d", __FUNCTION__, __FILE__, __LINE__)
 #endif

==== //depot/projects/toestack/sys/dev/cxgb/sys/mvec.h#5 (text+ko) ====

@@ -77,6 +77,7 @@
 #define MAX_MBUF_IOV        ((MHLEN-8)/sizeof(struct mbuf_iovec))
 #define MAX_MIOVEC_IOV      ((MIOVBYTES-sizeof(struct m_hdr)-sizeof(struct pkthdr)-8)/sizeof(struct mbuf_iovec))
 #define MAX_CL_IOV          ((MCLBYTES-sizeof(struct m_hdr)-sizeof(struct pkthdr)-8)/sizeof(struct mbuf_iovec))
+#define MAX_PAGE_IOV        ((MJUMPAGESIZE-sizeof(struct m_hdr)-sizeof(struct pkthdr)-8)/sizeof(struct mbuf_iovec))
 
 struct mbuf_vec {
 	uint16_t mv_first;     /* first valid cluster        */

==== //depot/projects/toestack/sys/dev/cxgb/t3cdev.h#2 (text+ko) ====

@@ -16,13 +16,13 @@
 struct t3cdev {
 	char name[T3CNAMSIZ];		    /* T3C device name */
 	enum t3ctype type;
-	TAILQ_ENTRY(t3cdev) ofld_entry;  /* for list linking */
+	TAILQ_ENTRY(t3cdev) entry;  /* for list linking */
         struct ifnet *lldev;     /* LL dev associated with T3C messages */
 	struct adapter *adapter;			    
 	int (*send)(struct t3cdev *dev, struct mbuf *m);
 	int (*recv)(struct t3cdev *dev, struct mbuf **m, int n);
 	int (*ctl)(struct t3cdev *dev, unsigned int req, void *data);
-	void (*neigh_update)(struct t3cdev *dev, struct rtentry *neigh);
+	void (*arp_update)(struct t3cdev *dev, struct rtentry *neigh);
 	void *priv;                         /* driver private data */
 	void *l2opt;                        /* optional layer 2 data */
 	void *l3opt;                        /* optional layer 3 data */

==== //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.c#3 (text+ko) ====

@@ -380,7 +380,7 @@
 }
 
 static int
-toedev_load(module_t mod, int cmd, void *arg)
+toecore_load(module_t mod, int cmd, void *arg)
 {
 	int err = 0;
 
@@ -415,9 +415,10 @@
 
 
 static moduledata_t mod_data= {
-	"toedev",
-	toedev_load,
+	"toecore",
+	toecore_load,
 	0
 };
 
-DECLARE_MODULE(toedev, mod_data, SI_SUB_EXEC, SI_ORDER_ANY);
+MODULE_VERSION(toecore, 1);
+DECLARE_MODULE(toecore, mod_data, SI_SUB_EXEC, SI_ORDER_ANY);

==== //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.h#5 (text+ko) ====

@@ -163,10 +163,13 @@
 }
 #endif /* CONFIG_TCP_OFFLOAD */
 
+struct toepcb;
 
 struct m_toe_ {
-	void             (*mt_arp_fail)(struct toedev *, struct mbuf *);
-	struct socket    *mt_so;  
+	void		(*mt_arp_fail)(struct t3cdev *, struct mbuf *);
+	void		(*mt_backlog_rcv)(struct toepcb *, struct mbuf *);
+	int 		priority;
+	struct toepcb	*mt_toepcb;  
 };
 
 #define TMLEN  (MLEN - sizeof(struct m_toe_))
@@ -186,5 +189,6 @@
 	} M_dat;
 };
 
+#define m_toe	M_dat.MH.MH_toe
 
 #endif /* _OFFLOAD_DEV_H_ */

==== //depot/projects/toestack/sys/modules/cxgb/Makefile#8 (text+ko) ====

@@ -2,5 +2,6 @@
 SUBDIR= cxgb
 SUBDIR+= iw_cxgb
 SUBDIR+= toecore
+SUBDIR+= tom
 
 .include <bsd.subdir.mk>

==== //depot/projects/toestack/sys/modules/cxgb/cxgb/Makefile#4 (text+ko) ====

@@ -7,7 +7,7 @@
 SRCS=	cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv88e1xxx.c 
 SRCS+=	cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c 
 SRCS+=  cxgb_sge.c cxgb_lro.c cxgb_offload.c cxgb_l2t.c
-SRCS+=	device_if.h bus_if.h pci_if.h opt_zero.h 
+SRCS+=	device_if.h bus_if.h pci_if.h opt_zero.h opt_sched.h
 SRCS+=	uipc_mvec.c cxgb_multiq.c cxgb_support.c
 
 CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP

==== //depot/projects/toestack/sys/modules/cxgb/toecore/Makefile#2 (text+ko) ====

@@ -3,5 +3,5 @@
 
 KMOD=	toecore
 SRCS=   toedev.c
-SRCS+=	device_if.h bus_if.h pci_if.h 
+SRCS+=	device_if.h bus_if.h pci_if.h opt_sched.h
 .include <bsd.kmod.mk>
==== //depot/projects/toestack/sys/netinet/tcp_var.h#5 (text+ko) ====

@@ -208,7 +208,7 @@
 	u_int32_t	rfbuf_ts;	/* recv buffer autoscaling timestamp */
 	int	rfbuf_cnt;		/* recv buffer autoscaling byte count */
 	struct toe_usrreqs *t_tu;       /* offload operations vector */
-	void *t_toe_priv;
+	void *t_toe;
 };
 
 #define IN_FASTRECOVERY(tp)	(tp->t_flags & TF_FASTRECOVERY)

==== //depot/projects/toestack/sys/sys/socket.h#4 (text+ko) ====

@@ -119,6 +119,7 @@
 #define	SO_BINTIME	0x2000		/* timestamp received dgram traffic */
 #endif
 #define	SO_NOOFFLOAD	0x4000		/* socket cannot be offloaded */
+#define SO_NO_DDP       0x8000
 
 /*
  * Additional options, not kept in so_options.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710270342.l9R3gYbu029168>